diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2018-02-02 15:45:06 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2018-02-02 15:45:06 +0000 |
commit | 5ae31a73253f6b29f5cbf1e04af17acf62741d9e (patch) | |
tree | 512041b9bf0835f2520e5b6b2fde0f972998efc4 /src/common | |
parent | 4a5332dfb88ec27157c82f77df87f588f7016736 (diff) | |
parent | 265484997185f3bf900744406206a2d64ca0a20d (diff) |
Merge last trunk modificat
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/rips_complex_from_correlation_matrix@3212 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: ea6296547b67ad82f5983d4309493e9131da7dd0
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/doc/examples.h | 99 | ||||
-rw-r--r-- | src/common/doc/file_formats.h | 66 | ||||
-rw-r--r-- | src/common/doc/footer.html | 10 | ||||
-rw-r--r-- | src/common/doc/header.html | 4 | ||||
-rw-r--r-- | src/common/doc/installation.h | 263 | ||||
-rw-r--r-- | src/common/doc/main_page.h | 316 | ||||
-rw-r--r-- | src/common/include/gudhi/Debug_utils.h | 4 | ||||
-rw-r--r-- | src/common/include/gudhi/Unitary_tests_utils.h | 40 | ||||
-rw-r--r-- | src/common/include/gudhi/distance_functions.h | 32 | ||||
-rw-r--r-- | src/common/include/gudhi/graph_simplicial_complex.h | 63 | ||||
-rw-r--r-- | src/common/utilities/README | 19 | ||||
-rw-r--r-- | src/common/utilities/pointsetgenerator.md | 33 |
12 files changed, 635 insertions, 314 deletions
diff --git a/src/common/doc/examples.h b/src/common/doc/examples.h new file mode 100644 index 00000000..40f202c7 --- /dev/null +++ b/src/common/doc/examples.h @@ -0,0 +1,99 @@ +// 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_kernel.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_periodic_alpha_complex_3d_persistence.cpp + * @example Alpha_complex/weighted_alpha_complex_3d_persistence.cpp + * @example Alpha_complex/periodic_alpha_complex_3d_persistence.cpp + * @example Alpha_complex/exact_alpha_complex_3d_persistence.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 + */ + diff --git a/src/common/doc/file_formats.h b/src/common/doc/file_formats.h index d715aa4d..c60ed15a 100644 --- a/src/common/doc/file_formats.h +++ b/src/common/doc/file_formats.h @@ -53,6 +53,72 @@ namespace Gudhi { Such files can be generated with `Gudhi::persistent_cohomology::Persistent_cohomology::output_diagram()` and read with `Gudhi::read_persistence_intervals_and_dimension()`, `Gudhi::read_persistence_intervals_grouped_by_dimension()` or `Gudhi::read_persistence_intervals_in_dimension()`. + + + \section FileFormatsIsoCuboid Iso-cuboid + + Such a file describes an iso-oriented cuboid with diagonal opposite vertices (min_x, min_y, min_z,...) and (max_x, max_y, max_z, ...). The format is:<br> + \verbatim + min_x min_y [min_z ...] + max_x max_y [max_z ...] + \endverbatim + + Here is a simple sample file in the 3D case: + \verbatim + -1. -1. -1. + 1. 1. 1. + \endverbatim + + + \section FileFormatsPerseus Perseus + + This file format is the format used by the Perseus software + (http://www.sas.upenn.edu/~vnanda/perseus/) by Vidit Nanda. + The first line contains a number d begin the dimension of the + bitmap (2 in the example below). Next d lines are the numbers of top dimensional cubes in each dimensions (3 and 3 + in the example below). Next, in lexicographical order, the filtration of top dimensional cubes is given (1 4 6 8 + 20 4 7 6 5 in the example below). + + \image html "exampleBitmap.png" "Example of a input data." + + The input file for the following complex is: + \verbatim + 2 + 3 + 3 + 1 + 4 + 6 + 8 + 20 + 4 + 7 + 6 + 5 + \endverbatim + + To indicate periodic boundary conditions in a + given direction, then number of top dimensional cells in this direction have to be multiplied by -1. For instance: + + \verbatim + 2 + -3 + 3 + 1 + 4 + 6 + 8 + 20 + 4 + 7 + 6 + 5 + \endverbatim + + Indicate that we have imposed periodic boundary conditions in the direction x, but not in the direction y. + + Other sample files can be found in the `data/bitmap` folder. + */ } // namespace Gudhi diff --git a/src/common/doc/footer.html b/src/common/doc/footer.html index 7b4cdc5c..a557922b 100644 --- a/src/common/doc/footer.html +++ b/src/common/doc/footer.html @@ -6,24 +6,18 @@ <!--BEGIN PROJECT_NAME--> $projectname <!--BEGIN PROJECT_NUMBER--> Version $projectnumber<!--END PROJECT_NUMBER--> <!--BEGIN PROJECT_BRIEF--> - $projectbrief<!--END PROJECT_BRIEF--> +<!--BEGIN PROJECT_BRIEF--> - Copyright : GPL v3<!--END PROJECT_BRIEF--> <!--END PROJECT_NAME--> </td> <td class="network-entypo"> <!--BEGIN GENERATE_TREEVIEW--> $generatedby <a href="http://www.doxygen.org/index.html"> - <img class="footer" src="$relpath^doxygen.png" alt="doxygen"/></a> $doxygenversion + Doxygen</a> $doxygenversion <!--END GENERATE_TREEVIEW--> </td> </tr> </table> -<!--BEGIN !GENERATE_TREEVIEW--> -<hr class="footer"/><address class="footer"><small> tralala -$generatedby  <a href="http://www.doxygen.org/index.html"> -<img class="footer" src="$relpath^doxygen.png" alt="doxygen"/> -</a> $doxygenversion -</small></address> -<!--END !GENERATE_TREEVIEW--> </body> </html> diff --git a/src/common/doc/header.html b/src/common/doc/header.html index 53b5c0a2..d69b28fa 100644 --- a/src/common/doc/header.html +++ b/src/common/doc/header.html @@ -56,6 +56,8 @@ $extrastylesheet <ul class="dropdown"> <li><a href="http://gudhi.gforge.inria.fr/licensing/">Licensing</a></li> <li><a href="https://gforge.inria.fr/frs/?group_id=3865" target="_blank">Get the sources</a></li> + <li><a href="https://gforge.inria.fr/frs/download.php/file/37365/2018-02-01-16-59-31_GUDHI_2.1.0_OSX_UTILS.tar.gz" target="_blank">Utils for Mac OSx</a></li> + <li><a href="https://gforge.inria.fr/frs/download.php/file/37366/2018-01-31-09-25-53_GUDHI_2.1.0_WIN64_UTILS.zip" target="_blank">Utils for Win x64</a></li> </ul> </li> <li class="divider"></li> @@ -66,6 +68,8 @@ $extrastylesheet <li><a href="http://gudhi.gforge.inria.fr/doc/latest/installation.html">C++ installation manual</a></li> <li><a href="http://gudhi.gforge.inria.fr/python/latest/">Python documentation</a></li> <li><a href="http://gudhi.gforge.inria.fr/python/latest/installation.html">Python installation manual</a></li> + <li><a href="http://gudhi.gforge.inria.fr/utils/">Utilities</a></li> + <li><a href="http://bertrand.michel.perso.math.cnrs.fr/Enseignements/TDA-Gudhi-Python.html" target="_blank">Tutorial</a></li> </ul> </li> <li class="divider"></li> diff --git a/src/common/doc/installation.h b/src/common/doc/installation.h new file mode 100644 index 00000000..25675cc5 --- /dev/null +++ b/src/common/doc/installation.h @@ -0,0 +1,263 @@ +/*! \page installation GUDHI installation + * \tableofcontents + * As GUDHI is a header only library, there is no need to install the library. + * + * Examples of GUDHI headers inclusion can be found in \ref demos. + * + * \section compiling Compiling + * The library uses c++11 and requires <a target="_blank" href="http://www.boost.org/">Boost</a> with version 1.48.0 or + * more recent. It is a multi-platform library and compiles on Linux, Mac OSX and Visual Studio 2015. + * + * \subsection demos Demos and examples + * To build the demos and examples, run the following commands in a terminal: +\verbatim cd /path-to-gudhi/ +mkdir build +cd build/ +cmake .. +make \endverbatim + * A list of examples is available <a href="examples.html">here</a>. + * + * \subsection testsuites Test suites + * To test your build, run the following command in a terminal: + * \verbatim make test \endverbatim + * + * \subsection documentationgeneration Documentation + * To generate the documentation, <a target="_blank" href="http://www.doxygen.org/">Doxygen</a> 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 + * + * \section optionallibrary Optional third-party library + * \subsection gmp GMP + * The multi-field persistent homology algorithm requires GMP which is a free library for arbitrary-precision + * arithmetic, operating on signed integers, rational numbers, and floating point numbers. + * + * The following example requires the <a target="_blank" href="http://gmplib.org/">GNU Multiple Precision Arithmetic + * Library</a> (GMP) and will not be built if GMP is not installed: + * \li <a href="_persistent_cohomology_2rips_multifield_persistence_8cpp-example.html"> + * Persistent_cohomology/rips_multifield_persistence.cpp</a> + * + * Having GMP version 4.2 or higher installed is recommended. + * + * \subsection cgal CGAL + * The \ref alpha_complex data structure, \ref bottleneck_distance, and few examples requires CGAL, which is a C++ + * library which 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> for CGAL version ≥ 4.8.0), thereafter you will be able to compile + * GUDHI by calling <CODE>cmake -DCGAL_DIR=/your/path/to/CGAL-X.Y .. && make</CODE> + * + * Having CGAL version 4.4.0 or higher installed is recommended. The procedure to install this library according to + * your operating system is detailed here http://doc.cgal.org/latest/Manual/installation.html + * + * The following examples/utilities require the <a target="_blank" href="http://www.cgal.org/">Computational Geometry Algorithms + * Library</a> (CGAL \cite cgal:eb-15b) and will not be built if CGAL is not installed: + * \li <a href="_alpha_complex_2alpha_complex_3d_persistence_8cpp-example.html"> + * Alpha_complex/alpha_complex_3d_persistence.cpp</a> + * \li <a href="_alpha_complex_2exact_alpha_complex_3d_persistence_8cpp-example.html"> + * Alpha_complex/exact_alpha_complex_3d_persistence.cpp</a> + * \li <a href="_alpha_complex_2weighted_alpha_complex_3d_persistence_8cpp-example.html"> + * Alpha_complex/weighted_alpha_complex_3d_persistence.cpp</a> + * \li <a href="_simplex_tree_2example_alpha_shapes_3_simplex_tree_from_off_file_8cpp-example.html"> + * Simplex_tree/example_alpha_shapes_3_simplex_tree_from_off_file.cpp</a> + * + * The following examples/utilities require CGAL version ≥ 4.6.0: + * \li <a href="_witness_complex_2strong_witness_persistence_8cpp-example.html"> + * Witness_complex/strong_witness_persistence.cpp</a> + * \li <a href="_witness_complex_2weak_witness_persistence_8cpp-example.html"> + * Witness_complex/weak_witness_persistence.cpp</a> + * \li <a href="_witness_complex_2example_strong_witness_complex_off_8cpp-example.html"> + * Witness_complex/example_strong_witness_complex_off.cpp</a> + * \li <a href="_witness_complex_2example_witness_complex_off_8cpp-example.html"> + * Witness_complex/example_witness_complex_off.cpp</a> + * \li <a href="_witness_complex_2example_witness_complex_sphere_8cpp-example.html"> + * Witness_complex/example_witness_complex_sphere.cpp</a> + * + * The following example requires CGAL version ≥ 4.7.0: + * \li <a href="_alpha_complex_2_alpha_complex_from_off_8cpp-example.html"> + * Alpha_complex/Alpha_complex_from_off.cpp</a> + * \li <a href="_alpha_complex_2_alpha_complex_from_points_8cpp-example.html"> + * Alpha_complex/Alpha_complex_from_points.cpp</a> + * \li <a href="_alpha_complex_2alpha_complex_persistence_8cpp-example.html"> + * Alpha_complex/alpha_complex_persistence.cpp</a> + * \li <a href="_alpha_complex_2periodic_alpha_complex_3d_persistence_8cpp-example.html"> + * Alpha_complex/periodic_alpha_complex_3d_persistence.cpp</a> + * \li <a href="_persistent_cohomology_2custom_persistence_sort_8cpp-example.html"> + * Persistent_cohomology/custom_persistence_sort.cpp</a> + * + * The following example requires CGAL version ≥ 4.8.1: + * \li <a href="_bottleneck_distance_2alpha_rips_persistence_bottleneck_distance_8cpp-example.html"> + * Bottleneck_distance/alpha_rips_persistence_bottleneck_distance.cpp.cpp</a> + * \li <a href="_bottleneck_distance_2bottleneck_basic_example_8cpp-example.html"> + * Bottleneck_distance/bottleneck_basic_example.cpp</a> + * \li <a href="_bottleneck_distance_2bottleneck_read_file_8cpp-example.html"> + * Bottleneck_distance/bottleneck_distance.cpp</a> + * \li <a href="_nerve__g_i_c_2_coord_g_i_c_8cpp-example.html"> + * Nerve_GIC/CoordGIC.cpp</a> + * \li <a href="_nerve__g_i_c_2_func_g_i_c_8cpp-example.html"> + * Nerve_GIC/FuncGIC.cpp</a> + * \li <a href="_nerve__g_i_c_2_nerve_8cpp-example.html"> + * Nerve_GIC/Nerve.cpp</a> + * \li <a href="_nerve__g_i_c_2_voronoi_g_i_c_8cpp-example.html"> + * Nerve_GIC/VoronoiGIC.cpp</a> + * \li <a href="_spatial_searching_2example_spatial_searching_8cpp-example.html"> + * Spatial_searching/example_spatial_searching.cpp</a> + * \li <a href="_subsampling_2example_choose_n_farthest_points_8cpp-example.html"> + * Subsampling/example_choose_n_farthest_points.cpp</a> + * \li <a href="_subsampling_2example_custom_kernel_8cpp-example.html"> + * Subsampling/example_custom_kernel.cpp</a> + * \li <a href="_subsampling_2example_pick_n_random_points_8cpp-example.html"> + * Subsampling/example_pick_n_random_points.cpp</a> + * \li <a href="_subsampling_2example_sparsify_point_set_8cpp-example.html"> + * Subsampling/example_sparsify_point_set.cpp</a> + * \li <a href="_tangential_complex_2example_basic_8cpp-example.html"> + * Tangential_complex/example_basic.cpp</a> + * \li <a href="_tangential_complex_2example_with_perturb_8cpp-example.html"> + * Tangential_complex/example_with_perturb.cpp</a> + * + * \subsection eigen3 Eigen3 + * The \ref alpha_complex data structure and few examples requires + * <a target="_blank" href="http://eigen.tuxfamily.org/">Eigen3</a> is a C++ template library for linear algebra: + * matrices, vectors, numerical solvers, and related algorithms. + * + * The following examples/utilities require the <a target="_blank" href="http://eigen.tuxfamily.org/">Eigen3</a> and will not be + * built if Eigen3 is not installed: + * \li <a href="_alpha_complex_2_alpha_complex_from_off_8cpp-example.html"> + * Alpha_complex/Alpha_complex_from_off.cpp</a> + * \li <a href="_alpha_complex_2_alpha_complex_from_points_8cpp-example.html"> + * Alpha_complex/Alpha_complex_from_points.cpp</a> + * \li <a href="_alpha_complex_2alpha_complex_persistence_8cpp-example.html"> + * Alpha_complex/alpha_complex_persistence.cpp</a> + * \li <a href="_alpha_complex_2periodic_alpha_complex_3d_persistence_8cpp-example.html"> + * Alpha_complex/periodic_alpha_complex_3d_persistence.cpp</a> + * \li <a href="_bottleneck_distance_2alpha_rips_persistence_bottleneck_distance_8cpp-example.html"> + * Bottleneck_distance/alpha_rips_persistence_bottleneck_distance.cpp.cpp</a> + * \li <a href="_persistent_cohomology_2custom_persistence_sort_8cpp-example.html"> + * Persistent_cohomology/custom_persistence_sort.cpp</a> + * \li <a href="_spatial_searching_2example_spatial_searching_8cpp-example.html"> + * Spatial_searching/example_spatial_searching.cpp</a> + * \li <a href="_subsampling_2example_choose_n_farthest_points_8cpp-example.html"> + * Subsampling/example_choose_n_farthest_points.cpp</a> + * \li <a href="_subsampling_2example_custom_kernel_8cpp-example.html"> + * Subsampling/example_custom_kernel.cpp</a> + * \li <a href="_subsampling_2example_pick_n_random_points_8cpp-example.html"> + * Subsampling/example_pick_n_random_points.cpp</a> + * \li <a href="_subsampling_2example_sparsify_point_set_8cpp-example.html"> + * Subsampling/example_sparsify_point_set.cpp</a> + * \li <a href="_tangential_complex_2example_basic_8cpp-example.html"> + * Tangential_complex/example_basic.cpp</a> + * \li <a href="_tangential_complex_2example_with_perturb_8cpp-example.html"> + * Tangential_complex/example_with_perturb.cpp</a> + * \li <a href="_witness_complex_2strong_witness_persistence_8cpp-example.html"> + * Witness_complex/strong_witness_persistence.cpp</a> + * \li <a href="_witness_complex_2weak_witness_persistence_8cpp-example.html"> + * Witness_complex/weak_witness_persistence.cpp</a> + * \li <a href="_witness_complex_2example_strong_witness_complex_off_8cpp-example.html"> + * Witness_complex/example_strong_witness_complex_off.cpp</a> + * \li <a href="_witness_complex_2example_witness_complex_off_8cpp-example.html"> + * Witness_complex/example_witness_complex_off.cpp</a> + * \li <a href="_witness_complex_2example_witness_complex_sphere_8cpp-example.html"> + * Witness_complex/example_witness_complex_sphere.cpp</a> + * + * \subsection tbb Threading Building Blocks + * <a target="_blank" href="https://www.threadingbuildingblocks.org/">Intel® TBB</a> 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. + * + * The following examples/utilities are using Intel® TBB if installed: + * \li <a href="_alpha_complex_2_alpha_complex_from_off_8cpp-example.html"> + * Alpha_complex/Alpha_complex_from_off.cpp</a> + * \li <a href="_alpha_complex_2_alpha_complex_from_points_8cpp-example.html"> + * Alpha_complex/Alpha_complex_from_points.cpp</a> + * \li <a href="_alpha_complex_2alpha_complex_3d_persistence_8cpp-example.html"> + * Alpha_complex/alpha_complex_3d_persistence.cpp</a> + * \li <a href="_alpha_complex_2alpha_complex_persistence_8cpp-example.html"> + * Alpha_complex/alpha_complex_persistence.cpp</a> + * \li <a href="_alpha_complex_2exact_alpha_complex_3d_persistence_8cpp-example.html"> + * Alpha_complex/exact_alpha_complex_3d_persistence.cpp</a> + * \li <a href="_alpha_complex_2periodic_alpha_complex_3d_persistence_8cpp-example.html"> + * Alpha_complex/periodic_alpha_complex_3d_persistence.cpp</a> + * \li <a href="_alpha_complex_2weighted_alpha_complex_3d_persistence_8cpp-example.html"> + * Alpha_complex/weighted_alpha_complex_3d_persistence.cpp</a> + * \li <a href="_bitmap_cubical_complex_2_bitmap_cubical_complex_8cpp-example.html"> + * Bitmap_cubical_complex/cubical_complex_persistence.cpp</a> + * \li <a href="_bitmap_cubical_complex_2_bitmap_cubical_complex_periodic_boundary_conditions_8cpp-example.html"> + * Bitmap_cubical_complex/periodic_cubical_complex_persistence.cpp</a> + * \li <a href="_bitmap_cubical_complex_2_random_bitmap_cubical_complex_8cpp-example.html"> + * Bitmap_cubical_complex/Random_bitmap_cubical_complex.cpp</a> + * \li <a href="_nerve__g_i_c_2_coord_g_i_c_8cpp-example.html"> + * Nerve_GIC/CoordGIC.cpp</a> + * \li <a href="_nerve__g_i_c_2_func_g_i_c_8cpp-example.html"> + * Nerve_GIC/FuncGIC.cpp</a> + * \li <a href="_nerve__g_i_c_2_nerve_8cpp-example.html"> + * Nerve_GIC/Nerve.cpp</a> + * \li <a href="_nerve__g_i_c_2_voronoi_g_i_c_8cpp-example.html"> + * Nerve_GIC/VoronoiGIC.cpp</a> + * \li <a href="_simplex_tree_2simple_simplex_tree_8cpp-example.html"> + * Simplex_tree/simple_simplex_tree.cpp</a> + * \li <a href="_simplex_tree_2example_alpha_shapes_3_simplex_tree_from_off_file_8cpp-example.html"> + * Simplex_tree/example_alpha_shapes_3_simplex_tree_from_off_file.cpp</a> + * \li <a href="_simplex_tree_2simplex_tree_from_cliques_of_graph_8cpp-example.html"> + * Simplex_tree/simplex_tree_from_cliques_of_graph.cpp</a> + * \li <a href="_simplex_tree_2graph_expansion_with_blocker_8cpp-example.html"> + * Simplex_tree/graph_expansion_with_blocker.cpp</a> + * \li <a href="_persistent_cohomology_2alpha_complex_3d_persistence_8cpp-example.html"> + * Persistent_cohomology/alpha_complex_3d_persistence.cpp</a> + * \li <a href="_persistent_cohomology_2alpha_complex_persistence_8cpp-example.html"> + * Persistent_cohomology/alpha_complex_persistence.cpp</a> + * \li <a href="_persistent_cohomology_2rips_persistence_via_boundary_matrix_8cpp-example.html"> + * Persistent_cohomology/rips_persistence_via_boundary_matrix.cpp</a> + * \li <a href="_persistent_cohomology_2persistence_from_file_8cpp-example.html"> + * Persistent_cohomology/persistence_from_file.cpp</a> + * \li <a href="_persistent_cohomology_2persistence_from_simple_simplex_tree_8cpp-example.html"> + * Persistent_cohomology/persistence_from_simple_simplex_tree.cpp</a> + * \li <a href="_persistent_cohomology_2plain_homology_8cpp-example.html"> + * Persistent_cohomology/plain_homology.cpp</a> + * \li <a href="_persistent_cohomology_2rips_multifield_persistence_8cpp-example.html"> + * Persistent_cohomology/rips_multifield_persistence.cpp</a> + * \li <a href="_persistent_cohomology_2rips_persistence_step_by_step_8cpp-example.html"> + * Persistent_cohomology/rips_persistence_step_by_step.cpp</a> + * \li <a href="_persistent_cohomology_2exact_alpha_complex_3d_persistence_8cpp-example.html"> + * Persistent_cohomology/exact_alpha_complex_3d_persistence.cpp</a> + * \li <a href="_persistent_cohomology_2weighted_alpha_complex_3d_persistence_8cpp-example.html"> + * Persistent_cohomology/weighted_alpha_complex_3d_persistence.cpp</a> + * \li <a href="_persistent_cohomology_2custom_persistence_sort_8cpp-example.html"> + * Persistent_cohomology/custom_persistence_sort.cpp</a> + * \li <a href="_rips_complex_2example_one_skeleton_rips_from_points_8cpp-example.html"> + * Rips_complex/example_one_skeleton_rips_from_points.cpp</a> + * \li <a href="_rips_complex_2example_rips_complex_from_off_file_8cpp-example.html"> + * Rips_complex/example_rips_complex_from_off_file.cpp</a> + * \li <a href="_rips_complex_2rips_distance_matrix_persistence_8cpp-example.html"> + * Rips_complex/rips_distance_matrix_persistence.cpp</a> + * \li <a href="_rips_complex_2rips_persistence_8cpp-example.html"> + * Rips_complex/rips_persistence.cpp</a> + * \li <a href="_witness_complex_2strong_witness_persistence_8cpp-example.html"> + * Witness_complex/strong_witness_persistence.cpp</a> + * \li <a href="_witness_complex_2weak_witness_persistence_8cpp-example.html"> + * Witness_complex/weak_witness_persistence.cpp</a> + * \li <a href="_witness_complex_2example_nearest_landmark_table_8cpp-example.html"> + * Witness_complex/example_nearest_landmark_table.cpp</a> + * + * \section Contributions Bug reports and contributions + * Please help us improving the quality of the GUDHI library. You may report bugs or suggestions to: + * \verbatim Contact: gudhi-users@lists.gforge.inria.fr \endverbatim + * + * GUDHI is open to external contributions. If you want to join our development team, please contact us. + * +*/ + +/*! \page Citation Acknowledging the GUDHI library + * We kindly ask users to cite the GUDHI library as appropriately as possible in their papers, and to mention the use + * of the GUDHI library on the web pages of their projects using GUDHI and provide us with links to these web pages. + * Feel free to contact us in case you have any question or remark on this topic. + * + * We provide \ref GudhiBibtex entries for the modules of the User and Reference Manual, as well as for publications + * directly related to the GUDHI library. + * \section GudhiBibtex GUDHI bibtex + * \verbinclude biblio/how_to_cite_gudhi.bib +*/ diff --git a/src/common/doc/main_page.h b/src/common/doc/main_page.h index 701ea8ff..b3e9ea03 100644 --- a/src/common/doc/main_page.h +++ b/src/common/doc/main_page.h @@ -93,6 +93,25 @@ </td> </tr> </table> + \subsection CoverComplexDataStructure Cover Complexes + \image html "gicvisu.jpg" "Graph Induced Complex of a point cloud." +<table border="0"> + <tr> + <td width="25%"> + <b>Author:</b> Mathieu Carrière<br> + <b>Introduced in:</b> GUDHI 2.1.0<br> + <b>Copyright:</b> GPL v3<br> + <b>Requires:</b> \ref cgal ≥ 4.8.1 + </td> + <td width="75%"> + Nerves and Graph Induced Complexes are cover complexes, i.e. simplicial complexes that provably contain + topological information about the input data. They can be computed with a cover of the + data, that comes i.e. from the preimage of a family of intervals covering the image + of a scalar-valued function defined on the data. <br> + <b>User manual:</b> \ref cover_complex - <b>Reference manual:</b> Gudhi::cover_complex::Cover_complex + </td> + </tr> +</table> \subsection SkeletonBlockerDataStructure Skeleton blocker \image html "ds_representation.png" "Skeleton blocker representation" <table border="0"> @@ -152,6 +171,7 @@ </table> \section Toolbox Toolbox + \subsection BottleneckDistanceToolbox Bottleneck distance \image html "perturb_pd.png" "Bottleneck distance is the length of the longest edge" <table border="0"> @@ -211,283 +231,23 @@ <b>User manual:</b> \ref persistent_cohomology - <b>Reference manual:</b> Gudhi::persistent_cohomology::Persistent_cohomology </td> </tr> +</table> + \subsection PersistenceRepresentationsToolbox Persistence representations + \image html "average_landscape.png" "Persistence representations" +<table border="0"> + <tr> + <td width="25%"> + <b>Author:</b> Pawel Dlotko<br> + <b>Introduced in:</b> GUDHI 2.1.0<br> + <b>Copyright:</b> GPL v3<br> + </td> + <td width="75%"> + It contains implementation of various representations of persistence diagrams; diagrams themselves, persistence + landscapes (rigorous and grid version), persistence heath maps, vectors and others. It implements basic + functionalities which are neccessary to use persistence in statistics and machine learning.<br> + <b>User manual:</b> \ref Persistence_representations + </td> + </tr> </table> + */ - -/*! \page installation GUDHI installation - * \tableofcontents - * As GUDHI is a header only library, there is no need to install the library. - * - * Examples of GUDHI headers inclusion can be found in \ref demos. - * - * \section compiling Compiling - * The library uses c++11 and requires <a target="_blank" href="http://www.boost.org/">Boost</a> with version 1.48.0 or - * more recent. It is a multi-platform library and compiles on Linux, Mac OSX and Visual Studio 2015. - * - * \subsection demos Demos and examples - * To build the demos and examples, run the following commands in a terminal: -\verbatim cd /path-to-gudhi/ -mkdir build -cd build/ -cmake .. -make \endverbatim - * A list of examples is available <a href="examples.html">here</a>. - * - * \subsection testsuites Test suites - * To test your build, run the following command in a terminal: - * \verbatim make test \endverbatim - * - * \subsection documentationgeneration Documentation - * To generate the documentation, <a target="_blank" href="http://www.doxygen.org/">Doxygen</a> 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 - * - * \section optionallibrary Optional third-party library - * \subsection gmp GMP - * The multi-field persistent homology algorithm requires GMP which is a free library for arbitrary-precision - * arithmetic, operating on signed integers, rational numbers, and floating point numbers. - * - * The following example requires the <a target="_blank" href="http://gmplib.org/">GNU Multiple Precision Arithmetic - * Library</a> (GMP) and will not be built if GMP is not installed: - * \li <a href="_persistent_cohomology_2rips_multifield_persistence_8cpp-example.html"> - * Persistent_cohomology/rips_multifield_persistence.cpp</a> - * - * Having GMP version 4.2 or higher installed is recommended. - * - * \subsection cgal CGAL - * The \ref alpha_complex data structure, \ref bottleneck_distance, and few examples requires CGAL, which is a C++ - * library which 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> for CGAL version ≥ 4.8.0), thereafter you will be able to compile - * GUDHI by calling <CODE>cmake -DCGAL_DIR=/your/path/to/CGAL-X.Y .. && make</CODE> - * - * Having CGAL version 4.4.0 or higher installed is recommended. The procedure to install this library according to - * your operating system is detailed here http://doc.cgal.org/latest/Manual/installation.html - * - * The following examples require the <a target="_blank" href="http://www.cgal.org/">Computational Geometry Algorithms - * Library</a> (CGAL \cite cgal:eb-15b) and will not be built if CGAL is not installed: - * \li <a href="_persistent_cohomology_2alpha_complex_3d_persistence_8cpp-example.html"> - * Persistent_cohomology/alpha_complex_3d_persistence.cpp</a> - * \li <a href="_persistent_cohomology_2exact_alpha_complex_3d_persistence_8cpp-example.html"> - * Persistent_cohomology/exact_alpha_complex_3d_persistence.cpp</a> - * \li <a href="_persistent_cohomology_2weighted_alpha_complex_3d_persistence_8cpp-example.html"> - * Persistent_cohomology/weighted_alpha_complex_3d_persistence.cpp</a> - * \li <a href="_simplex_tree_2example_alpha_shapes_3_simplex_tree_from_off_file_8cpp-example.html"> - * Simplex_tree/example_alpha_shapes_3_simplex_tree_from_off_file.cpp</a> - * - * The following example requires CGAL version ≥ 4.6.0: - * \li <a href="_witness_complex_2witness_complex_sphere_8cpp-example.html"> - * Witness_complex/witness_complex_sphere.cpp</a> - * - * The following example requires CGAL version ≥ 4.7.0: - * \li <a href="_alpha_complex_2_alpha_complex_from_off_8cpp-example.html"> - * Alpha_complex/Alpha_complex_from_off.cpp</a> - * \li <a href="_alpha_complex_2_alpha_complex_from_points_8cpp-example.html"> - * Alpha_complex/Alpha_complex_from_points.cpp</a> - * \li <a href="_persistent_cohomology_2alpha_complex_persistence_8cpp-example.html"> - * Persistent_cohomology/alpha_complex_persistence.cpp</a> - * \li <a href="_persistent_cohomology_2periodic_alpha_complex_3d_persistence_8cpp-example.html"> - * Persistent_cohomology/periodic_alpha_complex_3d_persistence.cpp</a> - * \li <a href="_persistent_cohomology_2custom_persistence_sort_8cpp-example.html"> - * Persistent_cohomology/custom_persistence_sort.cpp</a> - * - * The following example requires CGAL version ≥ 4.8.1: - * \li <a href="_bottleneck_distance_2alpha_rips_persistence_bottleneck_distance_8cpp-example.html"> - * Bottleneck_distance/alpha_rips_persistence_bottleneck_distance.cpp.cpp</a> - * \li <a href="_bottleneck_distance_2bottleneck_basic_example_8cpp-example.html"> - * Bottleneck_distance/bottleneck_basic_example.cpp</a> - * \li <a href="_bottleneck_distance_2bottleneck_read_file_example_8cpp-example.html"> - * Bottleneck_distance/bottleneck_read_file_example.cpp</a> - * \li <a href="_spatial_searching_2example_spatial_searching_8cpp-example.html"> - * Spatial_searching/example_spatial_searching.cpp</a> - * \li <a href="_subsampling_2example_choose_n_farthest_points_8cpp-example.html"> - * Subsampling/example_choose_n_farthest_points.cpp</a> - * \li <a href="_subsampling_2example_custom_kernel_8cpp-example.html"> - * Subsampling/example_custom_kernel.cpp</a> - * \li <a href="_subsampling_2example_pick_n_random_points_8cpp-example.html"> - * Subsampling/example_pick_n_random_points.cpp</a> - * \li <a href="_subsampling_2example_sparsify_point_set_8cpp-example.html"> - * Subsampling/example_sparsify_point_set.cpp</a> - * \li <a href="_tangential_complex_2example_basic_8cpp-example.html"> - * Tangential_complex/example_basic.cpp</a> - * \li <a href="_tangential_complex_2example_with_perturb_8cpp-example.html"> - * Tangential_complex/example_with_perturb.cpp</a> - * - * \subsection eigen3 Eigen3 - * The \ref alpha_complex data structure and few examples requires - * <a target="_blank" href="http://eigen.tuxfamily.org/">Eigen3</a> is a C++ template library for linear algebra: - * matrices, vectors, numerical solvers, and related algorithms. - * - * The following example requires the <a target="_blank" href="http://eigen.tuxfamily.org/">Eigen3</a> and will not be - * built if Eigen3 is not installed: - * \li <a href="_alpha_complex_2_alpha_complex_from_off_8cpp-example.html"> - * Alpha_complex/Alpha_complex_from_off.cpp</a> - * \li <a href="_alpha_complex_2_alpha_complex_from_points_8cpp-example.html"> - * Alpha_complex/Alpha_complex_from_points.cpp</a> - * \li <a href="_bottleneck_distance_2alpha_rips_persistence_bottleneck_distance_8cpp-example.html"> - * Bottleneck_distance/alpha_rips_persistence_bottleneck_distance.cpp.cpp</a> - * \li <a href="_persistent_cohomology_2alpha_complex_persistence_8cpp-example.html"> - * Persistent_cohomology/alpha_complex_persistence.cpp</a> - * \li <a href="_persistent_cohomology_2periodic_alpha_complex_3d_persistence_8cpp-example.html"> - * Persistent_cohomology/periodic_alpha_complex_3d_persistence.cpp</a> - * \li <a href="_persistent_cohomology_2custom_persistence_sort_8cpp-example.html"> - * Persistent_cohomology/custom_persistence_sort.cpp</a> - * \li <a href="_spatial_searching_2example_spatial_searching_8cpp-example.html"> - * Spatial_searching/example_spatial_searching.cpp</a> - * \li <a href="_subsampling_2example_choose_n_farthest_points_8cpp-example.html"> - * Subsampling/example_choose_n_farthest_points.cpp</a> - * \li <a href="_subsampling_2example_custom_kernel_8cpp-example.html"> - * Subsampling/example_custom_kernel.cpp</a> - * \li <a href="_subsampling_2example_pick_n_random_points_8cpp-example.html"> - * Subsampling/example_pick_n_random_points.cpp</a> - * \li <a href="_subsampling_2example_sparsify_point_set_8cpp-example.html"> - * Subsampling/example_sparsify_point_set.cpp</a> - * \li <a href="_tangential_complex_2example_basic_8cpp-example.html"> - * Tangential_complex/example_basic.cpp</a> - * \li <a href="_tangential_complex_2example_with_perturb_8cpp-example.html"> - * Tangential_complex/example_with_perturb.cpp</a> - * - * \subsection tbb Threading Building Blocks - * <a target="_blank" href="https://www.threadingbuildingblocks.org/">Intel® TBB</a> 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. - * - * The following examples are using Intel® TBB if installed: - * \li <a href="_alpha_complex_2_alpha_complex_from_off_8cpp-example.html"> - * Alpha_complex/Alpha_complex_from_off.cpp</a> - * \li <a href="_alpha_complex_2_alpha_complex_from_points_8cpp-example.html"> - * Alpha_complex/Alpha_complex_from_points.cpp</a> - * \li <a href="_bitmap_cubical_complex_2_bitmap_cubical_complex_8cpp-example.html"> - * Bitmap_cubical_complex/Bitmap_cubical_complex.cpp</a> - * \li <a href="_bitmap_cubical_complex_2_bitmap_cubical_complex_periodic_boundary_conditions_8cpp-example.html"> - * Bitmap_cubical_complex/Bitmap_cubical_complex_periodic_boundary_conditions.cpp</a> - * \li <a href="_bitmap_cubical_complex_2_random_bitmap_cubical_complex_8cpp-example.html"> - * Bitmap_cubical_complex/Random_bitmap_cubical_complex.cpp</a> - * \li <a href="_persistent_cohomology_2alpha_complex_3d_persistence_8cpp-example.html"> - * Persistent_cohomology/alpha_complex_3d_persistence.cpp</a> - * \li <a href="_persistent_cohomology_2alpha_complex_persistence_8cpp-example.html"> - * Persistent_cohomology/alpha_complex_persistence.cpp</a> - * \li <a href="_simplex_tree_2simple_simplex_tree_8cpp-example.html"> - * Simplex_tree/simple_simplex_tree.cpp</a> - * \li <a href="_simplex_tree_2example_alpha_shapes_3_simplex_tree_from_off_file_8cpp-example.html"> - * Simplex_tree/example_alpha_shapes_3_simplex_tree_from_off_file.cpp</a> - * \li <a href="_simplex_tree_2simplex_tree_from_cliques_of_graph_8cpp-example.html"> - * Simplex_tree/simplex_tree_from_cliques_of_graph.cpp</a> - * \li <a href="_simplex_tree_2graph_expansion_with_blocker_8cpp-example.html"> - * Simplex_tree/graph_expansion_with_blocker.cpp</a> - * \li <a href="_persistent_cohomology_2alpha_complex_3d_persistence_8cpp-example.html"> - * Persistent_cohomology/alpha_complex_3d_persistence.cpp</a> - * \li <a href="_persistent_cohomology_2alpha_complex_persistence_8cpp-example.html"> - * Persistent_cohomology/alpha_complex_persistence.cpp</a> - * \li <a href="_persistent_cohomology_2rips_persistence_via_boundary_matrix_8cpp-example.html"> - * Persistent_cohomology/rips_persistence_via_boundary_matrix.cpp</a> - * \li <a href="_persistent_cohomology_2persistence_from_file_8cpp-example.html"> - * Persistent_cohomology/persistence_from_file.cpp</a> - * \li <a href="_persistent_cohomology_2persistence_from_simple_simplex_tree_8cpp-example.html"> - * Persistent_cohomology/persistence_from_simple_simplex_tree.cpp</a> - * \li <a href="_persistent_cohomology_2plain_homology_8cpp-example.html"> - * Persistent_cohomology/plain_homology.cpp</a> - * \li <a href="_persistent_cohomology_2rips_distance_matrix_persistence_8cpp-example.html"> - * Persistent_cohomology/rips_distance_matrix_persistence.cpp</a> - * \li <a href="_persistent_cohomology_2rips_multifield_persistence_8cpp-example.html"> - * Persistent_cohomology/rips_multifield_persistence.cpp</a> - * \li <a href="_persistent_cohomology_2rips_persistence_8cpp-example.html"> - * Persistent_cohomology/rips_persistence.cpp</a> - * \li <a href="_persistent_cohomology_2rips_persistence_step_by_step_8cpp-example.html"> - * Persistent_cohomology/rips_persistence_step_by_step.cpp</a> - * \li <a href="_persistent_cohomology_2exact_alpha_complex_3d_persistence_8cpp-example.html"> - * Persistent_cohomology/exact_alpha_complex_3d_persistence.cpp</a> - * \li <a href="_persistent_cohomology_2weighted_alpha_complex_3d_persistence_8cpp-example.html"> - * Persistent_cohomology/weighted_alpha_complex_3d_persistence.cpp</a> - * \li <a href="_persistent_cohomology_2periodic_alpha_complex_3d_persistence_8cpp-example.html"> - * Persistent_cohomology/periodic_alpha_complex_3d_persistence.cpp</a> - * \li <a href="_persistent_cohomology_2custom_persistence_sort_8cpp-example.html"> - * Persistent_cohomology/custom_persistence_sort.cpp</a> - * \li <a href="_rips_complex_2example_one_skeleton_rips_from_points_8cpp-example.html"> - * Rips_complex/example_one_skeleton_rips_from_points.cpp</a> - * \li <a href="_rips_complex_2example_rips_complex_from_off_file_8cpp-example.html"> - * Rips_complex/example_rips_complex_from_off_file.cpp</a> - * - * \section Contributions Bug reports and contributions - * Please help us improving the quality of the GUDHI library. You may report bugs or suggestions to: - * \verbatim Contact: gudhi-users@lists.gforge.inria.fr \endverbatim - * - * GUDHI is open to external contributions. If you want to join our development team, please contact us. - * -*/ - -/*! \page Citation Acknowledging the GUDHI library - * We kindly ask users to cite the GUDHI library as appropriately as possible in their papers, and to mention the use - * of the GUDHI library on the web pages of their projects using GUDHI and provide us with links to these web pages. - * Feel free to contact us in case you have any question or remark on this topic. - * - * We provide \ref GudhiBibtex entries for the modules of the User and Reference Manual, as well as for publications - * directly related to the GUDHI library. - * \section GudhiBibtex GUDHI bibtex - * \verbinclude biblio/how_to_cite_gudhi.bib -*/ - -// List of GUDHI examples - Doxygen needs at least a file tag to analyse comments -/*! @file Examples - * @example Alpha_complex/Alpha_complex_from_off.cpp - * @example Alpha_complex/Alpha_complex_from_points.cpp - * @example Bottleneck_distance/alpha_rips_persistence_bottleneck_distance.cpp - * @example Bottleneck_distance/bottleneck_basic_example.cpp - * @example Bottleneck_distance/bottleneck_read_file_example.cpp - * @example Bitmap_cubical_complex/Bitmap_cubical_complex.cpp - * @example Bitmap_cubical_complex/Bitmap_cubical_complex_periodic_boundary_conditions.cpp - * @example Bitmap_cubical_complex/Random_bitmap_cubical_complex.cpp - * @example common/example_CGAL_3D_points_off_reader.cpp - * @example common/example_CGAL_points_off_reader.cpp - * @example Contraction/Garland_heckbert.cpp - * @example Contraction/Rips_contraction.cpp - * @example Persistent_cohomology/alpha_complex_3d_persistence.cpp - * @example Persistent_cohomology/alpha_complex_persistence.cpp - * @example Persistent_cohomology/rips_persistence_via_boundary_matrix.cpp - * @example Persistent_cohomology/exact_alpha_complex_3d_persistence.cpp - * @example Persistent_cohomology/weighted_alpha_complex_3d_persistence.cpp - * @example Persistent_cohomology/periodic_alpha_complex_3d_persistence.cpp - * @example Persistent_cohomology/persistence_from_file.cpp - * @example Persistent_cohomology/persistence_from_simple_simplex_tree.cpp - * @example Persistent_cohomology/plain_homology.cpp - * @example Persistent_cohomology/rips_multifield_persistence.cpp - * @example Persistent_cohomology/rips_correlation_matrix_persistence.cpp - * @example Persistent_cohomology/rips_distance_matrix_persistence.cpp - * @example Persistent_cohomology/rips_persistence.cpp - * @example Persistent_cohomology/custom_persistence_sort.cpp - * @example Persistent_cohomology/rips_persistence_step_by_step.cpp - * @example Rips_complex/example_one_skeleton_rips_from_correlation_matrix.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 Simplex_tree/mini_simplex_tree.cpp - * @example Simplex_tree/simple_simplex_tree.cpp - * @example Simplex_tree/example_alpha_shapes_3_simplex_tree_from_off_file.cpp - * @example Simplex_tree/simplex_tree_from_cliques_of_graph.cpp - * @example Simplex_tree/graph_expansion_with_blocker.cpp - * @example Skeleton_blocker/Skeleton_blocker_from_simplices.cpp - * @example Skeleton_blocker/Skeleton_blocker_iteration.cpp - * @example Skeleton_blocker/Skeleton_blocker_link.cpp - * @example Spatial_searching/example_spatial_searching.cpp - * @example Subsampling/example_choose_n_farthest_points.cpp - * @example Subsampling/example_custom_kernel.cpp - * @example Subsampling/example_pick_n_random_points.cpp - * @example Subsampling/example_sparsify_point_set.cpp - * @example Tangential_complex/example_basic.cpp - * @example Tangential_complex/example_with_perturb.cpp - * @example Witness_complex/example_nearest_landmark_table.cpp - * @example Witness_complex/example_strong_witness_complex_off.cpp - * @example Witness_complex/example_strong_witness_persistence.cpp - * @example Witness_complex/example_witness_complex_off.cpp - * @example Witness_complex/example_witness_complex_persistence.cpp - * @example Witness_complex/example_witness_complex_sphere.cpp - */ - diff --git a/src/common/include/gudhi/Debug_utils.h b/src/common/include/gudhi/Debug_utils.h index 8ed3b7b3..90d3cf47 100644 --- a/src/common/include/gudhi/Debug_utils.h +++ b/src/common/include/gudhi/Debug_utils.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 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 @@ -32,7 +32,7 @@ // GUDHI_CHECK throw an exception if expression is false in debug mode, but does nothing in release mode // Could assert in release mode, but cmake sets NDEBUG (for "NO DEBUG") in this mode, means assert does nothing. #ifdef GUDHI_DEBUG - #define GUDHI_CHECK(expression, excpt) if ((expression) == 0) throw excpt + #define GUDHI_CHECK(expression, excpt) ((expression) ? (void) 0 : (throw excpt)) #define GUDHI_CHECK_code(CODE) CODE #else #define GUDHI_CHECK(expression, excpt) (void) 0 diff --git a/src/common/include/gudhi/Unitary_tests_utils.h b/src/common/include/gudhi/Unitary_tests_utils.h new file mode 100644 index 00000000..8394a062 --- /dev/null +++ b/src/common/include/gudhi/Unitary_tests_utils.h @@ -0,0 +1,40 @@ +/* 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): Vincent Rouvreau + * + * 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/>. + */ +#ifndef UNITARY_TESTS_UTILS_H_ +#define UNITARY_TESTS_UTILS_H_ + +#include <boost/test/unit_test.hpp> + +#include <iostream> +#include <limits> // for std::numeric_limits<> + +template<typename FloatingType > +void GUDHI_TEST_FLOAT_EQUALITY_CHECK(FloatingType a, FloatingType b, + FloatingType epsilon = std::numeric_limits<FloatingType>::epsilon()) { +#ifdef DEBUG_TRACES + std::cout << "GUDHI_TEST_FLOAT_EQUALITY_CHECK - " << a << " versus " << b + << " | diff = " << std::fabs(a - b) << " - epsilon = " << epsilon << std::endl; +#endif + BOOST_CHECK(std::fabs(a - b) < epsilon); +} + +#endif // UNITARY_TESTS_UTILS_H_ diff --git a/src/common/include/gudhi/distance_functions.h b/src/common/include/gudhi/distance_functions.h index f6e2ab5a..3a5d1fd5 100644 --- a/src/common/include/gudhi/distance_functions.h +++ b/src/common/include/gudhi/distance_functions.h @@ -23,9 +23,14 @@ #ifndef DISTANCE_FUNCTIONS_H_ #define DISTANCE_FUNCTIONS_H_ +#include <gudhi/Debug_utils.h> + +#include <boost/range/metafunctions.hpp> + #include <cmath> // for std::sqrt #include <type_traits> // for std::decay #include <iterator> // for std::begin, std::end +#include <utility> namespace Gudhi { @@ -37,16 +42,29 @@ namespace Gudhi { * have the same dimension. */ class Euclidean_distance { public: + // boost::range_value is not SFINAE-friendly so we cannot use it in the return type template< typename Point > - auto operator()(const Point& p1, const Point& p2) const -> typename std::decay<decltype(*std::begin(p1))>::type { - auto it1 = p1.begin(); - auto it2 = p2.begin(); - typename Point::value_type dist = 0.; - for (; it1 != p1.end(); ++it1, ++it2) { - typename Point::value_type tmp = (*it1) - (*it2); + typename std::iterator_traits<typename boost::range_iterator<Point>::type>::value_type + operator()(const Point& p1, const Point& p2) const { + auto it1 = std::begin(p1); + auto it2 = std::begin(p2); + typedef typename boost::range_value<Point>::type NT; + NT dist = 0; + for (; it1 != std::end(p1); ++it1, ++it2) { + GUDHI_CHECK(it2 != std::end(p2), "inconsistent point dimensions"); + NT tmp = *it1 - *it2; dist += tmp*tmp; } - return std::sqrt(dist); + GUDHI_CHECK(it2 == std::end(p2), "inconsistent point dimensions"); + using std::sqrt; + return sqrt(dist); + } + template< typename T > + T operator() (const std::pair< T, T >& f, const std::pair< T, T >& s) const { + T dx = f.first - s.first; + T dy = f.second - s.second; + using std::sqrt; + return sqrt(dx*dx + dy*dy); } }; diff --git a/src/common/include/gudhi/graph_simplicial_complex.h b/src/common/include/gudhi/graph_simplicial_complex.h index 5fe7c826..d84421b2 100644 --- a/src/common/include/gudhi/graph_simplicial_complex.h +++ b/src/common/include/gudhi/graph_simplicial_complex.h @@ -28,6 +28,9 @@ #include <utility> // for pair<> #include <vector> #include <map> +#include <tuple> // for std::tie + +namespace Gudhi { /* Edge tag for Boost PropertyGraph. */ struct edge_filtration_t { @@ -39,4 +42,64 @@ struct vertex_filtration_t { typedef boost::vertex_property_tag kind; }; +template <typename SimplicialComplexForProximityGraph> +using Proximity_graph = typename boost::adjacency_list < boost::vecS, boost::vecS, boost::undirectedS +, boost::property < vertex_filtration_t, typename SimplicialComplexForProximityGraph::Filtration_value > +, boost::property < edge_filtration_t, typename SimplicialComplexForProximityGraph::Filtration_value >>; + +/** \brief Computes the proximity graph of the points. + * + * If points contains n elements, the proximity graph is the graph with n vertices, and an edge [u,v] iff the + * distance function between points u and v is smaller than threshold. + * + * \tparam ForwardPointRange furnishes `.begin()` and `.end()` methods. + * + * \tparam Distance furnishes `operator()(const Point& p1, const Point& p2)`, where + * `Point` is a point from the `ForwardPointRange`, and that returns a `Filtration_value`. + */ +template< typename SimplicialComplexForProximityGraph + , typename ForwardPointRange + , typename Distance > +Proximity_graph<SimplicialComplexForProximityGraph> compute_proximity_graph( + const ForwardPointRange& points, + typename SimplicialComplexForProximityGraph::Filtration_value threshold, + Distance distance) { + using Vertex_handle = typename SimplicialComplexForProximityGraph::Vertex_handle; + using Filtration_value = typename SimplicialComplexForProximityGraph::Filtration_value; + + std::vector<std::pair< Vertex_handle, Vertex_handle >> edges; + std::vector< Filtration_value > edges_fil; + std::map< Vertex_handle, Filtration_value > vertices; + + Vertex_handle idx_u, idx_v; + Filtration_value fil; + idx_u = 0; + for (auto it_u = points.begin(); it_u != points.end(); ++it_u) { + idx_v = idx_u + 1; + for (auto it_v = it_u + 1; it_v != points.end(); ++it_v, ++idx_v) { + fil = distance(*it_u, *it_v); + if (fil <= threshold) { + edges.emplace_back(idx_u, idx_v); + edges_fil.push_back(fil); + } + } + ++idx_u; + } + + // Points are labeled from 0 to idx_u-1 + Proximity_graph<SimplicialComplexForProximityGraph> skel_graph(edges.begin(), edges.end(), edges_fil.begin(), idx_u); + + auto vertex_prop = boost::get(vertex_filtration_t(), skel_graph); + + typename boost::graph_traits<Proximity_graph<SimplicialComplexForProximityGraph>>::vertex_iterator vi, vi_end; + for (std::tie(vi, vi_end) = boost::vertices(skel_graph); + vi != vi_end; ++vi) { + boost::put(vertex_prop, *vi, 0.); + } + + return skel_graph; +} + +} // namespace Gudhi + #endif // GRAPH_SIMPLICIAL_COMPLEX_H_ diff --git a/src/common/utilities/README b/src/common/utilities/README deleted file mode 100644 index dc841521..00000000 --- a/src/common/utilities/README +++ /dev/null @@ -1,19 +0,0 @@ -======================= off_file_from_shape_generator ================================== - -Example of use : - -*** on|in sphere|cube|curve|torus|klein generator - -./off_file_from_shape_generator on sphere onSphere.off 1000 3 15.2 - - => generates a onSphere.off file with 1000 points randomized on a sphere of dimension 3 and radius 15.2 - -./off_file_from_shape_generator in sphere inSphere.off 100 2 - - => generates a inSphere.off file with 100 points randomized in a sphere of dimension 2 (circle) and radius 1.0 (default) - -./off_file_from_shape_generator in cube inCube.off 10000 3 5.8 - - => generates a inCube.off file with 10000 points randomized in a cube of dimension 3 and side 5.8 - -!! Warning: hypegenerator on cube is not available !! diff --git a/src/common/utilities/pointsetgenerator.md b/src/common/utilities/pointsetgenerator.md new file mode 100644 index 00000000..284715d4 --- /dev/null +++ b/src/common/utilities/pointsetgenerator.md @@ -0,0 +1,33 @@ + + +# common # + +## off_file_from_shape_generator ## + +Generates a pointset and save it in an OFF file. Command-line is: + +``` +off_file_from_shape_generator on|in sphere|cube|curve|torus|klein <filename> <num_points> <dimension> <parameter1> <parameter2>... +``` + +Warning: "on cube" generator is not available! + +**Examples** + +``` +off_file_from_shape_generator on sphere onSphere.off 1000 3 15.2 +``` + +* Generates an onSphere.off file with 1000 points randomized on a sphere of dimension 3 and radius 15.2. + +``` +off_file_from_shape_generator in sphere inSphere.off 100 2 +``` + +* Generates an inSphere.off file with 100 points randomized in a sphere of dimension 2 (circle) and radius 1.0 (default). + +``` +off_file_from_shape_generator in cube inCube.off 10000 3 5.8 +``` + +* Generates a inCube.off file with 10000 points randomized in a cube of dimension 3 and side 5.8. |