Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistence matrix module #669

Merged
merged 156 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
e9f962e
initialization
hschreiber Jun 22, 2022
0183294
initialization
hschreiber Jun 22, 2022
9a9f9d2
options
hschreiber Jun 24, 2022
4097390
options
hschreiber Jun 28, 2022
b78092f
options
hschreiber Jun 29, 2022
33f866d
base matrix
hschreiber Jul 1, 2022
dcde95a
matrices
hschreiber Jul 6, 2022
cc39397
matrices
hschreiber Jul 8, 2022
9a4fb46
matrices
hschreiber Jul 11, 2022
f04174c
matrices
hschreiber Jul 12, 2022
7172a77
debug
hschreiber Jul 13, 2022
e006851
debug compilation
hschreiber Jul 18, 2022
e956f40
cleanup
hschreiber Jul 19, 2022
8c5f2e3
compilation error correction + simple compilation test in examples
hschreiber Aug 9, 2022
7dfe4c2
Merge branch 'GUDHI:master' into persistence_matrix
hschreiber Aug 11, 2022
94f5932
Merge branch 'GUDHI:master' into persistence_matrix
hschreiber Aug 23, 2022
be3e43d
fixed shadowing names
hschreiber Sep 8, 2022
5cf74ff
made optional method accessible + skeleton of overlay classes
hschreiber Sep 15, 2022
ddb1fc6
overlay for indexation
hschreiber Sep 20, 2022
5ea389f
unit test for field classes and common methods of matrices
hschreiber Sep 26, 2022
0edbec4
unit test for specialized matrix methods
hschreiber Oct 6, 2022
af6f889
deleting temporary compilation test
hschreiber Oct 6, 2022
bebe370
Merge branch 'GUDHI:master' into persistence_matrix
hschreiber Oct 12, 2022
b08b513
Merge branch 'persistence_matrix' of github.com:hschreiber/gudhi-deve…
hschreiber Oct 12, 2022
f9b65e2
Merge branch 'GUDHI:master' into persistence_matrix
hschreiber Oct 18, 2022
46c9125
Merge branch 'GUDHI:master' into persistence_matrix
hschreiber Oct 18, 2022
6b0dc90
Merge branch 'persistence_matrix' of github.com:hschreiber/gudhi-deve…
hschreiber Oct 18, 2022
3390def
hide friends and correction of swap calls
hschreiber Oct 19, 2022
0b6e5cc
Merge branch 'GUDHI:master' into persistence_matrix
hschreiber Oct 19, 2022
5b5cecd
addition of const keyword when possible
hschreiber Oct 20, 2022
c357fd3
removal of unnecessary at() and correction of template lock for row c…
hschreiber Nov 8, 2022
2067468
Merge branch 'GUDHI:master' into persistence_matrix
hschreiber Nov 8, 2022
b31b890
columns unit tests
hschreiber Nov 15, 2022
855989d
Merge branch 'GUDHI:master' into persistence_matrix
hschreiber Dec 20, 2022
edd19bb
reorganisation of columns to fit row access + chain matrices without …
hschreiber Dec 21, 2022
7b609af
boundary matrix with row access
hschreiber Jan 3, 2023
6213cdd
add reverse iterator to columns
hschreiber Jan 4, 2023
e0afba3
add column compression + bug fix
hschreiber Jan 23, 2023
e1242d0
Merge branch 'GUDHI:master' into persistence_matrix
hschreiber Jan 23, 2023
8fc37b6
compressed columns, adapting to cohomology + multi fields
hschreiber Feb 9, 2023
cf4d5f2
Merge branch 'GUDHI:master' into persistence_matrix
hschreiber May 10, 2023
52c84a5
compression fixes
hschreiber May 12, 2023
f168500
Merge branch 'persistence_matrix' of github.com:hschreiber/gudhi-deve…
hschreiber May 12, 2023
e61aa09
wrong file removed
hschreiber May 15, 2023
24bcef9
Merge branch 'GUDHI:master' into zigzag_persistence
hschreiber May 30, 2023
5409368
cleanup maria's version
hschreiber May 30, 2023
ea0f4ce
cleanup maria's version
hschreiber May 30, 2023
14c9375
Merge branch 'zigzag_persistence' of github.com:hschreiber/gudhi-deve…
hschreiber May 30, 2023
2d50466
add unit tests
hschreiber Jun 14, 2023
b49007d
Merge branch 'GUDHI:master' into persistence_matrix
hschreiber Jun 16, 2023
09ba636
comparision tests
hschreiber Jun 19, 2023
8d81c1d
merge with persistence matrix
hschreiber Jun 27, 2023
beea4c7
benchmark tests
hschreiber Jun 30, 2023
94307f3
small optimizations
hschreiber Jul 13, 2023
44d92ca
Merge branch 'GUDHI:master' into persistence_matrix
hschreiber Jul 13, 2023
99d01e5
merge last gudhi-devel version
hschreiber Jul 13, 2023
5f22c97
Merge remote-tracking branch 'origin/simplex_tree_zigzag_option' into…
hschreiber Jul 13, 2023
2c28d31
Merge remote-tracking branch 'origin/zigzag_persistence' into persist…
hschreiber Jul 13, 2023
a1c4cf9
removal of unnecessary files from last merge
hschreiber Jul 13, 2023
1cb32c4
corrections after merge
hschreiber Jul 17, 2023
4ea35f7
return essential cycles instead of passing by argument for chain matr…
hschreiber Jul 18, 2023
52401ad
include fix
hschreiber Jul 25, 2023
8efbe4f
Merge branch 'GUDHI:master' into persistence_matrix
hschreiber Aug 4, 2023
a361c93
rollback of simplex tree after merge
hschreiber Aug 21, 2023
fe5bac6
Merge branch 'GUDHI:master' into persistence_matrix
hschreiber Aug 21, 2023
a807dbb
Merge branch 'GUDHI:master' into persistence_matrix
hschreiber Aug 22, 2023
cb77fef
Merge branch 'GUDHI:master' into persistence_matrix
hschreiber Sep 1, 2023
a0cdfea
factorization of base, boundary matrices
hschreiber Sep 8, 2023
8745194
RU factorization
hschreiber Sep 11, 2023
0e2086b
factorization of chain matrices
hschreiber Sep 13, 2023
6408c8e
cell factorization
hschreiber Sep 14, 2023
cc168c2
small cleanups and revamp of column row access
hschreiber Sep 14, 2023
bd9234d
removal of child pointer + factorization of intrusive list column
hschreiber Sep 28, 2023
76fc0ba
factorized intrusive set, set and list column
hschreiber Oct 3, 2023
97cc289
factorize unordered_set and vector columns
hschreiber Oct 4, 2023
5e3a5fe
factorization of heap column + make it work for Zp
hschreiber Oct 5, 2023
03a35dd
clean up
hschreiber Oct 5, 2023
f575b7a
move overlays
hschreiber Oct 6, 2023
06a9a19
clean up
hschreiber Oct 6, 2023
bcbcd78
clean up
hschreiber Oct 6, 2023
71041a1
Merge branch 'GUDHI:master' into persistence_matrix
hschreiber Oct 6, 2023
4f3ad65
clean up
hschreiber Oct 6, 2023
07c193d
clean up
hschreiber Oct 6, 2023
080b848
fixes
hschreiber Nov 3, 2023
03c8c7a
updated unit tests v1 (compilation time has to be shortened)
hschreiber Nov 8, 2023
16d271e
Merge branch 'GUDHI:master' into persistence_matrix
hschreiber Nov 8, 2023
840a6e7
file rename fix
hschreiber Nov 8, 2023
2ddf03e
small compile fixes
hschreiber Nov 9, 2023
8817950
unit tests v2 (still not definitive, some tests are still too long, b…
hschreiber Nov 21, 2023
750da6e
add possibility to give dimension for insert_boundary in case of a ce…
hschreiber Nov 24, 2023
e3bef46
Merge branch 'GUDHI:master' into persistence_matrix
hschreiber Nov 24, 2023
d02e1ce
RU vine fix
hschreiber Dec 6, 2023
cf880bf
chain swap bug fix
hschreiber Jan 2, 2024
499972c
small fixes
hschreiber Jan 15, 2024
865e396
Merge branch 'GUDHI:master' into persistence_matrix
hschreiber Feb 16, 2024
a6aace5
fix for removal and indexation
hschreiber Feb 19, 2024
c25ca91
adaptation of the indexation options. But now, unit tests for id chai…
hschreiber Feb 19, 2024
e39f82e
change of zp operators such that the matrices do not have to share th…
hschreiber Feb 23, 2024
b63a801
small fixes
hschreiber Feb 29, 2024
58d019b
pushing up cell constructor to matrix level instead of static in columns
hschreiber Mar 4, 2024
5394c26
small fixes and faster barcodes for boundary matrix
hschreiber Mar 5, 2024
bd7652e
boundary reduction
hschreiber Mar 7, 2024
01e8597
doc
hschreiber Mar 8, 2024
6a2d218
small bug fix
hschreiber Mar 27, 2024
2f79f29
doc
hschreiber Mar 27, 2024
65bf22b
doc
hschreiber Apr 2, 2024
6f54642
doc
hschreiber Apr 3, 2024
353929a
doc
hschreiber Apr 4, 2024
65aa77b
doc
hschreiber Apr 5, 2024
cd1b83a
compilation fix for heap_column
hschreiber Apr 8, 2024
1a9349f
doc
hschreiber Apr 10, 2024
cf41344
doc
hschreiber Apr 10, 2024
016889a
doc + warning fix
hschreiber Apr 11, 2024
1f90ba0
doc
hschreiber Apr 12, 2024
308b3a9
doc
hschreiber Apr 15, 2024
e05b106
doc + revisting fields
hschreiber Apr 17, 2024
86b46a2
Merge branch 'GUDHI:master' into persistence_matrix
hschreiber Apr 17, 2024
c278d12
examples
hschreiber Apr 18, 2024
9a64c20
change pointer to std::function to store also lambda function in chai…
hschreiber Apr 18, 2024
aca2e02
vineyard fix
hschreiber Apr 19, 2024
c82ec26
std::unordered_set to boost unordered set
hschreiber May 16, 2024
8305da1
reworking of submatrix and column interfaces to allow better specific…
hschreiber May 21, 2024
02f6697
Merge branch 'GUDHI:master' into persistence_matrix
hschreiber May 22, 2024
a95f33d
small fixes for Unordered_set_column
hschreiber May 22, 2024
3e51f8e
merge with upstream gudhi-devel
hschreiber May 27, 2024
9d91ea5
change of == operator for unordered set columns
hschreiber May 27, 2024
b8d6c3d
doc fix + change of multiply_and_add method name to separate the two …
hschreiber May 27, 2024
07efd10
doc fix + small fixes in heap and vector column
hschreiber May 27, 2024
6299b92
replacing field operations with inplace operations
hschreiber May 28, 2024
3a006fa
change of addition strategy in Unordered_set_column
hschreiber May 29, 2024
1833eac
Merge branch 'GUDHI:master' into persistence_matrix
hschreiber May 29, 2024
f998d70
correction of hash method for Unordered_set_column
hschreiber May 30, 2024
45376f6
rename erase_row to erase_empty_row
hschreiber May 30, 2024
3773d2c
replaces assert with GUDHI_CHECK
hschreiber May 30, 2024
f64342e
Doc update for examples
hschreiber Jun 3, 2024
a86f72e
small changes
hschreiber Jun 3, 2024
abb93a6
few optimisations for zp
hschreiber Jun 5, 2024
55d17e5
factorization for better readability
hschreiber Jun 12, 2024
5bf1b6d
correction for column hash method
hschreiber Jun 12, 2024
f131e31
heap hash method correction
hschreiber Jun 12, 2024
6e886a3
doc correction
hschreiber Jun 12, 2024
c207e6e
change of default dummy value for field characteristic and simplifica…
hschreiber Jun 12, 2024
8b10f70
change of heap column == and > operators
hschreiber Jun 13, 2024
d3dc1b4
test cleanup
hschreiber Jun 13, 2024
2249aca
fix CI compilation problem?
hschreiber Jun 13, 2024
1cbec06
reduces default unit tests to less than 30s each
hschreiber Jun 13, 2024
28ef360
include multifields only when gmpxx gound
hschreiber Jun 14, 2024
79d2172
reduces the number of unit tests done for the matrices by default
hschreiber Jun 14, 2024
0c8e7f5
fix CI compilation problem?
hschreiber Jun 14, 2024
b9424b7
fix is_non_zero()
hschreiber Jun 14, 2024
cfee83d
fix gmp link error
hschreiber Jun 14, 2024
d802887
fix memory leaks in heap_column
hschreiber Jun 17, 2024
8d77ab7
Merge branch 'GUDHI:master' into persistence_matrix
hschreiber Jun 17, 2024
656c70c
fix windows compilation and test error
hschreiber Jun 19, 2024
a971ddd
Merge branch 'GUDHI:master' into persistence_matrix
hschreiber Jun 20, 2024
b2adaeb
Rollback merge issue with submodule
VincentRouvreau Jun 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ add_gudhi_module(Tangential_complex)
add_gudhi_module(Toplex_map)
add_gudhi_module(Witness_complex)
add_gudhi_module(Nerve_GIC)
add_gudhi_module(Persistence_matrix)

# Include module CMake subdirectories
# GUDHI_SUB_DIRECTORIES is managed in CMAKE_MODULE_PATH/GUDHI_modules.cmake
Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ add_gudhi_module(Tangential_complex)
add_gudhi_module(Toplex_map)
add_gudhi_module(Witness_complex)
add_gudhi_module(Nerve_GIC)
add_gudhi_module(Persistence_matrix)

# For "make doxygen" - Requires GUDHI_USER_VERSION_DIR to be set
set(GUDHI_USER_VERSION_DIR ${CMAKE_SOURCE_DIR})
Expand Down
6 changes: 6 additions & 0 deletions src/Persistence_matrix/example/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
project(Matrix_examples)

set(CMAKE_CXX_STANDARD 17)

add_executable(Matrix_examples_test comp_test.cpp)
add_test(NAME Matrix_examples_test COMMAND $<TARGET_FILE:Matrix_examples_test>)
345 changes: 345 additions & 0 deletions src/Persistence_matrix/example/comp_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,345 @@
/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT.
* See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details.
* Author(s): Hannah Schreiber
*
* Copyright (C) 2022 Inria
*
* Modification(s):
* - YYYY/MM Author: Description of the modification
*/

#include <iostream>
#include <random>
#include <vector>
#include <utility>

#include "gudhi/matrix.h"
#include "gudhi/options.h"
#include "gudhi/utilities/Z2_field.h"
#include "gudhi/utilities/Zp_field.h"
#include "gudhi/utilities/utilities.h"

using Gudhi::persistence_matrix::Z2_field_element;
using Gudhi::persistence_matrix::Zp_field_element;
using Gudhi::persistence_matrix::Matrix;
using Gudhi::persistence_matrix::Representative_cycles_options;
using Gudhi::persistence_matrix::Default_options;
using Gudhi::persistence_matrix::Zigzag_options;
using Gudhi::persistence_matrix::Multi_persistence_options;
using Gudhi::persistence_matrix::Cohomology_persistence_options;
using Gudhi::persistence_matrix::Column_types;
using Gudhi::persistence_matrix::Bar;

using boundary_type = std::vector<unsigned int>;
template<class Field_type = Zp_field_element<5> >
using field_boundary_type = std::vector<std::pair<unsigned int,Field_type> >;

template<Column_types column_type = Column_types::SET, bool separated_by_dimension = false, bool parallelizable = false>
struct test_options1 : Default_options<Z2_field_element, column_type, separated_by_dimension, parallelizable>{
static const bool has_column_pairings = true;
static const bool has_vine_update = true;
};

template<Column_types column_type = Column_types::SET, bool separated_by_dimension = false, bool parallelizable = false>
struct test_options2 : Default_options<Z2_field_element, column_type, separated_by_dimension, parallelizable>{
static const bool has_row_access = true;
static const bool has_column_pairings = true;
static const bool has_vine_update = true;
static const bool is_of_boundary_type = false;
static const bool has_removable_columns = true;
static const bool is_indexed_by_position = true;
};

template<class Matrix_type>
void test_comp_zp(Matrix_type m)
{
std::vector<field_boundary_type<> > ob;
field_boundary_type<> fb;

m.insert_boundary(fb);
m.get_column(0);
m.get_max_dimension();
m.get_number_of_columns();
m.get_column_dimension(0);
m.add_to(0, 1);
m.is_zero_cell(0, 0);
m.is_zero_column(0);
m.get_pivot(0);
swap(m, m);
m.print();
m = Matrix_type(ob);
}

template<class Matrix_type>
void test_comp_z2(Matrix_type m)
{
std::vector<boundary_type> ob;
boundary_type fb;

m.insert_boundary(fb);
m.get_column(0);
m.get_max_dimension();
m.get_number_of_columns();
m.get_column_dimension(0);
m.add_to(0, 1);
m.is_zero_cell(0, 0);
m.is_zero_column(0);
m.get_pivot(0);
swap(m, m);
m.print();
m = Matrix_type(ob);
}

int main(int argc, char* const argv[]) {
Zp_field_element<5> f(3);
Zp_field_element<5> f2(7);

std::clog << "== : " << (f == f2) << " " << (f == 3u) << " " << (f2 == 3u) << " " << (f == 7u) << "\n";

std::clog << "+ : " << (f + f2) << " " << (f + 3u) << " " << (f2 + 3u) << " " << (7u + f) << "\n";
std::clog << "- : " << (f - f2) << " " << (f - 3u) << " " << (f2 - 3u) << " " << (7u - f) << "\n";
std::clog << "* : " << (f * f2) << " " << (f * 3u) << " " << (f2 * 3u) << " " << (7u * f) << "\n";

f += f2;
f2 += 3u;

std::clog << "+= : " << f << " " << f2 << "\n";

unsigned int a = 3;

a = f;
std::clog << "= : " << f << " " << a << "\n";

std::vector<boundary_type> orderedBoundaries1;
boundary_type b;
orderedBoundaries1.emplace_back();
orderedBoundaries1.emplace_back();
orderedBoundaries1.emplace_back();
orderedBoundaries1.push_back(boundary_type{0,1});
orderedBoundaries1.push_back(boundary_type{1,2});

std::vector<field_boundary_type<> > orderedBoundaries2;
field_boundary_type<> fb;
std::pair<unsigned int,Zp_field_element<5>> p;
orderedBoundaries2.emplace_back();
orderedBoundaries2.emplace_back();
orderedBoundaries2.emplace_back();
orderedBoundaries2.push_back(field_boundary_type<>{{0,3},{1,2}});
orderedBoundaries2.push_back(field_boundary_type<>{{1,3},{2,2}});

Matrix<Representative_cycles_options<Zp_field_element<5> > > m1(orderedBoundaries2);
Matrix<Representative_cycles_options<Zp_field_element<2> > > m2(orderedBoundaries1);
Matrix<Representative_cycles_options<Zp_field_element<5>,Column_types::LIST> > m3(orderedBoundaries2);
Matrix<Representative_cycles_options<Zp_field_element<2>,Column_types::LIST> > m4(orderedBoundaries1);
Matrix<Representative_cycles_options<Zp_field_element<5>,Column_types::UNORDERED_SET> > m5(orderedBoundaries2);
Matrix<Representative_cycles_options<Zp_field_element<2>,Column_types::UNORDERED_SET> > m6(orderedBoundaries1);
Matrix<Representative_cycles_options<Zp_field_element<5>,Column_types::VECTOR> > m7(orderedBoundaries2);
Matrix<Representative_cycles_options<Zp_field_element<2>,Column_types::VECTOR> > m8(orderedBoundaries1);
Matrix<Representative_cycles_options<Zp_field_element<2>,Column_types::HEAP> > m10(orderedBoundaries1);

Matrix<Default_options<Zp_field_element<5> > > m11(orderedBoundaries2);
Matrix<Default_options<Zp_field_element<2> > > m12(orderedBoundaries1);
Matrix<Default_options<Zp_field_element<5>,Column_types::LIST> > m13(orderedBoundaries2);
Matrix<Default_options<Zp_field_element<2>,Column_types::LIST> > m14(orderedBoundaries1);
Matrix<Default_options<Zp_field_element<5>,Column_types::UNORDERED_SET> > m15(orderedBoundaries2);
Matrix<Default_options<Zp_field_element<2>,Column_types::UNORDERED_SET> > m16(orderedBoundaries1);
Matrix<Default_options<Zp_field_element<5>,Column_types::VECTOR> > m17(orderedBoundaries2);
Matrix<Default_options<Zp_field_element<2>,Column_types::VECTOR> > m18(orderedBoundaries1);
Matrix<Default_options<Zp_field_element<2>,Column_types::HEAP> > m20(orderedBoundaries1);

Matrix<Multi_persistence_options<> > m21(orderedBoundaries1);
Matrix<Multi_persistence_options<Column_types::LIST> > m22(orderedBoundaries1);
Matrix<Multi_persistence_options<Column_types::UNORDERED_SET> > m23(orderedBoundaries1);
Matrix<Multi_persistence_options<Column_types::VECTOR> > m24(orderedBoundaries1);
Matrix<Multi_persistence_options<Column_types::HEAP> > m25(orderedBoundaries1);

Matrix<Zigzag_options<> > m31(orderedBoundaries1);
Matrix<Zigzag_options<Column_types::LIST> > m32(orderedBoundaries1);

Matrix<Cohomology_persistence_options<Zp_field_element<5> > > m41(orderedBoundaries2);
Matrix<Cohomology_persistence_options<Zp_field_element<2> > > m42(orderedBoundaries1);

Matrix<test_options1<> > m51(orderedBoundaries1);
Matrix<test_options1<Column_types::LIST> > m52(orderedBoundaries1);
Matrix<test_options1<Column_types::UNORDERED_SET> > m53(orderedBoundaries1);
Matrix<test_options1<Column_types::VECTOR> > m54(orderedBoundaries1);
Matrix<test_options1<Column_types::HEAP> > m55(orderedBoundaries1);

Matrix<test_options2<> > m61(orderedBoundaries1);
Matrix<test_options2<Column_types::LIST> > m62(orderedBoundaries1);

test_comp_zp(m1);
test_comp_z2(m2);
test_comp_zp(m3);
test_comp_z2(m4);
test_comp_zp(m5);
test_comp_z2(m6);
test_comp_zp(m7);
test_comp_z2(m8);
test_comp_z2(m10);

auto& dgm1 = m1.get_current_barcode();
m1.update_representative_cycles();
m1.get_representative_cycles();
m1.get_representative_cycle(dgm1.front());
auto& dgm2 = m2.get_current_barcode();
m2.update_representative_cycles();
m2.get_representative_cycles();
m2.get_representative_cycle(dgm2.front());
auto& dgm3 = m3.get_current_barcode();
m3.update_representative_cycles();
m3.get_representative_cycles();
m3.get_representative_cycle(dgm3.front());
auto& dgm4 = m4.get_current_barcode();
m4.update_representative_cycles();
m4.get_representative_cycles();
m4.get_representative_cycle(dgm4.front());
auto& dgm5 = m5.get_current_barcode();
m5.update_representative_cycles();
m5.get_representative_cycles();
m5.get_representative_cycle(dgm5.front());
auto& dgm6 = m6.get_current_barcode();
m6.update_representative_cycles();
m6.get_representative_cycles();
m6.get_representative_cycle(dgm6.front());
auto& dgm7 = m7.get_current_barcode();
m7.update_representative_cycles();
m7.get_representative_cycles();
m7.get_representative_cycle(dgm7.front());
auto& dgm8 = m8.get_current_barcode();
m8.update_representative_cycles();
m8.get_representative_cycles();
m8.get_representative_cycle(dgm8.front());
auto& dgm10 = m10.get_current_barcode();
m10.update_representative_cycles();
m10.get_representative_cycles();
m10.get_representative_cycle(dgm10.front());

test_comp_zp(m11);
test_comp_z2(m12);
test_comp_zp(m13);
test_comp_z2(m14);
test_comp_zp(m15);
test_comp_z2(m16);
test_comp_zp(m17);
test_comp_z2(m18);
test_comp_z2(m20);

m11.zero_cell(0, 0);
m11.zero_column(0);
m12.zero_cell(0, 0);
m12.zero_column(0);
m13.zero_cell(0, 0);
m13.zero_column(0);
m14.zero_cell(0, 0);
m14.zero_column(0);
m15.zero_cell(0, 0);
m15.zero_column(0);
m16.zero_cell(0, 0);
m16.zero_column(0);
m17.zero_cell(0, 0);
m17.zero_column(0);
m18.zero_cell(0, 0);
m18.zero_column(0);
m20.zero_cell(0, 0);
m20.zero_column(0);

// std::cout << "number of columns2: " << m21.get_number_of_columns() << "\n";
test_comp_z2(m21);
// std::cout << "number of columns3: " << m21.get_number_of_columns() << "\n";
test_comp_z2(m22);
test_comp_z2(m23);
test_comp_z2(m24);
test_comp_z2(m25);

// std::cout << "number of columns4: " << m21.get_number_of_columns() << "\n";
m21.get_column_with_pivot(0);
// std::cout << "number of columns5: " << m21.get_number_of_columns() << "\n";
m22.get_column_with_pivot(0);
m23.get_column_with_pivot(0);
m24.get_column_with_pivot(0);
m25.get_column_with_pivot(0);
m21.get_current_barcode();
m21.vine_swap_with_z_eq_1_case(3);
m21.vine_swap(3);
m22.get_current_barcode();
m22.vine_swap_with_z_eq_1_case(3);
m22.vine_swap(3);
m23.get_current_barcode();
m23.vine_swap_with_z_eq_1_case(3);
m23.vine_swap(3);
m24.get_current_barcode();
m24.vine_swap_with_z_eq_1_case(3);
m24.vine_swap(3);
m25.get_current_barcode();
m25.vine_swap_with_z_eq_1_case(3);
m25.vine_swap(3);

test_comp_z2(m31);
test_comp_z2(m32);

m31.get_column_with_pivot(0);
m32.get_column_with_pivot(0);
m31.get_current_barcode();
m31.vine_swap_with_z_eq_1_case(3,4);
m31.vine_swap(3,4);
m32.get_current_barcode();
m32.vine_swap_with_z_eq_1_case(3,4);
m32.vine_swap(3,4);
m31.get_row(0);
m31.erase_last();
m32.get_row(0);
m32.erase_last();

test_comp_zp(m41);
test_comp_z2(m42);

// std::cout << "number of columns2: " << m51.get_number_of_columns() << "\n";
test_comp_z2(m51);
// std::cout << "number of columns3: " << m51.get_number_of_columns() << "\n";
test_comp_z2(m52);
test_comp_z2(m53);
test_comp_z2(m54);
test_comp_z2(m55);
//std::cout << "number of columns2: " << m51.get_number_of_columns() << "\n";
m51.get_column_with_pivot(0);
m52.get_column_with_pivot(0);
m53.get_column_with_pivot(0);
m54.get_column_with_pivot(0);
m55.get_column_with_pivot(0);
// std::cout << "number of columns3: " << m51.get_number_of_columns() << "\n";
m51.get_current_barcode();
// std::cout << "number of columns4: " << m51.get_number_of_columns() << "\n";
m51.vine_swap_with_z_eq_1_case(3,4);
m51.vine_swap(3,4);
m52.get_current_barcode();
m52.vine_swap_with_z_eq_1_case(3,4);
m52.vine_swap(3,4);
m53.get_current_barcode();
m53.vine_swap_with_z_eq_1_case(3,4);
m53.vine_swap(3,4);
m54.get_current_barcode();
m54.vine_swap_with_z_eq_1_case(3,4);
m54.vine_swap(3,4);
m55.get_current_barcode();
m55.vine_swap_with_z_eq_1_case(3,4);
m55.vine_swap(3,4);

test_comp_z2(m61);
test_comp_z2(m62);

m61.get_column_with_pivot(0);
m62.get_column_with_pivot(0);
m61.get_current_barcode();
m61.vine_swap_with_z_eq_1_case(3);
m61.vine_swap(3);
m62.get_current_barcode();
m62.vine_swap_with_z_eq_1_case(3);
m62.vine_swap(3);
m61.get_row(0);
m61.erase_last();
m62.get_row(0);
m62.erase_last();

return 0;
}
Loading