From 06b195e44a5430678ee87527e8c0ba320b4c1105 Mon Sep 17 00:00:00 2001 From: salinasd Date: Wed, 17 Dec 2014 11:45:30 +0000 Subject: Modif CMakeLists.txt developer such that everything compiles in VS13. Does it compiles in linux? git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@367 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: d62ff031e5dd77a7d6104706a73e57e8a039b828 --- src/Persistent_cohomology/example/CMakeLists.txt | 4 ++-- 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; -- cgit v1.2.3