diff options
-rw-r--r-- | src/Alpha_complex/example/CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/Alpha_complex/include/gudhi/Alpha_complex_3d.h | 6 | ||||
-rw-r--r-- | src/Alpha_complex/test/CMakeLists.txt | 6 | ||||
-rw-r--r-- | src/Alpha_complex/utilities/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/Collapse/example/CMakeLists.txt | 41 | ||||
-rw-r--r-- | src/Collapse/include/gudhi/Flag_complex_edge_collapser.h | 6 | ||||
-rw-r--r-- | src/Collapse/test/CMakeLists.txt | 16 | ||||
-rw-r--r-- | src/Collapse/utilities/CMakeLists.txt | 66 | ||||
-rw-r--r-- | src/common/doc/installation.h | 10 | ||||
-rw-r--r-- | src/python/doc/installation.rst | 2 | ||||
-rw-r--r-- | src/python/doc/rips_complex_sum.inc | 22 | ||||
-rw-r--r-- | src/python/doc/rips_complex_user.rst | 6 |
12 files changed, 107 insertions, 86 deletions
diff --git a/src/Alpha_complex/example/CMakeLists.txt b/src/Alpha_complex/example/CMakeLists.txt index 2eecd50c..6e231773 100644 --- a/src/Alpha_complex/example/CMakeLists.txt +++ b/src/Alpha_complex/example/CMakeLists.txt @@ -25,7 +25,7 @@ if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.11.0) add_test(NAME Alpha_complex_example_fast_from_off_32 COMMAND $<TARGET_FILE:Alpha_complex_example_fast_from_off> "${CMAKE_SOURCE_DIR}/data/points/alphacomplexdoc.off" "32.0" "${CMAKE_CURRENT_BINARY_DIR}/fastalphaoffreader_result_32.txt") -if (DIFF_PATH) + if (DIFF_PATH) # Do not forget to copy test results files in current binary dir file(COPY "alphaoffreader_for_doc_32.txt" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) file(COPY "alphaoffreader_for_doc_60.txt" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) @@ -43,8 +43,10 @@ if (DIFF_PATH) add_test(Alpha_complex_example_fast_from_off_32_diff_files ${DIFF_PATH} ${CMAKE_CURRENT_BINARY_DIR}/fastalphaoffreader_result_32.txt ${CMAKE_CURRENT_BINARY_DIR}/alphaoffreader_for_doc_32.txt) set_tests_properties(Alpha_complex_example_fast_from_off_32_diff_files PROPERTIES DEPENDS Alpha_complex_example_fast_from_off_32) -endif() + endif() + endif(NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.11.0) +if (NOT CGAL_VERSION VERSION_LESS 4.11.0) add_executable ( Alpha_complex_example_weighted_3d_from_points Weighted_alpha_complex_3d_from_points.cpp ) target_link_libraries(Alpha_complex_example_weighted_3d_from_points ${CGAL_LIBRARY}) if (TBB_FOUND) @@ -61,4 +63,4 @@ endif() add_test(NAME Alpha_complex_example_3d_from_points COMMAND $<TARGET_FILE:Alpha_complex_example_3d_from_points>) -endif(NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.11.0) +endif(NOT CGAL_VERSION VERSION_LESS 4.11.0) diff --git a/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h b/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h index f56e12d0..622b10ee 100644 --- a/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h +++ b/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h @@ -38,8 +38,6 @@ #include <CGAL/iterator.h> #include <CGAL/version.h> // for CGAL_VERSION_NR -#include <Eigen/src/Core/util/Macros.h> // for EIGEN_VERSION_AT_LEAST - #include <boost/container/static_vector.hpp> #include <iostream> @@ -56,10 +54,6 @@ # error Alpha_complex_3d is only available for CGAL >= 4.11 #endif -#if !EIGEN_VERSION_AT_LEAST(3,1,0) -# error Alpha_complex_3d is only available for Eigen3 >= 3.1.0 installed with CGAL -#endif - namespace Gudhi { namespace alpha_complex { diff --git a/src/Alpha_complex/test/CMakeLists.txt b/src/Alpha_complex/test/CMakeLists.txt index fe4b23e4..f38bd096 100644 --- a/src/Alpha_complex/test/CMakeLists.txt +++ b/src/Alpha_complex/test/CMakeLists.txt @@ -18,6 +18,10 @@ if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.11.0) gudhi_add_boost_test(Alpha_complex_test_unit) gudhi_add_boost_test(Delaunay_complex_test_unit) +endif (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.11.0) + +if (NOT CGAL_VERSION VERSION_LESS 4.11.0) + add_executable ( Alpha_complex_3d_test_unit Alpha_complex_3d_unit_test.cpp ) target_link_libraries(Alpha_complex_3d_test_unit ${CGAL_LIBRARY}) add_executable ( Weighted_alpha_complex_3d_test_unit Weighted_alpha_complex_3d_unit_test.cpp ) @@ -38,4 +42,4 @@ if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.11.0) gudhi_add_boost_test(Periodic_alpha_complex_3d_test_unit) gudhi_add_boost_test(Weighted_periodic_alpha_complex_3d_test_unit) -endif (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.11.0) +endif (NOT CGAL_VERSION VERSION_LESS 4.11.0) diff --git a/src/Alpha_complex/utilities/CMakeLists.txt b/src/Alpha_complex/utilities/CMakeLists.txt index 2ffbdde0..f0ddfc2c 100644 --- a/src/Alpha_complex/utilities/CMakeLists.txt +++ b/src/Alpha_complex/utilities/CMakeLists.txt @@ -27,7 +27,9 @@ if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.11.0) endif() install(TARGETS alpha_complex_persistence DESTINATION bin) +endif (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.11.0) +if (NOT CGAL_VERSION VERSION_LESS 4.11.0) add_executable(alpha_complex_3d_persistence alpha_complex_3d_persistence.cpp) target_link_libraries(alpha_complex_3d_persistence ${CGAL_LIBRARY} Boost::program_options) if (TBB_FOUND) @@ -75,4 +77,4 @@ if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.11.0) install(TARGETS alpha_complex_3d_persistence DESTINATION bin) -endif (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.11.0) +endif (NOT CGAL_VERSION VERSION_LESS 4.11.0) diff --git a/src/Collapse/example/CMakeLists.txt b/src/Collapse/example/CMakeLists.txt index ba0e75e3..4456a844 100644 --- a/src/Collapse/example/CMakeLists.txt +++ b/src/Collapse/example/CMakeLists.txt @@ -1,23 +1,28 @@ project(Edge_collapse_examples) -# Point cloud -add_executable ( Edge_collapse_example_basic edge_collapse_basic_example.cpp ) -if (TBB_FOUND) - target_link_libraries(Edge_collapse_example_basic ${TBB_LIBRARIES}) -endif() +if (NOT EIGEN3_VERSION VERSION_LESS 3.1.0) -add_test(NAME Edge_collapse_example_basic COMMAND $<TARGET_FILE:Edge_collapse_example_basic>) + # Point cloud + add_executable ( Edge_collapse_example_basic edge_collapse_basic_example.cpp ) + + if (TBB_FOUND) + target_link_libraries(Edge_collapse_example_basic ${TBB_LIBRARIES}) + endif() + + add_test(NAME Edge_collapse_example_basic COMMAND $<TARGET_FILE:Edge_collapse_example_basic>) + + # Point cloud + add_executable ( Edge_collapse_conserve_persistence edge_collapse_conserve_persistence.cpp ) + + if (TBB_FOUND) + target_link_libraries(Edge_collapse_conserve_persistence ${TBB_LIBRARIES}) + endif() + + add_test(NAME Edge_collapse_conserve_persistence_1 COMMAND $<TARGET_FILE:Edge_collapse_conserve_persistence> + "${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off" "0.2") + + add_test(NAME Edge_collapse_conserve_persistence_2 COMMAND $<TARGET_FILE:Edge_collapse_conserve_persistence> + "${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off" "1.8") -# Point cloud -add_executable ( Edge_collapse_conserve_persistence edge_collapse_conserve_persistence.cpp ) - -if (TBB_FOUND) - target_link_libraries(Edge_collapse_conserve_persistence ${TBB_LIBRARIES}) -endif() - -add_test(NAME Edge_collapse_conserve_persistence_1 COMMAND $<TARGET_FILE:Edge_collapse_conserve_persistence> - "${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off" "0.2") - -add_test(NAME Edge_collapse_conserve_persistence_2 COMMAND $<TARGET_FILE:Edge_collapse_conserve_persistence> - "${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off" "1.8") +endif()
\ No newline at end of file diff --git a/src/Collapse/include/gudhi/Flag_complex_edge_collapser.h b/src/Collapse/include/gudhi/Flag_complex_edge_collapser.h index b6b7f7c1..713c6608 100644 --- a/src/Collapse/include/gudhi/Flag_complex_edge_collapser.h +++ b/src/Collapse/include/gudhi/Flag_complex_edge_collapser.h @@ -18,6 +18,7 @@ #include <boost/iterator/iterator_facade.hpp> #include <Eigen/Sparse> +#include <Eigen/src/Core/util/Macros.h> // for EIGEN_VERSION_AT_LEAST #ifdef GUDHI_USE_TBB #include <tbb/parallel_sort.h> @@ -34,6 +35,11 @@ #include <iterator> // for std::inserter #include <type_traits> // for std::decay +// Make compilation fail - required for external projects - https://github.com/GUDHI/gudhi-devel/issues/10 +#if !EIGEN_VERSION_AT_LEAST(3,1,0) +# error Edge Collapse is only available for Eigen3 >= 3.1.0 +#endif + namespace Gudhi { namespace collapse { diff --git a/src/Collapse/test/CMakeLists.txt b/src/Collapse/test/CMakeLists.txt index c7eafb46..c04199e2 100644 --- a/src/Collapse/test/CMakeLists.txt +++ b/src/Collapse/test/CMakeLists.txt @@ -1,9 +1,13 @@ project(Collapse_tests) -include(GUDHI_boost_test) +if (NOT EIGEN3_VERSION VERSION_LESS 3.1.0) -add_executable ( Collapse_test_unit collapse_unit_test.cpp ) -if (TBB_FOUND) - target_link_libraries(Collapse_test_unit ${TBB_LIBRARIES}) -endif() -gudhi_add_boost_test(Collapse_test_unit) + include(GUDHI_boost_test) + + add_executable ( Collapse_test_unit collapse_unit_test.cpp ) + if (TBB_FOUND) + target_link_libraries(Collapse_test_unit ${TBB_LIBRARIES}) + endif() + gudhi_add_boost_test(Collapse_test_unit) + +endif()
\ No newline at end of file diff --git a/src/Collapse/utilities/CMakeLists.txt b/src/Collapse/utilities/CMakeLists.txt index c742144b..97fef649 100644 --- a/src/Collapse/utilities/CMakeLists.txt +++ b/src/Collapse/utilities/CMakeLists.txt @@ -1,33 +1,37 @@ project(Collapse_utilities) -# From a point cloud -add_executable ( point_cloud_edge_collapse_rips_persistence point_cloud_edge_collapse_rips_persistence.cpp ) -target_link_libraries(point_cloud_edge_collapse_rips_persistence Boost::program_options) - -if (TBB_FOUND) - target_link_libraries(point_cloud_edge_collapse_rips_persistence ${TBB_LIBRARIES}) -endif() -add_test(NAME Edge_collapse_utilities_point_cloud_rips_persistence COMMAND $<TARGET_FILE:point_cloud_edge_collapse_rips_persistence> - "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "-r" "0.25" "-m" "0.5" "-d" "3" "-p" "3" "-o" "off_results.pers") - -install(TARGETS point_cloud_edge_collapse_rips_persistence DESTINATION bin) - -# From a distance matrix -add_executable ( distance_matrix_edge_collapse_rips_persistence distance_matrix_edge_collapse_rips_persistence.cpp ) -target_link_libraries(distance_matrix_edge_collapse_rips_persistence Boost::program_options) - -if (TBB_FOUND) - target_link_libraries(distance_matrix_edge_collapse_rips_persistence ${TBB_LIBRARIES}) -endif() -add_test(NAME Edge_collapse_utilities_distance_matrix_rips_persistence COMMAND $<TARGET_FILE:distance_matrix_edge_collapse_rips_persistence> - "${CMAKE_SOURCE_DIR}/data/distance_matrix/tore3D_1307_distance_matrix.csv" "-r" "0.25" "-m" "0.5" "-d" "3" "-p" "3" "-o" "csv_results.pers") - -install(TARGETS distance_matrix_edge_collapse_rips_persistence DESTINATION bin) - -if (DIFF_PATH) - add_test(Edge_collapse_utilities_diff_persistence ${DIFF_PATH} - "off_results.pers" "csv_results.pers") - set_tests_properties(Edge_collapse_utilities_diff_persistence PROPERTIES DEPENDS - "Edge_collapse_utilities_point_cloud_rips_persistence;Edge_collapse_utilities_distance_matrix_rips_persistence") - -endif() +if (NOT EIGEN3_VERSION VERSION_LESS 3.1.0) + + # From a point cloud + add_executable ( point_cloud_edge_collapse_rips_persistence point_cloud_edge_collapse_rips_persistence.cpp ) + target_link_libraries(point_cloud_edge_collapse_rips_persistence Boost::program_options) + + if (TBB_FOUND) + target_link_libraries(point_cloud_edge_collapse_rips_persistence ${TBB_LIBRARIES}) + endif() + add_test(NAME Edge_collapse_utilities_point_cloud_rips_persistence COMMAND $<TARGET_FILE:point_cloud_edge_collapse_rips_persistence> + "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "-r" "0.25" "-m" "0.5" "-d" "3" "-p" "3" "-o" "off_results.pers") + + install(TARGETS point_cloud_edge_collapse_rips_persistence DESTINATION bin) + + # From a distance matrix + add_executable ( distance_matrix_edge_collapse_rips_persistence distance_matrix_edge_collapse_rips_persistence.cpp ) + target_link_libraries(distance_matrix_edge_collapse_rips_persistence Boost::program_options) + + if (TBB_FOUND) + target_link_libraries(distance_matrix_edge_collapse_rips_persistence ${TBB_LIBRARIES}) + endif() + add_test(NAME Edge_collapse_utilities_distance_matrix_rips_persistence COMMAND $<TARGET_FILE:distance_matrix_edge_collapse_rips_persistence> + "${CMAKE_SOURCE_DIR}/data/distance_matrix/tore3D_1307_distance_matrix.csv" "-r" "0.25" "-m" "0.5" "-d" "3" "-p" "3" "-o" "csv_results.pers") + + install(TARGETS distance_matrix_edge_collapse_rips_persistence DESTINATION bin) + + if (DIFF_PATH) + add_test(Edge_collapse_utilities_diff_persistence ${DIFF_PATH} + "off_results.pers" "csv_results.pers") + set_tests_properties(Edge_collapse_utilities_diff_persistence PROPERTIES DEPENDS + "Edge_collapse_utilities_point_cloud_rips_persistence;Edge_collapse_utilities_distance_matrix_rips_persistence") + + endif() + +endif()
\ No newline at end of file diff --git a/src/common/doc/installation.h b/src/common/doc/installation.h index ce2c5448..6af645e2 100644 --- a/src/common/doc/installation.h +++ b/src/common/doc/installation.h @@ -14,13 +14,13 @@ \verbatim cd /path-to-gudhi/ mkdir build cd build/ -cmake .. +cmake -DCMAKE_BUILD_TYPE=Release .. make \endverbatim * By default, examples are disabled. You can activate their compilation with * <a href="https://cmake.org/cmake/help/v3.0/manual/ccmake.1.html">ccmake</a> (on Linux and Mac OSX), * <a href="https://cmake.org/cmake/help/v3.0/manual/cmake-gui.1.html">cmake-gui</a> (on Windows) or by modifying the * cmake command as follows : -\verbatim cmake -DWITH_GUDHI_EXAMPLE=ON .. +\verbatim cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=ON .. make \endverbatim * A list of utilities and examples is available <a href="examples.html">here</a>. * @@ -66,9 +66,9 @@ make doxygen * Some GUDHI modules (cf. \ref main_page "modules list"), and few examples require CGAL, a C++ library that provides * easy access to efficient and reliable geometric algorithms. * - * \note There is no need to install CGAL, you can just <CODE>cmake . && make</CODE> CGAL (or even - * <CODE>cmake -DCGAL_HEADER_ONLY=ON .</CODE>), thereafter you will be able to compile - * GUDHI by calling <CODE>cmake -DCGAL_DIR=/your/path/to/CGAL-X.Y .. && make</CODE> + * \note There is no need to install CGAL, you can just <CODE>cmake -DCMAKE_BUILD_TYPE=Release . && make</CODE> CGAL + * (or even <CODE>cmake -DCMAKE_BUILD_TYPE=Release -DCGAL_HEADER_ONLY=ON .</CODE>), thereafter you will be able to + * compile GUDHI by calling <CODE>cmake -DCMAKE_BUILD_TYPE=Release -DCGAL_DIR=/your/path/to/CGAL-X.Y .. && make</CODE> * * The procedure to install this library according to * your operating system is detailed here http://doc.cgal.org/latest/Manual/installation.html diff --git a/src/python/doc/installation.rst b/src/python/doc/installation.rst index 78e1af73..4cc31d5c 100644 --- a/src/python/doc/installation.rst +++ b/src/python/doc/installation.rst @@ -65,7 +65,7 @@ one can build the GUDHI Python module, by running the following commands in a te cd /path-to-gudhi/ mkdir build cd build/ - cmake .. + cmake -DCMAKE_BUILD_TYPE=Release .. cd python make diff --git a/src/python/doc/rips_complex_sum.inc b/src/python/doc/rips_complex_sum.inc index c123ea2a..2cb24990 100644 --- a/src/python/doc/rips_complex_sum.inc +++ b/src/python/doc/rips_complex_sum.inc @@ -1,14 +1,14 @@ .. table:: :widths: 30 40 30 - +----------------------------------------------------------------+------------------------------------------------------------------------+----------------------------------------------------------------------+ - | .. figure:: | The Vietoris-Rips complex is a simplicial complex built as the | :Authors: Clément Maria, Pawel Dlotko, Vincent Rouvreau, Marc Glisse | - | ../../doc/Rips_complex/rips_complex_representation.png | clique-complex of a proximity graph. | | - | :figclass: align-center | | :Since: GUDHI 2.0.0 | - | | We also provide sparse approximations, to speed-up the computation | | - | | of persistent homology, and weighted versions, which are more robust | :License: MIT | - | | to outliers. | | - | | | | - +----------------------------------------------------------------+------------------------------------------------------------------------+----------------------------------------------------------------------+ - | * :doc:`rips_complex_user` | * :doc:`rips_complex_ref` | - +----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + +----------------------------------------------------------------+------------------------------------------------------------------------+----------------------------------------------------------------------------------+ + | .. figure:: | The Vietoris-Rips complex is a simplicial complex built as the | :Authors: Clément Maria, Pawel Dlotko, Vincent Rouvreau, Marc Glisse, Yuichi Ike | + | ../../doc/Rips_complex/rips_complex_representation.png | clique-complex of a proximity graph. | | + | :figclass: align-center | | :Since: GUDHI 2.0.0 | + | | We also provide sparse approximations, to speed-up the computation | | + | | of persistent homology, and weighted versions, which are more robust | :License: MIT | + | | to outliers. | | + | | | | + +----------------------------------------------------------------+------------------------------------------------------------------------+----------------------------------------------------------------------------------+ + | * :doc:`rips_complex_user` | * :doc:`rips_complex_ref` | + +----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ diff --git a/src/python/doc/rips_complex_user.rst b/src/python/doc/rips_complex_user.rst index 6048cc4e..27d218d4 100644 --- a/src/python/doc/rips_complex_user.rst +++ b/src/python/doc/rips_complex_user.rst @@ -7,9 +7,9 @@ Rips complex user manual Definition ---------- -==================================================================== ================================ ====================== -:Authors: Clément Maria, Pawel Dlotko, Vincent Rouvreau, Marc Glisse :Since: GUDHI 2.0.0 :License: GPL v3 -==================================================================== ================================ ====================== +================================================================================ ================================ ====================== +:Authors: Clément Maria, Pawel Dlotko, Vincent Rouvreau, Marc Glisse, Yuichi Ike :Since: GUDHI 2.0.0 :License: GPL v3 +================================================================================ ================================ ====================== +-------------------------------------------+----------------------------------------------------------------------+ | :doc:`rips_complex_user` | :doc:`rips_complex_ref` | |