From f76a6824b064beda19131635c7775e09d4309044 Mon Sep 17 00:00:00 2001 From: hschreiber Date: Tue, 14 Jan 2025 18:37:42 +0100 Subject: [PATCH] doc --- src/Zigzag_persistence/concept/EdgeModifier.h | 2 +- .../concept/OscillatingRipsSimplexRange.h | 69 --- src/Zigzag_persistence/concept/PointRange.h | 8 +- .../concept/StableFilteredComplex.h | 25 +- .../concept/ZigzagOptions.h | 26 +- .../doc/Intro_zigzag_persistence.h | 35 +- src/Zigzag_persistence/doc/osc_rips.svg | 475 ++++++++++++++++++ .../gudhi/Oscillating_rips_persistence.h | 42 +- .../oscillating_rips_iterators.h | 19 +- .../gudhi/filtered_zigzag_persistence.h | 20 +- src/common/doc/main_page.md | 23 + 11 files changed, 605 insertions(+), 139 deletions(-) delete mode 100644 src/Zigzag_persistence/concept/OscillatingRipsSimplexRange.h create mode 100644 src/Zigzag_persistence/doc/osc_rips.svg diff --git a/src/Zigzag_persistence/concept/EdgeModifier.h b/src/Zigzag_persistence/concept/EdgeModifier.h index 180460d3d6..c3bdaca3a8 100644 --- a/src/Zigzag_persistence/concept/EdgeModifier.h +++ b/src/Zigzag_persistence/concept/EdgeModifier.h @@ -22,7 +22,7 @@ namespace zigzag_persistence { * @brief Methods whose purposes are to modify the filtration value of a given edge following a rule. * The concept is for example realized by @ref Square_root_edge_modifier. */ - template +template class EdgeModifier { public: /** diff --git a/src/Zigzag_persistence/concept/OscillatingRipsSimplexRange.h b/src/Zigzag_persistence/concept/OscillatingRipsSimplexRange.h deleted file mode 100644 index 7b3c724815..0000000000 --- a/src/Zigzag_persistence/concept/OscillatingRipsSimplexRange.h +++ /dev/null @@ -1,69 +0,0 @@ -/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. - * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. - * Author(s): Hannah Schreiber - * - * Copyright (C) 2023 Inria - * - * Modification(s): - * - YYYY/MM Author: Description of the modification - */ - -#ifndef CONCEPT_ZZ_OSCI_RIPS_RANGE_H_ -#define CONCEPT_ZZ_OSCI_RIPS_RANGE_H_ - -/** @file OscillatingRipsSimplexRange.h - * @brief Contains @ref Gudhi::zigzag_persistence::OscillatingRipsSimplexRange concept. - */ - -#include -#include - -namespace Gudhi { -namespace zigzag_persistence { - -/** - * @brief Class giving access to a range over the simplices in an oscillating Rips filtration - * in order of the filtration. - * - * A simplex has to be represented by a tuple of three elements: - * the first is the simplex handle of the simplex in the given complex, - * the second is the filtration value of the corresponding arrow, - * the third is the direction of the arrow, i.e., indicates if the simplex is inserted or removed. - */ -class OscillatingRipsSimplexRange { - public: - /** - * @brief Returns a range over the simplices in an oscillating Rips filtration - * in order of the filtration. - * - * @param edgeStartIterator Begin iterator of the edge range. - * @param edgeEndIterator End iterator of the edge range. - * @param complex Structure storing the complex at each step. - * @param maxDimension Maximal dimension of the expansion. - * @return A range with begin() and end() methods. - */ - static auto get_iterator_range(Oscillating_rips_edge_range::Oscillating_rips_edge_iterator& edgeStartIterator, - Oscillating_rips_edge_range::Oscillating_rips_edge_iterator& edgeEndIterator, - StableFilteredComplex& complex, - int maxDimension); - - /** - * @brief Returns a range over the simplices in an oscillating Rips filtration - * in order of the filtration. - * - * @param edgeStartIterator Begin iterator of the edge range. - * @param edgeEndIterator End iterator of the edge range. - * @param complex Structure storing the complex at each step. - * @param maxDimension Maximal dimension of the expansion. - * @return A range with begin() and end() methods. - */ - static auto get_iterator_range(std::vector >::iterator& edgeStartIterator, - std::vector >::iterator& edgeEndIterator, - StableFilteredComplex& complex, - int maxDimension); -}; - -} // namespace zigzag_persistence -} // namespace Gudhi - -#endif // CONCEPT_ZZ_OSCI_RIPS_RANGE_H_ diff --git a/src/Zigzag_persistence/concept/PointRange.h b/src/Zigzag_persistence/concept/PointRange.h index b09a9123e7..5f77ba498c 100644 --- a/src/Zigzag_persistence/concept/PointRange.h +++ b/src/Zigzag_persistence/concept/PointRange.h @@ -25,8 +25,8 @@ namespace zigzag_persistence { class Point{}; /** - * @brief Range of @ref Point. Used with @ref Oscillating_rips_edge_range::Order_policy::FARTHEST_POINT_ORDERING order policy, - * it has to be a random access range. + * @brief Range of @ref Point. If used with @ref Oscillating_rips_edge_order_policy::FARTHEST_POINT_ORDERING + * order policy, it has to be a random access range. */ class PointRange { public: @@ -52,8 +52,8 @@ class PointRange { std::size_t size(); /** - * @brief Necessary only if used with @ref Oscillating_rips_edge_range::Order_policy::FARTHEST_POINT_ORDERING. Returns the element - * at the given index. + * @brief Necessary only if used with @ref Oscillating_rips_edge_order_policy::FARTHEST_POINT_ORDERING. + * Returns the element at the given index. * * @param index Index of the element to return. * @return Point at index @p index. diff --git a/src/Zigzag_persistence/concept/StableFilteredComplex.h b/src/Zigzag_persistence/concept/StableFilteredComplex.h index 6d430ec52a..7f638ad811 100644 --- a/src/Zigzag_persistence/concept/StableFilteredComplex.h +++ b/src/Zigzag_persistence/concept/StableFilteredComplex.h @@ -20,13 +20,8 @@ namespace zigzag_persistence { /** * @brief Data structure storing the simplices and their filtration values in the current complex. - * The concept is realized for example by @ref Gudhi::Simplex_tree < Gudhi::Simplex_tree_options_oscillating_rips >. - * - * This concept is not incompatible with the @ref ZigzagComplex concept, so it is possible to use the same complex - * for the @ref Oscillating_rips_iterator class and the @ref ZigzagPersistence class, as long as it realizes the two - * concepts (which is the case for @ref Gudhi::Simplex_tree < Gudhi::Simplex_tree_options_oscillating_rips >). - * This avoids having two complexes in memory and give the possibility to directly use the simplex handle instead - * of the vector of vertices to communicate between the two classes. + * The concept is realized for example by + * @ref Gudhi::Simplex_tree < Gudhi::zigzag_persistence::Simplex_tree_options_oscillating_rips >. */ class StableFilteredComplex { public: @@ -36,9 +31,8 @@ class StableFilteredComplex { typename Simplex_key; /** - * @brief Handle to specify a simplex. Different from the @ref ZigzagComplex concept, - * the simplex handles have to be stable, that is, they do not invalidate when a simplex is - * added or removed from the complex (except for the removed simplices them selves of course). + * @brief Handle to specify a simplex. The simplex handles have to be stable, that is, they do not invalidate when + * a simplex is added or removed from the complex (except for the removed simplices them selves of course). */ typename Simplex_handle; @@ -74,17 +68,11 @@ class StableFilteredComplex { /** * @brief Returns the key associated to the given simplex. - * - * @param sh Simplex handle representing the simplex. - * @return The key. */ Simplex_key key(Simplex_handle sh); /** * @brief Assignes the given value to the given simplex as a key. - * - * @param sh Simplex handle representing the simplex. - * @param key Values to associate as key. */ void assign_key(Simplex_handle sh, Simplex_key key); @@ -93,16 +81,13 @@ class StableFilteredComplex { * * @tparam VertexRange Range over the vertices of a simplex. * @param simplex Simplex to find represented by its vertices. - * @return The simplex handle associated to @p simplex if the simplex is found, @ref null_simplex() otherwise. + * @return The simplex handle associated to @p simplex if the simplex is found. */ template Simplex_handle find(const VertexRange& simplex); /** * @brief Returns the filtration value of the given simplex. - * - * @param sh - * @return Filtration_value */ Filtration_value filtration(Simplex_handle sh); diff --git a/src/Zigzag_persistence/concept/ZigzagOptions.h b/src/Zigzag_persistence/concept/ZigzagOptions.h index 35f421ac11..acdb047b82 100644 --- a/src/Zigzag_persistence/concept/ZigzagOptions.h +++ b/src/Zigzag_persistence/concept/ZigzagOptions.h @@ -22,24 +22,35 @@ namespace zigzag_persistence { /** * @ingroup zigzag_persistence * - * @brief List of options used for the filtered zigzag persistence computation. + * @brief List of options used for the filtered zigzag persistence computation. An implementation of this concept is + * @ref Default_filtered_zigzag_options "", which inherits from @ref Default_zigzag_options for the common types. */ struct FilteredZigzagOptions { /** - * @brief Numerical type for the cell IDs used internally and other indexations. It must be signed. + * @brief Type for filtration values. */ - using Internal_key = unspecified; + using Filtration_value = unspecified; /** * @brief Type for the cell IDs used at insertion and in the boundaries given as argument. - * Has to be usable as key in a hashtable, so "hashable" and comparable. */ using Cell_key = unspecified; /** - * @brief Type for filtration values. + * @brief Hash method for @ref Cell_key type. Could simply be 'std::hash' if the specialization exists; */ - using Filtration_value = unspecified; + using Cell_key_hash = unspecified; + + /** + * @brief Equality comparator for @ref Cell_key type. Could simply be 'std::equal_to' if the specialization + * exists; + */ + using Cell_key_equal = unspecified; + + /** + * @brief Numerical type for the cell IDs used internally and other indexations. It must be signed. + */ + using Internal_key = unspecified; /** * @brief Type for the dimension values. @@ -55,7 +66,8 @@ struct FilteredZigzagOptions { /** * @ingroup zigzag_persistence * - * @brief List of options used for the zigzag persistence computation. + * @brief List of options used for the zigzag persistence computation. An implementation of this concept is + * @ref Default_zigzag_options "". */ struct ZigzagOptions { /** diff --git a/src/Zigzag_persistence/doc/Intro_zigzag_persistence.h b/src/Zigzag_persistence/doc/Intro_zigzag_persistence.h index 444fb14d68..7a46196eee 100644 --- a/src/Zigzag_persistence/doc/Intro_zigzag_persistence.h +++ b/src/Zigzag_persistence/doc/Intro_zigzag_persistence.h @@ -55,9 +55,38 @@ namespace zigzag_persistence { * * \subsection zigzagrips Oscillating Rips * - * A typical example of zigzag filtrations are oscillating rips filtrations. Similar to standard Rips filtrations, they - * completely depend on their edges. But here we look at neighborhoods "oscillating" in size around the points, so - * edges are added but also removed. We refer for example to \cite osc_zz. + * A typical example of zigzag filtrations are oscillating Rips filtrations. Similar to standard + * @ref ripsdefinition "Rips filtrations", they completely depend on their edges. But here we look at neighborhoods + * "oscillating" in size around the points, so edges are added but also removed. We refer for example to \cite osc_zz + * for more theoretical details. + * + * This module implements the construction of such an oscillating Rips filtration as follows: + * \image html "osc_rips.svg" width=70% + * + * If \f$ P \f$ is the set of points generating the rips filtration, \f$ P_i \f$ corresponds to the subset containing + * the \f$ i \f$ first points. So, at each forward inclusion, one vertex is added. + * + * The superscript of \f$ \mathcal{R} \f$ corresponds to the filtration values which will be associated to the cycles. + * The sequence of \f$ \varepsilon \f$ should be decreasing and end with \f$ 0 \f$. The sequence can either be specified + * by the user or automatically generated by choosing the distance of the added point from the other already added + * points from the set. In the second case, the user has to specify how the order of the points should be decided. + * + * The subscript of \f$ \mathcal{R} \f$ corresponds like usual to the radius of the Rips complex. It is generated from + * the current epsilon / filtration value by multiplying it alternatively by two coefficients: \f$ \nu \leqslant \mu \f$. + * Both multipliers have to be specified by the user. + * + * The construction is based on two classes: + * - @ref Oscillating_rips_edge_range computes the range of inserted and removed vertices and edges in the filtration + * based on the elements descipted above. + * - @ref Oscillating_rips_simplex_range infers from @ref Oscillating_rips_edge_range all simplices from higher + * dimensions (i.e. > 1) of the filtration if necessary. For this purpose, a data structure able to represent a flag + * complex is additionally needed (such as @ref Gudhi::Simplex_tree). Note that @ref Oscillating_rips_edge_range is + * passed by template, so the user can potentially pass any other type of edge range as long as the dereferenced format + * corresponds and the sequence makes sense as a zigzag filtration. + * + * If only the barcode of the filtration is of interest and not the filtration it-self, the helper method + * @ref compute_oscillating_rips_persistence can be used. It will directly feed to the filtration constructed by the + * two classes above into @ref Zigzag_persistence "". * * \section zigzagexamples Examples * diff --git a/src/Zigzag_persistence/doc/osc_rips.svg b/src/Zigzag_persistence/doc/osc_rips.svg new file mode 100644 index 0000000000..e71cc06650 --- /dev/null +++ b/src/Zigzag_persistence/doc/osc_rips.svg @@ -0,0 +1,475 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Zigzag_persistence/include/gudhi/Oscillating_rips_persistence.h b/src/Zigzag_persistence/include/gudhi/Oscillating_rips_persistence.h index ba3169bf05..a353357595 100644 --- a/src/Zigzag_persistence/include/gudhi/Oscillating_rips_persistence.h +++ b/src/Zigzag_persistence/include/gudhi/Oscillating_rips_persistence.h @@ -85,7 +85,8 @@ struct Default_oscillating_rips_zigzag_options : Default_filtered_zigzag_options /** * @brief Computes the oscillating Rips filtration based on the given parameters and computes the - * corresponding zigzag barcode. + * corresponding zigzag barcode. The bars are not stored during the computation and returned via the given callback + * method instead. * * @ingroup zigzag_persistence * @@ -96,22 +97,23 @@ struct Default_oscillating_rips_zigzag_options : Default_filtered_zigzag_options * more information). One can easily create their own method based on this one. * * @tparam PointRange Range containing the point cloud. - * @tparam edge_range_type Either Edge_range_type::BOOST_RANGE or Edge_range_type::VECTOR. - * Default value: Edge_range_type::BOOST_RANGE. - * @tparam OscillatingRipsSimplexRange Type of the oscillating Rips simplex range. - * Default value: Oscillating_rips_simplex_range with templates depending on @p edge_range_type. - * @tparam ZigzagPersistenceOptions Options for the matrix used by the zigzag persistence algorithm. - * Default value: @ref Gudhi::persistence_matrix::Zigzag_options<>. + * @tparam F Callback method type for the zigzag barcode output. + * @tparam edge_range_type Either @ref Edge_range_type::BOOST_RANGE or @ref Edge_range_type::VECTOR. + * Default value: @ref Edge_range_type::BOOST_RANGE. + * @tparam StableFilteredComplex Data structure to store and build the computed complex at each step. * @param points Point cloud. * @param nu Lower multiplier. * @param mu Upper multiplier. * @param maxDim Maximum dimension to which to expand the Rips complex. If set to -1, there is no limit. + * @param outStream Callback method to process the birth and death values of a persistence bar. + * Has to take three arguments as input: first the dimension of the cycle, then the birth value of the cycle + * and third the death value of the cycle. The values corresponds to the filtration values which were given at + * insertions or removals. Note that bars of length 0 will not be token into account. * @param p Order policy for the points. - * Can be either @ref Oscillating_rips_edge_range::Order_policy::FARTHEST_POINT_ORDERING, - * @ref Oscillating_rips_edge_range::Order_policy::ALREADY_ORDERED or - * @ref Oscillating_rips_edge_range::Order_policy::RANDOM_POINT_ORDERING. - * Default value: @ref Oscillating_rips_edge_range::Order_policy::FARTHEST_POINT_ORDERING. - * @return The persistence diagram of the oscillating Rips filtration. + * Can be either @ref Oscillating_rips_edge_order_policy::FARTHEST_POINT_ORDERING, + * @ref Oscillating_rips_edge_order_policy::ALREADY_ORDERED or + * @ref Oscillating_rips_edge_order_policy::RANDOM_POINT_ORDERING. + * Default value: @ref Oscillating_rips_edge_order_policy::FARTHEST_POINT_ORDERING. */ template . + * @tparam StableFilteredComplex Data structure to store and build the computed complex at each step. * @param points Point cloud. * @param nu Lower multiplier. * @param mu Upper multiplier. * @param maxDim Maximum dimension to which to expand the Rips complex. If set to -1, there is no limit. * @param p Order policy for the points. - * Can be either @ref Oscillating_rips_edge_range::Order_policy::FARTHEST_POINT_ORDERING, - * @ref Oscillating_rips_edge_range::Order_policy::ALREADY_ORDERED or - * @ref Oscillating_rips_edge_range::Order_policy::RANDOM_POINT_ORDERING. - * Default value: @ref Oscillating_rips_edge_range::Order_policy::FARTHEST_POINT_ORDERING. - * @return The persistence diagram of the oscillating Rips filtration. + * Can be either @ref Oscillating_rips_edge_order_policy::FARTHEST_POINT_ORDERING, + * @ref Oscillating_rips_edge_order_policy::ALREADY_ORDERED or + * @ref Oscillating_rips_edge_order_policy::RANDOM_POINT_ORDERING. + * Default value: @ref Oscillating_rips_edge_order_policy::FARTHEST_POINT_ORDERING. + * @return The persistence diagram of the oscillating Rips filtration as vector of + * @ref Gudhi::persistence_matrix::Persistence_interval "". */ template class Zigzag_edge @@ -143,6 +143,8 @@ class Zigzag_edge bool direction_; /**< Direction. True = forward, false = backward. */ }; +//TODO: remove the isActive_ members from the edge modifiers. + /** * @class Identity_edge_modifier oscillating_rips_iterators.h gudhi/Zigzag_persistence/oscillating_rips_iterators.h * @brief Identity modifier, i.e., does nothing. @@ -170,7 +172,7 @@ class Identity_edge_modifier * @details Useful in particular when geometric computations (edge length, etc) are * run with squared Euclidean distance for performance. * - * @tparam Filtration_value Filtration value type. + * @tparam Filtration_value Filtration value type. Should be compatible with `std::sqrt` and `operator*`. */ template class Square_root_edge_modifier @@ -223,7 +225,7 @@ enum Oscillating_rips_edge_order_policy { * a Boost range made from a custom iterator computing an edge on the fly at each increment. * The custom iterator is therefore only a forward iterator and can only be incremented. * - * @tparam Filtration_value Filtration value type + * @tparam Filtration_value Filtration value type. Should be compatible with the edge modifier. * @tparam EdgeModifier Modifier for the edge filtration values. If no modifications are wanted, * use @ref Identity_edge_modifier. Default value: @ref Identity_edge_modifier. * @@ -263,8 +265,10 @@ class Oscillating_rips_edge_range * distance function. * @param distance Distance function. Has to take two points as it from the range @p points as input parameters * and return the distance between those points. - * @param orderPolicy Order policy for the points. Can be either @ref Oscillating_rips_edge_order_policy::FARTHEST_POINT_ORDERING, - * @ref Oscillating_rips_edge_order_policy::ALREADY_ORDERED or @ref Oscillating_rips_edge_order_policy::RANDOM_POINT_ORDERING. + * @param orderPolicy Order policy for the points. Can be either + * @ref Oscillating_rips_edge_order_policy::FARTHEST_POINT_ORDERING "", + * @ref Oscillating_rips_edge_order_policy::ALREADY_ORDERED or + * @ref Oscillating_rips_edge_order_policy::RANDOM_POINT_ORDERING "". */ template Oscillating_rips_edge_iterator(Filtration_value nu, @@ -573,6 +577,7 @@ class Oscillating_rips_edge_range /** * @brief Computes and return a vector with all edges in order of the oscillating Rips filtration. + * See the @ref zigzagrips "introduction page" for more details about the arguments. * * @tparam PointRange Point range type. * @tparam DistanceFunction Type of the distance function. @@ -625,6 +630,7 @@ class Oscillating_rips_edge_range /** * @brief Returns a boost::iterator_range from @ref Oscillating_rips_edge_iterator. The edges are computed * on the fly at each increment. The iterator is a forward iterator only. + * See the @ref zigzagrips "introduction page" for more details about the arguments. * * @tparam PointRange Point range type. * @tparam DistanceFunction Type of the distance function. @@ -659,6 +665,7 @@ class Oscillating_rips_edge_range * on the fly at each increment. The iterator is a forward iterator only. * Takes already computed epsilon values as input, but assumes that the points are already ordered accordingly. * Assumes also that the last epsilon value is 0. + * See the @ref zigzagrips "introduction page" for more details about the arguments. * * @tparam PointRange Point range type. * @tparam DistanceFunction Type of the distance function. @@ -692,6 +699,7 @@ class Oscillating_rips_edge_range /** * @brief Returns the begin iterator of a the range of edges based on @ref Oscillating_rips_edge_iterator. + * See the @ref zigzagrips "introduction page" for more details about the arguments. * * @tparam PointRange Point range type. * @tparam DistanceFunction Type of the distance function. @@ -722,6 +730,7 @@ class Oscillating_rips_edge_range * @brief Returns the begin iterator of a the range of edges based on @ref Oscillating_rips_edge_iterator. * Takes already computed epsilon values as input, but assumes that the points are already ordered accordingly. * Assumes also that the last epsilon value is 0. + * See the @ref zigzagrips "introduction page" for more details about the arguments. * * @tparam PointRange Point range type. * @tparam DistanceFunction Type of the distance function. diff --git a/src/Zigzag_persistence/include/gudhi/filtered_zigzag_persistence.h b/src/Zigzag_persistence/include/gudhi/filtered_zigzag_persistence.h index d07cef5b97..824934781a 100644 --- a/src/Zigzag_persistence/include/gudhi/filtered_zigzag_persistence.h +++ b/src/Zigzag_persistence/include/gudhi/filtered_zigzag_persistence.h @@ -41,10 +41,10 @@ namespace zigzag_persistence { * @brief Default options for @ref Filtered_zigzag_persistence_with_storage and @ref Filtered_zigzag_persistence. */ struct Default_filtered_zigzag_options : Default_zigzag_options { - using Cell_key = int; /**< Cell ID used in the given boundaries. */ - using Filtration_value = double; /**< Filtration value type. */ - using Hash = std::hash; /**< Hash method for Cell_key */ - using KeyEqual = std::equal_to; /**< Equality comparator for Cell_key */ + using Cell_key = int; /**< Cell ID used in the given boundaries. */ + using Filtration_value = double; /**< Filtration value type. */ + using Cell_key_hash = std::hash; /**< Hash method for Cell_key */ + using Cell_key_equal = std::equal_to; /**< Equality comparator for Cell_key */ }; /** @@ -300,7 +300,8 @@ class Filtered_zigzag_persistence_with_storage /** * @brief Map from input keys to internal keys. */ - std::unordered_map handleToKey_; + std::unordered_map + handleToKey_; Dimension dimMax_; /**< Maximal dimension of a bar to record. */ std::vector persistenceDiagram_; /**< Stores current closed persistence intervals. */ Internal_key numArrow_; /**< Current arrow number. */ @@ -450,7 +451,7 @@ class Filtered_zigzag_persistence { using Internal_key = typename Options::Internal_key; /**< Key and index type, has to be signed. */ using Cell_key = typename Options::Cell_key; /**< Cell ID type from external inputs. */ using Filtration_value = typename Options::Filtration_value; /**< Type for filtration values. */ - using Dimension = typename Options::Dimension; /**< Type for dimension values. */ + using Dimension = typename Options::Dimension; /**< Type for dimension values. */ /** * @brief Constructor. @@ -577,10 +578,11 @@ class Filtered_zigzag_persistence { /** * @brief Map from input keys to internal keys. */ - std::unordered_map handleToKey_; - Internal_key numArrow_; /**< Current arrow number. */ + std::unordered_map + handleToKey_; + Internal_key numArrow_; /**< Current arrow number. */ std::unordered_map keyToFiltrationValue_; /**< Cell Key to filtration value map. */ - Zigzag_persistence pers_; /**< Class computing the pairs. */ + Zigzag_persistence pers_; /**< Class computing the pairs. */ }; // end class Filtered_zigzag_persistence } // namespace zigzag_persistence diff --git a/src/common/doc/main_page.md b/src/common/doc/main_page.md index 334746b319..dfc3840b1d 100644 --- a/src/common/doc/main_page.md +++ b/src/common/doc/main_page.md @@ -294,6 +294,29 @@ +### Oscillating Rips Filtrations + + + + + + + + + +
+ \image html "osc_rips.svg" width=100% + + Variant of the Rips filtration in which the diameter not only grows but "oscillates". The resulting filtration + is therefore a zigzag filtration.
+
+ Author: Clément Maria, Hannah Schreiber
+ Introduced in: GUDHI 3.11.x
+ License: MIT
+
+ User manual: \ref zigzagrips +
+ ## Manifold reconstructions ### Coxeter triangulation