diff options
Diffstat (limited to 'src/Nerve_GIC/utilities')
-rw-r--r-- | src/Nerve_GIC/utilities/CMakeLists.txt | 36 | ||||
-rw-r--r-- | src/Nerve_GIC/utilities/Nerve.cpp | 10 | ||||
-rw-r--r-- | src/Nerve_GIC/utilities/VoronoiGIC.cpp | 10 | ||||
-rw-r--r-- | src/Nerve_GIC/utilities/km.py.COPYRIGHT | 2 |
4 files changed, 27 insertions, 31 deletions
diff --git a/src/Nerve_GIC/utilities/CMakeLists.txt b/src/Nerve_GIC/utilities/CMakeLists.txt index 65a08d9a..4521a992 100644 --- a/src/Nerve_GIC/utilities/CMakeLists.txt +++ b/src/Nerve_GIC/utilities/CMakeLists.txt @@ -1,27 +1,23 @@ project(Nerve_GIC_examples) -if (NOT CGAL_VERSION VERSION_LESS 4.11.0) +add_executable ( Nerve Nerve.cpp ) +add_executable ( VoronoiGIC VoronoiGIC.cpp ) - add_executable ( Nerve Nerve.cpp ) - add_executable ( VoronoiGIC VoronoiGIC.cpp ) +if (TBB_FOUND) + target_link_libraries(Nerve ${TBB_LIBRARIES}) + target_link_libraries(VoronoiGIC ${TBB_LIBRARIES}) +endif() - if (TBB_FOUND) - target_link_libraries(Nerve ${TBB_LIBRARIES}) - target_link_libraries(VoronoiGIC ${TBB_LIBRARIES}) - endif() +file(COPY KeplerMapperVisuFromTxtFile.py km.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) +# Copy files for not to pollute sources when testing +file(COPY "${CMAKE_SOURCE_DIR}/data/points/human.off" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) - file(COPY KeplerMapperVisuFromTxtFile.py km.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) - # Copy files for not to pollute sources when testing - file(COPY "${CMAKE_SOURCE_DIR}/data/points/human.off" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) +add_test(NAME Nerve_GIC_utilities_nerve COMMAND $<TARGET_FILE:Nerve> + "human.off" "2" "10" "0.3") - add_test(NAME Nerve_GIC_utilities_nerve COMMAND $<TARGET_FILE:Nerve> - "human.off" "2" "10" "0.3") +add_test(NAME Nerve_GIC_utilities_VoronoiGIC COMMAND $<TARGET_FILE:VoronoiGIC> + "human.off" "100") - add_test(NAME Nerve_GIC_utilities_VoronoiGIC COMMAND $<TARGET_FILE:VoronoiGIC> - "human.off" "100") - - install(TARGETS Nerve DESTINATION bin) - install(TARGETS VoronoiGIC DESTINATION bin) - install(FILES KeplerMapperVisuFromTxtFile.py km.py km.py.COPYRIGHT DESTINATION bin) - -endif (NOT CGAL_VERSION VERSION_LESS 4.11.0) +install(TARGETS Nerve DESTINATION bin) +install(TARGETS VoronoiGIC DESTINATION bin) +install(FILES KeplerMapperVisuFromTxtFile.py km.py km.py.COPYRIGHT DESTINATION bin) diff --git a/src/Nerve_GIC/utilities/Nerve.cpp b/src/Nerve_GIC/utilities/Nerve.cpp index d34e922c..7b09f89d 100644 --- a/src/Nerve_GIC/utilities/Nerve.cpp +++ b/src/Nerve_GIC/utilities/Nerve.cpp @@ -42,7 +42,7 @@ int main(int argc, char **argv) { bool check = SC.read_point_cloud(off_file_name); if (!check) { - std::cout << "Incorrect OFF file." << std::endl; + std::clog << "Incorrect OFF file." << std::endl; } else { SC.set_type("Nerve"); @@ -67,15 +67,15 @@ int main(int argc, char **argv) { // ---------------------------------------------------------------------------- if (verb) { - std::cout << "Nerve is of dimension " << stree.dimension() << " - " << stree.num_simplices() << " simplices - " + std::clog << "Nerve is of dimension " << stree.dimension() << " - " << stree.num_simplices() << " simplices - " << stree.num_vertices() << " vertices." << std::endl; - std::cout << "Iterator on Nerve simplices" << std::endl; + std::clog << "Iterator on Nerve simplices" << std::endl; for (auto f_simplex : stree.filtration_simplex_range()) { for (auto vertex : stree.simplex_vertex_range(f_simplex)) { - std::cout << vertex << " "; + std::clog << vertex << " "; } - std::cout << std::endl; + std::clog << std::endl; } } } diff --git a/src/Nerve_GIC/utilities/VoronoiGIC.cpp b/src/Nerve_GIC/utilities/VoronoiGIC.cpp index 0182c948..117c89fb 100644 --- a/src/Nerve_GIC/utilities/VoronoiGIC.cpp +++ b/src/Nerve_GIC/utilities/VoronoiGIC.cpp @@ -40,7 +40,7 @@ int main(int argc, char **argv) { bool check = GIC.read_point_cloud(off_file_name); if (!check) { - std::cout << "Incorrect OFF file." << std::endl; + std::clog << "Incorrect OFF file." << std::endl; } else { GIC.set_type("GIC"); @@ -61,15 +61,15 @@ int main(int argc, char **argv) { // ---------------------------------------------------------------------------- if (verb) { - std::cout << "Graph induced complex is of dimension " << stree.dimension() << " - " << stree.num_simplices() + std::clog << "Graph induced complex is of dimension " << stree.dimension() << " - " << stree.num_simplices() << " simplices - " << stree.num_vertices() << " vertices." << std::endl; - std::cout << "Iterator on graph induced complex simplices" << std::endl; + std::clog << "Iterator on graph induced complex simplices" << std::endl; for (auto f_simplex : stree.filtration_simplex_range()) { for (auto vertex : stree.simplex_vertex_range(f_simplex)) { - std::cout << vertex << " "; + std::clog << vertex << " "; } - std::cout << std::endl; + std::clog << std::endl; } } } diff --git a/src/Nerve_GIC/utilities/km.py.COPYRIGHT b/src/Nerve_GIC/utilities/km.py.COPYRIGHT index bef7b121..5358d287 100644 --- a/src/Nerve_GIC/utilities/km.py.COPYRIGHT +++ b/src/Nerve_GIC/utilities/km.py.COPYRIGHT @@ -1,7 +1,7 @@ km.py is a fork of https://github.com/MLWave/kepler-mapper. Only the visualization part has been kept (Mapper part has been removed). -This file has te following Copyright : +This file has the following Copyright : The MIT License (MIT) |