summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorHind-M <hind.montassif@gmail.com>2022-02-02 11:34:48 +0100
committerHind-M <hind.montassif@gmail.com>2022-02-02 11:34:48 +0100
commit307f5f50a806168deb236e263c58dbed3f776ad0 (patch)
treee4d8a576970b3515acd7da156fe542874f1c9a7a /src/common
parentbeb431316a5181caf0eec5c0940601457340cc58 (diff)
parent7f1b8eb706c72921141b53e607d6e2aa28e2bf19 (diff)
Merge remote-tracking branch 'upstream/master' into cech_optimization
Diffstat (limited to 'src/common')
-rw-r--r--src/common/benchmark/CMakeLists.txt4
-rw-r--r--src/common/doc/examples.h172
-rw-r--r--src/common/doc/header.html1
-rw-r--r--src/common/doc/installation.h56
-rw-r--r--src/common/doc/main_page.md28
-rw-r--r--src/common/include/gudhi/random_point_generators.h12
-rw-r--r--src/common/include/gudhi/reader_utils.h6
-rw-r--r--src/common/test/test_distance_matrix_reader.cpp2
-rw-r--r--src/common/utilities/off_file_from_shape_generator.cpp2
9 files changed, 182 insertions, 101 deletions
diff --git a/src/common/benchmark/CMakeLists.txt b/src/common/benchmark/CMakeLists.txt
index a3787d6e..26e4e6af 100644
--- a/src/common/benchmark/CMakeLists.txt
+++ b/src/common/benchmark/CMakeLists.txt
@@ -1,3 +1,7 @@
project(common_benchmark)
add_executable(Graph_simplicial_complex_benchmark Graph_simplicial_complex_benchmark.cpp)
+
+if (TBB_FOUND)
+ target_link_libraries(Graph_simplicial_complex_benchmark ${TBB_LIBRARIES})
+endif()
diff --git a/src/common/doc/examples.h b/src/common/doc/examples.h
index b557727b..879fb96a 100644
--- a/src/common/doc/examples.h
+++ b/src/common/doc/examples.h
@@ -1,98 +1,134 @@
-// 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
+// List of GUDHI examples and utils - Doxygen needs at least a file tag to analyse comments
+// Generated from scripts/cpp_examples_for_doxygen.py
/*! @file Examples
- * \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
+ * \section Witness_complex_example_section Witness_complex
+ * @example strong_witness_persistence.cpp
+ * @example weak_witness_persistence.cpp
* @example example_witness_complex_off.cpp
- * @example example_witness_complex_sphere.cpp
* @example example_strong_witness_complex_off.cpp
+ * @example example_nearest_landmark_table.cpp
+ * @example example_witness_complex_sphere.cpp
+ * \section Contraction_example_section Contraction
+ * @example Rips_contraction.cpp
+ * @example Garland_heckbert.cpp
+ * \section Simplex_tree_example_section Simplex_tree
* @example mini_simplex_tree.cpp
+ * @example cech_complex_cgal_mini_sphere_3d.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
+ * \section Persistent_cohomology_example_section Persistent_cohomology
+ * @example custom_persistence_sort.cpp
* @example rips_persistence_step_by_step.cpp
+ * @example persistence_from_file.cpp
* @example rips_persistence_via_boundary_matrix.cpp
- * @example custom_persistence_sort.cpp
- * @example persistence_from_simple_simplex_tree.cpp
+ * @example plain_homology.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 persistence_from_simple_simplex_tree.cpp
+ * \section Subsampling_example_section Subsampling
* @example example_sparsify_point_set.cpp
+ * @example example_choose_n_farthest_points.cpp
+ * @example example_custom_distance.cpp
* @example example_pick_n_random_points.cpp
- * @example CoordGIC.cpp
+ * \section Toplex_map_example_section Toplex_map
+ * @example simple_toplex_map.cpp
+ * \section Collapse_example_section Collapse
+ * @example distance_matrix_edge_collapse_rips_persistence.cpp
+ * @example point_cloud_edge_collapse_rips_persistence.cpp
+ * @example edge_collapse_conserve_persistence.cpp
+ * @example edge_collapse_basic_example.cpp
+ * \section Cech_complex_example_section Cech_complex
+ * @example cech_persistence.cpp
+ * @example cech_complex_step_by_step.cpp
+ * @example cech_complex_example_from_points.cpp
+ * \section Bitmap_cubical_complex_example_section Bitmap_cubical_complex
+ * @example periodic_cubical_complex_persistence.cpp
+ * @example cubical_complex_persistence.cpp
+ * @example Random_bitmap_cubical_complex.cpp
+ * \section Coxeter_triangulation_example_section Coxeter_triangulation
+ * @example cell_complex_from_basic_circle_manifold.cpp
+ * @example manifold_tracing_flat_torus_with_boundary.cpp
+ * @example manifold_tracing_custom_function.cpp
+ * \section Nerve_GIC_example_section Nerve_GIC
+ * @example VoronoiGIC.cpp
* @example Nerve.cpp
+ * @example CoordGIC.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
+ * \section Tangential_complex_example_section Tangential_complex
+ * @example example_basic.cpp
+ * @example example_with_perturb.cpp
+ * \section Persistence_representations_example_section Persistence_representations
+ * @example persistence_vectors/create_persistence_vectors.cpp
+ * @example persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp
+ * @example persistence_vectors/plot_persistence_vectors.cpp
+ * @example persistence_vectors/average_persistence_vectors.cpp
+ * @example persistence_vectors/compute_distance_of_persistence_vectors.cpp
+ * @example persistence_landscapes_on_grid/average_landscapes_on_grid.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_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp
+ * @example persistence_landscapes_on_grid/plot_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_intervals/compute_number_of_dominant_intervals.cpp
+ * @example persistence_intervals/plot_histogram_of_intervals_lengths.cpp
+ * @example persistence_intervals/plot_persistence_intervals.cpp
+ * @example persistence_heat_maps/compute_distance_of_persistence_heat_maps.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_distance_from_diagonal.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_heat_maps/average_persistence_heat_maps.cpp
* @example persistence_landscapes/compute_distance_of_landscapes.cpp
+ * @example persistence_landscapes/compute_scalar_product_of_landscapes.cpp
+ * @example persistence_landscapes/average_landscapes.cpp
* @example persistence_landscapes/plot_landscapes.cpp
+ * @example persistence_landscapes/create_landscapes.cpp
+ * @example persistence_landscape_on_grid.cpp
+ * @example persistence_intervals.cpp
+ * @example persistence_landscape.cpp
+ * @example persistence_vectors.cpp
+ * @example sliced_wasserstein.cpp
+ * @example persistence_heat_maps.cpp
+ * \section Spatial_searching_example_section Spatial_searching
+ * @example example_spatial_searching.cpp
+ * \section Bottleneck_distance_example_section Bottleneck_distance
+ * @example bottleneck_distance.cpp
+ * @example bottleneck_basic_example.cpp
+ * @example alpha_rips_persistence_bottleneck_distance.cpp
+ * \section common_example_section common
+ * @example off_file_from_shape_generator.cpp
+ * @example example_vector_double_points_off_reader.cpp
+ * @example example_CGAL_points_off_reader.cpp
+ * @example example_CGAL_3D_points_off_reader.cpp
+ * \section Alpha_complex_example_section Alpha_complex
+ * @example alpha_complex_3d_persistence.cpp
+ * @example alpha_complex_persistence.cpp
+ * @example Fast_alpha_complex_from_off.cpp
+ * @example Alpha_complex_3d_from_points.cpp
+ * @example Alpha_complex_from_off.cpp
+ * @example Weighted_alpha_complex_3d_from_points.cpp
+ * @example Weighted_alpha_complex_from_points.cpp
+ * @example Alpha_complex_from_points.cpp
+ * \section Skeleton_blocker_example_section Skeleton_blocker
+ * @example Skeleton_blocker_from_simplices.cpp
+ * @example Skeleton_blocker_link.cpp
+ * @example Skeleton_blocker_iteration.cpp
+ * \section Rips_complex_example_section Rips_complex
+ * @example rips_persistence.cpp
+ * @example rips_correlation_matrix_persistence.cpp
+ * @example sparse_rips_persistence.cpp
+ * @example rips_distance_matrix_persistence.cpp
+ * @example example_sparse_rips.cpp
+ * @example example_rips_complex_from_csv_distance_matrix_file.cpp
+ * @example example_one_skeleton_rips_from_correlation_matrix.cpp
+ * @example example_one_skeleton_rips_from_distance_matrix.cpp
+ * @example example_one_skeleton_rips_from_points.cpp
+ * @example example_rips_complex_from_off_file.cpp
*/
diff --git a/src/common/doc/header.html b/src/common/doc/header.html
index 9da20bbc..7c20478b 100644
--- a/src/common/doc/header.html
+++ b/src/common/doc/header.html
@@ -49,6 +49,7 @@ $extrastylesheet
<li><a href="/relatedprojects/">Related projects</a></li>
<li><a href="/theyaretalkingaboutus/">They are talking about us</a></li>
<li><a href="/inaction/">GUDHI in action</a></li>
+ <li><a href="/etymology/">Etymology</a></li>
</ul>
</li>
<li class="divider"></li>
diff --git a/src/common/doc/installation.h b/src/common/doc/installation.h
index 610aa17e..ef668dfb 100644
--- a/src/common/doc/installation.h
+++ b/src/common/doc/installation.h
@@ -88,9 +88,9 @@ make \endverbatim
* Witness_complex/example_witness_complex_off.cpp</a>
* \li <a href="example_witness_complex_sphere_8cpp-example.html">
* Witness_complex/example_witness_complex_sphere.cpp</a>
- * \li <a href="alpha_complex_from_off_8cpp-example.html">
+ * \li <a href="_alpha_complex_from_off_8cpp-example.html">
* Alpha_complex/Alpha_complex_from_off.cpp</a>
- * \li <a href="alpha_complex_from_points_8cpp-example.html">
+ * \li <a href="_alpha_complex_from_points_8cpp-example.html">
* Alpha_complex/Alpha_complex_from_points.cpp</a>
* \li <a href="alpha_complex_persistence_8cpp-example.html">
* Alpha_complex/alpha_complex_persistence.cpp</a>
@@ -100,15 +100,15 @@ make \endverbatim
* Bottleneck_distance/alpha_rips_persistence_bottleneck_distance.cpp.cpp</a>
* \li <a href="bottleneck_basic_example_8cpp-example.html">
* Bottleneck_distance/bottleneck_basic_example.cpp</a>
- * \li <a href="bottleneck_read_file_8cpp-example.html">
+ * \li <a href="bottleneck_distance_8cpp-example.html">
* Bottleneck_distance/bottleneck_distance.cpp</a>
- * \li <a href="coord_g_i_c_8cpp-example.html">
+ * \li <a href="_coord_g_i_c_8cpp-example.html">
* Nerve_GIC/CoordGIC.cpp</a>
- * \li <a href="func_g_i_c_8cpp-example.html">
+ * \li <a href="_func_g_i_c_8cpp-example.html">
* Nerve_GIC/FuncGIC.cpp</a>
- * \li <a href="nerve_8cpp-example.html">
+ * \li <a href="_nerve_8cpp-example.html">
* Nerve_GIC/Nerve.cpp</a>
- * \li <a href="voronoi_g_i_c_8cpp-example.html">
+ * \li <a href="_voronoi_g_i_c_8cpp-example.html">
* Nerve_GIC/VoronoiGIC.cpp</a>
* \li <a href="example_spatial_searching_8cpp-example.html">
* Spatial_searching/example_spatial_searching.cpp</a>
@@ -122,10 +122,12 @@ make \endverbatim
* Tangential_complex/example_basic.cpp</a>
* \li <a href="example_with_perturb_8cpp-example.html">
* Tangential_complex/example_with_perturb.cpp</a>
- * \li <a href="weighted_alpha_complex_3d_from_points_8cpp-example.html">
+ * \li <a href="_weighted_alpha_complex_3d_from_points_8cpp-example.html">
* Alpha_complex/Weighted_alpha_complex_3d_from_points.cpp</a>
* \li <a href="alpha_complex_3d_persistence_8cpp-example.html">
* Alpha_complex/alpha_complex_3d_persistence.cpp</a>
+ * \li <a href="_coxeter_triangulation_2manifold_tracing_flat_torus_with_boundary_8cpp-example.html">
+ * Coxeter_triangulation/manifold_tracing_flat_torus_with_boundary.cpp</a>
*
* \subsection eigen Eigen
* Some GUDHI modules (cf. \ref main_page "modules list"), and few examples require
@@ -134,15 +136,15 @@ make \endverbatim
*
* The following examples/utilities require the <a target="_blank" href="http://eigen.tuxfamily.org/">Eigen</a> and will not be
* built if Eigen is not installed:
- * \li <a href="alpha_complex_from_off_8cpp-example.html">
+ * \li <a href="_alpha_complex_from_off_8cpp-example.html">
* Alpha_complex/Alpha_complex_from_off.cpp</a>
- * \li <a href="alpha_complex_from_points_8cpp-example.html">
+ * \li <a href="_alpha_complex_from_points_8cpp-example.html">
* Alpha_complex/Alpha_complex_from_points.cpp</a>
* \li <a href="alpha_complex_persistence_8cpp-example.html">
* Alpha_complex/alpha_complex_persistence.cpp</a>
* \li <a href="alpha_complex_3d_persistence_8cpp-example.html">
* Alpha_complex/alpha_complex_3d_persistence.cpp</a>
- * \li <a href="weighted_alpha_complex_3d_from_points_8cpp-example.html">
+ * \li <a href="_weighted_alpha_complex_3d_from_points_8cpp-example.html">
* Alpha_complex/Weighted_alpha_complex_3d_from_points.cpp</a>
* \li <a href="alpha_rips_persistence_bottleneck_distance_8cpp-example.html">
* Bottleneck_distance/alpha_rips_persistence_bottleneck_distance.cpp.cpp</a>
@@ -170,6 +172,12 @@ make \endverbatim
* Witness_complex/example_witness_complex_off.cpp</a>
* \li <a href="example_witness_complex_sphere_8cpp-example.html">
* Witness_complex/example_witness_complex_sphere.cpp</a>
+ * \li <a href="_coxeter_triangulation_2cell_complex_from_basic_circle_manifold_8cpp-example.html">
+ * Coxeter_triangulation/cell_complex_from_basic_circle_manifold.cpp</a>
+ * \li <a href="_coxeter_triangulation_2manifold_tracing_custom_function_8cpp-example.html">
+ * Coxeter_triangulation/manifold_tracing_custom_function.cpp</a>
+ * \li <a href="_coxeter_triangulation_2manifold_tracing_flat_torus_with_boundary_8cpp-example.html">
+ * Coxeter_triangulation/manifold_tracing_flat_torus_with_boundary.cpp</a>
*
* \subsection tbb Threading Building Blocks
* <a target="_blank" href="https://www.threadingbuildingblocks.org/">Intel&reg; TBB</a> lets you easily write parallel
@@ -179,27 +187,27 @@ make \endverbatim
* Having Intel&reg; TBB installed is recommended to parallelize and accelerate some GUDHI computations.
*
* The following examples/utilities are using Intel&reg; TBB if installed:
- * \li <a href="alpha_complex_from_off_8cpp-example.html">
+ * \li <a href="_alpha_complex_from_off_8cpp-example.html">
* Alpha_complex/Alpha_complex_from_off.cpp</a>
- * \li <a href="alpha_complex_from_points_8cpp-example.html">
+ * \li <a href="_alpha_complex_from_points_8cpp-example.html">
* Alpha_complex/Alpha_complex_from_points.cpp</a>
* \li <a href="alpha_complex_3d_persistence_8cpp-example.html">
* Alpha_complex/alpha_complex_3d_persistence.cpp</a>
* \li <a href="alpha_complex_persistence_8cpp-example.html">
* Alpha_complex/alpha_complex_persistence.cpp</a>
- * \li <a href="bitmap_cubical_complex_8cpp-example.html">
+ * \li <a href="cubical_complex_persistence_8cpp-example.html">
* Bitmap_cubical_complex/cubical_complex_persistence.cpp</a>
- * \li <a href="bitmap_cubical_complex_periodic_boundary_conditions_8cpp-example.html">
+ * \li <a href="periodic_cubical_complex_persistence_8cpp-example.html">
* Bitmap_cubical_complex/periodic_cubical_complex_persistence.cpp</a>
- * \li <a href="random_bitmap_cubical_complex_8cpp-example.html">
+ * \li <a href="_random_bitmap_cubical_complex_8cpp-example.html">
* Bitmap_cubical_complex/Random_bitmap_cubical_complex.cpp</a>
- * \li <a href="coord_g_i_c_8cpp-example.html">
+ * \li <a href="_coord_g_i_c_8cpp-example.html">
* Nerve_GIC/CoordGIC.cpp</a>
- * \li <a href="func_g_i_c_8cpp-example.html">
+ * \li <a href="_func_g_i_c_8cpp-example.html">
* Nerve_GIC/FuncGIC.cpp</a>
- * \li <a href="nerve_8cpp-example.html">
+ * \li <a href="_nerve_8cpp-example.html">
* Nerve_GIC/Nerve.cpp</a>
- * \li <a href="voronoi_g_i_c_8cpp-example.html">
+ * \li <a href="_voronoi_g_i_c_8cpp-example.html">
* Nerve_GIC/VoronoiGIC.cpp</a>
* \li <a href="simple_simplex_tree_8cpp-example.html">
* Simplex_tree/simple_simplex_tree.cpp</a>
@@ -243,10 +251,12 @@ make \endverbatim
* 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
+ * Please help us improving the quality of the GUDHI library.
+ * You may <a href="https://github.com/GUDHI/gudhi-devel/issues">report bugs</a> or
+ * <a href="https://gudhi.inria.fr/contact/">contact us</a> for any suggestions.
*
- * GUDHI is open to external contributions. If you want to join our development team, please contact us.
+ * GUDHI is open to external contributions. If you want to join our development team, please take some time to read our
+ * <a href="https://github.com/GUDHI/gudhi-devel/blob/master/.github/CONTRIBUTING.md">contributing guide</a>.
*
*/
diff --git a/src/common/doc/main_page.md b/src/common/doc/main_page.md
index e19af537..17354179 100644
--- a/src/common/doc/main_page.md
+++ b/src/common/doc/main_page.md
@@ -135,7 +135,7 @@
</tr>
</table>
-## Filtrations and reconstructions {#FiltrationsReconstructions}
+## Filtrations
### Alpha complex
<table>
@@ -298,6 +298,32 @@
</tr>
</table>
+## Manifold reconstructions
+### Coxeter triangulation
+
+<table>
+ <tr>
+ <td width="35%" rowspan=2>
+ \image html "manifold_tracing_on_custom_function_example.png"
+ </td>
+ <td width="50%">
+ Coxeter triangulation module is designed to provide tools for constructing a piecewise-linear approximation of an
+ \f$m\f$-dimensional smooth manifold embedded in \f$ \mathbb{R}^d \f$ using an ambient triangulation.
+ </td>
+ <td width="15%">
+ <b>Author:</b> Siargey Kachanovich<br>
+ <b>Introduced in:</b> GUDHI 3.4.0<br>
+ <b>Copyright:</b> MIT [(LGPL v3)](../../licensing/)<br>
+ <b>Requires:</b> \ref eigen &ge; 3.1.0
+ </td>
+ </tr>
+ <tr>
+ <td colspan=2 height="25">
+ <b>User manual:</b> \ref coxeter_triangulation
+ </td>
+ </tr>
+</table>
+
### Tangential complex
<table>
diff --git a/src/common/include/gudhi/random_point_generators.h b/src/common/include/gudhi/random_point_generators.h
index 33fb182d..25a7392d 100644
--- a/src/common/include/gudhi/random_point_generators.h
+++ b/src/common/include/gudhi/random_point_generators.h
@@ -185,7 +185,7 @@ std::vector<typename Kernel::Point_d> generate_points_on_torus_3D(std::size_t nu
// "Private" function used by generate_points_on_torus_d
template <typename Kernel, typename OutputIterator>
-static void generate_uniform_points_on_torus_d(const Kernel &k, int dim, std::size_t num_slices,
+static void generate_grid_points_on_torus_d(const Kernel &k, int dim, std::size_t num_slices,
OutputIterator out,
double radius_noise_percentage = 0.,
std::vector<typename Kernel::FT> current_point =
@@ -208,14 +208,14 @@ static void generate_uniform_points_on_torus_d(const Kernel &k, int dim, std::si
double alpha = two_pi * slice_idx / num_slices;
cp2.push_back(radius_noise_ratio * std::cos(alpha));
cp2.push_back(radius_noise_ratio * std::sin(alpha));
- generate_uniform_points_on_torus_d(
+ generate_grid_points_on_torus_d(
k, dim, num_slices, out, radius_noise_percentage, cp2);
}
}
}
template <typename Kernel>
-std::vector<typename Kernel::Point_d> generate_points_on_torus_d(std::size_t num_points, int dim, bool uniform = false,
+std::vector<typename Kernel::Point_d> generate_points_on_torus_d(std::size_t num_points, int dim, std::string sample = "random",
double radius_noise_percentage = 0.) {
using namespace boost::math::double_constants;
@@ -226,9 +226,9 @@ std::vector<typename Kernel::Point_d> generate_points_on_torus_d(std::size_t num
std::vector<Point> points;
points.reserve(num_points);
- if (uniform) {
- std::size_t num_slices = (std::size_t)std::pow(num_points, 1. / dim);
- generate_uniform_points_on_torus_d(
+ if (sample == "grid") {
+ std::size_t num_slices = (std::size_t)std::pow(num_points + .5, 1. / dim); // add .5 to avoid rounding down with numerical approximations
+ generate_grid_points_on_torus_d(
k, dim, num_slices, std::back_inserter(points), radius_noise_percentage);
} else {
for (std::size_t i = 0; i < num_points;) {
diff --git a/src/common/include/gudhi/reader_utils.h b/src/common/include/gudhi/reader_utils.h
index 0938f5c1..a1b104e2 100644
--- a/src/common/include/gudhi/reader_utils.h
+++ b/src/common/include/gudhi/reader_utils.h
@@ -14,7 +14,11 @@
#include <gudhi/graph_simplicial_complex.h>
#include <gudhi/Debug_utils.h>
-#include <boost/function_output_iterator.hpp>
+#if BOOST_VERSION < 106600
+# include <boost/function_output_iterator.hpp>
+#else
+# include <boost/iterator/function_output_iterator.hpp>
+#endif
#include <boost/graph/adjacency_list.hpp>
#include <iostream>
diff --git a/src/common/test/test_distance_matrix_reader.cpp b/src/common/test/test_distance_matrix_reader.cpp
index 73be8104..92e899b8 100644
--- a/src/common/test/test_distance_matrix_reader.cpp
+++ b/src/common/test/test_distance_matrix_reader.cpp
@@ -57,7 +57,7 @@ BOOST_AUTO_TEST_CASE( full_square_distance_matrix )
{
Distance_matrix from_full_square;
// Read full_square_distance_matrix.csv file where the separator is the default one ';'
- from_full_square = Gudhi::read_lower_triangular_matrix_from_csv_file<double>("full_square_distance_matrix.csv");
+ from_full_square = Gudhi::read_lower_triangular_matrix_from_csv_file<double>("full_square_distance_matrix.csv", ';');
for (auto& i : from_full_square) {
for (auto j : i) {
std::clog << j << " ";
diff --git a/src/common/utilities/off_file_from_shape_generator.cpp b/src/common/utilities/off_file_from_shape_generator.cpp
index 6efef4fc..71ede434 100644
--- a/src/common/utilities/off_file_from_shape_generator.cpp
+++ b/src/common/utilities/off_file_from_shape_generator.cpp
@@ -135,7 +135,7 @@ int main(int argc, char **argv) {
if (dimension == 3)
points = Gudhi::generate_points_on_torus_3D<K>(points_number, dimension, radius, radius/2.);
else
- points = Gudhi::generate_points_on_torus_d<K>(points_number, dimension, true);
+ points = Gudhi::generate_points_on_torus_d<K>(points_number, dimension, "grid");
break;
case Data_shape::klein:
switch (dimension) {