summaryrefslogtreecommitdiff
path: root/src/Persistent_cohomology
diff options
context:
space:
mode:
Diffstat (limited to 'src/Persistent_cohomology')
-rw-r--r--src/Persistent_cohomology/doc/Intro_persistent_cohomology.h11
-rw-r--r--src/Persistent_cohomology/example/alpha_complex_3d_persistence.cpp4
-rw-r--r--src/Persistent_cohomology/example/exact_alpha_complex_3d_persistence.cpp4
-rw-r--r--src/Persistent_cohomology/example/periodic_alpha_complex_3d_persistence.cpp2
-rw-r--r--src/Persistent_cohomology/example/persistence_from_file.cpp3
-rw-r--r--src/Persistent_cohomology/example/persistence_from_simple_simplex_tree.cpp3
-rw-r--r--src/Persistent_cohomology/example/weighted_alpha_complex_3d_persistence.cpp2
-rw-r--r--src/Persistent_cohomology/example/weighted_periodic_alpha_complex_3d_persistence.cpp3
-rw-r--r--src/Persistent_cohomology/test/persistent_cohomology_unit_test.cpp3
-rw-r--r--src/Persistent_cohomology/test/persistent_cohomology_unit_test_multi_field.cpp3
10 files changed, 12 insertions, 26 deletions
diff --git a/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h b/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h
index e17e5926..6400116b 100644
--- a/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h
+++ b/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h
@@ -189,10 +189,10 @@ and a weights file.
\code $> ./weighted_alpha_complex_3d_persistence ../../data/points/tore3D_300.off
../../data/points/tore3D_300.weights 2 0.45 \endcode
\code Simplex_tree dim: 3
-2 -0 0 inf
-2 1 0.0682162 1.0001
-2 1 0.0934117 1.00003
-2 2 0.56444 1.03938 \endcode
+2 0 -1 inf
+2 1 -0.931784 0.000103311
+2 1 -0.906588 2.60165e-05
+2 2 -0.43556 0.0393798 \endcode
\li <a href="_persistent_cohomology_2alpha_complex_persistence_8cpp-example.html">
Persistent_cohomology/alpha_complex_persistence.cpp</a> computes the persistent homology with
@@ -208,7 +208,8 @@ Simplex_tree dim: 3
\li <a href="_persistent_cohomology_2periodic_alpha_complex_3d_persistence_8cpp-example.html">
Persistent_cohomology/periodic_alpha_complex_3d_persistence.cpp</a> computes the persistent homology with
\f$\mathbb{Z}/2\mathbb{Z}\f$ coefficients of the periodic alpha complex on points sampling from an OFF file.
-\code $> ./periodic_alpha_complex_3d_persistence ../../data/points/grid_10_10_10_in_0_1.off 3 1.0 \endcode
+\code $> ./periodic_alpha_complex_3d_persistence ../../data/points/grid_10_10_10_in_0_1.off
+../../data/points/iso_cuboid_3_in_0_1.txt 3 1.0 \endcode
\code Periodic Delaunay computed.
Simplex_tree dim: 3
3 0 0 inf
diff --git a/src/Persistent_cohomology/example/alpha_complex_3d_persistence.cpp b/src/Persistent_cohomology/example/alpha_complex_3d_persistence.cpp
index df96fcfd..de9b8cdf 100644
--- a/src/Persistent_cohomology/example/alpha_complex_3d_persistence.cpp
+++ b/src/Persistent_cohomology/example/alpha_complex_3d_persistence.cpp
@@ -185,7 +185,7 @@ int main(int argc, char* const argv[]) {
}
}
// Construction of the simplex_tree
- Filtration_value filtr = /*std::sqrt*/ (*the_alpha_value_iterator);
+ Filtration_value filtr = /*std::sqrt*/(*the_alpha_value_iterator);
#ifdef DEBUG_TRACES
std::cout << "filtration = " << filtr << std::endl;
#endif // DEBUG_TRACES
@@ -198,7 +198,6 @@ int main(int argc, char* const argv[]) {
else
std::cout << "This shall not happen" << std::endl;
}
- simplex_tree.set_filtration(filtration_max);
simplex_tree.set_dimension(dim_max);
#ifdef DEBUG_TRACES
@@ -211,7 +210,6 @@ int main(int argc, char* const argv[]) {
std::cout << " Number of vertices = " << simplex_tree.num_vertices() << " ";
std::cout << " Number of simplices = " << simplex_tree.num_simplices() << std::endl << std::endl;
std::cout << " Dimension = " << simplex_tree.dimension() << " ";
- std::cout << " filtration = " << simplex_tree.filtration() << std::endl << std::endl;
#endif // DEBUG_TRACES
#ifdef DEBUG_TRACES
diff --git a/src/Persistent_cohomology/example/exact_alpha_complex_3d_persistence.cpp b/src/Persistent_cohomology/example/exact_alpha_complex_3d_persistence.cpp
index b189e980..5f078251 100644
--- a/src/Persistent_cohomology/example/exact_alpha_complex_3d_persistence.cpp
+++ b/src/Persistent_cohomology/example/exact_alpha_complex_3d_persistence.cpp
@@ -66,7 +66,7 @@ using Cell_handle = Alpha_shape_3::Cell_handle;
using Facet = Alpha_shape_3::Facet;
using Edge_3 = Alpha_shape_3::Edge;
using Vertex_handle = Alpha_shape_3::Vertex_handle;
-using Vertex_list = std::list<Alpha_shape_3::Vertex_handle>;
+using Vertex_list = std::list<Vertex_handle>;
// gudhi type definition
using ST = Gudhi::Simplex_tree<Gudhi::Simplex_tree_options_fast_persistence>;
@@ -200,7 +200,6 @@ int main(int argc, char* const argv[]) {
else
std::cout << "This shall not happen" << std::endl;
}
- simplex_tree.set_filtration(filtration_max);
simplex_tree.set_dimension(dim_max);
#ifdef DEBUG_TRACES
@@ -213,7 +212,6 @@ int main(int argc, char* const argv[]) {
std::cout << " Number of vertices = " << simplex_tree.num_vertices() << " ";
std::cout << " Number of simplices = " << simplex_tree.num_simplices() << std::endl << std::endl;
std::cout << " Dimension = " << simplex_tree.dimension() << " ";
- std::cout << " filtration = " << simplex_tree.filtration() << std::endl << std::endl;
#endif // DEBUG_TRACES
#ifdef DEBUG_TRACES
diff --git a/src/Persistent_cohomology/example/periodic_alpha_complex_3d_persistence.cpp b/src/Persistent_cohomology/example/periodic_alpha_complex_3d_persistence.cpp
index 63731a4a..e6355e6b 100644
--- a/src/Persistent_cohomology/example/periodic_alpha_complex_3d_persistence.cpp
+++ b/src/Persistent_cohomology/example/periodic_alpha_complex_3d_persistence.cpp
@@ -220,7 +220,6 @@ int main(int argc, char* const argv[]) {
else
std::cout << "This shall not happen" << std::endl;
}
- simplex_tree.set_filtration(filtration_max);
simplex_tree.set_dimension(dim_max);
#ifdef DEBUG_TRACES
@@ -233,7 +232,6 @@ int main(int argc, char* const argv[]) {
std::cout << " Number of vertices = " << simplex_tree.num_vertices() << " ";
std::cout << " Number of simplices = " << simplex_tree.num_simplices() << std::endl << std::endl;
std::cout << " Dimension = " << simplex_tree.dimension() << " ";
- std::cout << " filtration = " << simplex_tree.filtration() << std::endl << std::endl;
#endif // DEBUG_TRACES
#ifdef DEBUG_TRACES
diff --git a/src/Persistent_cohomology/example/persistence_from_file.cpp b/src/Persistent_cohomology/example/persistence_from_file.cpp
index 67235467..eafa3fd5 100644
--- a/src/Persistent_cohomology/example/persistence_from_file.cpp
+++ b/src/Persistent_cohomology/example/persistence_from_file.cpp
@@ -61,8 +61,7 @@ int main(int argc, char * argv[]) {
simplex_tree_stream >> simplex_tree;
std::cout << "The complex contains " << simplex_tree.num_simplices() << " simplices" << std::endl;
- std::cout << " - dimension " << simplex_tree.dimension() << " - filtration " << simplex_tree.filtration()
- << std::endl;
+ std::cout << " - dimension " << simplex_tree.dimension() << std::endl;
/*
std::cout << std::endl << std::endl << "Iterator on Simplices in the filtration, with [filtration value]:" << std::endl;
diff --git a/src/Persistent_cohomology/example/persistence_from_simple_simplex_tree.cpp b/src/Persistent_cohomology/example/persistence_from_simple_simplex_tree.cpp
index 7ca9410a..8214d66a 100644
--- a/src/Persistent_cohomology/example/persistence_from_simple_simplex_tree.cpp
+++ b/src/Persistent_cohomology/example/persistence_from_simple_simplex_tree.cpp
@@ -143,11 +143,10 @@ int main(int argc, char * const argv[]) {
/* An edge [10,12,2] */
st.set_dimension(2);
- st.set_filtration(0.4);
std::cout << "The complex contains " << st.num_simplices() << " simplices - " << st.num_vertices() << " vertices "
<< std::endl;
- std::cout << " - dimension " << st.dimension() << " - filtration " << st.filtration() << std::endl;
+ std::cout << " - dimension " << st.dimension() << std::endl;
std::cout << std::endl << std::endl << "Iterator on Simplices in the filtration, with [filtration value]:"
<< std::endl;
std::cout << "**************************************************************" << std::endl;
diff --git a/src/Persistent_cohomology/example/weighted_alpha_complex_3d_persistence.cpp b/src/Persistent_cohomology/example/weighted_alpha_complex_3d_persistence.cpp
index 96cc57e9..4bddbe82 100644
--- a/src/Persistent_cohomology/example/weighted_alpha_complex_3d_persistence.cpp
+++ b/src/Persistent_cohomology/example/weighted_alpha_complex_3d_persistence.cpp
@@ -245,7 +245,6 @@ int main(int argc, char* const argv[]) {
else
std::cout << "This shall not happen" << std::endl;
}
- simplex_tree.set_filtration(filtration_max);
simplex_tree.set_dimension(dim_max);
#ifdef DEBUG_TRACES
@@ -258,7 +257,6 @@ int main(int argc, char* const argv[]) {
std::cout << " Number of vertices = " << simplex_tree.num_vertices() << " ";
std::cout << " Number of simplices = " << simplex_tree.num_simplices() << std::endl << std::endl;
std::cout << " Dimension = " << simplex_tree.dimension() << " ";
- std::cout << " filtration = " << simplex_tree.filtration() << std::endl << std::endl;
#endif // DEBUG_TRACES
#ifdef DEBUG_TRACES
diff --git a/src/Persistent_cohomology/example/weighted_periodic_alpha_complex_3d_persistence.cpp b/src/Persistent_cohomology/example/weighted_periodic_alpha_complex_3d_persistence.cpp
index a4a2a9f8..13634ff7 100644
--- a/src/Persistent_cohomology/example/weighted_periodic_alpha_complex_3d_persistence.cpp
+++ b/src/Persistent_cohomology/example/weighted_periodic_alpha_complex_3d_persistence.cpp
@@ -244,8 +244,6 @@ int main(int argc, char* const argv[]) {
else
std::cout << "This shall not happen" << std::endl;
}
- simplex_tree.set_filtration(filtration_max);
- simplex_tree.set_dimension(dim_max);
#ifdef DEBUG_TRACES
std::cout << "vertices \t\t" << count_vertices << std::endl;
@@ -257,7 +255,6 @@ int main(int argc, char* const argv[]) {
std::cout << " Number of vertices = " << simplex_tree.num_vertices() << " ";
std::cout << " Number of simplices = " << simplex_tree.num_simplices() << std::endl << std::endl;
std::cout << " Dimension = " << simplex_tree.dimension() << " ";
- std::cout << " filtration = " << simplex_tree.filtration() << std::endl << std::endl;
#endif // DEBUG_TRACES
#ifdef DEBUG_TRACES
diff --git a/src/Persistent_cohomology/test/persistent_cohomology_unit_test.cpp b/src/Persistent_cohomology/test/persistent_cohomology_unit_test.cpp
index f8174020..f53987b6 100644
--- a/src/Persistent_cohomology/test/persistent_cohomology_unit_test.cpp
+++ b/src/Persistent_cohomology/test/persistent_cohomology_unit_test.cpp
@@ -31,12 +31,11 @@ std::string test_rips_persistence(int coefficient, int min_persistence) {
// Display the Simplex_tree
std::cout << "The complex contains " << st.num_simplices() << " simplices" << " - dimension= " << st.dimension()
- << " - filtration= " << st.filtration() << std::endl;
+ << std::endl;
// Check
BOOST_CHECK(st.num_simplices() == 98);
BOOST_CHECK(st.dimension() == 3);
- BOOST_CHECK(st.filtration() == 1.89);
// Sort the simplices in the order of the filtration
st.initialize_filtration();
diff --git a/src/Persistent_cohomology/test/persistent_cohomology_unit_test_multi_field.cpp b/src/Persistent_cohomology/test/persistent_cohomology_unit_test_multi_field.cpp
index 3537cfa4..9e767943 100644
--- a/src/Persistent_cohomology/test/persistent_cohomology_unit_test_multi_field.cpp
+++ b/src/Persistent_cohomology/test/persistent_cohomology_unit_test_multi_field.cpp
@@ -31,12 +31,11 @@ std::string test_rips_persistence(int min_coefficient, int max_coefficient, doub
// Display the Simplex_tree
std::cout << "The complex contains " << st.num_simplices() << " simplices" << " - dimension= " << st.dimension()
- << " - filtration= " << st.filtration() << std::endl;
+ << std::endl;
// Check
BOOST_CHECK(st.num_simplices() == 58);
BOOST_CHECK(st.dimension() == 3);
- BOOST_CHECK(st.filtration() == 0.4);
// Sort the simplices in the order of the filtration
st.initialize_filtration();