summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-02-27 16:17:08 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-02-27 16:17:08 +0000
commitd357b3bf12430d5d1ccd03fed58966155bd8826c (patch)
treef96c8994238e39093329e94ee529429ffc5ef202
parent3f26877857b2f72053aff8bf0d449444114fd5a9 (diff)
Add TBB compilation support and documentation
Add Matplotlib results in GUDHI persistence graphical tools git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/ST_cythonize@2112 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: e9fe1111d3a7d82c004a390cee77197221f117ec
-rw-r--r--src/cython/CMakeLists.txt54
-rw-r--r--src/cython/doc/installation.rst19
-rw-r--r--src/cython/doc/persistence_graphical_tools_user.rst25
3 files changed, 75 insertions, 23 deletions
diff --git a/src/cython/CMakeLists.txt b/src/cython/CMakeLists.txt
index 449a980c..9e107500 100644
--- a/src/cython/CMakeLists.txt
+++ b/src/cython/CMakeLists.txt
@@ -40,12 +40,30 @@ if(PYTHON_PATH AND CYTHON_PATH)
set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-DCGAL_EIGEN3_ENABLED', ")
endif (EIGEN3_FOUND)
- # Copy recursively include, cython, example and test repositories before packages finding
- # Some tests files are removed in case some packages are not found
+ # Copy recursively include, cython, example, doc and test repositories before packages finding
+ # Some tests and doc files are removed in case some packages are not found
file(COPY include DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY cython DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY example DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY test DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+ file(COPY doc DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+ # Developper version for doc images
+ file(GLOB GUDHI_DEV_DOC_IMAGES "${CMAKE_SOURCE_DIR}/src/*/doc/*.png")
+ file(COPY ${GUDHI_DEV_DOC_IMAGES} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/doc/img")
+ # User version for doc images
+ file(GLOB GUDHI_USER_DOC_IMAGES "${CMAKE_SOURCE_DIR}/doc/*/*.png")
+ file(COPY ${GUDHI_USER_DOC_IMAGES} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/doc/img")
+ # Biblio
+ file(GLOB GUDHI_BIB_FILES "${CMAKE_SOURCE_DIR}/biblio/*.bib")
+ file(COPY ${GUDHI_BIB_FILES} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/doc/")
+ # Cubical complex perseus doc example
+ file(GLOB GUDHI_CUBICAL_PERSEUS_FILES "${CMAKE_SOURCE_DIR}/data/bitmap/*cubicalcomplexdoc.txt")
+ file(COPY ${GUDHI_CUBICAL_PERSEUS_FILES} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/doc/")
+ file(COPY "${CMAKE_SOURCE_DIR}/data/points/alphacomplexdoc.off" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/doc/")
+ file(COPY "${CMAKE_SOURCE_DIR}/data/distance_matrix/full_square_distance_matrix.csv" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/doc/")
+ # Persistence graphical tools examples
+ file(COPY "${CMAKE_SOURCE_DIR}/data/bitmap/3d_torus.txt" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/doc/")
+ file(COPY "${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/doc/")
if (NOT CGAL_VERSION VERSION_LESS 4.8.1)
# If CGAL_VERSION >= 4.8.1, include subsampling
@@ -54,6 +72,9 @@ if(PYTHON_PATH AND CYTHON_PATH)
else (NOT CGAL_VERSION VERSION_LESS 4.8.1)
# Remove alpha complex unitary tests
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/test/test_subsampling.py)
+ file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/doc/subsampling_ref.rst")
+ file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/doc/subsampling_sum.rst")
+ file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/doc/subsampling_user.rst")
endif (NOT CGAL_VERSION VERSION_LESS 4.8.1)
if (NOT CGAL_VERSION VERSION_LESS 4.8.0)
# If CGAL_VERSION >= 4.8.0, include tangential complex
@@ -63,6 +84,12 @@ if(PYTHON_PATH AND CYTHON_PATH)
# Remove tangential complex and bottleneck unitary tests
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/test/test_tangential_complex.py)
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/test/test_bottleneck_distance.py)
+ file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/doc/bottleneck_distance_ref.rst")
+ file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/doc/bottleneck_distance_sum.rst")
+ file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/doc/bottleneck_distance_user.rst")
+ file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/doc/tangential_complex_ref.rst")
+ file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/doc/tangential_complex_sum.rst")
+ file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/doc/tangential_complex_user.rst")
endif (NOT CGAL_VERSION VERSION_LESS 4.8.0)
if (NOT CGAL_VERSION VERSION_LESS 4.7.0)
# If CGAL_VERSION >= 4.7.0, include alpha
@@ -70,6 +97,9 @@ if(PYTHON_PATH AND CYTHON_PATH)
else (NOT CGAL_VERSION VERSION_LESS 4.7.0)
# Remove alpha complex unitary tests
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/test/test_alpha_complex.py)
+ file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/doc/alpha_complex_ref.rst")
+ file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/doc/alpha_complex_sum.rst")
+ file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/doc/alpha_complex_user.rst")
endif (NOT CGAL_VERSION VERSION_LESS 4.7.0)
if(CGAL_FOUND)
@@ -139,28 +169,10 @@ if(PYTHON_PATH AND CYTHON_PATH)
# Documentation generation is available through sphinx
find_program( SPHINX_PATH sphinx-build )
if(SPHINX_PATH)
- file(COPY doc DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
- # Developper version
- file(GLOB GUDHI_DEV_DOC_IMAGES "${CMAKE_SOURCE_DIR}/src/*/doc/*.png")
- file(COPY ${GUDHI_DEV_DOC_IMAGES} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/doc/img")
- # User version
- file(GLOB GUDHI_USER_DOC_IMAGES "${CMAKE_SOURCE_DIR}/doc/*/*.png")
- file(COPY ${GUDHI_USER_DOC_IMAGES} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/doc/img")
- # Biblio
- file(GLOB GUDHI_BIB_FILES "${CMAKE_SOURCE_DIR}/biblio/*.bib")
- file(COPY ${GUDHI_BIB_FILES} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/doc/")
- # Cubical complex perseus doc example
- file(GLOB GUDHI_CUBICAL_PERSEUS_FILES "${CMAKE_SOURCE_DIR}/data/bitmap/*cubicalcomplexdoc.txt")
- file(COPY ${GUDHI_CUBICAL_PERSEUS_FILES} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/doc/")
- file(COPY "${CMAKE_SOURCE_DIR}/data/points/alphacomplexdoc.off" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/doc/")
- file(COPY "${CMAKE_SOURCE_DIR}/data/distance_matrix/full_square_distance_matrix.csv" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/doc/")
- # Persistence graphical tools examples
- file(COPY "${CMAKE_SOURCE_DIR}/data/bitmap/3d_torus.txt" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/doc/")
- file(COPY "${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/doc/")
if (UNIX)
add_custom_target(sphinx
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc
- COMMAND make html && make doctest)
+ COMMAND make html doctest)
else (UNIX)
add_custom_target(sphinx
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc
diff --git a/src/cython/doc/installation.rst b/src/cython/doc/installation.rst
index 0a715b34..c47802b9 100644
--- a/src/cython/doc/installation.rst
+++ b/src/cython/doc/installation.rst
@@ -135,3 +135,22 @@ The following examples require the `NumPy <http://numpy.org>`_:
* :download:`rips_persistence_diagram.py <../example/rips_persistence_diagram.py>`
* :download:`rips_complex_diagram_persistence_from_distance_matrix_file_example.py <../example/rips_complex_diagram_persistence_from_distance_matrix_file_example.py>`
* :download:`tangential_complex_plain_homology_from_off_file_example.py <../example/tangential_complex_plain_homology_from_off_file_example.py>`
+
+Threading Building Blocks
+=========================
+
+`IntelĀ® TBB <https://www.threadingbuildingblocks.org/>`_ lets you easily write
+parallel C++ programs that take full advantage of multicore performance, that
+are portable and composable, and that have future-proof scalability.
+
+Having IntelĀ® TBB installed is recommended to parallelize and accelerate some
+GUDHI computations.
+
+Bug reports and contributions
+*****************************
+
+Please help us improving the quality of the GUDHI library. You may report bugs or suggestions to:
+
+ Contact: gudhi-users@lists.gforge.inria.fr
+
+GUDHI is open to external contributions. If you want to join our development team, please contact us.
diff --git a/src/cython/doc/persistence_graphical_tools_user.rst b/src/cython/doc/persistence_graphical_tools_user.rst
index 43c695bf..1a5195c5 100644
--- a/src/cython/doc/persistence_graphical_tools_user.rst
+++ b/src/cython/doc/persistence_graphical_tools_user.rst
@@ -17,6 +17,11 @@ This function is useful to show the color palette values of dimension:
import gudhi
gudhi.show_palette_values(alpha=1.0)
+.. plot::
+
+ import gudhi
+ gudhi.show_palette_values(alpha=1.0)
+
Show persistence as a barcode
-----------------------------
@@ -30,6 +35,13 @@ This function can display the persistence result as a barcode:
diag = periodic_cc.persistence()
gudhi.barcode_persistence(diag)
+.. plot::
+
+ import gudhi
+
+ periodic_cc = gudhi.PeriodicCubicalComplex(perseus_file='3d_torus.txt')
+ diag = periodic_cc.persistence()
+ gudhi.barcode_persistence(diag)
Show persistence as a diagram
-----------------------------
@@ -40,7 +52,16 @@ This function can display the persistence result as a diagram:
import gudhi
- alpha_complex = gudhi.AlphaComplex(off_file='tore3D_300.off')
- simplex_tree = alpha_complex.create_simplex_tree()
+ rips_complex = gudhi.RipsComplex(off_file='tore3D_300.off', max_edge_length=2.0)
+ simplex_tree = rips_complex.create_simplex_tree(max_dimension=3)
+ diag = simplex_tree.persistence()
+ gudhi.diagram_persistence(diag)
+
+.. plot::
+
+ import gudhi
+
+ rips_complex = gudhi.RipsComplex(off_file='tore3D_300.off', max_edge_length=2.0)
+ simplex_tree = rips_complex.create_simplex_tree(max_dimension=3)
diag = simplex_tree.persistence()
gudhi.diagram_persistence(diag)