From 4b7ea5b88dc96ca3d5a881ea7962a0accbd9a62a Mon Sep 17 00:00:00 2001 From: glisse Date: Thu, 30 Nov 2017 15:39:50 +0000 Subject: map::insert(pair(a,b)) --> map::emplace(a,b) git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/misc-glisse@2990 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: ae232890c6291e2e381b0d76f21b2a66da2cf9f5 --- src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp') diff --git a/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp index 9a266418..fc9d1a8a 100644 --- a/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp @@ -169,7 +169,7 @@ int main(int argc, char **argv) { std::cout << "vertex [" << the_alpha_shape_vertex->point() << "] not found - insert " << vertex << std::endl; #endif // DEBUG_TRACES the_simplex_tree.push_back(vertex); - map_cgal_simplex_tree.insert(Alpha_shape_simplex_tree_pair(the_alpha_shape_vertex, vertex)); + map_cgal_simplex_tree.emplace(the_alpha_shape_vertex, vertex); } else { // alpha shape found Simplex_tree_vertex vertex = the_map_iterator->second; -- cgit v1.2.3 From 0a0b42dc45ddcc5065cf70dc05e7070ce09eeff5 Mon Sep 17 00:00:00 2001 From: glisse Date: Thu, 30 Nov 2017 15:41:18 +0000 Subject: dead typedef git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/misc-glisse@2991 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: a314bb92443fc49370a7e12da84713eed7985981 --- src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp | 1 - src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp | 1 - src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp | 1 - src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp | 1 - .../utilities/weighted_periodic_alpha_complex_3d_persistence.cpp | 1 - 5 files changed, 5 deletions(-) (limited to 'src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp') diff --git a/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp index ff834393..7470d7df 100644 --- a/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp @@ -73,7 +73,6 @@ using ST = Gudhi::Simplex_tree; using Filtration_value = ST::Filtration_value; using Simplex_tree_vertex = ST::Vertex_handle; using Alpha_shape_simplex_tree_map = std::map; -using Alpha_shape_simplex_tree_pair = std::pair; using Simplex_tree_vector_vertex = std::vector; using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology; diff --git a/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp index fc9d1a8a..eb0f4b62 100644 --- a/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp @@ -74,7 +74,6 @@ using ST = Gudhi::Simplex_tree; using Filtration_value = ST::Filtration_value; using Simplex_tree_vertex = ST::Vertex_handle; using Alpha_shape_simplex_tree_map = std::map; -using Alpha_shape_simplex_tree_pair = std::pair; using Simplex_tree_vector_vertex = std::vector; using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology; diff --git a/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp index 2f544076..5e6ff873 100644 --- a/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp @@ -79,7 +79,6 @@ using ST = Gudhi::Simplex_tree; using Filtration_value = ST::Filtration_value; using Simplex_tree_vertex = ST::Vertex_handle; using Alpha_shape_simplex_tree_map = std::map; -using Alpha_shape_simplex_tree_pair = std::pair; using Simplex_tree_vector_vertex = std::vector; using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology; diff --git a/src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp index 6e0074e1..2e42c99f 100644 --- a/src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp @@ -99,7 +99,6 @@ using ST = Gudhi::Simplex_tree; using Filtration_value = ST::Filtration_value; using Simplex_tree_vertex = ST::Vertex_handle; using Alpha_shape_simplex_tree_map = std::map; -using Alpha_shape_simplex_tree_pair = std::pair; using Simplex_tree_vector_vertex = std::vector; using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology; diff --git a/src/Alpha_complex/utilities/weighted_periodic_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/weighted_periodic_alpha_complex_3d_persistence.cpp index 5958ff3a..2f3aa509 100644 --- a/src/Alpha_complex/utilities/weighted_periodic_alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/weighted_periodic_alpha_complex_3d_persistence.cpp @@ -81,7 +81,6 @@ using ST = Gudhi::Simplex_tree; using Filtration_value = ST::Filtration_value; using Simplex_tree_vertex = ST::Vertex_handle; using Alpha_shape_simplex_tree_map = std::map; -using Alpha_shape_simplex_tree_pair = std::pair; using Simplex_tree_vector_vertex = std::vector; using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology; -- cgit v1.2.3 From d50e2735c2503038652eb8f225e2badcc3821239 Mon Sep 17 00:00:00 2001 From: glisse Date: Thu, 30 Nov 2017 15:43:26 +0000 Subject: remove dim_max git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/misc-glisse@2992 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 8d511d55de65a316b2c83a6763c90ef2bc26942f --- .../utilities/alpha_complex_3d_persistence.cpp | 13 ------------- .../utilities/exact_alpha_complex_3d_persistence.cpp | 13 ------------- .../utilities/periodic_alpha_complex_3d_persistence.cpp | 13 ------------- .../utilities/weighted_alpha_complex_3d_persistence.cpp | 13 ------------- .../weighted_periodic_alpha_complex_3d_persistence.cpp | 13 ------------- 5 files changed, 65 deletions(-) (limited to 'src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp') diff --git a/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp index 7470d7df..d0920689 100644 --- a/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp @@ -127,31 +127,18 @@ int main(int argc, char **argv) { ST simplex_tree; Alpha_shape_simplex_tree_map map_cgal_simplex_tree; std::vector::iterator the_alpha_value_iterator = the_alpha_values.begin(); - int dim_max = 0; Filtration_value filtration_max = 0.0; for (auto object_iterator : the_objects) { // Retrieve Alpha shape vertex list from object if (const Cell_handle* cell = CGAL::object_cast(&object_iterator)) { vertex_list = from_cell(*cell); count_cells++; - if (dim_max < 3) { - // Cell is of dim 3 - dim_max = 3; - } } else if (const Facet* facet = CGAL::object_cast(&object_iterator)) { vertex_list = from_facet(*facet); count_facets++; - if (dim_max < 2) { - // Facet is of dim 2 - dim_max = 2; - } } else if (const Edge_3* edge = CGAL::object_cast(&object_iterator)) { vertex_list = from_edge(*edge); count_edges++; - if (dim_max < 1) { - // Edge_3 is of dim 1 - dim_max = 1; - } } else if (const Vertex_handle* vertex = CGAL::object_cast(&object_iterator)) { count_vertices++; vertex_list = from_vertex(*vertex); diff --git a/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp index eb0f4b62..877507fa 100644 --- a/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp @@ -128,31 +128,18 @@ int main(int argc, char **argv) { ST simplex_tree; Alpha_shape_simplex_tree_map map_cgal_simplex_tree; std::vector::iterator the_alpha_value_iterator = the_alpha_values.begin(); - int dim_max = 0; Filtration_value filtration_max = 0.0; for (auto object_iterator : the_objects) { // Retrieve Alpha shape vertex list from object if (const Cell_handle* cell = CGAL::object_cast(&object_iterator)) { vertex_list = from_cell(*cell); count_cells++; - if (dim_max < 3) { - // Cell is of dim 3 - dim_max = 3; - } } else if (const Facet* facet = CGAL::object_cast(&object_iterator)) { vertex_list = from_facet(*facet); count_facets++; - if (dim_max < 2) { - // Facet is of dim 2 - dim_max = 2; - } } else if (const Edge_3* edge = CGAL::object_cast(&object_iterator)) { vertex_list = from_edge(*edge); count_edges++; - if (dim_max < 1) { - // Edge_3 is of dim 1 - dim_max = 1; - } } else if (const Vertex_handle* vertex = CGAL::object_cast(&object_iterator)) { count_vertices++; vertex_list = from_vertex(*vertex); diff --git a/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp index 5e6ff873..8e7e5090 100644 --- a/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp @@ -151,31 +151,18 @@ int main(int argc, char **argv) { ST simplex_tree; Alpha_shape_simplex_tree_map map_cgal_simplex_tree; std::vector::iterator the_alpha_value_iterator = the_alpha_values.begin(); - int dim_max = 0; Filtration_value filtration_max = 0.0; for (auto object_iterator : the_objects) { // Retrieve Alpha shape vertex list from object if (const Cell_handle* cell = CGAL::object_cast(&object_iterator)) { vertex_list = from_cell(*cell); count_cells++; - if (dim_max < 3) { - // Cell is of dim 3 - dim_max = 3; - } } else if (const Facet* facet = CGAL::object_cast(&object_iterator)) { vertex_list = from_facet(*facet); count_facets++; - if (dim_max < 2) { - // Facet is of dim 2 - dim_max = 2; - } } else if (const Edge_3* edge = CGAL::object_cast(&object_iterator)) { vertex_list = from_edge(*edge); count_edges++; - if (dim_max < 1) { - // Edge_3 is of dim 1 - dim_max = 1; - } } else if (const Vertex_handle* vertex = CGAL::object_cast(&object_iterator)) { count_vertices++; vertex_list = from_vertex(*vertex); diff --git a/src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp index 2e42c99f..4ee91cd3 100644 --- a/src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp @@ -176,31 +176,18 @@ int main(int argc, char **argv) { ST simplex_tree; Alpha_shape_simplex_tree_map map_cgal_simplex_tree; std::vector::iterator the_alpha_value_iterator = the_alpha_values.begin(); - int dim_max = 0; Filtration_value filtration_max = 0.0; for (auto object_iterator : the_objects) { // Retrieve Alpha shape vertex list from object if (const Cell_handle* cell = CGAL::object_cast(&object_iterator)) { vertex_list = from_cell(*cell); count_cells++; - if (dim_max < 3) { - // Cell is of dim 3 - dim_max = 3; - } } else if (const Facet* facet = CGAL::object_cast(&object_iterator)) { vertex_list = from_facet(*facet); count_facets++; - if (dim_max < 2) { - // Facet is of dim 2 - dim_max = 2; - } } else if (const Edge_3* edge = CGAL::object_cast(&object_iterator)) { vertex_list = from_edge(*edge); count_edges++; - if (dim_max < 1) { - // Edge_3 is of dim 1 - dim_max = 1; - } } else if (const Vertex_handle* vertex = CGAL::object_cast(&object_iterator)) { count_vertices++; vertex_list = from_vertex(*vertex); diff --git a/src/Alpha_complex/utilities/weighted_periodic_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/weighted_periodic_alpha_complex_3d_persistence.cpp index 2f3aa509..8050dc65 100644 --- a/src/Alpha_complex/utilities/weighted_periodic_alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/weighted_periodic_alpha_complex_3d_persistence.cpp @@ -179,31 +179,18 @@ int main(int argc, char* const argv[]) { ST simplex_tree; Alpha_shape_simplex_tree_map map_cgal_simplex_tree; std::vector::iterator the_alpha_value_iterator = the_alpha_values.begin(); - int dim_max = 0; Filtration_value filtration_max = 0.0; for (auto object_iterator : the_objects) { // Retrieve Alpha shape vertex list from object if (const Cell_handle* cell = CGAL::object_cast(&object_iterator)) { vertex_list = from_cell(*cell); count_cells++; - if (dim_max < 3) { - // Cell is of dim 3 - dim_max = 3; - } } else if (const Facet* facet = CGAL::object_cast(&object_iterator)) { vertex_list = from_facet(*facet); count_facets++; - if (dim_max < 2) { - // Facet is of dim 2 - dim_max = 2; - } } else if (const Edge_3* edge = CGAL::object_cast(&object_iterator)) { vertex_list = from_edge(*edge); count_edges++; - if (dim_max < 1) { - // Edge_3 is of dim 1 - dim_max = 1; - } } else if (const Vertex_handle* vertex = CGAL::object_cast(&object_iterator)) { count_vertices++; vertex_list = from_vertex(*vertex); -- cgit v1.2.3 From a76511c25d45aa9cadf3b4e9150dbbc4f0e7dc4f Mon Sep 17 00:00:00 2001 From: glisse Date: Thu, 30 Nov 2017 15:44:34 +0000 Subject: remove filtration_max git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/misc-glisse@2993 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 99113f763adb76266bb2dad206bce539076c3f62 --- src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp | 4 ---- src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp | 4 ---- src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp | 4 ---- src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp | 4 ---- .../utilities/weighted_periodic_alpha_complex_3d_persistence.cpp | 4 ---- 5 files changed, 20 deletions(-) (limited to 'src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp') diff --git a/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp index d0920689..24492802 100644 --- a/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp @@ -127,7 +127,6 @@ int main(int argc, char **argv) { ST simplex_tree; Alpha_shape_simplex_tree_map map_cgal_simplex_tree; std::vector::iterator the_alpha_value_iterator = the_alpha_values.begin(); - Filtration_value filtration_max = 0.0; for (auto object_iterator : the_objects) { // Retrieve Alpha shape vertex list from object if (const Cell_handle* cell = CGAL::object_cast(&object_iterator)) { @@ -169,9 +168,6 @@ int main(int argc, char **argv) { #ifdef DEBUG_TRACES std::cout << "filtration = " << filtr << std::endl; #endif // DEBUG_TRACES - if (filtr > filtration_max) { - filtration_max = filtr; - } simplex_tree.insert_simplex(the_simplex_tree, filtr); if (the_alpha_value_iterator != the_alpha_values.end()) ++the_alpha_value_iterator; diff --git a/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp index 877507fa..7519e25f 100644 --- a/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp @@ -128,7 +128,6 @@ int main(int argc, char **argv) { ST simplex_tree; Alpha_shape_simplex_tree_map map_cgal_simplex_tree; std::vector::iterator the_alpha_value_iterator = the_alpha_values.begin(); - Filtration_value filtration_max = 0.0; for (auto object_iterator : the_objects) { // Retrieve Alpha shape vertex list from object if (const Cell_handle* cell = CGAL::object_cast(&object_iterator)) { @@ -171,9 +170,6 @@ int main(int argc, char **argv) { #ifdef DEBUG_TRACES std::cout << "filtration = " << filtr << std::endl; #endif // DEBUG_TRACES - if (filtr > filtration_max) { - filtration_max = filtr; - } simplex_tree.insert_simplex(the_simplex_tree, filtr); if (the_alpha_value_iterator != the_alpha_values.end()) ++the_alpha_value_iterator; diff --git a/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp index 8e7e5090..f751d5f6 100644 --- a/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp @@ -151,7 +151,6 @@ int main(int argc, char **argv) { ST simplex_tree; Alpha_shape_simplex_tree_map map_cgal_simplex_tree; std::vector::iterator the_alpha_value_iterator = the_alpha_values.begin(); - Filtration_value filtration_max = 0.0; for (auto object_iterator : the_objects) { // Retrieve Alpha shape vertex list from object if (const Cell_handle* cell = CGAL::object_cast(&object_iterator)) { @@ -193,9 +192,6 @@ int main(int argc, char **argv) { #ifdef DEBUG_TRACES std::cout << "filtration = " << filtr << std::endl; #endif // DEBUG_TRACES - if (filtr > filtration_max) { - filtration_max = filtr; - } simplex_tree.insert_simplex(the_simplex_tree, filtr); if (the_alpha_value_iterator != the_alpha_values.end()) ++the_alpha_value_iterator; diff --git a/src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp index 4ee91cd3..51f4a60b 100644 --- a/src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp @@ -176,7 +176,6 @@ int main(int argc, char **argv) { ST simplex_tree; Alpha_shape_simplex_tree_map map_cgal_simplex_tree; std::vector::iterator the_alpha_value_iterator = the_alpha_values.begin(); - Filtration_value filtration_max = 0.0; for (auto object_iterator : the_objects) { // Retrieve Alpha shape vertex list from object if (const Cell_handle* cell = CGAL::object_cast(&object_iterator)) { @@ -218,9 +217,6 @@ int main(int argc, char **argv) { #ifdef DEBUG_TRACES std::cout << "filtration = " << filtr << std::endl; #endif // DEBUG_TRACES - if (filtr > filtration_max) { - filtration_max = filtr; - } simplex_tree.insert_simplex(the_simplex_tree, filtr); if (the_alpha_value_iterator != the_alpha_values.end()) ++the_alpha_value_iterator; diff --git a/src/Alpha_complex/utilities/weighted_periodic_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/weighted_periodic_alpha_complex_3d_persistence.cpp index 8050dc65..24e0b665 100644 --- a/src/Alpha_complex/utilities/weighted_periodic_alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/weighted_periodic_alpha_complex_3d_persistence.cpp @@ -179,7 +179,6 @@ int main(int argc, char* const argv[]) { ST simplex_tree; Alpha_shape_simplex_tree_map map_cgal_simplex_tree; std::vector::iterator the_alpha_value_iterator = the_alpha_values.begin(); - Filtration_value filtration_max = 0.0; for (auto object_iterator : the_objects) { // Retrieve Alpha shape vertex list from object if (const Cell_handle* cell = CGAL::object_cast(&object_iterator)) { @@ -221,9 +220,6 @@ int main(int argc, char* const argv[]) { #ifdef DEBUG_TRACES std::cout << "filtration = " << filtr << std::endl; #endif // DEBUG_TRACES - if (filtr > filtration_max) { - filtration_max = filtr; - } simplex_tree.insert_simplex(the_simplex_tree, filtr); if (the_alpha_value_iterator != the_alpha_values.end()) ++the_alpha_value_iterator; -- cgit v1.2.3 From 7b29ed7cea21e87a0b8c876c52ca525245161dfd Mon Sep 17 00:00:00 2001 From: glisse Date: Thu, 30 Nov 2017 15:47:29 +0000 Subject: list -> vector git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/misc-glisse@2994 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 336af6c51d9b6ca4d60b2caac02a3f53b02ffda5 --- src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp | 3 +-- src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp | 3 +-- src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp | 3 +-- src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp | 3 +-- .../utilities/weighted_periodic_alpha_complex_3d_persistence.cpp | 3 +-- 5 files changed, 5 insertions(+), 10 deletions(-) (limited to 'src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp') diff --git a/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp index 24492802..aef1151e 100644 --- a/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp @@ -38,7 +38,6 @@ #include #include #include -#include #include #include @@ -66,7 +65,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; +using Vertex_list = std::vector; // gudhi type definition using ST = Gudhi::Simplex_tree; diff --git a/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp index 7519e25f..d53f72c7 100644 --- a/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp @@ -38,7 +38,6 @@ #include #include #include -#include #include #include @@ -67,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; +using Vertex_list = std::vector; // gudhi type definition using ST = Gudhi::Simplex_tree; diff --git a/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp index f751d5f6..b58480ee 100644 --- a/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp @@ -39,7 +39,6 @@ #include #include #include -#include #include #include @@ -72,7 +71,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; +using Vertex_list = std::vector; // gudhi type definition using ST = Gudhi::Simplex_tree; diff --git a/src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp index 51f4a60b..4a54583a 100644 --- a/src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp @@ -44,7 +44,6 @@ #include #include #include -#include #include #include @@ -92,7 +91,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; +using Vertex_list = std::vector; // gudhi type definition using ST = Gudhi::Simplex_tree; diff --git a/src/Alpha_complex/utilities/weighted_periodic_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/weighted_periodic_alpha_complex_3d_persistence.cpp index 24e0b665..7221d12d 100644 --- a/src/Alpha_complex/utilities/weighted_periodic_alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/weighted_periodic_alpha_complex_3d_persistence.cpp @@ -38,7 +38,6 @@ #include #include #include -#include #include #include @@ -74,7 +73,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; +using Vertex_list = std::vector; // gudhi type definition using ST = Gudhi::Simplex_tree; -- cgit v1.2.3 From 28d6d8aec8f3e1c91bf2a3fdd024d3a471717630 Mon Sep 17 00:00:00 2001 From: glisse Date: Thu, 30 Nov 2017 15:58:59 +0000 Subject: rename the_simplex_tree which represents one simplex git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/misc-glisse@2996 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: fae071018b07c2a3304d14038b6778da0589bf05 --- src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp | 8 ++++---- .../utilities/exact_alpha_complex_3d_persistence.cpp | 8 ++++---- .../utilities/periodic_alpha_complex_3d_persistence.cpp | 8 ++++---- .../utilities/weighted_alpha_complex_3d_persistence.cpp | 8 ++++---- .../utilities/weighted_periodic_alpha_complex_3d_persistence.cpp | 8 ++++---- 5 files changed, 20 insertions(+), 20 deletions(-) (limited to 'src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp') diff --git a/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp index aef1151e..ada67898 100644 --- a/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp @@ -142,7 +142,7 @@ int main(int argc, char **argv) { vertex_list = from_vertex(*vertex); } // Construction of the vector of simplex_tree vertex from list of alpha_shapes vertex - Simplex_tree_vector_vertex the_simplex_tree; + Simplex_tree_vector_vertex the_simplex; for (auto the_alpha_shape_vertex : vertex_list) { Alpha_shape_simplex_tree_map::iterator the_map_iterator = map_cgal_simplex_tree.find(the_alpha_shape_vertex); if (the_map_iterator == map_cgal_simplex_tree.end()) { @@ -151,7 +151,7 @@ int main(int argc, char **argv) { #ifdef DEBUG_TRACES std::cout << "vertex [" << the_alpha_shape_vertex->point() << "] not found - insert " << vertex << std::endl; #endif // DEBUG_TRACES - the_simplex_tree.push_back(vertex); + the_simplex.push_back(vertex); map_cgal_simplex_tree.emplace(the_alpha_shape_vertex, vertex); } else { // alpha shape found @@ -159,7 +159,7 @@ int main(int argc, char **argv) { #ifdef DEBUG_TRACES std::cout << "vertex [" << the_alpha_shape_vertex->point() << "] found in " << vertex << std::endl; #endif // DEBUG_TRACES - the_simplex_tree.push_back(vertex); + the_simplex.push_back(vertex); } } // Construction of the simplex_tree @@ -167,7 +167,7 @@ int main(int argc, char **argv) { #ifdef DEBUG_TRACES std::cout << "filtration = " << filtr << std::endl; #endif // DEBUG_TRACES - simplex_tree.insert_simplex(the_simplex_tree, filtr); + simplex_tree.insert_simplex(the_simplex, filtr); if (the_alpha_value_iterator != the_alpha_values.end()) ++the_alpha_value_iterator; else diff --git a/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp index d53f72c7..f55bac20 100644 --- a/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp @@ -143,7 +143,7 @@ int main(int argc, char **argv) { vertex_list = from_vertex(*vertex); } // Construction of the vector of simplex_tree vertex from list of alpha_shapes vertex - Simplex_tree_vector_vertex the_simplex_tree; + Simplex_tree_vector_vertex the_simplex; for (auto the_alpha_shape_vertex : vertex_list) { Alpha_shape_simplex_tree_map::iterator the_map_iterator = map_cgal_simplex_tree.find(the_alpha_shape_vertex); if (the_map_iterator == map_cgal_simplex_tree.end()) { @@ -152,7 +152,7 @@ int main(int argc, char **argv) { #ifdef DEBUG_TRACES std::cout << "vertex [" << the_alpha_shape_vertex->point() << "] not found - insert " << vertex << std::endl; #endif // DEBUG_TRACES - the_simplex_tree.push_back(vertex); + the_simplex.push_back(vertex); map_cgal_simplex_tree.emplace(the_alpha_shape_vertex, vertex); } else { // alpha shape found @@ -160,7 +160,7 @@ int main(int argc, char **argv) { #ifdef DEBUG_TRACES std::cout << "vertex [" << the_alpha_shape_vertex->point() << "] found in " << vertex << std::endl; #endif // DEBUG_TRACES - the_simplex_tree.push_back(vertex); + the_simplex.push_back(vertex); } } // Construction of the simplex_tree @@ -169,7 +169,7 @@ int main(int argc, char **argv) { #ifdef DEBUG_TRACES std::cout << "filtration = " << filtr << std::endl; #endif // DEBUG_TRACES - simplex_tree.insert_simplex(the_simplex_tree, filtr); + simplex_tree.insert_simplex(the_simplex, filtr); if (the_alpha_value_iterator != the_alpha_values.end()) ++the_alpha_value_iterator; else diff --git a/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp index b58480ee..a02ccfff 100644 --- a/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp @@ -166,7 +166,7 @@ int main(int argc, char **argv) { vertex_list = from_vertex(*vertex); } // Construction of the vector of simplex_tree vertex from list of alpha_shapes vertex - Simplex_tree_vector_vertex the_simplex_tree; + Simplex_tree_vector_vertex the_simplex; for (auto the_alpha_shape_vertex : vertex_list) { Alpha_shape_simplex_tree_map::iterator the_map_iterator = map_cgal_simplex_tree.find(the_alpha_shape_vertex); if (the_map_iterator == map_cgal_simplex_tree.end()) { @@ -175,7 +175,7 @@ int main(int argc, char **argv) { #ifdef DEBUG_TRACES std::cout << "vertex [" << the_alpha_shape_vertex->point() << "] not found - insert " << vertex << std::endl; #endif // DEBUG_TRACES - the_simplex_tree.push_back(vertex); + the_simplex.push_back(vertex); map_cgal_simplex_tree.emplace(the_alpha_shape_vertex, vertex); } else { // alpha shape found @@ -183,7 +183,7 @@ int main(int argc, char **argv) { #ifdef DEBUG_TRACES std::cout << "vertex [" << the_alpha_shape_vertex->point() << "] found in " << vertex << std::endl; #endif // DEBUG_TRACES - the_simplex_tree.push_back(vertex); + the_simplex.push_back(vertex); } } // Construction of the simplex_tree @@ -191,7 +191,7 @@ int main(int argc, char **argv) { #ifdef DEBUG_TRACES std::cout << "filtration = " << filtr << std::endl; #endif // DEBUG_TRACES - simplex_tree.insert_simplex(the_simplex_tree, filtr); + simplex_tree.insert_simplex(the_simplex, filtr); if (the_alpha_value_iterator != the_alpha_values.end()) ++the_alpha_value_iterator; else diff --git a/src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp index 4a54583a..d6e5b789 100644 --- a/src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp @@ -191,7 +191,7 @@ int main(int argc, char **argv) { vertex_list = from_vertex(*vertex); } // Construction of the vector of simplex_tree vertex from list of alpha_shapes vertex - Simplex_tree_vector_vertex the_simplex_tree; + Simplex_tree_vector_vertex the_simplex; for (auto the_alpha_shape_vertex : vertex_list) { Alpha_shape_simplex_tree_map::iterator the_map_iterator = map_cgal_simplex_tree.find(the_alpha_shape_vertex); if (the_map_iterator == map_cgal_simplex_tree.end()) { @@ -200,7 +200,7 @@ int main(int argc, char **argv) { #ifdef DEBUG_TRACES std::cout << "vertex [" << the_alpha_shape_vertex->point() << "] not found - insert " << vertex << std::endl; #endif // DEBUG_TRACES - the_simplex_tree.push_back(vertex); + the_simplex.push_back(vertex); map_cgal_simplex_tree.emplace(the_alpha_shape_vertex, vertex); } else { // alpha shape found @@ -208,7 +208,7 @@ int main(int argc, char **argv) { #ifdef DEBUG_TRACES std::cout << "vertex [" << the_alpha_shape_vertex->point() << "] found in " << vertex << std::endl; #endif // DEBUG_TRACES - the_simplex_tree.push_back(vertex); + the_simplex.push_back(vertex); } } // Construction of the simplex_tree @@ -216,7 +216,7 @@ int main(int argc, char **argv) { #ifdef DEBUG_TRACES std::cout << "filtration = " << filtr << std::endl; #endif // DEBUG_TRACES - simplex_tree.insert_simplex(the_simplex_tree, filtr); + simplex_tree.insert_simplex(the_simplex, filtr); if (the_alpha_value_iterator != the_alpha_values.end()) ++the_alpha_value_iterator; else diff --git a/src/Alpha_complex/utilities/weighted_periodic_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/weighted_periodic_alpha_complex_3d_persistence.cpp index 7221d12d..3d4c456d 100644 --- a/src/Alpha_complex/utilities/weighted_periodic_alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/weighted_periodic_alpha_complex_3d_persistence.cpp @@ -194,7 +194,7 @@ int main(int argc, char* const argv[]) { vertex_list = from_vertex(*vertex); } // Construction of the vector of simplex_tree vertex from list of alpha_shapes vertex - Simplex_tree_vector_vertex the_simplex_tree; + Simplex_tree_vector_vertex the_simplex; for (auto the_alpha_shape_vertex : vertex_list) { Alpha_shape_simplex_tree_map::iterator the_map_iterator = map_cgal_simplex_tree.find(the_alpha_shape_vertex); if (the_map_iterator == map_cgal_simplex_tree.end()) { @@ -203,7 +203,7 @@ int main(int argc, char* const argv[]) { #ifdef DEBUG_TRACES std::cout << "vertex [" << the_alpha_shape_vertex->point() << "] not found - insert " << vertex << std::endl; #endif // DEBUG_TRACES - the_simplex_tree.push_back(vertex); + the_simplex.push_back(vertex); map_cgal_simplex_tree.emplace(the_alpha_shape_vertex, vertex); } else { // alpha shape found @@ -211,7 +211,7 @@ int main(int argc, char* const argv[]) { #ifdef DEBUG_TRACES std::cout << "vertex [" << the_alpha_shape_vertex->point() << "] found in " << vertex << std::endl; #endif // DEBUG_TRACES - the_simplex_tree.push_back(vertex); + the_simplex.push_back(vertex); } } // Construction of the simplex_tree @@ -219,7 +219,7 @@ int main(int argc, char* const argv[]) { #ifdef DEBUG_TRACES std::cout << "filtration = " << filtr << std::endl; #endif // DEBUG_TRACES - simplex_tree.insert_simplex(the_simplex_tree, filtr); + simplex_tree.insert_simplex(the_simplex, filtr); if (the_alpha_value_iterator != the_alpha_values.end()) ++the_alpha_value_iterator; else -- cgit v1.2.3 From 15039a6e2ef84b8d79e9d3e912edf901bab40238 Mon Sep 17 00:00:00 2001 From: glisse Date: Thu, 30 Nov 2017 16:01:22 +0000 Subject: Typo get_point_cloud retrieves the points, not the triangulation. git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/misc-glisse@2998 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: acc15d17d9ebf9cb3e64c8c66e756cdd8627d137 --- src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp | 2 +- src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp | 2 +- src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp | 2 +- src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp | 2 +- .../utilities/weighted_periodic_alpha_complex_3d_persistence.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp') diff --git a/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp index ada67898..3c51cf86 100644 --- a/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp @@ -95,7 +95,7 @@ int main(int argc, char **argv) { exit(-1); } - // Retrieve the triangulation + // Retrieve the points std::vector lp = off_reader.get_point_cloud(); // alpha shape construction from points. CGAL has a strange behavior in REGULARIZED mode. diff --git a/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp index f55bac20..3b9a2ae0 100644 --- a/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/exact_alpha_complex_3d_persistence.cpp @@ -96,7 +96,7 @@ int main(int argc, char **argv) { exit(-1); } - // Retrieve the triangulation + // Retrieve the points std::vector lp = off_reader.get_point_cloud(); // alpha shape construction from points. CGAL has a strange behavior in REGULARIZED mode. diff --git a/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp index a02ccfff..6993b0ad 100644 --- a/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/periodic_alpha_complex_3d_persistence.cpp @@ -113,7 +113,7 @@ int main(int argc, char **argv) { exit(-1); } - // Retrieve the triangulation + // Retrieve the points std::vector lp = off_reader.get_point_cloud(); // Define the periodic cube diff --git a/src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp index d6e5b789..f46f1a58 100644 --- a/src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/weighted_alpha_complex_3d_persistence.cpp @@ -123,7 +123,7 @@ int main(int argc, char **argv) { exit(-1); } - // Retrieve the triangulation + // Retrieve the points std::vector lp = off_reader.get_point_cloud(); // Read weights information from file diff --git a/src/Alpha_complex/utilities/weighted_periodic_alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/weighted_periodic_alpha_complex_3d_persistence.cpp index 3d4c456d..282b9180 100644 --- a/src/Alpha_complex/utilities/weighted_periodic_alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/weighted_periodic_alpha_complex_3d_persistence.cpp @@ -110,7 +110,7 @@ int main(int argc, char* const argv[]) { usage(argv[0]); } - // Retrieve the triangulation + // Retrieve the points std::vector lp = off_reader.get_point_cloud(); // Read weights information from file -- cgit v1.2.3