diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-11-16 17:48:57 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-11-16 17:48:57 +0000 |
commit | 4036005c0302fa7ce72ef2966bda73049da6be41 (patch) | |
tree | 0f99f40bbf0efe3161febd2528807507f0387da5 /src/Nerve_GIC | |
parent | a81f82e1751846495c5f02fb1486ae5b574d8232 (diff) | |
parent | 0b38e753e73af22391788f0bb92fc3ddb49f6938 (diff) |
Merge last trunk modifications
Fix copyright issues
Add Nerve_GIC as examples
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/Nerve_GIC@2897 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: ee046c4c043c7fb76f4b2ad6772229f3a837ae8f
Diffstat (limited to 'src/Nerve_GIC')
-rw-r--r-- | src/Nerve_GIC/example/CMakeLists.txt | 26 | ||||
-rw-r--r-- | src/Nerve_GIC/example/CoordGIC.cpp | 2 | ||||
-rw-r--r-- | src/Nerve_GIC/example/FuncGIC.cpp | 2 | ||||
-rw-r--r-- | src/Nerve_GIC/example/GIC.cpp | 2 | ||||
-rwxr-xr-x | src/Nerve_GIC/example/KeplerMapperVisuFromTxtFile.py | 28 | ||||
-rw-r--r-- | src/Nerve_GIC/example/Nerve.cpp | 4 | ||||
-rw-r--r-- | src/Nerve_GIC/example/VoronoiGIC.cpp | 2 | ||||
-rw-r--r-- | src/Nerve_GIC/example/km.py.COPYRIGHT | 26 | ||||
-rw-r--r-- | src/Nerve_GIC/include/gudhi/GIC.h | 2 | ||||
-rw-r--r-- | src/Nerve_GIC/test/CMakeLists.txt | 19 | ||||
-rw-r--r-- | src/Nerve_GIC/test/test_GIC.cpp | 2 |
11 files changed, 82 insertions, 33 deletions
diff --git a/src/Nerve_GIC/example/CMakeLists.txt b/src/Nerve_GIC/example/CMakeLists.txt index 871e46a6..461b6db2 100644 --- a/src/Nerve_GIC/example/CMakeLists.txt +++ b/src/Nerve_GIC/example/CMakeLists.txt @@ -2,22 +2,28 @@ cmake_minimum_required(VERSION 2.6) project(Nerve_GIC_examples) add_executable ( Nerve Nerve.cpp ) -target_link_libraries(Nerve ${Boost_SYSTEM_LIBRARY}) - add_executable ( CoordGIC CoordGIC.cpp ) -target_link_libraries(CoordGIC ${Boost_SYSTEM_LIBRARY}) - add_executable ( FuncGIC FuncGIC.cpp ) -target_link_libraries(FuncGIC ${Boost_SYSTEM_LIBRARY}) - add_executable ( VoronoiGIC VoronoiGIC.cpp ) -target_link_libraries(VoronoiGIC ${Boost_SYSTEM_LIBRARY}) - -#[[file(COPY KeplerMapperVisuFromTxtFile.py km.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)]] if (TBB_FOUND) target_link_libraries(Nerve ${TBB_LIBRARIES}) target_link_libraries(CoordGIC ${TBB_LIBRARIES}) target_link_libraries(FuncGIC ${TBB_LIBRARIES}) target_link_libraries(VoronoiGIC ${TBB_LIBRARIES}) -endif()
\ No newline at end of file +endif() + +file(COPY KeplerMapperVisuFromTxtFile.py km.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) + +add_test(NAME Nerve_GIC_example_nerve COMMAND $<TARGET_FILE:Nerve> + "${CMAKE_SOURCE_DIR}/data/points/human.off" "2" "10" "0.3") + +add_test(NAME Nerve_GIC_example_VoronoiGIC COMMAND $<TARGET_FILE:VoronoiGIC> + "${CMAKE_SOURCE_DIR}/data/points/human.off" "100") + +add_test(NAME Nerve_GIC_example_CoordGIC COMMAND $<TARGET_FILE:CoordGIC> + "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "0") + +add_test(NAME Nerve_GIC_example_FuncGIC COMMAND $<TARGET_FILE:FuncGIC> + "${CMAKE_SOURCE_DIR}/data/points/COIL_database/lucky_cat.off" + "${CMAKE_SOURCE_DIR}/data/points/COIL_database/lucky_cat_PCA1") diff --git a/src/Nerve_GIC/example/CoordGIC.cpp b/src/Nerve_GIC/example/CoordGIC.cpp index e24943df..f23e3f55 100644 --- a/src/Nerve_GIC/example/CoordGIC.cpp +++ b/src/Nerve_GIC/example/CoordGIC.cpp @@ -4,7 +4,7 @@ * * Author(s): Mathieu Carrière * - * Copyright (C) 2017 INRIA Saclay (France) + * Copyright (C) 2017 INRIA * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Nerve_GIC/example/FuncGIC.cpp b/src/Nerve_GIC/example/FuncGIC.cpp index 99e3fb78..1601ddab 100644 --- a/src/Nerve_GIC/example/FuncGIC.cpp +++ b/src/Nerve_GIC/example/FuncGIC.cpp @@ -4,7 +4,7 @@ * * Author(s): Mathieu Carrière * - * Copyright (C) 2017 INRIA Saclay (France) + * Copyright (C) 2017 INRIA * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Nerve_GIC/example/GIC.cpp b/src/Nerve_GIC/example/GIC.cpp index b8b5cd05..cdfe73a7 100644 --- a/src/Nerve_GIC/example/GIC.cpp +++ b/src/Nerve_GIC/example/GIC.cpp @@ -4,7 +4,7 @@ * * Author(s): Mathieu Carrière * - * Copyright (C) 2017 INRIA Saclay (France) + * Copyright (C) 2017 INRIA * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Nerve_GIC/example/KeplerMapperVisuFromTxtFile.py b/src/Nerve_GIC/example/KeplerMapperVisuFromTxtFile.py index 06d22abd..406264ba 100755 --- a/src/Nerve_GIC/example/KeplerMapperVisuFromTxtFile.py +++ b/src/Nerve_GIC/example/KeplerMapperVisuFromTxtFile.py @@ -2,6 +2,32 @@ import km import numpy as np from collections import defaultdict +"""This file is part of the Gudhi Library. The Gudhi library + (Geometric Understanding in Higher Dimensions) is a generic C++ + library for computational topology. + + Author(s): Mathieu Carriere + + Copyright (C) 2017 INRIA + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + +__author__ = "Mathieu Carriere" +__copyright__ = "Copyright (C) 2017 INRIA" +__license__ = "GPL v3" + network = {} mapper = km.KeplerMapper(verbose=0) data = np.zeros((3,3)) @@ -41,4 +67,4 @@ network["meta"] = lens mapper.visualize(network, color_function = color, path_html="SC.html", title=dat, graph_link_distance=30, graph_gravity=0.1, graph_charge=-120, custom_tooltips=custom, width_html=0, -height_html=0, show_tooltips=True, show_title=True, show_meta=True, res=param[0],gain=param[1], minimum=m,maximum=M)
\ No newline at end of file +height_html=0, show_tooltips=True, show_title=True, show_meta=True, res=param[0],gain=param[1], minimum=m,maximum=M) diff --git a/src/Nerve_GIC/example/Nerve.cpp b/src/Nerve_GIC/example/Nerve.cpp index 70424cda..71f12f5d 100644 --- a/src/Nerve_GIC/example/Nerve.cpp +++ b/src/Nerve_GIC/example/Nerve.cpp @@ -4,7 +4,7 @@ * * Author(s): Mathieu Carrière * - * Copyright (C) 2017 INRIA Saclay (France) + * Copyright (C) 2017 INRIA * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,7 +25,7 @@ void usage(int nbArgs, char * const progName) { std::cerr << "Error: Number of arguments (" << nbArgs << ") is not correct\n"; std::cerr << "Usage: " << progName << " filename.off coordinate resolution gain [--v] \n"; - std::cerr << " i.e.: " << progName << " ../../../../data/points/human.off 2 10 0.3 --v \n"; + std::cerr << " i.e.: " << progName << " ../../data/points/human.off 2 10 0.3 --v \n"; exit(-1); // ----- >> } diff --git a/src/Nerve_GIC/example/VoronoiGIC.cpp b/src/Nerve_GIC/example/VoronoiGIC.cpp index 73a776a6..8ce64819 100644 --- a/src/Nerve_GIC/example/VoronoiGIC.cpp +++ b/src/Nerve_GIC/example/VoronoiGIC.cpp @@ -4,7 +4,7 @@ * * Author(s): Mathieu Carrière * - * Copyright (C) 2017 INRIA Saclay (France) + * Copyright (C) 2017 INRIA * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Nerve_GIC/example/km.py.COPYRIGHT b/src/Nerve_GIC/example/km.py.COPYRIGHT new file mode 100644 index 00000000..bef7b121 --- /dev/null +++ b/src/Nerve_GIC/example/km.py.COPYRIGHT @@ -0,0 +1,26 @@ +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 : + +The MIT License (MIT) + +Copyright (c) 2015 Triskelion - HJ van Veen - info@mlwave.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/Nerve_GIC/include/gudhi/GIC.h b/src/Nerve_GIC/include/gudhi/GIC.h index 2520042d..ca8727a0 100644 --- a/src/Nerve_GIC/include/gudhi/GIC.h +++ b/src/Nerve_GIC/include/gudhi/GIC.h @@ -799,7 +799,7 @@ class Cover_complex { if (cover_color[simplices[i][0]].first > mask && cover_color[simplices[i][1]].first > mask) graphic << simplices[i][0] << " " << simplices[i][1] << std::endl; graphic.close(); - std::cout << "SC.txt generated. It can be visualized with e.g. python visu.py and firefox." << std::endl; + std::cout << "SC.txt generated. It can be visualized with e.g. python KeplerMapperVisuFromTxtFile.py and firefox." << std::endl; } diff --git a/src/Nerve_GIC/test/CMakeLists.txt b/src/Nerve_GIC/test/CMakeLists.txt index 627778fa..77efe043 100644 --- a/src/Nerve_GIC/test/CMakeLists.txt +++ b/src/Nerve_GIC/test/CMakeLists.txt @@ -1,23 +1,14 @@ cmake_minimum_required(VERSION 2.6) project(Graph_induced_complex_tests) -if (GCOVR_PATH) - # for gcovr to make coverage reports - Corbera Jenkins plugin - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage") -endif() -if (GPROF_PATH) - # for gprof to make coverage reports - Jenkins - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg") -endif() +include(GUDHI_test_coverage) -add_executable ( graph_induced_complex_UT test_GIC.cpp ) -target_link_libraries(graph_induced_complex_UT ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +add_executable ( Graph_induced_complex_test_unit test_GIC.cpp ) +target_link_libraries(Graph_induced_complex_test_unit ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) if (TBB_FOUND) - target_link_libraries(graph_induced_complex_UT ${TBB_LIBRARIES}) + target_link_libraries(Graph_induced_complex_test_unit ${TBB_LIBRARIES}) endif() file(COPY data DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) -add_test(graph_induced_complex_UT ${CMAKE_CURRENT_BINARY_DIR}/graph_induced_complex_UT - # XML format for Jenkins xUnit plugin - --log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/graph_induced_complex_UT.xml --log_level=test_suite --report_level=no) +gudhi_add_coverage_test(Graph_induced_complex_test_unit) diff --git a/src/Nerve_GIC/test/test_GIC.cpp b/src/Nerve_GIC/test/test_GIC.cpp index e8c6ed4a..d7af7680 100644 --- a/src/Nerve_GIC/test/test_GIC.cpp +++ b/src/Nerve_GIC/test/test_GIC.cpp @@ -4,7 +4,7 @@ * * Author(s): Mathieu Carrière * - * Copyright (C) 2017 INRIA Saclay (France) + * Copyright (C) 2017 INRIA * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by |