diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2022-02-18 20:01:06 +0100 |
---|---|---|
committer | Marc Glisse <marc.glisse@inria.fr> | 2022-02-18 21:51:54 +0100 |
commit | 0748c7b50d48849bd086e0c70a165402d597c81c (patch) | |
tree | 293ac81deb27a262065a262ea1b607f1983d7c05 | |
parent | b9fef938c7b833679f98e9618df72a2c74abeaa3 (diff) |
Document the right function
-rw-r--r-- | src/Collapse/include/gudhi/Flag_complex_edge_collapser.h | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/src/Collapse/include/gudhi/Flag_complex_edge_collapser.h b/src/Collapse/include/gudhi/Flag_complex_edge_collapser.h index 5fb8b588..63f747bf 100644 --- a/src/Collapse/include/gudhi/Flag_complex_edge_collapser.h +++ b/src/Collapse/include/gudhi/Flag_complex_edge_collapser.h @@ -34,7 +34,7 @@ namespace Gudhi { namespace collapse { /** \private - * + * * \brief Flag complex sparse matrix data structure. * * \tparam Vertex type must be an integer type. @@ -279,24 +279,6 @@ end_move: }; -/** \brief Implicitly constructs a flag complex from edges as an input, collapses edges while preserving the persistent - * homology and returns the remaining edges as a range. The filtration value of vertices is irrelevant to this function. - * - * \param[in] edges Range of Filtered edges. There is no need for the range to be sorted, as it will be done internally. - * - * \tparam FilteredEdgeRange Range of `std::tuple<Vertex_handle, Vertex_handle, Filtration_value>` - * where `Vertex_handle` is the type of a vertex index. - * - * \return Remaining edges after collapse as a range of - * `std::tuple<Vertex_handle, Vertex_handle, Filtration_value>`. - * - * \ingroup edge_collapse - * - * \note - * Advanced: Defining the macro GUDHI_COLLAPSE_USE_DENSE_ARRAY tells gudhi to allocate a square table of size the - * maximum vertex index. This usually speeds up the computation for dense graphs. However, for sparse graphs, the memory - * use may be problematic and initializing this large table may be slow. - */ template<class FilteredEdgeRange, class Delay> auto flag_complex_collapse_edges(FilteredEdgeRange&& edges, Delay&&delay) { // Would it help to label the points according to some spatial sorting? auto first_edge_itr = std::begin(edges); @@ -316,6 +298,25 @@ template<class FilteredEdgeRange, class Delay> auto flag_complex_collapse_edges( } return std::vector<typename Edge_collapser::Filtered_edge>(); } + +/** \brief Implicitly constructs a flag complex from edges as an input, collapses edges while preserving the persistent + * homology and returns the remaining edges as a range. The filtration value of vertices is irrelevant to this function. + * + * \param[in] edges Range of Filtered edges. There is no need for the range to be sorted, as it will be done internally. + * + * \tparam FilteredEdgeRange Range of `std::tuple<Vertex_handle, Vertex_handle, Filtration_value>` + * where `Vertex_handle` is the type of a vertex index. + * + * \return Remaining edges after collapse as a range of + * `std::tuple<Vertex_handle, Vertex_handle, Filtration_value>`. + * + * \ingroup edge_collapse + * + * \note + * Advanced: Defining the macro GUDHI_COLLAPSE_USE_DENSE_ARRAY tells gudhi to allocate a square table of size the + * maximum vertex index. This usually speeds up the computation for dense graphs. However, for sparse graphs, the memory + * use may be problematic and initializing this large table may be slow. + */ template<class FilteredEdgeRange> auto flag_complex_collapse_edges(const FilteredEdgeRange& edges) { return flag_complex_collapse_edges(edges, [](auto const&d){return d;}); } |