From 0748c7b50d48849bd086e0c70a165402d597c81c Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Fri, 18 Feb 2022 20:01:06 +0100 Subject: Document the right function --- .../include/gudhi/Flag_complex_edge_collapser.h | 39 +++++++++++----------- 1 file changed, 20 insertions(+), 19 deletions(-) (limited to 'src/Collapse/include/gudhi/Flag_complex_edge_collapser.h') 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` - * where `Vertex_handle` is the type of a vertex index. - * - * \return Remaining edges after collapse as a range of - * `std::tuple`. - * - * \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 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 auto flag_complex_collapse_edges( } return std::vector(); } + +/** \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` + * where `Vertex_handle` is the type of a vertex index. + * + * \return Remaining edges after collapse as a range of + * `std::tuple`. + * + * \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 auto flag_complex_collapse_edges(const FilteredEdgeRange& edges) { return flag_complex_collapse_edges(edges, [](auto const&d){return d;}); } -- cgit v1.2.3