diff options
-rw-r--r-- | src/Persistent_cohomology/example/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp | 13 |
2 files changed, 4 insertions, 13 deletions
diff --git a/src/Persistent_cohomology/example/CMakeLists.txt b/src/Persistent_cohomology/example/CMakeLists.txt index 5c337f0b..a8392e8c 100644 --- a/src/Persistent_cohomology/example/CMakeLists.txt +++ b/src/Persistent_cohomology/example/CMakeLists.txt @@ -2,12 +2,12 @@ cmake_minimum_required(VERSION 2.6) project(GUDHIExPersCohom) add_executable(rips_persistence rips_persistence.cpp) -target_link_libraries(rips_persistence ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_SYSTEM_LIBRARY}) +#target_link_libraries(rips_persistence ${Boost_PROGRAM_OPTIONS_LIBRARY}) add_test(rips_persistence_2 ${CMAKE_CURRENT_BINARY_DIR}/rips_persistence ${CMAKE_SOURCE_DIR}/data/points/Kl.txt -r 0.25 -d 3 -p 2 -m 100) add_test(rips_persistence_3 ${CMAKE_CURRENT_BINARY_DIR}/rips_persistence ${CMAKE_SOURCE_DIR}/data/points/Kl.txt -r 0.25 -d 3 -p 3 -m 100) add_executable(rips_persistence_from_alpha_shape_3 rips_persistence_from_alpha_shape_3.cpp ) -target_link_libraries(rips_persistence_from_alpha_shape_3 ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_SYSTEM_LIBRARY}) +#target_link_libraries(rips_persistence_from_alpha_shape_3 ${Boost_PROGRAM_OPTIONS_LIBRARY}) if(GMPXX_FOUND AND GMP_FOUND) message("GMPXX_LIBRARIES = ${GMPXX_LIBRARIES}") diff --git a/src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp b/src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp index b1cb281e..e5c364f8 100644 --- a/src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp +++ b/src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp @@ -64,17 +64,8 @@ int main (int argc, char *argv[]){ // this is just to illustrate iterators, to count number of vertices // or edges, complex.num_vertices() and complex.num_edges() are // more appropriated! - unsigned num_vertices = 0; - for(auto v : complex.vertex_range()){ - if(v==v); //do something with v as removing a ennoying warning. - ++num_vertices; - } - - unsigned num_edges = 0; - for(auto e : complex.edge_range()){ - if(e==e); - ++num_edges; - } + unsigned num_vertices = std::distance(complex.vertex_range().begin(), complex.vertex_range().end()); + unsigned num_edges = std::distance(complex.edge_range().begin(), complex.edge_range().end()); unsigned euler = 0; unsigned num_simplices = 0; |