From cb68f3e4c8ce7724ccb693e5c67dd9928d12d84b Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Wed, 16 Sep 2020 12:39:00 +0200 Subject: Some documentation about weighted dD Alpha complex. Make examples 3d/dD consistents --- src/Alpha_complex/doc/Intro_alpha_complex.h | 35 ++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'src/Alpha_complex/doc') diff --git a/src/Alpha_complex/doc/Intro_alpha_complex.h b/src/Alpha_complex/doc/Intro_alpha_complex.h index 60da7169..f14adee6 100644 --- a/src/Alpha_complex/doc/Intro_alpha_complex.h +++ b/src/Alpha_complex/doc/Intro_alpha_complex.h @@ -22,6 +22,17 @@ namespace alpha_complex { * * @{ * +
+Table of Contents + +
+ * \section definition Definition * * Alpha_complex is a simplicial complex @@ -146,6 +157,28 @@ namespace alpha_complex { * `SimplicialComplexForAlpha::prune_above_filtration()`). * In the following example, the value is given by the user as argument of the program. * + * \section weightedversion Weighted specific version + * Requires: \ref eigen ≥ 3.1.0 and \ref cgal ≥ 5.1.0. + * For performances reasons, it is advised to use \ref eigen ≥ 3.5.8 and \ref cgal ≥ 5.2.0 + * A weighted version for Alpha complex is available (cf. Alpha_complex). + * + * This example builds the CGAL weighted alpha shapes from a small molecule, and initializes the alpha complex with + * it. This example is taken from CGAL 3d + * weighted alpha shapes. + * + * Then, it is asked to display information about the alpha complex. + * + * \include Alpha_complex/Weighted_alpha_complex_from_points.cpp + * + * When launching: + * + * \code $> ./Weighted_alpha_complex_example_from_points + * \endcode + * + * the program output is: + * + * \include Alpha_complex/weightedalpha3dfrompoints_for_doc.txt + * * * \section offexample Example from OFF file * @@ -166,7 +199,7 @@ namespace alpha_complex { * \include Alpha_complex/alphaoffreader_for_doc_32.txt * * - * \section weighted3dexample 3d specific example + * \section weighted3dexample 3d specific version * * A specific module for Alpha complex is available in 3d (cf. Alpha_complex_3d) and allows to construct standard, * weighted, periodic or weighted and periodic versions of alpha complexes. Alpha values computation can be -- cgit v1.2.3 From 282934d4f51acac046c04f752534a6a900880df9 Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Wed, 16 Sep 2020 12:43:35 +0200 Subject: Add weighted in toc --- src/Alpha_complex/doc/Intro_alpha_complex.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/Alpha_complex/doc') diff --git a/src/Alpha_complex/doc/Intro_alpha_complex.h b/src/Alpha_complex/doc/Intro_alpha_complex.h index f14adee6..b04562e1 100644 --- a/src/Alpha_complex/doc/Intro_alpha_complex.h +++ b/src/Alpha_complex/doc/Intro_alpha_complex.h @@ -28,6 +28,7 @@ Table of Contents
  • Definition
  • Example from points
  • Create complex algorithm
  • +
  • Weighted specific version
  • Example from OFF file
  • 3d specific version
  • @@ -214,14 +215,7 @@ Table of Contents * * \include Alpha_complex/Weighted_alpha_complex_3d_from_points.cpp * - * When launching: - * - * \code $> ./Alpha_complex_example_weighted_3d_from_points - * \endcode - * - * the program output is: - * - * \include Alpha_complex/weightedalpha3dfrompoints_for_doc.txt + * The results will be the same as in \ref weightedversion . * */ /** @} */ // end defgroup alpha_complex -- cgit v1.2.3 From 6f2ec5ee6572351d3aee5f559ef4cf7ad03bf914 Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Tue, 29 Sep 2020 15:00:53 +0200 Subject: doc review: fix eigen version and period --- src/Alpha_complex/doc/Intro_alpha_complex.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Alpha_complex/doc') diff --git a/src/Alpha_complex/doc/Intro_alpha_complex.h b/src/Alpha_complex/doc/Intro_alpha_complex.h index b04562e1..78486ad6 100644 --- a/src/Alpha_complex/doc/Intro_alpha_complex.h +++ b/src/Alpha_complex/doc/Intro_alpha_complex.h @@ -160,7 +160,8 @@ Table of Contents * * \section weightedversion Weighted specific version * Requires: \ref eigen ≥ 3.1.0 and \ref cgal ≥ 5.1.0. - * For performances reasons, it is advised to use \ref eigen ≥ 3.5.8 and \ref cgal ≥ 5.2.0 + * For performances reasons, it is advised to use \ref eigen ≥ 3.3.5 and \ref cgal ≥ 5.2.0. + * * A weighted version for Alpha complex is available (cf. Alpha_complex). * * This example builds the CGAL weighted alpha shapes from a small molecule, and initializes the alpha complex with -- cgit v1.2.3 From 3b839cae75a7e58b87216ee92356267bbe873e46 Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Mon, 5 Oct 2020 11:26:24 +0200 Subject: doc review: eigen 3.3.5 and cgal 5.2.0 is advised for perf reasons not only on weighted version --- src/Alpha_complex/doc/Intro_alpha_complex.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/Alpha_complex/doc') diff --git a/src/Alpha_complex/doc/Intro_alpha_complex.h b/src/Alpha_complex/doc/Intro_alpha_complex.h index 78486ad6..fb051760 100644 --- a/src/Alpha_complex/doc/Intro_alpha_complex.h +++ b/src/Alpha_complex/doc/Intro_alpha_complex.h @@ -74,7 +74,7 @@ Table of Contents * [10^12,10^12+10^6]. Using `CGAL::Epick_d` makes the computations slightly faster, and the combinatorics are still * exact, but the computation of filtration values can exceptionally be arbitrarily bad. In all cases, we still * guarantee that the output is a valid filtration (faces have a filtration value no larger than their cofaces). - * - For performances reasons, it is advised to use `Alpha_complex` with \ref cgal ≥ 5.0.0. + * - For performances reasons, it is advised to use \ref eigen ≥ 3.3.5 and \ref cgal ≥ 5.2.0. * * \section pointsexample Example from points * @@ -160,7 +160,6 @@ Table of Contents * * \section weightedversion Weighted specific version * Requires: \ref eigen ≥ 3.1.0 and \ref cgal ≥ 5.1.0. - * For performances reasons, it is advised to use \ref eigen ≥ 3.3.5 and \ref cgal ≥ 5.2.0. * * A weighted version for Alpha complex is available (cf. Alpha_complex). * -- cgit v1.2.3 From 51f4de9a42cbdf7686a0f36106b31c0d3296ccfa Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Mon, 5 Oct 2020 16:11:46 +0200 Subject: doc review: Add some precision about regular triangulations --- src/Alpha_complex/doc/Intro_alpha_complex.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Alpha_complex/doc') diff --git a/src/Alpha_complex/doc/Intro_alpha_complex.h b/src/Alpha_complex/doc/Intro_alpha_complex.h index fb051760..c068b268 100644 --- a/src/Alpha_complex/doc/Intro_alpha_complex.h +++ b/src/Alpha_complex/doc/Intro_alpha_complex.h @@ -161,7 +161,9 @@ Table of Contents * \section weightedversion Weighted specific version * Requires: \ref eigen ≥ 3.1.0 and \ref cgal ≥ 5.1.0. * - * A weighted version for Alpha complex is available (cf. Alpha_complex). + * A weighted version for Alpha complex is available (cf. Alpha_complex). It is like a usual Alpha complex, but based + * on a CGAL regular triangulation instead + * of Delaunay. * * This example builds the CGAL weighted alpha shapes from a small molecule, and initializes the alpha complex with * it. This example is taken from CGAL 3d -- cgit v1.2.3 From ce73a29d4fee67b7d20c213df81edf57b0de8770 Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Tue, 27 Apr 2021 17:41:15 +0200 Subject: Doxygen documentation improvement --- .circleci/config.yml | 9 +- .../for_maintainers/new_gudhi_version_creation.md | 9 +- src/Alpha_complex/doc/Intro_alpha_complex.h | 14 +- .../doc/Intro_bottleneck_distance.h | 2 +- src/Cech_complex/doc/Intro_cech_complex.h | 6 +- src/Collapse/doc/intro_edge_collapse.h | 4 +- src/Doxyfile.in | 44 ++--- src/Nerve_GIC/doc/Intro_graph_induced_complex.h | 10 +- .../doc/Intro_persistent_cohomology.h | 14 +- src/Rips_complex/doc/Intro_rips_complex.h | 24 +-- src/Simplex_tree/doc/Intro_simplex_tree.h | 8 +- .../doc/Intro_spatial_searching.h | 2 +- src/Subsampling/doc/Intro_subsampling.h | 6 +- .../doc/Intro_tangential_complex.h | 4 +- src/Witness_complex/doc/Witness_complex_doc.h | 4 +- src/cmake/modules/GUDHI_doxygen_target.cmake | 47 +++++- src/cmake/modules/GUDHI_user_version_target.cmake | 11 +- src/common/doc/examples.h | 184 +++++++++++---------- src/common/doc/installation.h | 157 +++++++++--------- src/common/include/gudhi/Points_3D_off_io.h | 4 +- src/common/include/gudhi/Points_off_io.h | 4 +- 21 files changed, 302 insertions(+), 265 deletions(-) (limited to 'src/Alpha_complex/doc') diff --git a/.circleci/config.yml b/.circleci/config.yml index 7fa9ae05..f6a875dd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -90,10 +90,15 @@ jobs: mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_TEST=OFF -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=OFF -DUSER_VERSION_DIR=version .. + make user_version + cd version + mkdir build + cd build + cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_TEST=OFF -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=OFF .. make doxygen 2>&1 | tee dox.log grep warning dox.log - cp dox.log version/doc/html/ - cp -R version/doc/html /tmp/doxygen + cp dox.log html/ + cp -R html /tmp/doxygen - store_artifacts: path: /tmp/doxygen diff --git a/.github/for_maintainers/new_gudhi_version_creation.md b/.github/for_maintainers/new_gudhi_version_creation.md index aadfae7d..d6c4cdd3 100644 --- a/.github/for_maintainers/new_gudhi_version_creation.md +++ b/.github/for_maintainers/new_gudhi_version_creation.md @@ -34,16 +34,21 @@ make -j 4 all && ctest -j 4 --output-on-failure ## Create the documentation ```bash mkdir gudhi.doc.@GUDHI_VERSION@ -make doxygen 2>&1 | tee dox.log && grep warning dox.log ``` ***[Check there are no error and the warnings]*** ```bash -cp -R gudhi.@GUDHI_VERSION@/doc/html gudhi.doc.@GUDHI_VERSION@/cpp cd gudhi.@GUDHI_VERSION@ rm -rf build; mkdir build; cd build cmake -DCMAKE_BUILD_TYPE=Release -DCGAL_DIR=/your/path/to/CGAL -DWITH_GUDHI_EXAMPLE=ON -DPython_ADDITIONAL_VERSIONS=3 .. +make doxygen 2>&1 | tee dox.log && grep warning dox.log +``` + +***[Check there are no error and the warnings]*** + +```bash +cp -R html ../../gudhi.doc.@GUDHI_VERSION@/cpp export LC_ALL=en_US.UTF-8 # cf. bug https://github.com/GUDHI/gudhi-devel/issues/111 make sphinx ``` diff --git a/src/Alpha_complex/doc/Intro_alpha_complex.h b/src/Alpha_complex/doc/Intro_alpha_complex.h index c068b268..f417ebb2 100644 --- a/src/Alpha_complex/doc/Intro_alpha_complex.h +++ b/src/Alpha_complex/doc/Intro_alpha_complex.h @@ -83,7 +83,7 @@ Table of Contents * * Then, it is asked to display information about the simplicial complex. * - * \include Alpha_complex/Alpha_complex_from_points.cpp + * \include Alpha_complex_from_points.cpp * * When launching: * @@ -92,7 +92,7 @@ Table of Contents * * the program output is: * - * \include Alpha_complex/alphaoffreader_for_doc_60.txt + * \include alphaoffreader_for_doc_60.txt * * \section createcomplexalgorithm Create complex algorithm * @@ -171,7 +171,7 @@ Table of Contents * * Then, it is asked to display information about the alpha complex. * - * \include Alpha_complex/Weighted_alpha_complex_from_points.cpp + * \include Weighted_alpha_complex_from_points.cpp * * When launching: * @@ -180,7 +180,7 @@ Table of Contents * * the program output is: * - * \include Alpha_complex/weightedalpha3dfrompoints_for_doc.txt + * \include weightedalpha3dfrompoints_for_doc.txt * * * \section offexample Example from OFF file @@ -190,7 +190,7 @@ Table of Contents * * Then, it is asked to display information about the alpha complex. * - * \include Alpha_complex/Alpha_complex_from_off.cpp + * \include Alpha_complex_from_off.cpp * * When launching: * @@ -199,7 +199,7 @@ Table of Contents * * the program output is: * - * \include Alpha_complex/alphaoffreader_for_doc_32.txt + * \include alphaoffreader_for_doc_32.txt * * * \section weighted3dexample 3d specific version @@ -215,7 +215,7 @@ Table of Contents * * Then, it is asked to display information about the alpha complex. * - * \include Alpha_complex/Weighted_alpha_complex_3d_from_points.cpp + * \include Weighted_alpha_complex_3d_from_points.cpp * * The results will be the same as in \ref weightedversion . * diff --git a/src/Bottleneck_distance/doc/Intro_bottleneck_distance.h b/src/Bottleneck_distance/doc/Intro_bottleneck_distance.h index 2a988b4b..4f5a956c 100644 --- a/src/Bottleneck_distance/doc/Intro_bottleneck_distance.h +++ b/src/Bottleneck_distance/doc/Intro_bottleneck_distance.h @@ -64,7 +64,7 @@ int main() { * \section bottleneckbasicexample Basic example * * This other example computes the bottleneck distance from 2 persistence diagrams: - * \include Bottleneck_distance/bottleneck_basic_example.cpp + * \include bottleneck_basic_example.cpp * * \code Bottleneck distance = 0.75 diff --git a/src/Cech_complex/doc/Intro_cech_complex.h b/src/Cech_complex/doc/Intro_cech_complex.h index 80c88dc6..698f9749 100644 --- a/src/Cech_complex/doc/Intro_cech_complex.h +++ b/src/Cech_complex/doc/Intro_cech_complex.h @@ -71,7 +71,7 @@ namespace cech_complex { * \ref rips_complex but it offers more topological guarantees. * * If the Cech_complex interfaces are not detailed enough for your need, please refer to - * + * * cech_complex_step_by_step.cpp example, where the graph construction over the Simplex_tree is more detailed. * * \subsection cechpointscloudexample Example from a point cloud @@ -81,7 +81,7 @@ namespace cech_complex { * * Then, it is asked to display information about the simplicial complex. * - * \include Cech_complex/cech_complex_example_from_points.cpp + * \include cech_complex_example_from_points.cpp * * When launching (maximal enclosing ball radius is 1., is expanded until dimension 2): * @@ -90,7 +90,7 @@ namespace cech_complex { * * the program output is: * - * \include Cech_complex/cech_complex_example_from_points_for_doc.txt + * \include cech_complex_example_from_points_for_doc.txt * */ /** @} */ // end defgroup cech_complex diff --git a/src/Collapse/doc/intro_edge_collapse.h b/src/Collapse/doc/intro_edge_collapse.h index 81edd79f..fde39707 100644 --- a/src/Collapse/doc/intro_edge_collapse.h +++ b/src/Collapse/doc/intro_edge_collapse.h @@ -81,7 +81,7 @@ namespace collapse { * Then it collapses edges and displays a new list of `Filtered_edge` (with less edges) * that will preserve the persistence homology computation. * - * \include Collapse/edge_collapse_basic_example.cpp + * \include edge_collapse_basic_example.cpp * * When launching the example: * @@ -90,7 +90,7 @@ namespace collapse { * * the program output is: * - * \include Collapse/edge_collapse_example_basic.txt + * \include edge_collapse_example_basic.txt */ /** @} */ // end defgroup strong_collapse diff --git a/src/Doxyfile.in b/src/Doxyfile.in index 49e781bd..4784b915 100644 --- a/src/Doxyfile.in +++ b/src/Doxyfile.in @@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8 # title of most generated pages and in a few other places. # The default value is: My Project. -PROJECT_NAME = "GUDHI" +PROJECT_NAME = "@CMAKE_PROJECT_NAME@" # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version @@ -58,7 +58,7 @@ PROJECT_LOGO = # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. -OUTPUT_DIRECTORY = "doc/" +OUTPUT_DIRECTORY = # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and @@ -672,9 +672,9 @@ LAYOUT_FILE = # search path. Do not use file names with spaces, bibtex cannot handle them. See # also \cite for info how to create references. -CITE_BIB_FILES = biblio/bibliography.bib \ - biblio/how_to_cite_cgal.bib \ - biblio/how_to_cite_gudhi.bib +CITE_BIB_FILES = @CMAKE_SOURCE_DIR@/biblio/bibliography.bib \ + @CMAKE_SOURCE_DIR@/biblio/how_to_cite_cgal.bib \ + @CMAKE_SOURCE_DIR@/biblio/how_to_cite_gudhi.bib #--------------------------------------------------------------------------- # Configuration options related to warning and progress messages @@ -745,7 +745,7 @@ WARN_LOGFILE = # spaces. # Note: If this tag is empty the current directory is searched. -INPUT = +INPUT = @CMAKE_SOURCE_DIR@ # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses @@ -780,13 +780,14 @@ RECURSIVE = YES # Note that relative paths are relative to the directory from which doxygen is # run. -EXCLUDE = data/ \ - example/ \ - GudhUI/ \ - cmake/ \ - python/ \ - ext/ \ - README.md +EXCLUDE = @CMAKE_SOURCE_DIR@/data/ \ + @CMAKE_SOURCE_DIR@/ext/ \ + @CMAKE_SOURCE_DIR@/README.md \ + @CMAKE_SOURCE_DIR@/.github \ + @CMAKE_CURRENT_BINARY_DIR@/new_gudhi_version_creation.md \ + @GUDHI_DOXYGEN_SOURCE_PREFIX@/GudhUI/ \ + @GUDHI_DOXYGEN_SOURCE_PREFIX@/cmake/ \ + @GUDHI_DOXYGEN_SOURCE_PREFIX@/python/ \ # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded @@ -802,7 +803,7 @@ EXCLUDE_SYMLINKS = NO # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* -EXCLUDE_PATTERNS = */utilities/*/*.md +EXCLUDE_PATTERNS = @GUDHI_DOXYGEN_SOURCE_PREFIX@/@GUDHI_DOXYGEN_UTILS_PATH@/*.md # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the @@ -819,10 +820,9 @@ EXCLUDE_SYMBOLS = # that contain example code fragments that are included (see the \include # command). -EXAMPLE_PATH = biblio/ \ - example/ \ - utilities/ \ - data/ +EXAMPLE_PATH = @CMAKE_SOURCE_DIR@/biblio/ \ + @CMAKE_SOURCE_DIR@/data/ \ + @GUDHI_DOXYGEN_EXAMPLE_PATH@ # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and @@ -890,7 +890,7 @@ FILTER_SOURCE_PATTERNS = # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. -USE_MDFILE_AS_MAINPAGE = doc/common/main_page.md +USE_MDFILE_AS_MAINPAGE = @GUDHI_DOXYGEN_COMMON_DOC_PATH@/main_page.md #--------------------------------------------------------------------------- # Configuration options related to source browsing @@ -1046,7 +1046,7 @@ HTML_FILE_EXTENSION = .html # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_HEADER = doc/common/header.html +HTML_HEADER = @GUDHI_DOXYGEN_COMMON_DOC_PATH@/header.html # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard @@ -1056,7 +1056,7 @@ HTML_HEADER = doc/common/header.html # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_FOOTER = doc/common/footer.html +HTML_FOOTER = @GUDHI_DOXYGEN_COMMON_DOC_PATH@/footer.html # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of @@ -1068,7 +1068,7 @@ HTML_FOOTER = doc/common/footer.html # obsolete. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_STYLESHEET = doc/common/stylesheet.css +HTML_STYLESHEET = @GUDHI_DOXYGEN_COMMON_DOC_PATH@/stylesheet.css # The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- # defined cascading style sheet that is included after the standard style sheets diff --git a/src/Nerve_GIC/doc/Intro_graph_induced_complex.h b/src/Nerve_GIC/doc/Intro_graph_induced_complex.h index f9441b24..a6098860 100644 --- a/src/Nerve_GIC/doc/Intro_graph_induced_complex.h +++ b/src/Nerve_GIC/doc/Intro_graph_induced_complex.h @@ -53,7 +53,7 @@ namespace cover_complex { * covering the height function (coordinate 2), * which are then refined into their connected components using the triangulation of the .OFF file. * - * \include Nerve_GIC/Nerve.cpp + * \include Nerve.cpp * * When launching: * @@ -62,7 +62,7 @@ namespace cover_complex { * * the program output is: * - * \include Nerve_GIC/Nerve.txt + * \include Nerve.txt * * The program also writes a file ../../data/points/human_sc.txt. The first three lines in this file are the location * of the input point cloud and the function used to compute the cover. @@ -96,7 +96,7 @@ namespace cover_complex { * comes from the triangulation of the human shape. Note that the resulting simplicial complex is in dimension 3 * in this example. * - * \include Nerve_GIC/VoronoiGIC.cpp + * \include VoronoiGIC.cpp * * When launching: * @@ -129,7 +129,7 @@ namespace cover_complex { * with automatic resolution and gain. Note that automatic threshold, resolution and gain * can be computed as well for the Nerve. * - * \include Nerve_GIC/CoordGIC.cpp + * \include CoordGIC.cpp * * When launching: * @@ -152,7 +152,7 @@ namespace cover_complex { * The function is now the first eigenfunction given by PCA, whose values * are written in a file (lucky_cat_PCA1). Threshold, resolution and gain are automatically selected as before. * - * \include Nerve_GIC/FuncGIC.cpp + * \include FuncGIC.cpp * * When launching: * diff --git a/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h b/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h index b4f9fd2c..a3613d0d 100644 --- a/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h +++ b/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h @@ -131,7 +131,7 @@ namespace persistent_cohomology { We provide several example files: run these examples with -h for details on their use, and read the README file. -\li +\li Rips_complex/rips_persistence.cpp computes the Rips complex of a point cloud and outputs its persistence diagram. \code $> ./rips_persistence ../../data/points/tore3D_1307.off -r 0.25 -m 0.5 -d 3 -p 3 \endcode @@ -144,11 +144,11 @@ diagram. More details on the Rips complex utilities dedicated page. -\li +\li Persistent_cohomology/rips_multifield_persistence.cpp computes the Rips complex of a point cloud and outputs its persistence diagram with a family of field coefficients. -\li +\li Rips_complex/rips_distance_matrix_persistence.cpp computes the Rips complex of a distance matrix and outputs its persistence diagram. @@ -158,7 +158,7 @@ Please refer to data/distance_matrix/lower_triangular_distance_matrix.csv for an More details on the Rips complex utilities dedicated page. -\li +\li Rips_complex/rips_correlation_matrix_persistence.cpp computes the Rips complex of a correlation matrix and outputs its persistence diagram. @@ -169,7 +169,7 @@ Please refer to data/correlation_matrix/lower_triangular_correlation_matrix.csv More details on the Rips complex utilities dedicated page. -\li +\li Alpha_complex/alpha_complex_3d_persistence.cpp computes the persistent homology with \f$\mathbb{Z}/2\mathbb{Z}\f$ coefficients of the alpha complex on points sampling from an OFF file. \code $> ./alpha_complex_3d_persistence ../../data/points/tore3D_300.off -p 2 -m 0.45 \endcode @@ -235,7 +235,7 @@ Note that the lengths of the sides of the periodic cuboid have to be the same. +\li Alpha_complex/alpha_complex_persistence.cpp computes the persistent homology with \f$\mathbb{Z}/p\mathbb{Z}\f$ coefficients of the alpha complex on points sampling from an OFF file. \code $> ./alpha_complex_persistence -r 32 -p 2 -m 0.45 ../../data/points/tore3D_300.off \endcode @@ -248,7 +248,7 @@ Simplex_tree dim: 3 More details on the Alpha complex utilities dedicated page. -\li +\li Persistent_cohomology/plain_homology.cpp computes the plain homology of a simple simplicial complex without filtration values. diff --git a/src/Rips_complex/doc/Intro_rips_complex.h b/src/Rips_complex/doc/Intro_rips_complex.h index b2840686..3888ec8f 100644 --- a/src/Rips_complex/doc/Intro_rips_complex.h +++ b/src/Rips_complex/doc/Intro_rips_complex.h @@ -64,7 +64,7 @@ namespace rips_complex { * And so on for simplex (0,1,2,3). * * If the Rips_complex interfaces are not detailed enough for your need, please refer to - * + * * rips_persistence_step_by_step.cpp example, where the constructions of the graph and * the Simplex_tree are more detailed. * @@ -111,7 +111,7 @@ namespace rips_complex { * * Then, it is asked to display information about the simplicial complex. * - * \include Rips_complex/example_one_skeleton_rips_from_points.cpp + * \include example_one_skeleton_rips_from_points.cpp * * When launching (Rips maximal distance between 2 points is 12.0, is expanded * until dimension 1 - one skeleton graph in other words): @@ -121,7 +121,7 @@ namespace rips_complex { * * the program output is: * - * \include Rips_complex/one_skeleton_rips_for_doc.txt + * \include one_skeleton_rips_for_doc.txt * * \subsection ripsoffexample Example from OFF file * @@ -132,7 +132,7 @@ namespace rips_complex { * * Then, it is asked to display information about the Rips complex. * - * \include Rips_complex/example_rips_complex_from_off_file.cpp + * \include example_rips_complex_from_off_file.cpp * * When launching: * @@ -141,7 +141,7 @@ namespace rips_complex { * * the program output is: * - * \include Rips_complex/full_skeleton_rips_for_doc.txt + * \include full_skeleton_rips_for_doc.txt * * * \subsection sparseripspointscloudexample Example of a sparse Rips from a point cloud @@ -149,7 +149,7 @@ namespace rips_complex { * This example builds the full sparse Rips of a set of 2D Euclidean points, then prints some minimal * information about the complex. * - * \include Rips_complex/example_sparse_rips.cpp + * \include example_sparse_rips.cpp * * When launching: * @@ -172,7 +172,7 @@ namespace rips_complex { * * Then, it is asked to display information about the simplicial complex. * - * \include Rips_complex/example_one_skeleton_rips_from_distance_matrix.cpp + * \include example_one_skeleton_rips_from_distance_matrix.cpp * * When launching (Rips maximal distance between 2 points is 1.0, is expanded until dimension 1 - one skeleton graph * with other words): @@ -182,7 +182,7 @@ namespace rips_complex { * * the program output is: * - * \include Rips_complex/one_skeleton_rips_for_doc.txt + * \include one_skeleton_rips_for_doc.txt * * \subsection ripscsvdistanceexample Example from a distance matrix read in a csv file * @@ -192,7 +192,7 @@ namespace rips_complex { * * Then, it is asked to display information about the Rips complex. * - * \include Rips_complex/example_rips_complex_from_csv_distance_matrix_file.cpp + * \include example_rips_complex_from_csv_distance_matrix_file.cpp * * When launching: * @@ -201,7 +201,7 @@ namespace rips_complex { * * the program output is: * - * \include Rips_complex/full_skeleton_rips_for_doc.txt + * \include full_skeleton_rips_for_doc.txt * * * \section ripscorrelationematrix Correlation matrix @@ -213,7 +213,7 @@ namespace rips_complex { * * Then, it is asked to display information about the simplicial complex. * - * \include Rips_complex/example_one_skeleton_rips_from_correlation_matrix.cpp + * \include example_one_skeleton_rips_from_correlation_matrix.cpp * * When launching: * @@ -222,7 +222,7 @@ namespace rips_complex { * * the program output is: * - * \include Rips_complex/one_skeleton_rips_from_correlation_matrix_for_doc.txt + * \include one_skeleton_rips_from_correlation_matrix_for_doc.txt * * All the other constructions discussed for Rips complex for distance matrix can be also performed for Rips complexes * construction from correlation matrices. diff --git a/src/Simplex_tree/doc/Intro_simplex_tree.h b/src/Simplex_tree/doc/Intro_simplex_tree.h index 800879fe..ef8dec91 100644 --- a/src/Simplex_tree/doc/Intro_simplex_tree.h +++ b/src/Simplex_tree/doc/Intro_simplex_tree.h @@ -39,10 +39,10 @@ namespace Gudhi { * \subsubsection filteredcomplexessimplextreeexamples Examples * * Here is a list of simplex tree examples : - * \li + * \li * Simplex_tree/simple_simplex_tree.cpp - Simple simplex tree construction and basic function use. * - * \li + * \li * Simplex_tree/simplex_tree_from_cliques_of_graph.cpp - Simplex tree construction from cliques of graph read in * a file. * @@ -54,11 +54,11 @@ Expand the simplex tree in 3.8e-05 s. Information of the Simplex Tree: Number of vertices = 10 Number of simplices = 98 \endcode * - * \li + * \li * Simplex_tree/example_alpha_shapes_3_simplex_tree_from_off_file.cpp - Simplex tree is computed and displayed * from a 3D alpha complex (Requires CGAL, GMP and GMPXX to be installed). * - * \li + * \li * Simplex_tree/graph_expansion_with_blocker.cpp - Simple simplex tree construction from a one-skeleton graph with * a simple blocker expansion method. * diff --git a/src/Spatial_searching/doc/Intro_spatial_searching.h b/src/Spatial_searching/doc/Intro_spatial_searching.h index 30805570..81c5a3aa 100644 --- a/src/Spatial_searching/doc/Intro_spatial_searching.h +++ b/src/Spatial_searching/doc/Intro_spatial_searching.h @@ -36,7 +36,7 @@ namespace spatial_searching { * * This example generates 500 random points, then performs all-near-neighbors searches, and queries for nearest and furthest neighbors using different methods. * - * \include Spatial_searching/example_spatial_searching.cpp + * \include example_spatial_searching.cpp * */ /** @} */ // end defgroup spatial_searching diff --git a/src/Subsampling/doc/Intro_subsampling.h b/src/Subsampling/doc/Intro_subsampling.h index 1c84fb2e..1c366fe6 100644 --- a/src/Subsampling/doc/Intro_subsampling.h +++ b/src/Subsampling/doc/Intro_subsampling.h @@ -32,20 +32,20 @@ namespace subsampling { * squared distance between any two points * is greater than or equal to 0.4. * - * \include Subsampling/example_sparsify_point_set.cpp + * \include example_sparsify_point_set.cpp * * \section farthestpointexamples Example: choose_n_farthest_points * * This example outputs a subset of 100 points obtained by González algorithm, * starting with a random point. * - * \include Subsampling/example_choose_n_farthest_points.cpp + * \include example_choose_n_farthest_points.cpp * * \section randompointexamples Example: pick_n_random_points * * This example outputs a subset of 100 points picked randomly. * - * \include Subsampling/example_pick_n_random_points.cpp + * \include example_pick_n_random_points.cpp */ /** @} */ // end defgroup subsampling diff --git a/src/Tangential_complex/doc/Intro_tangential_complex.h b/src/Tangential_complex/doc/Intro_tangential_complex.h index ce277185..cb8c6122 100644 --- a/src/Tangential_complex/doc/Intro_tangential_complex.h +++ b/src/Tangential_complex/doc/Intro_tangential_complex.h @@ -88,7 +88,7 @@ This example builds the Tangential complex of point set. Note that the dimension of the kernel here is dynamic, which is slower, but more flexible: the intrinsic and ambient dimensions does not have to be known at compile-time. -\include Tangential_complex/example_basic.cpp +\include example_basic.cpp \section example_with_perturb Example with perturbation @@ -97,7 +97,7 @@ by perturbing the positions of points involved in inconsistent simplices. Note that the dimension of the kernel here is static, which is the best choice when the dimensions are known at compile-time. -\include Tangential_complex/example_with_perturb.cpp +\include example_with_perturb.cpp */ /** @} */ // end defgroup tangential_complex diff --git a/src/Witness_complex/doc/Witness_complex_doc.h b/src/Witness_complex/doc/Witness_complex_doc.h index 202f4539..c66b106e 100644 --- a/src/Witness_complex/doc/Witness_complex_doc.h +++ b/src/Witness_complex/doc/Witness_complex_doc.h @@ -108,14 +108,14 @@ int main(int argc, char * const argv[]) { Here is an example of constructing a strong witness complex filtration and computing persistence on it: - \include Witness_complex/strong_witness_persistence.cpp + \include strong_witness_persistence.cpp \section witnessexample3 Example3: Computing relaxed witness complex persistence from a distance matrix In this example we compute the relaxed witness complex persistence from a given matrix of closest landmarks to each witness. Each landmark is given as the couple (index, distance). - \include Witness_complex/example_nearest_landmark_table.cpp + \include example_nearest_landmark_table.cpp */ diff --git a/src/cmake/modules/GUDHI_doxygen_target.cmake b/src/cmake/modules/GUDHI_doxygen_target.cmake index 7a84c4e0..0f80b187 100644 --- a/src/cmake/modules/GUDHI_doxygen_target.cmake +++ b/src/cmake/modules/GUDHI_doxygen_target.cmake @@ -8,14 +8,47 @@ if(DOXYGEN_FOUND) get_property(DOXYGEN_EXECUTABLE TARGET Doxygen::doxygen PROPERTY IMPORTED_LOCATION) endif() - add_custom_target(doxygen ${DOXYGEN_EXECUTABLE} ${GUDHI_USER_VERSION_DIR}/Doxyfile - WORKING_DIRECTORY ${GUDHI_USER_VERSION_DIR} - COMMENT "Generating API documentation with Doxygen in ${GUDHI_USER_VERSION_DIR}/doc/html/" VERBATIM) - - if(TARGET user_version) - # In dev version, doxygen target depends on user_version target. Not existing in user version - add_dependencies(doxygen user_version) + message("++ Project = ${CMAKE_PROJECT_NAME}") + if (CMAKE_PROJECT_NAME STREQUAL "GUDHIdev") + # Set Doxyfile.in variables for the developer version + set(GUDHI_DOXYGEN_SOURCE_PREFIX "${CMAKE_SOURCE_DIR}/src") + foreach(GUDHI_MODULE ${GUDHI_MODULES_FULL_LIST}) + if(EXISTS "${GUDHI_DOXYGEN_SOURCE_PREFIX}/${GUDHI_MODULE}/doc/") + set(GUDHI_DOXYGEN_IMAGE_PATH "${GUDHI_DOXYGEN_IMAGE_PATH} ${GUDHI_DOXYGEN_SOURCE_PREFIX}/${GUDHI_MODULE}/doc/ \\ \n") + endif() + if(EXISTS "${GUDHI_DOXYGEN_SOURCE_PREFIX}/${GUDHI_MODULE}/example/") + set(GUDHI_DOXYGEN_EXAMPLE_PATH "${GUDHI_DOXYGEN_EXAMPLE_PATH} ${GUDHI_DOXYGEN_SOURCE_PREFIX}/${GUDHI_MODULE}/example/ \\ \n") + endif() + if(EXISTS "${GUDHI_DOXYGEN_SOURCE_PREFIX}/${GUDHI_MODULE}/utilities/") + set(GUDHI_DOXYGEN_EXAMPLE_PATH "${GUDHI_DOXYGEN_EXAMPLE_PATH} ${GUDHI_DOXYGEN_SOURCE_PREFIX}/${GUDHI_MODULE}/utilities/ \\ \n") + endif() + endforeach(GUDHI_MODULE ${GUDHI_MODULES_FULL_LIST}) + set(GUDHI_DOXYGEN_COMMON_DOC_PATH "${GUDHI_DOXYGEN_SOURCE_PREFIX}/common/doc") + set(GUDHI_DOXYGEN_UTILS_PATH "*/utilities") + endif() + if (CMAKE_PROJECT_NAME STREQUAL "GUDHI") + # Set Doxyfile.in variables for the user version + set(GUDHI_DOXYGEN_SOURCE_PREFIX "${CMAKE_SOURCE_DIR}") + foreach(GUDHI_MODULE ${GUDHI_MODULES_FULL_LIST}) + if(EXISTS "${GUDHI_DOXYGEN_SOURCE_PREFIX}/doc/${GUDHI_MODULE}") + set(GUDHI_DOXYGEN_IMAGE_PATH "${GUDHI_DOXYGEN_IMAGE_PATH} ${GUDHI_DOXYGEN_SOURCE_PREFIX}/doc/${GUDHI_MODULE}/ \\ \n") + endif() + if(EXISTS "${GUDHI_DOXYGEN_SOURCE_PREFIX}/example/${GUDHI_MODULE}") + set(GUDHI_DOXYGEN_EXAMPLE_PATH "${GUDHI_DOXYGEN_EXAMPLE_PATH} ${GUDHI_DOXYGEN_SOURCE_PREFIX}/example/${GUDHI_MODULE}/ \\ \n") + endif() + if(EXISTS "${GUDHI_DOXYGEN_SOURCE_PREFIX}/utilities/${GUDHI_MODULE}") + set(GUDHI_DOXYGEN_EXAMPLE_PATH "${GUDHI_DOXYGEN_EXAMPLE_PATH} ${GUDHI_DOXYGEN_SOURCE_PREFIX}/utilities/${GUDHI_MODULE}/ \\ \n") + endif() + endforeach(GUDHI_MODULE ${GUDHI_MODULES_FULL_LIST}) + set(GUDHI_DOXYGEN_COMMON_DOC_PATH "${GUDHI_DOXYGEN_SOURCE_PREFIX}/doc/common") + set(GUDHI_DOXYGEN_UTILS_PATH "utilities/*") endif() + + configure_file(${GUDHI_DOXYGEN_SOURCE_PREFIX}/Doxyfile.in "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile" @ONLY) + + add_custom_target(doxygen ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Generating API documentation with Doxygen in 'html' directory" VERBATIM) else() set(GUDHI_MISSING_MODULES ${GUDHI_MISSING_MODULES} "cpp-documentation" CACHE INTERNAL "GUDHI_MISSING_MODULES") endif() diff --git a/src/cmake/modules/GUDHI_user_version_target.cmake b/src/cmake/modules/GUDHI_user_version_target.cmake index e4f39aae..9e76c3d9 100644 --- a/src/cmake/modules/GUDHI_user_version_target.cmake +++ b/src/cmake/modules/GUDHI_user_version_target.cmake @@ -14,14 +14,7 @@ add_custom_command(TARGET user_version PRE_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${GUDHI_USER_VERSION_DIR} COMMENT "user_version creation in ${GUDHI_USER_VERSION_DIR}") -foreach(GUDHI_MODULE ${GUDHI_MODULES_FULL_LIST}) - set(GUDHI_DOXYGEN_IMAGE_PATH "${GUDHI_DOXYGEN_IMAGE_PATH} doc/${GUDHI_MODULE}/ \\ \n") -endforeach(GUDHI_MODULE ${GUDHI_MODULES_FULL_LIST}) - -# Generate Doxyfile for Doxygen - cf. root CMakeLists.txt for explanation -configure_file(${CMAKE_SOURCE_DIR}/src/Doxyfile.in "${CMAKE_CURRENT_BINARY_DIR}/src/Doxyfile" @ONLY) -add_custom_command(TARGET user_version PRE_BUILD COMMAND ${CMAKE_COMMAND} -E - copy ${CMAKE_CURRENT_BINARY_DIR}/src/Doxyfile ${GUDHI_USER_VERSION_DIR}/Doxyfile) +file(COPY "${CMAKE_SOURCE_DIR}/src/Doxyfile.in" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") # Generate bib files for Doxygen - cf. root CMakeLists.txt for explanation string(TIMESTAMP GUDHI_VERSION_YEAR "%Y") @@ -48,6 +41,8 @@ add_custom_command(TARGET user_version PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/src/GUDHIConfig.cmake.in ${GUDHI_USER_VERSION_DIR}/GUDHIConfig.cmake.in) add_custom_command(TARGET user_version PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/CMakeGUDHIVersion.txt ${GUDHI_USER_VERSION_DIR}/CMakeGUDHIVersion.txt) +add_custom_command(TARGET user_version PRE_BUILD COMMAND ${CMAKE_COMMAND} -E + copy ${CMAKE_SOURCE_DIR}/src/Doxyfile.in ${GUDHI_USER_VERSION_DIR}/Doxyfile.in) # As cython generates .cpp files in source, we have to copy all except cpp files from python directory file(GLOB_RECURSE PYTHON_FILES ${CMAKE_SOURCE_DIR}/${GUDHI_PYTHON_PATH}/*) diff --git a/src/common/doc/examples.h b/src/common/doc/examples.h index 474f8699..b557727b 100644 --- a/src/common/doc/examples.h +++ b/src/common/doc/examples.h @@ -1,96 +1,98 @@ // List of GUDHI examples - Doxygen needs at least a file tag to analyse comments // In user_version, `find . -name "*.cpp"` in example and utilities folders /*! @file Examples - * @example Alpha_complex/Alpha_complex_from_off.cpp - * @example Alpha_complex/Alpha_complex_from_points.cpp - * @example Bottleneck_distance/bottleneck_basic_example.cpp - * @example Bottleneck_distance/alpha_rips_persistence_bottleneck_distance.cpp - * @example Witness_complex/example_nearest_landmark_table.cpp - * @example Witness_complex/example_witness_complex_off.cpp - * @example Witness_complex/example_witness_complex_sphere.cpp - * @example Witness_complex/example_strong_witness_complex_off.cpp - * @example Simplex_tree/mini_simplex_tree.cpp - * @example Simplex_tree/graph_expansion_with_blocker.cpp - * @example Simplex_tree/simple_simplex_tree.cpp - * @example Simplex_tree/simplex_tree_from_cliques_of_graph.cpp - * @example Simplex_tree/example_alpha_shapes_3_simplex_tree_from_off_file.cpp - * @example Simplex_tree/cech_complex_cgal_mini_sphere_3d.cpp - * @example Persistent_cohomology/plain_homology.cpp - * @example Persistent_cohomology/persistence_from_file.cpp - * @example Persistent_cohomology/rips_persistence_step_by_step.cpp - * @example Persistent_cohomology/rips_persistence_via_boundary_matrix.cpp - * @example Persistent_cohomology/custom_persistence_sort.cpp - * @example Persistent_cohomology/persistence_from_simple_simplex_tree.cpp - * @example Persistent_cohomology/rips_multifield_persistence.cpp - * @example Skeleton_blocker/Skeleton_blocker_from_simplices.cpp - * @example Skeleton_blocker/Skeleton_blocker_iteration.cpp - * @example Skeleton_blocker/Skeleton_blocker_link.cpp - * @example Contraction/Garland_heckbert.cpp - * @example Contraction/Rips_contraction.cpp - * @example Bitmap_cubical_complex/Random_bitmap_cubical_complex.cpp - * @example common/example_CGAL_3D_points_off_reader.cpp - * @example common/example_vector_double_points_off_reader.cpp - * @example common/example_CGAL_points_off_reader.cpp - * @example Rips_complex/example_one_skeleton_rips_from_distance_matrix.cpp - * @example Rips_complex/example_one_skeleton_rips_from_points.cpp - * @example Rips_complex/example_rips_complex_from_csv_distance_matrix_file.cpp - * @example Rips_complex/example_rips_complex_from_off_file.cpp - * @example Persistence_representations/persistence_intervals.cpp - * @example Persistence_representations/persistence_vectors.cpp - * @example Persistence_representations/persistence_heat_maps.cpp - * @example Persistence_representations/persistence_landscape_on_grid.cpp - * @example Persistence_representations/persistence_landscape.cpp - * @example Tangential_complex/example_basic.cpp - * @example Tangential_complex/example_with_perturb.cpp - * @example Subsampling/example_custom_distance.cpp - * @example Subsampling/example_choose_n_farthest_points.cpp - * @example Subsampling/example_sparsify_point_set.cpp - * @example Subsampling/example_pick_n_random_points.cpp - * @example Nerve_GIC/CoordGIC.cpp - * @example Nerve_GIC/Nerve.cpp - * @example Nerve_GIC/FuncGIC.cpp - * @example Nerve_GIC/VoronoiGIC.cpp - * @example Spatial_searching/example_spatial_searching.cpp - * @example Alpha_complex/alpha_complex_3d_persistence.cpp - * @example Alpha_complex/alpha_complex_persistence.cpp - * @example Alpha_complex/Weighted_alpha_complex_3d_from_points.cpp - * @example Bottleneck_distance/bottleneck_distance.cpp - * @example Witness_complex/weak_witness_persistence.cpp - * @example Witness_complex/strong_witness_persistence.cpp - * @example Bitmap_cubical_complex/cubical_complex_persistence.cpp - * @example Bitmap_cubical_complex/periodic_cubical_complex_persistence.cpp - * @example common/off_file_from_shape_generator.cpp - * @example Rips_complex/rips_distance_matrix_persistence.cpp - * @example Rips_complex/rips_persistence.cpp - * @example Persistence_representations/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp - * @example Persistence_representations/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp - * @example Persistence_representations/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp - * @example Persistence_representations/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp - * @example Persistence_representations/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp - * @example Persistence_representations/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp - * @example Persistence_representations/persistence_intervals/compute_number_of_dominant_intervals.cpp - * @example Persistence_representations/persistence_intervals/plot_persistence_Betti_numbers.cpp - * @example Persistence_representations/persistence_intervals/plot_persistence_intervals.cpp - * @example Persistence_representations/persistence_intervals/plot_histogram_of_intervals_lengths.cpp - * @example Persistence_representations/persistence_intervals/compute_bottleneck_distance.cpp - * @example Persistence_representations/persistence_heat_maps/create_pssk.cpp - * @example Persistence_representations/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp - * @example Persistence_representations/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp - * @example Persistence_representations/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp - * @example Persistence_representations/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp - * @example Persistence_representations/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp - * @example Persistence_representations/persistence_heat_maps/average_persistence_heat_maps.cpp - * @example Persistence_representations/persistence_heat_maps/plot_persistence_heat_map.cpp - * @example Persistence_representations/persistence_heat_maps/create_persistence_heat_maps.cpp - * @example Persistence_representations/persistence_vectors/plot_persistence_vectors.cpp - * @example Persistence_representations/persistence_vectors/compute_distance_of_persistence_vectors.cpp - * @example Persistence_representations/persistence_vectors/average_persistence_vectors.cpp - * @example Persistence_representations/persistence_vectors/create_persistence_vectors.cpp - * @example Persistence_representations/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp - * @example Persistence_representations/persistence_landscapes/average_landscapes.cpp - * @example Persistence_representations/persistence_landscapes/compute_scalar_product_of_landscapes.cpp - * @example Persistence_representations/persistence_landscapes/create_landscapes.cpp - * @example Persistence_representations/persistence_landscapes/compute_distance_of_landscapes.cpp - * @example Persistence_representations/persistence_landscapes/plot_landscapes.cpp + * \section Alpha_complex_examples Alpha complex + * @example Alpha_complex_from_off.cpp + * @example Alpha_complex_from_points.cpp + * \section bottleneck_examples bottleneck + * @example bottleneck_basic_example.cpp + * @example alpha_rips_persistence_bottleneck_distance.cpp + * @example example_nearest_landmark_table.cpp + * @example example_witness_complex_off.cpp + * @example example_witness_complex_sphere.cpp + * @example example_strong_witness_complex_off.cpp + * @example mini_simplex_tree.cpp + * @example graph_expansion_with_blocker.cpp + * @example simple_simplex_tree.cpp + * @example simplex_tree_from_cliques_of_graph.cpp + * @example example_alpha_shapes_3_simplex_tree_from_off_file.cpp + * @example cech_complex_cgal_mini_sphere_3d.cpp + * @example plain_homology.cpp + * @example persistence_from_file.cpp + * @example rips_persistence_step_by_step.cpp + * @example rips_persistence_via_boundary_matrix.cpp + * @example custom_persistence_sort.cpp + * @example persistence_from_simple_simplex_tree.cpp + * @example rips_multifield_persistence.cpp + * @example Skeleton_blocker_from_simplices.cpp + * @example Skeleton_blocker_iteration.cpp + * @example Skeleton_blocker_link.cpp + * @example Garland_heckbert.cpp + * @example Rips_contraction.cpp + * @example Random_bitmap_cubical_complex.cpp + * @example example_CGAL_3D_points_off_reader.cpp + * @example example_vector_double_points_off_reader.cpp + * @example example_CGAL_points_off_reader.cpp + * @example example_one_skeleton_rips_from_distance_matrix.cpp + * @example example_one_skeleton_rips_from_points.cpp + * @example example_rips_complex_from_csv_distance_matrix_file.cpp + * @example example_rips_complex_from_off_file.cpp + * @example persistence_intervals.cpp + * @example persistence_vectors.cpp + * @example persistence_heat_maps.cpp + * @example persistence_landscape_on_grid.cpp + * @example persistence_landscape.cpp + * @example example_basic.cpp + * @example example_with_perturb.cpp + * @example example_custom_distance.cpp + * @example example_choose_n_farthest_points.cpp + * @example example_sparsify_point_set.cpp + * @example example_pick_n_random_points.cpp + * @example CoordGIC.cpp + * @example Nerve.cpp + * @example FuncGIC.cpp + * @example VoronoiGIC.cpp + * @example example_spatial_searching.cpp + * @example alpha_complex_3d_persistence.cpp + * @example alpha_complex_persistence.cpp + * @example Weighted_alpha_complex_3d_from_points.cpp + * @example bottleneck_distance.cpp + * @example weak_witness_persistence.cpp + * @example strong_witness_persistence.cpp + * @example cubical_complex_persistence.cpp + * @example periodic_cubical_complex_persistence.cpp + * @example off_file_from_shape_generator.cpp + * @example rips_distance_matrix_persistence.cpp + * @example rips_persistence.cpp + * @example persistence_landscapes_on_grid/create_landscapes_on_grid.cpp + * @example persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp + * @example persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp + * @example persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp + * @example persistence_landscapes_on_grid/average_landscapes_on_grid.cpp + * @example persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp + * @example persistence_intervals/compute_number_of_dominant_intervals.cpp + * @example persistence_intervals/plot_persistence_Betti_numbers.cpp + * @example persistence_intervals/plot_persistence_intervals.cpp + * @example persistence_intervals/plot_histogram_of_intervals_lengths.cpp + * @example persistence_intervals/compute_bottleneck_distance.cpp + * @example persistence_heat_maps/create_pssk.cpp + * @example persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp + * @example persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp + * @example persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp + * @example persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp + * @example persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp + * @example persistence_heat_maps/average_persistence_heat_maps.cpp + * @example persistence_heat_maps/plot_persistence_heat_map.cpp + * @example persistence_heat_maps/create_persistence_heat_maps.cpp + * @example persistence_vectors/plot_persistence_vectors.cpp + * @example persistence_vectors/compute_distance_of_persistence_vectors.cpp + * @example persistence_vectors/average_persistence_vectors.cpp + * @example persistence_vectors/create_persistence_vectors.cpp + * @example persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp + * @example persistence_landscapes/average_landscapes.cpp + * @example persistence_landscapes/compute_scalar_product_of_landscapes.cpp + * @example persistence_landscapes/create_landscapes.cpp + * @example persistence_landscapes/compute_distance_of_landscapes.cpp + * @example persistence_landscapes/plot_landscapes.cpp */ diff --git a/src/common/doc/installation.h b/src/common/doc/installation.h index c2e63a24..313184b6 100644 --- a/src/common/doc/installation.h +++ b/src/common/doc/installation.h @@ -40,11 +40,8 @@ make \endverbatim * \subsection documentationgeneration Documentation * To generate the documentation, Doxygen is required. * Run the following command in a terminal: -\verbatim -make doxygen -# Documentation will be generated in the folder YYYY-MM-DD-hh-mm-ss_GUDHI_X.Y.Z/doc/html/ -# You can customize the directory name by calling `cmake -DUSER_VERSION_DIR=/my/custom/folder` -\endverbatim + * \verbatim make doxygen \endverbatim + * Documentation will be generated in a folder named html. * * \subsection helloworld Hello world ! * The Hello world for GUDHI @@ -57,7 +54,7 @@ make doxygen * * The following example requires the GNU Multiple Precision Arithmetic * Library (GMP) and will not be built if GMP is not installed: - * \li + * \li * Persistent_cohomology/rips_multifield_persistence.cpp * * Having GMP version 4.2 or higher installed is recommended. @@ -75,55 +72,55 @@ make doxygen * * The following examples/utilities require the Computational Geometry Algorithms * Library (CGAL \cite cgal:eb-19b) and will not be built if CGAL version 4.11.0 or higher is not installed: - * \li + * \li * Simplex_tree/example_alpha_shapes_3_simplex_tree_from_off_file.cpp - * \li + * \li * Witness_complex/strong_witness_persistence.cpp - * \li + * \li * Witness_complex/weak_witness_persistence.cpp - * \li + * \li * Witness_complex/example_strong_witness_complex_off.cpp - * \li + * \li * Witness_complex/example_witness_complex_off.cpp - * \li + * \li * Witness_complex/example_witness_complex_sphere.cpp - * \li + * \li * Alpha_complex/Alpha_complex_from_off.cpp - * \li + * \li * Alpha_complex/Alpha_complex_from_points.cpp - * \li + * \li * Alpha_complex/alpha_complex_persistence.cpp - * \li + * \li * Persistent_cohomology/custom_persistence_sort.cpp - * \li + * \li * Bottleneck_distance/alpha_rips_persistence_bottleneck_distance.cpp.cpp - * \li + * \li * Bottleneck_distance/bottleneck_basic_example.cpp - * \li + * \li * Bottleneck_distance/bottleneck_distance.cpp - * \li + * \li * Nerve_GIC/CoordGIC.cpp - * \li + * \li * Nerve_GIC/FuncGIC.cpp - * \li + * \li * Nerve_GIC/Nerve.cpp - * \li + * \li * Nerve_GIC/VoronoiGIC.cpp - * \li + * \li * Spatial_searching/example_spatial_searching.cpp - * \li + * \li * Subsampling/example_choose_n_farthest_points.cpp - * \li + * \li * Subsampling/example_pick_n_random_points.cpp - * \li + * \li * Subsampling/example_sparsify_point_set.cpp - * \li + * \li * Tangential_complex/example_basic.cpp - * \li + * \li * Tangential_complex/example_with_perturb.cpp - * \li + * \li * Alpha_complex/Weighted_alpha_complex_3d_from_points.cpp - * \li + * \li * Alpha_complex/alpha_complex_3d_persistence.cpp * * \subsection eigen Eigen @@ -133,41 +130,41 @@ make doxygen * * The following examples/utilities require the Eigen and will not be * built if Eigen is not installed: - * \li + * \li * Alpha_complex/Alpha_complex_from_off.cpp - * \li + * \li * Alpha_complex/Alpha_complex_from_points.cpp - * \li + * \li * Alpha_complex/alpha_complex_persistence.cpp - * \li + * \li * Alpha_complex/alpha_complex_3d_persistence.cpp - * \li + * \li * Alpha_complex/Weighted_alpha_complex_3d_from_points.cpp - * \li + * \li * Bottleneck_distance/alpha_rips_persistence_bottleneck_distance.cpp.cpp - * \li + * \li * Persistent_cohomology/custom_persistence_sort.cpp - * \li + * \li * Spatial_searching/example_spatial_searching.cpp - * \li + * \li * Subsampling/example_choose_n_farthest_points.cpp - * \li + * \li * Subsampling/example_pick_n_random_points.cpp - * \li + * \li * Subsampling/example_sparsify_point_set.cpp - * \li + * \li * Tangential_complex/example_basic.cpp - * \li + * \li * Tangential_complex/example_with_perturb.cpp - * \li + * \li * Witness_complex/strong_witness_persistence.cpp - * \li + * \li * Witness_complex/weak_witness_persistence.cpp - * \li + * \li * Witness_complex/example_strong_witness_complex_off.cpp - * \li + * \li * Witness_complex/example_witness_complex_off.cpp - * \li + * \li * Witness_complex/example_witness_complex_sphere.cpp * * \subsection tbb Threading Building Blocks @@ -178,67 +175,67 @@ make doxygen * Having Intel® TBB installed is recommended to parallelize and accelerate some GUDHI computations. * * The following examples/utilities are using Intel® TBB if installed: - * \li + * \li * Alpha_complex/Alpha_complex_from_off.cpp - * \li + * \li * Alpha_complex/Alpha_complex_from_points.cpp - * \li + * \li * Alpha_complex/alpha_complex_3d_persistence.cpp - * \li + * \li * Alpha_complex/alpha_complex_persistence.cpp - * \li + * \li * Bitmap_cubical_complex/cubical_complex_persistence.cpp - * \li + * \li * Bitmap_cubical_complex/periodic_cubical_complex_persistence.cpp - * \li + * \li * Bitmap_cubical_complex/Random_bitmap_cubical_complex.cpp - * \li + * \li * Nerve_GIC/CoordGIC.cpp - * \li + * \li * Nerve_GIC/FuncGIC.cpp - * \li + * \li * Nerve_GIC/Nerve.cpp - * \li + * \li * Nerve_GIC/VoronoiGIC.cpp - * \li + * \li * Simplex_tree/simple_simplex_tree.cpp - * \li + * \li * Simplex_tree/example_alpha_shapes_3_simplex_tree_from_off_file.cpp - * \li + * \li * Simplex_tree/simplex_tree_from_cliques_of_graph.cpp - * \li + * \li * Simplex_tree/graph_expansion_with_blocker.cpp - * \li + * \li * Persistent_cohomology/alpha_complex_3d_persistence.cpp - * \li + * \li * Persistent_cohomology/alpha_complex_persistence.cpp - * \li + * \li * Persistent_cohomology/rips_persistence_via_boundary_matrix.cpp - * \li + * \li * Persistent_cohomology/persistence_from_file.cpp - * \li + * \li * Persistent_cohomology/persistence_from_simple_simplex_tree.cpp - * \li + * \li * Persistent_cohomology/plain_homology.cpp - * \li + * \li * Persistent_cohomology/rips_multifield_persistence.cpp - * \li + * \li * Persistent_cohomology/rips_persistence_step_by_step.cpp - * \li + * \li * Persistent_cohomology/custom_persistence_sort.cpp - * \li + * \li * Rips_complex/example_one_skeleton_rips_from_points.cpp - * \li + * \li * Rips_complex/example_rips_complex_from_off_file.cpp - * \li + * \li * Rips_complex/rips_distance_matrix_persistence.cpp - * \li + * \li * Rips_complex/rips_persistence.cpp - * \li + * \li * Witness_complex/strong_witness_persistence.cpp - * \li + * \li * Witness_complex/weak_witness_persistence.cpp - * \li + * \li * Witness_complex/example_nearest_landmark_table.cpp * * \section Contributions Bug reports and contributions diff --git a/src/common/include/gudhi/Points_3D_off_io.h b/src/common/include/gudhi/Points_3D_off_io.h index 39b79c96..4f74fd4b 100644 --- a/src/common/include/gudhi/Points_3D_off_io.h +++ b/src/common/include/gudhi/Points_3D_off_io.h @@ -125,7 +125,7 @@ class Points_3D_off_visitor_reader { * This example loads points from an OFF file and builds a vector of CGAL points in dimension 3. * Then, it is asked to display the points. * - * @include common/example_CGAL_3D_points_off_reader.cpp + * @include example_CGAL_3D_points_off_reader.cpp * * When launching: * @@ -134,7 +134,7 @@ class Points_3D_off_visitor_reader { * * the program output is: * - * @include common/cgal3Doffreader_result.txt + * @include cgal3Doffreader_result.txt */ template class Points_3D_off_reader { diff --git a/src/common/include/gudhi/Points_off_io.h b/src/common/include/gudhi/Points_off_io.h index 9dc40568..3aa8afd8 100644 --- a/src/common/include/gudhi/Points_off_io.h +++ b/src/common/include/gudhi/Points_off_io.h @@ -107,7 +107,7 @@ class Points_off_visitor_reader { * This example loads points from an OFF file and builds a vector of points (vector of double). * Then, it is asked to display the points. * - * \include common/example_vector_double_points_off_reader.cpp + * \include example_vector_double_points_off_reader.cpp * * When launching: * @@ -116,7 +116,7 @@ class Points_off_visitor_reader { * * the program outputs a file ../../data/points/alphacomplexdoc.off.txt: * - * \include common/vectordoubleoffreader_result.txt + * \include vectordoubleoffreader_result.txt */ template class Points_off_reader { -- cgit v1.2.3 From c5a12380e0744eaa26b59ae043dd4fa160d9f268 Mon Sep 17 00:00:00 2001 From: VincentRouvreau Date: Mon, 13 Sep 2021 16:34:23 +0200 Subject: make_filtration_non_decreasing no more called in alpha complex dD exact version and exact and safe 3d versions --- src/Alpha_complex/doc/Intro_alpha_complex.h | 2 ++ src/Alpha_complex/include/gudhi/Alpha_complex.h | 6 ++++-- src/Alpha_complex/include/gudhi/Alpha_complex_3d.h | 6 ++++-- src/python/doc/alpha_complex_user.rst | 3 +++ 4 files changed, 13 insertions(+), 4 deletions(-) (limited to 'src/Alpha_complex/doc') diff --git a/src/Alpha_complex/doc/Intro_alpha_complex.h b/src/Alpha_complex/doc/Intro_alpha_complex.h index f417ebb2..5ab23720 100644 --- a/src/Alpha_complex/doc/Intro_alpha_complex.h +++ b/src/Alpha_complex/doc/Intro_alpha_complex.h @@ -152,6 +152,8 @@ Table of Contents * not quite define a proper filtration (i.e. non-decreasing with respect to inclusion). * We fix that up by calling `SimplicialComplexForAlpha::make_filtration_non_decreasing()`. * + * \note This is not the case in `exact` version, this is the reason why it is not called in this case. + * * \subsubsection pruneabove Prune above given filtration value * * The simplex tree is pruned from the given maximum \f$ \alpha^2 \f$ value (cf. diff --git a/src/Alpha_complex/include/gudhi/Alpha_complex.h b/src/Alpha_complex/include/gudhi/Alpha_complex.h index b315fa99..e03bb161 100644 --- a/src/Alpha_complex/include/gudhi/Alpha_complex.h +++ b/src/Alpha_complex/include/gudhi/Alpha_complex.h @@ -435,8 +435,10 @@ class Alpha_complex { // -------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------- - // As Alpha value is an approximation, we have to make filtration non decreasing while increasing the dimension - complex.make_filtration_non_decreasing(); + if (!exact) + // As Alpha value is an approximation, we have to make filtration non decreasing while increasing the dimension + // Only in not exact version, cf. https://github.com/GUDHI/gudhi-devel/issues/57 + complex.make_filtration_non_decreasing(); // Remove all simplices that have a filtration value greater than max_alpha_square complex.prune_above_filtration(max_alpha_square); // -------------------------------------------------------------------------------------------- diff --git a/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h b/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h index 4e5fc933..ccc3d852 100644 --- a/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h +++ b/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h @@ -554,8 +554,10 @@ Weighted_alpha_complex_3d::Weighted_point_3 wp0(Weighted_alpha_complex_3d::Bare_ std::clog << "cells \t\t" << count_cells << std::endl; #endif // DEBUG_TRACES // -------------------------------------------------------------------------------------------- - // As Alpha value is an approximation, we have to make filtration non decreasing while increasing the dimension - complex.make_filtration_non_decreasing(); + if (Complexity == complexity::FAST) + // As Alpha value is an approximation, we have to make filtration non decreasing while increasing the dimension + // Only in FAST version, cf. https://github.com/GUDHI/gudhi-devel/issues/57 + complex.make_filtration_non_decreasing(); // Remove all simplices that have a filtration value greater than max_alpha_square complex.prune_above_filtration(max_alpha_square); // -------------------------------------------------------------------------------------------- diff --git a/src/python/doc/alpha_complex_user.rst b/src/python/doc/alpha_complex_user.rst index fffcb3db..ef67a457 100644 --- a/src/python/doc/alpha_complex_user.rst +++ b/src/python/doc/alpha_complex_user.rst @@ -165,6 +165,9 @@ respect to inclusion). We fix that up by calling :func:`~gudhi.SimplexTree.make_filtration_non_decreasing` (cf. `C++ version `_). +.. note:: + This is not the case in `exact` version, this is the reason why it is not called in this case. + Prune above given filtration value ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -- cgit v1.2.3