diff --git a/src/Persistence_matrix/concept/PersistenceMatrixColumn.h b/src/Persistence_matrix/concept/PersistenceMatrixColumn.h index a8a00d7a04..7fc7623b28 100644 --- a/src/Persistence_matrix/concept/PersistenceMatrixColumn.h +++ b/src/Persistence_matrix/concept/PersistenceMatrixColumn.h @@ -47,7 +47,7 @@ using Chain_column_option = Chain_column_extra_properties; /** * @ingroup persistence_matrix * - * @brief Concept of the column classes used by the @ref Matrix class. The classes the columns inheritates from + * @brief Concept of the column classes used by the @ref Matrix class. The classes the columns inherit from * are either real or dummy classes, see @ref Row_access_option, @ref Column_dimension_option, @ref Chain_column_option. * If used with column compression, the column type has to have its `std::hash` method. * @@ -81,7 +81,7 @@ class PersistenceMatrixColumn : * @param colSettings Pointer to a setting structure or `nullptr`. The structure should contain all the necessary * classes specific to the column type, such as custom allocators. The specificities are this way hidden behind * a commun interface for all column types. If @p colSettings is not specified or is equal to `nullptr`, the column - * should still be constructable eventhough not necessarily "usable". + * should still be constructable even though not necessarily "usable". */ PersistenceMatrixColumn(Column_settings* colSettings = nullptr); /** @@ -291,7 +291,7 @@ class PersistenceMatrixColumn : * @brief Returns a begin @ref Cell iterator to iterate over all cells contained in the underlying container. * * @warning The iterators really just iterate over the underlying container. Depending of the column type, - * neither the content nor the order is garanteed. See description of the actual Column class for more details. + * neither the content nor the order is guaranteed. See description of the actual Column class for more details. * * @return @ref Cell iterator. */ @@ -300,7 +300,7 @@ class PersistenceMatrixColumn : * @brief Returns a begin @ref Cell const iterator to iterate over all cells contained in the underlying container. * * @warning The iterators really just iterate over the underlying container. Depending of the column type, - * neither the content nor the order is garanteed. See description of the actual Column class for more details. + * neither the content nor the order is guaranteed. See description of the actual Column class for more details. * * @return @ref Cell const iterator. */ @@ -309,7 +309,7 @@ class PersistenceMatrixColumn : * @brief Returns a end @ref Cell iterator, iterating over all cells contained in the underlying container. * * @warning The iterators really just iterate over the underlying container. Depending of the column type, - * neither the content nor the order is garanteed. See description of the actual Column class for more details. + * neither the content nor the order is guaranteed. See description of the actual Column class for more details. * * @return @ref Cell iterator. */ @@ -318,7 +318,7 @@ class PersistenceMatrixColumn : * @brief Returns a end @ref Cell const iterator, iterating over all cells contained in the underlying container. * * @warning The iterators really just iterate over the underlying container. Depending of the column type, - * neither the content nor the order is garanteed. See description of the actual Column class for more details. + * neither the content nor the order is guaranteed. See description of the actual Column class for more details. * * @return @ref Cell const iterator. */ @@ -327,7 +327,7 @@ class PersistenceMatrixColumn : * @brief Returns a begin @ref Cell reverse iterator to iterate over all cells contained in the underlying container. * * @warning The iterators really just iterate over the underlying container. Depending of the column type, - * neither the content nor the order is garanteed. See description of the actual Column class for more details. + * neither the content nor the order is guaranteed. See description of the actual Column class for more details. * * @return @ref Cell reverse iterator. */ @@ -337,7 +337,7 @@ class PersistenceMatrixColumn : * container. * * @warning The iterators really just iterate over the underlying container. Depending of the column type, - * neither the content nor the order is garanteed. See description of the actual Column class for more details. + * neither the content nor the order is guaranteed. See description of the actual Column class for more details. * * @return @ref Cell const reverse iterator. */ @@ -346,7 +346,7 @@ class PersistenceMatrixColumn : * @brief Returns a end @ref Cell reverse iterator, iterating over all cells contained in the underlying container. * * @warning The iterators really just iterate over the underlying container. Depending of the column type, - * neither the content nor the order is garanteed. See description of the actual Column class for more details. + * neither the content nor the order is guaranteed. See description of the actual Column class for more details. * * @return @ref Cell reverse iterator. */ @@ -356,7 +356,7 @@ class PersistenceMatrixColumn : * container. * * @warning The iterators really just iterate over the underlying container. Depending of the column type, - * neither the content nor the order is garanteed. See description of the actual Column class for more details. + * neither the content nor the order is guaranteed. See description of the actual Column class for more details. * * @return @ref Cell const reverse iterator. */ @@ -420,8 +420,8 @@ class PersistenceMatrixColumn : /** * @brief Equality comparator. Equal in the sense that what is "supposed" to be contained in the columns is equal, - * not what is actually stored in the underlying container. For exemple, the underlying container of - * @ref Vector_column can contain cells which were erased explicitely by @ref clear(index). Those cells should not + * not what is actually stored in the underlying container. For example, the underlying container of + * @ref Vector_column can contain cells which were erased explicitly by @ref clear(index). Those cells should not * be taken into account while comparing. * * @param c1 First column to compare. @@ -433,8 +433,8 @@ class PersistenceMatrixColumn : /** * @brief "Strictly smaller than" comparator. Usually a lexicographical order, but what matters is that the * order is total. The order should apply on what is "supposed" to be contained in the columns, - * not what is actually stored in the underlying container. For exemple, the underlying container of - * @ref Vector_column can contain cells which were erased explicitely by @ref clear(index). Those cells should not + * not what is actually stored in the underlying container. For example, the underlying container of + * @ref Vector_column can contain cells which were erased explicitly by @ref clear(index). Those cells should not * be taken into account while comparing. * * @param c1 First column to compare. diff --git a/src/Persistence_matrix/concept/PersistenceMatrixOptions.h b/src/Persistence_matrix/concept/PersistenceMatrixOptions.h index b26b362606..040c4f4be5 100644 --- a/src/Persistence_matrix/concept/PersistenceMatrixOptions.h +++ b/src/Persistence_matrix/concept/PersistenceMatrixOptions.h @@ -68,7 +68,7 @@ struct PersistenceMatrixOptions /** * @brief Only enabled for @ref basematrix "base matrices" (i.e., none of the following is true: * @ref has_column_pairings, @ref has_vine_update, @ref can_retrieve_representative_cycles), is ignored otherwise. - * If set to true, two identical columns in the matrix are not explicitely stored separately but are represented + * If set to true, two identical columns in the matrix are not explicitly stored separately but are represented * by a same column. * * Note that some methods of the @ref basematrix "base matrix" are not available when true: @@ -166,7 +166,7 @@ struct PersistenceMatrixOptions // * the following is true: @ref has_column_pairings, @ref has_vine_update or // * @ref can_retrieve_representative_cycles. // * Is ignored otherwise - // * If set to true, the matrix is decomposed in several submatrices containing each all the + // * If set to true, the matrix is decomposed in several sub-matrices containing each all the // * columns of same dimension. // */ // static const bool is_separated_by_dimension; diff --git a/src/Persistence_matrix/doc/Intro_field_elements_and_operators.h b/src/Persistence_matrix/doc/Intro_field_elements_and_operators.h index abd6437908..bf50c171f9 100644 --- a/src/Persistence_matrix/doc/Intro_field_elements_and_operators.h +++ b/src/Persistence_matrix/doc/Intro_field_elements_and_operators.h @@ -26,11 +26,11 @@ namespace persistence_fields { * * There are two types of classes: * - those defining directly a field element, allowing to use them as any integer: the operators are overwritten such - * that the calculation is done in the field. For example, if \f$ e = 2 \f$ is an instanciation of an - * \f$ \mathbb{F}_3 \f$ element class, then `e + 3` returns an element instanciation of value `2`, + * that the calculation is done in the field. For example, if \f$ e = 2 \f$ is an instantiation of an + * \f$ \mathbb{F}_3 \f$ element class, then `e + 3` returns an element instantiation of value `2`, * - those only defining the operators of a field or multi-field. They represent a collection of methods taking * one or two integers as input and treating them as elements of the field. For example, if \f$ op \f$ is an - * instanciation of a \f$ \mathbb{F}_3 \f$ operator class, `op.add(2, 3)` returns `2`. + * instantiation of a \f$ \mathbb{F}_3 \f$ operator class, `op.add(2, 3)` returns `2`. * * The field operator classes all respect the @ref persistence_matrix::FieldOperators concept. * diff --git a/src/Persistence_matrix/doc/Intro_persistence_matrix.h b/src/Persistence_matrix/doc/Intro_persistence_matrix.h index 39cfb2e41d..bb160075ed 100644 --- a/src/Persistence_matrix/doc/Intro_persistence_matrix.h +++ b/src/Persistence_matrix/doc/Intro_persistence_matrix.h @@ -25,9 +25,9 @@ namespace persistence_matrix { * and used as backend for persistence algorithms, such at persistent homology, @ref persistent_cohomology, * or zigzag @cite zigzag. * - * The structure is entirely accessed via the class @ref Matrix and it provides several functionnalities which can + * The structure is entirely accessed via the class @ref Matrix and it provides several functionalities which can * be enabled or disabled through a template argument following the @ref PersistenceMatrixOptions concept. - * The main functionnalities are: + * The main functionalities are: * @li column and row access, * @li column addition and scalar multiplication, * @li removal of maximal faces while maintaining a valid reduced boundary matrix or compatible chain complex base diff --git a/src/Persistence_matrix/example/example_field_operations.cpp b/src/Persistence_matrix/example/example_field_operations.cpp index d288219553..9a45d2b2d5 100644 --- a/src/Persistence_matrix/example/example_field_operations.cpp +++ b/src/Persistence_matrix/example/example_field_operations.cpp @@ -41,7 +41,7 @@ void field_element_example(int ini){ std::cout << "e -= 4: " << e << "\n"; t = 4; t -= e; //standard integer addition - std::cout << "4 -= e: " << t << " //standard integer substraction\n"; + std::cout << "4 -= e: " << t << " //standard integer subtraction\n"; std::cout << "e * 6: " << (e * 6) << "\n"; std::cout << "6 * e: " << (6 * e) << "\n"; e *= 6; @@ -57,8 +57,8 @@ void field_operator_example(const Field_operator& op){ std::cout << "Characteristic: " << op.get_characteristic() << "\n"; std::cout << "2 + 3: " << op.add(2u, 3u) << "\n"; std::cout << "3 + 2: " << op.add(3u, 2u) << "\n"; - std::cout << "10 - 4: " << op.substract(10u, 4u) << "\n"; - std::cout << "4 - 10: " << op.substract(4u, 10u) << "\n"; + std::cout << "10 - 4: " << op.subtract(10u, 4u) << "\n"; + std::cout << "4 - 10: " << op.subtract(4u, 10u) << "\n"; std::cout << "3 * 6: " << op.multiply(3u, 6u) << "\n"; std::cout << "6 * 3: " << op.multiply(6u, 3u) << "\n"; std::cout << "Value of 7: " << op.get_value(7u) << "\n"; diff --git a/src/Persistence_matrix/example/representative_cycles_from_matrix.cpp b/src/Persistence_matrix/example/representative_cycles_from_matrix.cpp index f5b4bcef30..9c6641b1f2 100644 --- a/src/Persistence_matrix/example/representative_cycles_from_matrix.cpp +++ b/src/Persistence_matrix/example/representative_cycles_from_matrix.cpp @@ -58,14 +58,14 @@ void print_representative_cycles_example() auto rc = mp.get_representative_cycles(); for (auto cycle : rc) { // cycle[0] gives the row index of a simplex in the cycle - // because the simplices where indexed from 0 continously, the simplex represented by the row index cycle[0] is + // because the simplices where indexed from 0 continuously, the simplex represented by the row index cycle[0] is // the same simplex represented by the column at position cycle[0] in RU // that is why `mp.get_column_dimension(cycle[0])` gives us the dimension of the simplex for RU_matrix // // for the chain matrix, the row index will always represent a simplex ID. So, // `mp.get_column_dimension(mp.get_column_with_pivot(cycle[0]))` will always work to get the dimension - // of the simplex. But in this particlar case, because of the simplex indexation and the fact that no swap - // occured, mp.get_column_with_pivot(cycle[0]) == cycle[0] and so `mp.get_column_dimension(cycle[0])` also works. + // of the simplex. But in this particular case, because of the simplex indexation and the fact that no swap + // occurred, mp.get_column_with_pivot(cycle[0]) == cycle[0] and so `mp.get_column_dimension(cycle[0])` also works. std::cout << mp.get_column_dimension(cycle[0]); std::cout << "-cycle: "; for (auto index : cycle) { diff --git a/src/Persistence_matrix/example/simplex_tree_to_matrix.cpp b/src/Persistence_matrix/example/simplex_tree_to_matrix.cpp index 3799d3fe15..2367a8b16f 100644 --- a/src/Persistence_matrix/example/simplex_tree_to_matrix.cpp +++ b/src/Persistence_matrix/example/simplex_tree_to_matrix.cpp @@ -87,7 +87,7 @@ void print_matrix(Base_matrix& bm, unsigned int size){ void print_matrix(const Chain_matrix& cm, unsigned int size){ std::cout << "Chain_matrix:\n"; - // just note that if some vine swaps or removals occured, this would + // just note that if some vine swaps or removals occurred, this would // not give us the columns in the order of filtration anymore, but just // in the order they are stored in the matrix for (unsigned int i = 0; i < size; ++i) { diff --git a/src/Persistence_matrix/include/gudhi/Fields/Multi_field_operators.h b/src/Persistence_matrix/include/gudhi/Fields/Multi_field_operators.h index cfad44f4dc..b5434c21ac 100644 --- a/src/Persistence_matrix/include/gudhi/Fields/Multi_field_operators.h +++ b/src/Persistence_matrix/include/gudhi/Fields/Multi_field_operators.h @@ -29,7 +29,7 @@ namespace persistence_fields { * @class Multi_field_operators Multi_field_operators.h gudhi/Fields/Multi_field_operators.h * @ingroup persistence_fields * - * @brief Class defining operators for a multi-field with "consecutive" charateristic range. + * @brief Class defining operators for a multi-field with "consecutive" characteristic range. */ class Multi_field_operators { @@ -46,7 +46,7 @@ class Multi_field_operators * @brief Constructor setting the characteristics to all prime numbers between the two given integers. * * @param minCharacteristic Smallest value of a prime. - * @param maxCharacteristic Heighest value of a prime. + * @param maxCharacteristic Highest value of a prime. */ Multi_field_operators(int minCharacteristic, int maxCharacteristic) : productOfAllCharacteristics_(0) //, multiplicativeID_(1) @@ -81,7 +81,7 @@ class Multi_field_operators * The characteristics will be all prime numbers in the given interval. * * @param minimum Smallest value of a prime. - * @param maximum Heighest value of a prime. + * @param maximum Highest value of a prime. */ void set_characteristic(int minimum, int maximum) { if (maximum < 2) throw std::invalid_argument("Characteristic must be strictly positive"); @@ -184,36 +184,36 @@ class Multi_field_operators } /** - * @brief Returns the substraction in the field of the first element by the second element. + * @brief Returns the subtraction in the field of the first element by the second element. * * @param e1 First element. * @param e2 Second element. * @return `(e1 - e2) % productOfAllCharacteristics`, such that the result is positive. */ - element_type substract(element_type e1, const element_type& e2) const { - substract_inplace_front(e1, e2); + element_type subtract(element_type e1, const element_type& e2) const { + subtract_inplace_front(e1, e2); return e1; } /** - * @brief Stores in the first element the substraction in the field of the first element by the second element, + * @brief Stores in the first element the subtraction in the field of the first element by the second element, * that is `(e1 - e2) % productOfAllCharacteristics`, such that the result is positive. * * @param e1 First element. * @param e2 Second element. */ - void substract_inplace_front(element_type& e1, const element_type& e2) const { + void subtract_inplace_front(element_type& e1, const element_type& e2) const { e1 -= e2; get_value_inplace(e1); } /** - * @brief Stores in the second element the substraction in the field of the first element by the second element, + * @brief Stores in the second element the subtraction in the field of the first element by the second element, * that is `(e1 - e2) % productOfAllCharacteristics`, such that the result is positive. * * @param e1 First element. * @param e2 Second element. */ - void substract_inplace_back(const element_type& e1, element_type& e2) const { + void subtract_inplace_back(const element_type& e1, element_type& e2) const { mpz_sub(e2.get_mpz_t(), e1.get_mpz_t(), e2.get_mpz_t()); get_value_inplace(e2); } diff --git a/src/Persistence_matrix/include/gudhi/Fields/Multi_field_shared.h b/src/Persistence_matrix/include/gudhi/Fields/Multi_field_shared.h index 2f44b7a1d7..88b6a2c123 100644 --- a/src/Persistence_matrix/include/gudhi/Fields/Multi_field_shared.h +++ b/src/Persistence_matrix/include/gudhi/Fields/Multi_field_shared.h @@ -29,9 +29,9 @@ namespace persistence_fields { * @class Shared_multi_field_element Multi_field_shared.h gudhi/Fields/Multi_field_shared.h * @ingroup persistence_fields * - * @brief Class representing an element of a multi-field. If each instanciation of the class can represent another - * element, they all share the same characteritics. That is if the characteristics are set for one, they will be - * set for all the others. The characteristics can be set before instianciating the elements with the static + * @brief Class representing an element of a multi-field. If each instantiation of the class can represent another + * element, they all share the same characteristics. That is if the characteristics are set for one, they will be + * set for all the others. The characteristics can be set before instantiating the elements with the static * @ref Shared_multi_field_element::initialize method. */ class Shared_multi_field_element diff --git a/src/Persistence_matrix/include/gudhi/Fields/Multi_field_small.h b/src/Persistence_matrix/include/gudhi/Fields/Multi_field_small.h index 7cb6798248..86a1eb6bf9 100644 --- a/src/Persistence_matrix/include/gudhi/Fields/Multi_field_small.h +++ b/src/Persistence_matrix/include/gudhi/Fields/Multi_field_small.h @@ -135,7 +135,7 @@ class Multi_field_element_with_small_characteristics { */ friend void operator-=(Multi_field_element_with_small_characteristics& f1, Multi_field_element_with_small_characteristics const& f2) { - f1.element_ = _substract(f1.element_, f2.element_); + f1.element_ = _subtract(f1.element_, f2.element_); } /** * @brief operator- @@ -152,7 +152,7 @@ class Multi_field_element_with_small_characteristics { */ template > friend void operator-=(Multi_field_element_with_small_characteristics& f, const Integer_type& v) { - f.element_ = _substract(f.element_, _get_value(v)); + f.element_ = _subtract(f.element_, _get_value(v)); } /** * @brief operator- @@ -172,7 +172,7 @@ class Multi_field_element_with_small_characteristics { */ template > friend Integer_type operator-(const Integer_type& v, const Multi_field_element_with_small_characteristics& f) { - return _substract(_get_value(v), f.element_); + return _subtract(_get_value(v), f.element_); } /** @@ -431,7 +431,7 @@ class Multi_field_element_with_small_characteristics { return element; } - static constexpr element_type _substract(element_type element, element_type v) { + static constexpr element_type _subtract(element_type element, element_type v) { if (element < v) { element += productOfAllCharacteristics_; } @@ -444,7 +444,7 @@ class Multi_field_element_with_small_characteristics { int M = mod; int A = element; int y = 0, x = 1; - // extended euclidien division + // extended euclidean division while (A > 1) { int quotient = A / M; int temp = M; diff --git a/src/Persistence_matrix/include/gudhi/Fields/Multi_field_small_operators.h b/src/Persistence_matrix/include/gudhi/Fields/Multi_field_small_operators.h index 2674b18eda..94daecc821 100644 --- a/src/Persistence_matrix/include/gudhi/Fields/Multi_field_small_operators.h +++ b/src/Persistence_matrix/include/gudhi/Fields/Multi_field_small_operators.h @@ -31,7 +31,7 @@ namespace persistence_fields { * gudhi/Fields/Multi_field_small_operators.h * @ingroup persistence_fields * - * @brief Class defining operators for a multi-field with "consecutive" charateristic range, such that + * @brief Class defining operators for a multi-field with "consecutive" characteristic range, such that * `productOfAllCharacteristics ^ 2` fits into an unsigned int. */ class Multi_field_operators_with_small_characteristics @@ -50,7 +50,7 @@ class Multi_field_operators_with_small_characteristics * The product of all primes to the square has to fit into an unsigned int. * * @param minCharacteristic Smallest value of a prime. - * @param maxCharacteristic Heighest value of a prime. + * @param maxCharacteristic Highest value of a prime. */ Multi_field_operators_with_small_characteristics(int minCharacteristic, int maxCharacteristic) : productOfAllCharacteristics_(0) //, multiplicativeID_(1) @@ -86,7 +86,7 @@ class Multi_field_operators_with_small_characteristics * The product of all primes to the square has to fit into an unsigned int. * * @param minimum Smallest value of a prime. - * @param maximum Heighest value of a prime. + * @param maximum Highest value of a prime. */ void set_characteristic(int minimum, int maximum) { if (maximum < 2) throw std::invalid_argument("Characteristic must be strictly positive"); @@ -168,35 +168,35 @@ class Multi_field_operators_with_small_characteristics } /** - * @brief Returns the substraction in the field of the first element by the second element. + * @brief Returns the subtraction in the field of the first element by the second element. * * @param e1 First element. * @param e2 Second element. * @return `(e1 - e2) % productOfAllCharacteristics`, such that the result is positive. */ - element_type substract(element_type e1, element_type e2) const { - return _substract(get_value(e1), get_value(e2), productOfAllCharacteristics_); + element_type subtract(element_type e1, element_type e2) const { + return _subtract(get_value(e1), get_value(e2), productOfAllCharacteristics_); } /** - * @brief Stores in the first element the substraction in the field of the first element by the second element, + * @brief Stores in the first element the subtraction in the field of the first element by the second element, * that is `(e1 - e2) % productOfAllCharacteristics`, such that the result is positive. * * @param e1 First element. * @param e2 Second element. */ - void substract_inplace_front(element_type& e1, element_type e2) const { - e1 = _substract(get_value(e1), get_value(e2), productOfAllCharacteristics_); + void subtract_inplace_front(element_type& e1, element_type e2) const { + e1 = _subtract(get_value(e1), get_value(e2), productOfAllCharacteristics_); } /** - * @brief Stores in the second element the substraction in the field of the first element by the second element, + * @brief Stores in the second element the subtraction in the field of the first element by the second element, * that is `(e1 - e2) % productOfAllCharacteristics`, such that the result is positive. * * @param e1 First element. * @param e2 Second element. */ - void substract_inplace_back(element_type e1, element_type& e2) const { - e2 = _substract(get_value(e1), get_value(e2), productOfAllCharacteristics_); + void subtract_inplace_back(element_type e1, element_type& e2) const { + e2 = _subtract(get_value(e1), get_value(e2), productOfAllCharacteristics_); } /** @@ -410,7 +410,7 @@ class Multi_field_operators_with_small_characteristics // static inline constexpr unsigned int multiplicativeID_ = 1; static element_type _add(element_type element, element_type v, characteristic_type characteristic); - static element_type _substract(element_type element, element_type v, characteristic_type characteristic); + static element_type _subtract(element_type element, element_type v, characteristic_type characteristic); static element_type _multiply(element_type a, element_type b, characteristic_type characteristic); static constexpr long int _get_inverse(element_type element, characteristic_type mod); static constexpr bool _is_prime(const int p); @@ -433,7 +433,7 @@ Multi_field_operators_with_small_characteristics::_add(element_type element, ele } inline Multi_field_operators_with_small_characteristics::element_type -Multi_field_operators_with_small_characteristics::_substract(element_type element, element_type v, +Multi_field_operators_with_small_characteristics::_subtract(element_type element, element_type v, characteristic_type characteristic) { if (element < v) { element += characteristic; @@ -473,7 +473,7 @@ inline constexpr long int Multi_field_operators_with_small_characteristics::_get element_type M = mod; element_type A = element; long int y = 0, x = 1; - // extended euclidien division + // extended euclidean division while (A > 1) { int quotient = A / M; int temp = M; diff --git a/src/Persistence_matrix/include/gudhi/Fields/Multi_field_small_shared.h b/src/Persistence_matrix/include/gudhi/Fields/Multi_field_small_shared.h index 19d99d7447..4adbecea1c 100644 --- a/src/Persistence_matrix/include/gudhi/Fields/Multi_field_small_shared.h +++ b/src/Persistence_matrix/include/gudhi/Fields/Multi_field_small_shared.h @@ -32,9 +32,9 @@ namespace persistence_fields { * @ingroup persistence_fields * * @brief Class representing an element of a multi-field, such that `productOfAllCharacteristics ^ 2` fits into - * the given @p Unsigned_integer_type template argument. If each instanciation of the class can represent another - * element, they all share the same characteritics. That is if the characteristics are set for one, they will be - * set for all the others. The characteristics can be set before instanciating the elements with the static + * the given @p Unsigned_integer_type template argument. If each instantiation of the class can represent another + * element, they all share the same characteristics. That is if the characteristics are set for one, they will be + * set for all the others. The characteristics can be set before instantiating the elements with the static * @ref Shared_multi_field_element_with_small_characteristics::initialize method. * * @tparam Unsigned_integer_type A native unsigned integer type: unsigned int, long unsigned int, etc. @@ -178,7 +178,7 @@ class Shared_multi_field_element_with_small_characteristics { */ friend void operator-=(Shared_multi_field_element_with_small_characteristics& f1, Shared_multi_field_element_with_small_characteristics const& f2) { - f1.element_ = _substract(f1.element_, f2.element_); + f1.element_ = _subtract(f1.element_, f2.element_); } /** * @brief operator- @@ -196,7 +196,7 @@ class Shared_multi_field_element_with_small_characteristics { */ template > friend void operator-=(Shared_multi_field_element_with_small_characteristics& f, const Integer_type& v) { - f.element_ = _substract(f.element_, _get_value(v)); + f.element_ = _subtract(f.element_, _get_value(v)); } /** * @brief operator- @@ -216,7 +216,7 @@ class Shared_multi_field_element_with_small_characteristics { */ template > friend Integer_type operator-(const Integer_type& v, const Shared_multi_field_element_with_small_characteristics& f) { - return _substract(_get_value(v), f.element_); + return _subtract(_get_value(v), f.element_); } /** @@ -477,7 +477,7 @@ class Shared_multi_field_element_with_small_characteristics { return element; } - static element_type _substract(element_type element, element_type v) { + static element_type _subtract(element_type element, element_type v) { if (element < v) { element += productOfAllCharacteristics_; } @@ -490,7 +490,7 @@ class Shared_multi_field_element_with_small_characteristics { int M = mod; int A = element; int y = 0, x = 1; - // extended euclidien division + // extended euclidean division while (A > 1) { int quotient = A / M; int temp = M; diff --git a/src/Persistence_matrix/include/gudhi/Fields/Z2_field_operators.h b/src/Persistence_matrix/include/gudhi/Fields/Z2_field_operators.h index 6265db8ef5..ff53914e73 100644 --- a/src/Persistence_matrix/include/gudhi/Fields/Z2_field_operators.h +++ b/src/Persistence_matrix/include/gudhi/Fields/Z2_field_operators.h @@ -102,7 +102,7 @@ class Z2_field_operators } /** - * @brief Returns the substraction in the field of the first element by the second element. + * @brief Returns the subtraction in the field of the first element by the second element. * * @tparam Unsigned_integer_type A native unsigned integer type: unsigned int, bool, etc. * @param e1 First element. @@ -110,7 +110,7 @@ class Z2_field_operators * @return `(e1 - e2) % 2` as a boolean. */ template > - static element_type substract(Unsigned_integer_type e1, Unsigned_integer_type e2) { + static element_type subtract(Unsigned_integer_type e1, Unsigned_integer_type e2) { if constexpr (std::is_same_v) { return e1 != e2; } else { @@ -119,7 +119,7 @@ class Z2_field_operators } /** - * @brief Stores in the first element the substraction in the field of the first element by the second element, + * @brief Stores in the first element the subtraction in the field of the first element by the second element, * that is `(e1 - e2) % 2`, such that the result is positive. * * @tparam Unsigned_integer_type A native unsigned integer type: unsigned int, bool, etc. @@ -127,7 +127,7 @@ class Z2_field_operators * @param e2 Second element. */ template > - static void substract_inplace_front(Unsigned_integer_type& e1, Unsigned_integer_type e2) { + static void subtract_inplace_front(Unsigned_integer_type& e1, Unsigned_integer_type e2) { if constexpr (std::is_same_v) { e1 = e1 != e2; } else { @@ -135,7 +135,7 @@ class Z2_field_operators } } /** - * @brief Stores in the second element the substraction in the field of the first element by the second element, + * @brief Stores in the second element the subtraction in the field of the first element by the second element, * that is `(e1 - e2) % 2`, such that the result is positive. * * @tparam Unsigned_integer_type A native unsigned integer type: unsigned int, bool, etc. @@ -143,7 +143,7 @@ class Z2_field_operators * @param e2 Second element. */ template > - static void substract_inplace_back(Unsigned_integer_type e1, Unsigned_integer_type& e2) { + static void subtract_inplace_back(Unsigned_integer_type e1, Unsigned_integer_type& e2) { if constexpr (std::is_same_v) { e2 = e1 != e2; } else { diff --git a/src/Persistence_matrix/include/gudhi/Fields/Zp_field.h b/src/Persistence_matrix/include/gudhi/Fields/Zp_field.h index ac0b067082..f9180c92d5 100644 --- a/src/Persistence_matrix/include/gudhi/Fields/Zp_field.h +++ b/src/Persistence_matrix/include/gudhi/Fields/Zp_field.h @@ -115,7 +115,7 @@ class Zp_field_element { * @brief operator-= */ friend void operator-=(Zp_field_element& f1, const Zp_field_element& f2) { - f1.element_ = Zp_field_element::_substract(f1.element_, f2.element_); + f1.element_ = Zp_field_element::_subtract(f1.element_, f2.element_); } /** * @brief operator- @@ -129,7 +129,7 @@ class Zp_field_element { */ template > friend void operator-=(Zp_field_element& f, const Integer_type& v) { - f.element_ = Zp_field_element::_substract(f.element_, _get_value(v)); + f.element_ = Zp_field_element::_subtract(f.element_, _get_value(v)); } /** * @brief operator- @@ -148,7 +148,7 @@ class Zp_field_element { */ template > friend Integer_type operator-(const Integer_type& v, const Zp_field_element& f) { - return Zp_field_element::_substract(_get_value(v), f.element_); + return Zp_field_element::_subtract(_get_value(v), f.element_); } /** @@ -272,7 +272,7 @@ class Zp_field_element { * @return The inverse. */ Zp_field_element get_inverse() const { - if (element_ != 0 && inverse_[element_] == 0) { // initialize everything at instanciation instead? + if (element_ != 0 && inverse_[element_] == 0) { // initialize everything at instantiation instead? inverse_[element_] = _get_inverse(element_); } @@ -342,7 +342,7 @@ class Zp_field_element { return element; } - static element_type _substract(element_type element, element_type v) { + static element_type _subtract(element_type element, element_type v) { if (element < v) { element += characteristic; } @@ -374,7 +374,7 @@ class Zp_field_element { int M = characteristic; int A = element; int y = 0, x = 1; - // extended euclidien division + // extended euclidean division while (A > 1) { int quotient = A / M; int temp = M; diff --git a/src/Persistence_matrix/include/gudhi/Fields/Zp_field_operators.h b/src/Persistence_matrix/include/gudhi/Fields/Zp_field_operators.h index f5d72a0271..b502d8ad8a 100644 --- a/src/Persistence_matrix/include/gudhi/Fields/Zp_field_operators.h +++ b/src/Persistence_matrix/include/gudhi/Fields/Zp_field_operators.h @@ -146,35 +146,35 @@ class Zp_field_operators } /** - * @brief Returns the substraction in the field of the first element by the second element. + * @brief Returns the subtraction in the field of the first element by the second element. * * @param e1 First element. * @param e2 Second element. * @return `(e1 - e2) % characteristic`, such that the result is positive. */ - element_type substract(element_type e1, element_type e2) const { - return _substract(get_value(e1), get_value(e2), characteristic_); + element_type subtract(element_type e1, element_type e2) const { + return _subtract(get_value(e1), get_value(e2), characteristic_); } /** - * @brief Stores in the first element the substraction in the field of the first element by the second element, + * @brief Stores in the first element the subtraction in the field of the first element by the second element, * that is `(e1 - e2) % 2`, such that the result is positive. * * @param e1 First element. * @param e2 Second element. */ - void substract_inplace_front(element_type& e1, element_type e2) const { - e1 = _substract(get_value(e1), get_value(e2), characteristic_); + void subtract_inplace_front(element_type& e1, element_type e2) const { + e1 = _subtract(get_value(e1), get_value(e2), characteristic_); } /** - * @brief Stores in the second element the substraction in the field of the first element by the second element, + * @brief Stores in the second element the subtraction in the field of the first element by the second element, * that is `(e1 - e2) % 2`, such that the result is positive. * * @param e1 First element. * @param e2 Second element. */ - void substract_inplace_back(element_type e1, element_type& e2) const { - e2 = _substract(get_value(e1), get_value(e2), characteristic_); + void subtract_inplace_back(element_type e1, element_type& e2) const { + e2 = _subtract(get_value(e1), get_value(e2), characteristic_); } /** @@ -365,7 +365,7 @@ class Zp_field_operators return e1; } - static element_type _substract(element_type e1, element_type e2, characteristic_type characteristic) { + static element_type _subtract(element_type e1, element_type e2, characteristic_type characteristic) { if (e1 < e2) { e1 += characteristic; } diff --git a/src/Persistence_matrix/include/gudhi/Fields/Zp_field_shared.h b/src/Persistence_matrix/include/gudhi/Fields/Zp_field_shared.h index 2e9e3121af..4d3a74df0d 100644 --- a/src/Persistence_matrix/include/gudhi/Fields/Zp_field_shared.h +++ b/src/Persistence_matrix/include/gudhi/Fields/Zp_field_shared.h @@ -30,9 +30,9 @@ namespace persistence_fields { * @ingroup persistence_fields * * @brief Class representing an element of the \f$ \mathbb{F}_p \f$ field for any prime number \f$ p \f$. - * If each instanciation of the class can represent another element, they all share the same characteritics. + * If each instantiation of the class can represent another element, they all share the same characteristics. * That is if the characteristics are set for one, they will be set for all the others. The characteristics can - * be set before instianciating the elements with the static @ref Shared_Zp_field_element::initialize method. + * be set before instantiating the elements with the static @ref Shared_Zp_field_element::initialize method. * * @tparam Unsigned_integer_type A native unsigned integer type: unsigned int, long unsigned int, etc. * Will be used as the field element type. @@ -151,7 +151,7 @@ class Shared_Zp_field_element { * @brief operator-= */ friend void operator-=(Shared_Zp_field_element& f1, const Shared_Zp_field_element& f2) { - f1.element_ = Shared_Zp_field_element::_substract(f1.element_, f2.element_); + f1.element_ = Shared_Zp_field_element::_subtract(f1.element_, f2.element_); } /** * @brief operator- @@ -167,7 +167,7 @@ class Shared_Zp_field_element { */ template > friend void operator-=(Shared_Zp_field_element& f, const Integer_type& v) { - f.element_ = Shared_Zp_field_element::_substract(f.element_, _get_value(v)); + f.element_ = Shared_Zp_field_element::_subtract(f.element_, _get_value(v)); } /** * @brief operator- @@ -186,7 +186,7 @@ class Shared_Zp_field_element { */ template > friend Integer_type operator-(const Integer_type& v, const Shared_Zp_field_element& f) { - return Shared_Zp_field_element::_substract(_get_value(v), f.element_); + return Shared_Zp_field_element::_subtract(_get_value(v), f.element_); } /** @@ -372,7 +372,7 @@ class Shared_Zp_field_element { return element; } - static element_type _substract(element_type element, element_type v) { + static element_type _subtract(element_type element, element_type v) { if (element < v) { element += characteristic_; } diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/allocators/cell_constructors.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/allocators/cell_constructors.h index 12db311330..f13d92256f 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/allocators/cell_constructors.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/allocators/cell_constructors.h @@ -28,7 +28,7 @@ namespace persistence_matrix { * @private * @ingroup persistence_matrix * - * @brief @ref Cell factory. Constructs and destroyes cell pointers with new and delete. + * @brief @ref Cell factory. Constructs and destroys cell pointers with new and delete. * * @tparam Cell @ref Cell with the right templates. */ @@ -52,7 +52,7 @@ struct New_cell_constructor } /** - * @brief Destroyes the given cell. + * @brief Destroys the given cell. * * @param cell @ref Cell pointer. */ @@ -108,7 +108,7 @@ struct Pool_cell_constructor } /** - * @brief Destroyes the given cell. + * @brief Destroys the given cell. * * @param cell @ref Cell pointer. */ diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/base_matrix.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/base_matrix.h index e862061873..d2a827495b 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/base_matrix.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/base_matrix.h @@ -31,7 +31,7 @@ namespace persistence_matrix { * @brief A @ref basematrix "basic matrix" structure allowing to easily manipulate and access entire columns and rows, * but not individual cells. * - * @tparam Master_matrix An instanciation of @ref Matrix from which all types and options are deduced. + * @tparam Master_matrix An instantiation of @ref Matrix from which all types and options are deduced. */ template class Base_matrix : public Master_matrix::template Base_swap_option >, @@ -111,7 +111,7 @@ class Base_matrix : public Master_matrix::template Base_swap_option void add_to(const Cell_range_or_column_index& sourceColumn, index targetColumnIndex); /** - * @brief Multiplies the target column with the coefficiant and then adds the source column to it. + * @brief Multiplies the target column with the coefficient and then adds the source column to it. * That is: `targetColumn = (targetColumn * coefficient) + sourceColumn`. * * @tparam Cell_range_or_column_index Either a range of @ref Cell with a begin() and end() method, @@ -237,7 +237,7 @@ class Base_matrix : public Master_matrix::template Base_swap_option class Base_matrix_with_column_compression : protected Master_matrix::Matrix_row_access_option @@ -59,7 +59,7 @@ class Base_matrix_with_column_compression : protected Master_matrix::Matrix_row_ necessary external classes. */ /** - * @brief Type for columns. Only one for each "column class" is explicitely constructed. + * @brief Type for columns. Only one for each "column class" is explicitly constructed. */ class Column_type : public Master_matrix::Column_type, @@ -209,7 +209,7 @@ class Base_matrix_with_column_compression : protected Master_matrix::Matrix_row_ * removed from their columns. And in the case of intrusive rows, this will generate a segmentation fault when * the column cells are destroyed later. The row access is just meant as a "read only" access to the rows and the * @ref erase_empty_row method just as a way to specify that a row is empty and can therefore be removed from - * dictionnaries. This allows to avoid testing the emptiness of a row at each column cell removal, what can be + * dictionaries. This allows to avoid testing the emptiness of a row at each column cell removal, what can be * quite frequent. * * @param rowIndex @ref rowindex "Row index" of the empty row. @@ -237,7 +237,7 @@ class Base_matrix_with_column_compression : protected Master_matrix::Matrix_row_ template void add_to(const Cell_range_or_column_index& sourceColumn, index targetColumnIndex); /** - * @brief Multiplies the target column with the coefficiant and then adds the source column to it. + * @brief Multiplies the target column with the coefficient and then adds the source column to it. * That is: `targetColumn = (targetColumn * coefficient) + sourceColumn`. * * The representatives of redundant columns are summed together, which means that @@ -254,7 +254,7 @@ class Base_matrix_with_column_compression : protected Master_matrix::Matrix_row_ const Field_element_type& coefficient, index targetColumnIndex); /** - * @brief Multiplies the source column with the coefficiant before adding it to the target column. + * @brief Multiplies the source column with the coefficient before adding it to the target column. * That is: `targetColumn += (coefficient * sourceColumn)`. The source column will **not** be modified. * * The representatives of redundant columns are summed together, which means that @@ -348,7 +348,7 @@ class Base_matrix_with_column_compression : protected Master_matrix::Matrix_row_ index nextColumnIndex_; /**< Next unused column index. */ Column_settings* colSettings_; /**< Cell factory. */ /** - * @brief Column factory. Has to be a pointer as Simple_object_pool is not swappable, so their adresses have to be + * @brief Column factory. Has to be a pointer as Simple_object_pool is not swappable, so their addresses have to be * exchanged instead. */ std::unique_ptr > columnPool_; diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/base_pairing.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/base_pairing.h index 31676642d3..3e156888b0 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/base_pairing.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/base_pairing.h @@ -30,7 +30,7 @@ namespace persistence_matrix { * @ingroup persistence_matrix * * @brief Empty structure. - * Inheritated instead of @ref Base_pairing, when the computation of the barcode was not enabled or if the pairing + * Inherited instead of @ref Base_pairing, when the computation of the barcode was not enabled or if the pairing * is already managed by the vine update classes. */ struct Dummy_base_pairing { @@ -43,7 +43,7 @@ struct Dummy_base_pairing { * * @brief Class managing the barcode for @ref Boundary_matrix if the option was enabled. * - * @tparam Master_matrix An instanciation of @ref Matrix from which all types and options are deduced. + * @tparam Master_matrix An instantiation of @ref Matrix from which all types and options are deduced. */ template class Base_pairing @@ -98,17 +98,17 @@ class Base_pairing protected: using pos_index = typename Master_matrix::pos_index; - using dictionnary_type = typename Master_matrix::bar_dictionnary_type; + using dictionary_type = typename Master_matrix::bar_dictionary_type; using base_matrix = typename Master_matrix::Boundary_matrix_type; barcode_type barcode_; /**< Bar container. */ - dictionnary_type deathToBar_; /**< Map from death index to bar index. */ + dictionary_type deathToBar_; /**< Map from death index to bar index. */ bool isReduced_; /**< True if `_reduce()` was called. */ void _reduce(); void _remove_last(pos_index columnIndex); - //access to inheritating Boundary_matrix class + //access to inheriting Boundary_matrix class constexpr base_matrix* _matrix() { return static_cast(this); } constexpr const base_matrix* _matrix() const { return static_cast(this); } }; @@ -210,7 +210,7 @@ inline void Base_pairing::_remove_last(pos_index columnIndex) auto it = deathToBar_.find(columnIndex); if (it == deathToBar_.end()) { // birth - barcode_.pop_back(); // sorted by birth and columnIndex has to be the heighest one + barcode_.pop_back(); // sorted by birth and columnIndex has to be the highest one } else { // death barcode_[it->second].death = -1; deathToBar_.erase(it); diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/base_swap.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/base_swap.h index b1477bcb26..74841c9362 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/base_swap.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/base_swap.h @@ -28,7 +28,7 @@ namespace persistence_matrix { * @ingroup persistence_matrix * * @brief Empty structure. - * Inheritated instead of @ref Base_swap, when the column and row swaps are not enabled. + * Inherited instead of @ref Base_swap, when the column and row swaps are not enabled. */ struct Dummy_base_swap { friend void swap([[maybe_unused]] Dummy_base_swap& d1, [[maybe_unused]] Dummy_base_swap& d2) {} @@ -42,7 +42,7 @@ struct Dummy_base_swap { * * @brief Class managing the column and row swaps in @ref Base_matrix and @ref Boundary_matrix. * - * @tparam Master_matrix An instanciation of @ref Matrix from which all types and options are deduced. + * @tparam Master_matrix An instantiation of @ref Matrix from which all types and options are deduced. * @tparam Base_matrix Either @ref Base_matrix or @ref Boundary_matrix. */ template @@ -106,16 +106,16 @@ class Base_swap { } protected: - using index_dictionnary_type = typename Master_matrix::template dictionnary_type; - using row_dictionnary_type = typename Master_matrix::template dictionnary_type; + using index_dictionary_type = typename Master_matrix::template dictionary_type; + using row_dictionary_type = typename Master_matrix::template dictionary_type; - index_dictionnary_type indexToRow_; /**< Map from row index to actual index in row container. */ - row_dictionnary_type rowToIndex_; /**< Map from index in row container to "public" row index. */ + index_dictionary_type indexToRow_; /**< Map from row index to actual index in row container. */ + row_dictionary_type rowToIndex_; /**< Map from index in row container to "public" row index. */ bool rowSwapped_; /**< True if any rows were swapped since last call to `_orderRows()`. */ void _orderRows(); - //access to inheritating matrix class + //access to inheriting matrix class constexpr Base_matrix* _matrix() { return static_cast(this); } constexpr const Base_matrix* _matrix() const { return static_cast(this); } }; diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/boundary_matrix.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/boundary_matrix.h index 8556cfe248..04995aa7a9 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/boundary_matrix.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/boundary_matrix.h @@ -25,7 +25,7 @@ namespace Gudhi { namespace persistence_matrix { -// TODO: factorize/inheritate/compose with @ref basematrix "base matrix"? +// TODO: factorize/inherit/compose with base matrix? /** * @class Boundary_matrix boundary_matrix.h gudhi/Persistence_matrix/boundary_matrix.h * @ingroup persistence_matrix @@ -34,7 +34,7 @@ namespace persistence_matrix { * in order to compute its persistent homology. Provides an access to its columns and rows as well as the possibility * to remove the last faces of the filtration while maintaining a valid barcode. * - * @tparam Master_matrix An instanciation of @ref Matrix from which all types and options are deduced. + * @tparam Master_matrix An instantiation of @ref Matrix from which all types and options are deduced. */ template class Boundary_matrix : public Master_matrix::Matrix_dimension_option, @@ -69,7 +69,7 @@ class Boundary_matrix : public Master_matrix::Matrix_dimension_option, /** * @brief Constructs a new matrix from the given ranges of @ref Matrix::cell_rep_type. Each range corresponds to * a column (the order of the ranges are preserved). The content of the ranges is assumed to be sorted by increasing - * IDs. The IDs of the simplices are also assumed to be consecutifs, ordered by filtration value, starting with 0. + * IDs. The IDs of the simplices are also assumed to be consecutive, ordered by filtration value, starting with 0. * * @tparam Boundary_type Range type for @ref Matrix::cell_rep_type ranges. * Assumed to have a begin(), end() and size() method. @@ -77,7 +77,7 @@ class Boundary_matrix : public Master_matrix::Matrix_dimension_option, * filtered **simplicial** complex, whose boundaries are ordered by filtration order. * Therefore, `orderedBoundaries[i]` should store the boundary of the \f$ i^{th} \f$ simplex in the filtration, * as an ordered list of indices of its facets (again those indices correspond to their respective position - * in the matrix). That is why the indices of the simplices are assumed to be consecutifs and starting with 0 + * in the matrix). That is why the indices of the simplices are assumed to be consecutive and starting with 0 * (an empty boundary is interpreted as a vertex boundary and not as a non existing simplex). * All dimensions up to the maximal dimension of interest have to be present. If only a higher dimension is of * interest and not everything should be stored, then use the @ref insert_boundary method instead @@ -128,7 +128,7 @@ class Boundary_matrix : public Master_matrix::Matrix_dimension_option, * a more general cell complex. This includes cubical complexes or Morse complexes for example. * * At the insertion, the boundary will be copied as is. The column will only be reduced later when the barcode - * is requested in order to apply some optimisations with the additional knowledge. Hence, the barcode will also + * is requested in order to apply some optimizations with the additional knowledge. Hence, the barcode will also * not be updated, so call @ref Base_pairing::get_current_barcode "get_current_barcode" only when the matrix is * complete. * @@ -149,7 +149,7 @@ class Boundary_matrix : public Master_matrix::Matrix_dimension_option, * the faces are inserted by order of filtration), it is sufficient to indicate the ID of the face being inserted. * * @tparam Boundary_type Range of @ref Matrix::cell_rep_type. Assumed to have a begin(), end() and size() method. - * @param faceIndex @ref IDIdx index to use to indentify the new face. + * @param faceIndex @ref IDIdx index to use to identify the new face. * @param boundary Boundary generating the new column. The indices of the boundary have to correspond to the * @p faceIndex values of precedent calls of the method for the corresponding faces and should be ordered in * increasing order. @@ -165,7 +165,7 @@ class Boundary_matrix : public Master_matrix::Matrix_dimension_option, * * Note that before returning the column, all column cells can eventually be reordered, if lazy swaps occurred. * It is therefore recommended to avoid calling @ref get_column between column or row swaps, otherwise the benefits - * of the the lazyness is lost. + * of the the laziness is lost. * * @param columnIndex @ref MatIdx index of the column to return. * @return Reference to the column. @@ -178,7 +178,7 @@ class Boundary_matrix : public Master_matrix::Matrix_dimension_option, * * Note that before returning the row, all column cells can eventually be reordered, if lazy swaps occurred. * It is therefore recommended to avoid calling @ref get_row between column or row swaps, otherwise the benefits - * of the the lazyness is lost. + * of the the laziness is lost. * * @param rowIndex @ref rowindex "Row index" of the row to return. * @return Reference to the row. @@ -201,7 +201,7 @@ class Boundary_matrix : public Master_matrix::Matrix_dimension_option, * removed from their columns. And in the case of intrusive rows, this will generate a segmentation fault when * the column cells are destroyed later. The row access is just meant as a "read only" access to the rows and the * @ref erase_empty_row method just as a way to specify that a row is empty and can therefore be removed from - * dictionnaries. This allows to avoid testing the emptiness of a row at each column cell removal, what can be + * dictionaries. This allows to avoid testing the emptiness of a row at each column cell removal, what can be * quite frequent. * * @param rowIndex @ref rowindex "Row index" of the empty row. @@ -235,7 +235,7 @@ class Boundary_matrix : public Master_matrix::Matrix_dimension_option, */ void add_to(index sourceColumnIndex, index targetColumnIndex); /** - * @brief Multiplies the target column with the coefficiant and then adds the source column to it. + * @brief Multiplies the target column with the coefficient and then adds the source column to it. * That is: `targetColumn = (targetColumn * coefficient) + sourceColumn`. * * @warning They will be no verification to ensure that the addition makes sense for the validity of a @@ -250,7 +250,7 @@ class Boundary_matrix : public Master_matrix::Matrix_dimension_option, const Field_element_type& coefficient, index targetColumnIndex); /** - * @brief Multiplies the source column with the coefficiant before adding it to the target column. + * @brief Multiplies the source column with the coefficient before adding it to the target column. * That is: `targetColumn += (coefficient * sourceColumn)`. The source column will **not** be modified. * * @warning They will be no verification to ensure that the addition makes sense for the validity of a @@ -306,7 +306,7 @@ class Boundary_matrix : public Master_matrix::Matrix_dimension_option, * @brief Returns the pivot of the given column. * * @param columnIndex @ref MatIdx index of the column. - * @return Pivot of the coluimn at @p columnIndex. + * @return Pivot of the column at @p columnIndex. */ index get_pivot(index columnIndex); diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/chain_matrix.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/chain_matrix.h index 6202ef0e99..0dcfe3ce5d 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/chain_matrix.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/chain_matrix.h @@ -39,7 +39,7 @@ namespace persistence_matrix { * computed, as well as representative cycles. Supports vineyards (see @cite vineyards) and the removal * of maximal faces while maintaining a valid barcode. Provides an access to its columns and rows. * - * @tparam Master_matrix An instanciation of @ref Matrix from which all types and options are deduced. + * @tparam Master_matrix An instantiation of @ref Matrix from which all types and options are deduced. */ template class Chain_matrix : public Master_matrix::Matrix_dimension_option, @@ -80,7 +80,7 @@ class Chain_matrix : public Master_matrix::Matrix_dimension_option, /** * @brief Constructs a new matrix from the given ranges of @ref Matrix::cell_rep_type. Each range corresponds to a * column (the order of the ranges are preserved). The content of the ranges is assumed to be sorted by increasing - * IDs. The IDs of the simplices are also assumed to be consecutifs, ordered by filtration value, starting with 0. + * IDs. The IDs of the simplices are also assumed to be consecutive, ordered by filtration value, starting with 0. * Only available if @ref PersistenceMatrixOptions::has_column_pairings is true or * @ref PersistenceMatrixOptions::has_vine_update is false. Otherwise, birth and death * comparators have to be provided. @@ -91,7 +91,7 @@ class Chain_matrix : public Master_matrix::Matrix_dimension_option, * filtered **simplicial** complex, whose boundaries are ordered by filtration order. * Therefore, `orderedBoundaries[i]` should store the boundary of the \f$ i^{th} \f$ simplex in the filtration, * as an ordered list of indices of its facets (again those indices correspond to their respective position - * in the matrix). That is why the indices of the simplices are assumed to be consecutifs and starting with 0 + * in the matrix). That is why the indices of the simplices are assumed to be consecutive and starting with 0 * (an empty boundary is interpreted as a vertex boundary and not as a non existing simplex). * All dimensions up to the maximal dimension of interest have to be present. If only a higher dimension is of * interest and not everything should be stored, then use the @ref insert_boundary method instead @@ -142,7 +142,7 @@ class Chain_matrix : public Master_matrix::Matrix_dimension_option, /** * @brief Constructs a new matrix from the given ranges of @ref Matrix::cell_rep_type. Each range corresponds to a * column (the order of the ranges are preserved). The content of the ranges is assumed to be sorted by increasing - * IDs. The IDs of the simplices are also assumed to be consecutifs, ordered by filtration value, starting with 0. + * IDs. The IDs of the simplices are also assumed to be consecutive, ordered by filtration value, starting with 0. * * @warning If @ref PersistenceMatrixOptions::has_vine_update is false, the comparators are not used. * And if @ref PersistenceMatrixOptions::has_vine_update is true, but @@ -157,7 +157,7 @@ class Chain_matrix : public Master_matrix::Matrix_dimension_option, * filtered **simplicial** complex, whose boundaries are ordered by filtration order. * Therefore, `orderedBoundaries[i]` should store the boundary of the \f$ i^{th} \f$ simplex in the filtration, * as an ordered list of indices of its facets (again those indices correspond to their respective position - * in the matrix). That is why the indices of the simplices are assumed to be consecutifs and starting with 0 + * in the matrix). That is why the indices of the simplices are assumed to be consecutive and starting with 0 * (an empty boundary is interpreted as a vertex boundary and not as a non existing simplex). * All dimensions up to the maximal dimension of interest have to be present. If only a higher dimension is of * interest and not everything should be stored, then use the @ref insert_boundary method instead @@ -255,7 +255,7 @@ class Chain_matrix : public Master_matrix::Matrix_dimension_option, * the faces are inserted by order of filtration), it is sufficient to indicate the ID of the face being inserted. * * @tparam Boundary_type Range of @ref Matrix::cell_rep_type. Assumed to have a begin(), end() and size() method. - * @param faceID @ref IDIdx index to use to indentify the new face. + * @param faceID @ref IDIdx index to use to identify the new face. * @param boundary Boundary generating the new column. The indices of the boundary have to correspond to the * @p faceID values of precedent calls of the method for the corresponding faces and should be ordered in * increasing order. @@ -365,7 +365,7 @@ class Chain_matrix : public Master_matrix::Matrix_dimension_option, */ void add_to(index sourceColumnIndex, index targetColumnIndex); /** - * @brief Multiplies the target column with the coefficiant and then adds the source column to it. + * @brief Multiplies the target column with the coefficient and then adds the source column to it. * That is: `targetColumn = (targetColumn * coefficient) + sourceColumn`. * * @warning They will be no verification to ensure that the addition makes sense for the validity of a @@ -380,7 +380,7 @@ class Chain_matrix : public Master_matrix::Matrix_dimension_option, const Field_element_type& coefficient, index targetColumnIndex); /** - * @brief Multiplies the source column with the coefficiant before adding it to the target column. + * @brief Multiplies the source column with the coefficient before adding it to the target column. * That is: `targetColumn += (coefficient * sourceColumn)`. The source column will **not** be modified. * * @warning They will be no verification to ensure that the addition makes sense for the validity of a @@ -480,9 +480,9 @@ class Chain_matrix : public Master_matrix::Matrix_dimension_option, using rep_opt = typename Master_matrix::Chain_representative_cycles_option; using ra_opt = typename Master_matrix::Matrix_row_access_option; using matrix_type = typename Master_matrix::column_container_type; - using dictionnary_type = typename Master_matrix::template dictionnary_type; + using dictionary_type = typename Master_matrix::template dictionary_type; using barcode_type = typename Master_matrix::barcode_type; - using bar_dictionnary_type = typename Master_matrix::bar_dictionnary_type; + using bar_dictionary_type = typename Master_matrix::bar_dictionary_type; using tmp_column_type = typename std::conditional< Master_matrix::Option_list::is_z2, std::set, @@ -490,7 +490,7 @@ class Chain_matrix : public Master_matrix::Matrix_dimension_option, >::type; matrix_type matrix_; /**< Column container. */ - dictionnary_type pivotToColumnIndex_; /**< Map from @ref IDIdx to @ref MatIdx index. */ + dictionary_type pivotToColumnIndex_; /**< Map from @ref IDIdx to @ref MatIdx index. */ index nextIndex_; /**< Next unused column index. */ Column_settings* colSettings_; /**< Cell factory. */ @@ -513,7 +513,7 @@ class Chain_matrix : public Master_matrix::Matrix_dimension_option, void _container_insert(const Column_type& column, [[maybe_unused]] index pos = 0); constexpr barcode_type& _barcode(); - constexpr bar_dictionnary_type& _indexToBar(); + constexpr bar_dictionary_type& _indexToBar(); constexpr pos_index& _nextPosition(); }; @@ -792,7 +792,7 @@ inline void Chain_matrix::remove_last() if (nextIndex_ == 0 || matrix_.empty()) return; // empty matrix if constexpr (Master_matrix::Option_list::has_vine_update) { - // carefull: linear because of the search of the last index. It is better to keep track of the @ref IDIdx index + // careful: linear because of the search of the last index. It is better to keep track of the @ref IDIdx index // of the last column while performing swaps (or the @ref MatIdx with the return values of `vine_swap` + get_pivot) // and then call `remove_maximal_face` with it and an empty `columnsToSwap`. @@ -1008,7 +1008,7 @@ inline std::vector Chain_matrix::barcode_type& Chain_matri } template -inline constexpr typename Chain_matrix::bar_dictionnary_type& +inline constexpr typename Chain_matrix::bar_dictionary_type& Chain_matrix::_indexToBar() { if constexpr (Master_matrix::Option_list::has_vine_update) diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/chain_pairing.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/chain_pairing.h index cc0521a246..78d97a41a5 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/chain_pairing.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/chain_pairing.h @@ -27,7 +27,7 @@ namespace persistence_matrix { * @ingroup persistence_matrix * * @brief Empty structure. - * Inheritated instead of @ref Chain_pairing, when the computation of the barcode was not enabled or if the pairing + * Inherited instead of @ref Chain_pairing, when the computation of the barcode was not enabled or if the pairing * is already managed by the vine update classes. */ struct Dummy_chain_pairing { @@ -40,7 +40,7 @@ struct Dummy_chain_pairing { * * @brief Class managing the barcode for @ref Chain_matrix if the option was enabled. * - * @tparam Master_matrix An instanciation of @ref Matrix from which all types and options are deduced. + * @tparam Master_matrix An instantiation of @ref Matrix from which all types and options are deduced. */ template class Chain_pairing @@ -87,11 +87,11 @@ class Chain_pairing } protected: - using dictionnary_type = typename Master_matrix::bar_dictionnary_type; + using dictionary_type = typename Master_matrix::bar_dictionary_type; using pos_index = typename Master_matrix::pos_index; barcode_type barcode_; /**< Bar container. */ - dictionnary_type indexToBar_; /**< Map from @ref MatIdx index to bar index. */ + dictionary_type indexToBar_; /**< Map from @ref MatIdx index to bar index. */ pos_index nextPosition_; /**< Next relative position in the filtration. */ }; diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/chain_rep_cycles.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/chain_rep_cycles.h index bebc20ec1d..a5a8996668 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/chain_rep_cycles.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/chain_rep_cycles.h @@ -29,7 +29,7 @@ namespace persistence_matrix { * @ingroup persistence_matrix * * @brief Empty structure. - * Inheritated instead of @ref Chain_representative_cycles, when the computation of the representative cycles + * Inherited instead of @ref Chain_representative_cycles, when the computation of the representative cycles * were not enabled. */ struct Dummy_chain_representative_cycles { @@ -44,7 +44,7 @@ struct Dummy_chain_representative_cycles { * * @brief Class managing the representative cycles for @ref Chain_matrix if the option was enabled. * - * @tparam Master_matrix An instanciation of @ref Matrix from which all types and options are deduced. + * @tparam Master_matrix An instantiation of @ref Matrix from which all types and options are deduced. */ template class Chain_representative_cycles @@ -111,7 +111,7 @@ class Chain_representative_cycles std::vector representativeCycles_; /**< Cycle container. */ std::vector birthToCycle_; /**< Map from birth index to cycle index. */ - //access to inheritating Chain_matrix class + //access to inheriting Chain_matrix class constexpr chain_matrix* _matrix() { return static_cast(this); } constexpr const chain_matrix* _matrix() const { return static_cast(this); } }; diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/chain_vine_swap.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/chain_vine_swap.h index 65ceaa3864..947c16cdac 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/chain_vine_swap.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/chain_vine_swap.h @@ -50,7 +50,7 @@ constexpr bool _no_G_death_comparator([[maybe_unused]] unsigned int columnIndex1 * @ingroup persistence_matrix * * @brief Empty structure. - * Inheritated instead of @ref Chain_vine_swap, when vine swappes are not enabled. + * Inherited instead of @ref Chain_vine_swap, when vine swaps are not enabled. */ struct Dummy_chain_vine_swap { friend void swap([[maybe_unused]] Dummy_chain_vine_swap& d1, [[maybe_unused]] Dummy_chain_vine_swap& d2) {} @@ -65,7 +65,7 @@ struct Dummy_chain_vine_swap { * @ingroup persistence_matrix * * @brief Empty structure. - * Inheritated instead of @ref Chain_barcode_swap, when the barcode is not stored. + * Inherited instead of @ref Chain_barcode_swap, when the barcode is not stored. */ struct Dummy_chain_vine_pairing { friend void swap([[maybe_unused]] Dummy_chain_vine_pairing& d1, [[maybe_unused]] Dummy_chain_vine_pairing& d2) {} @@ -76,7 +76,7 @@ struct Dummy_chain_vine_pairing { * * @brief Class managing the barcode for @ref Chain_vine_swap. * - * @tparam Master_matrix An instanciation of @ref Matrix from which all types and options are deduced. + * @tparam Master_matrix An instantiation of @ref Matrix from which all types and options are deduced. */ template class Chain_barcode_swap : public Chain_pairing @@ -106,9 +106,9 @@ class Chain_barcode_swap : public Chain_pairing : CP(std::move(static_cast(other))), pivotToPosition_(std::move(other.pivotToPosition_)){}; protected: - using dictionnary_type = typename Master_matrix::template dictionnary_type; + using dictionary_type = typename Master_matrix::template dictionary_type; - dictionnary_type pivotToPosition_; // necessary to keep track of the barcode changes + dictionary_type pivotToPosition_; // necessary to keep track of the barcode changes void swap_positions(id_index pivot1, id_index pivot2) { if constexpr (Master_matrix::Option_list::has_map_column_container) { @@ -198,7 +198,7 @@ class Chain_barcode_swap : public Chain_pairing pos_index _get_pivot_position(id_index pivot) const { if constexpr (Master_matrix::Option_list::has_map_column_container) { return pivotToPosition_.at( - pivot); // quite often called, make public and pass position instead of pivot to avoid find() everytime? + pivot); // quite often called, make public and pass position instead of pivot to avoid find() every time? } else { return pivotToPosition_[pivot]; } @@ -227,7 +227,7 @@ class Chain_barcode_swap : public Chain_pairing * * @brief Class managing the vine swaps for @ref Chain_matrix. * - * @tparam Master_matrix An instanciation of @ref Matrix from which all types and options are deduced. + * @tparam Master_matrix An instantiation of @ref Matrix from which all types and options are deduced. */ template class Chain_vine_swap : public std::conditional::index Chain_vine_swapget_pivot(columnIndex1), _matrix()->get_pivot(columnIndex2)), std::invalid_argument( - "Chain_vine_swap::vine_swap - Columns to be swaped need to be adjacent in the 'real' matrix.")); + "Chain_vine_swap::vine_swap - Columns to be swapped need to be adjacent in the 'real' matrix.")); } const bool col1IsNeg = _is_negative_in_pair(columnIndex1); diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/cell_types.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/cell_types.h index 77ecee572a..b56258d6d7 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/cell_types.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/cell_types.h @@ -31,7 +31,7 @@ namespace persistence_matrix { * @ingroup persistence_matrix * * @brief Empty structure. - * Inheritated instead of @ref Cell_column_index, when the row access is disabled. + * Inherited instead of @ref Cell_column_index, when the row access is disabled. */ struct Dummy_cell_column_index_mixin { @@ -44,7 +44,7 @@ struct Dummy_cell_column_index_mixin * @ingroup persistence_matrix * * @brief Empty structure. - * Inheritated instead of @ref Cell_field_element, when @ref PersistenceMatrixOptions::is_z2 is true. + * Inherited instead of @ref Cell_field_element, when @ref PersistenceMatrixOptions::is_z2 is true. */ struct Dummy_cell_field_element_mixin { @@ -183,9 +183,9 @@ class Cell_field_element * * @brief %Matrix cell class. Stores by default only the row index it belongs to, but can also store its * column index when the row access is enabled, as well as its value when they are different from only 0 and 1. - * Zero-valued cells are never explicited in the matrix. + * Zero-valued cells are never made explicit in the matrix. * - * @tparam Master_matrix An instanciation of @ref Matrix from which all types and options are deduced. + * @tparam Master_matrix An instantiation of @ref Matrix from which all types and options are deduced. */ template class Cell : public Master_matrix::Cell_column_index_option, @@ -312,7 +312,7 @@ class Cell : public Master_matrix::Cell_column_index_option, * * @brief Hash method for @ref Gudhi::persistence_matrix::Cell. * - * The cells are differentiated by their row indices only. For exemple, two cells with the same row index + * The cells are differentiated by their row indices only. For example, two cells with the same row index * but different column indices have the same hash value. * * @tparam Master_matrix Template parameter of @ref Gudhi::persistence_matrix::Cell. diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/chain_column_extra_properties.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/chain_column_extra_properties.h index 6187f67a0f..e55fd53e2d 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/chain_column_extra_properties.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/chain_column_extra_properties.h @@ -27,7 +27,7 @@ namespace persistence_matrix { * @ingroup persistence_matrix * * @brief Empty structure. - * Inheritated instead of @ref Chain_column_extra_properties, when the columns are not meant for + * Inherited instead of @ref Chain_column_extra_properties, when the columns are not meant for * @ref chainmatrix "chain matrices". */ struct Dummy_chain_properties @@ -50,7 +50,7 @@ struct Dummy_chain_properties * the image of the bijection if the column is in either \f$ G \f$ or \f$ H \f$. See @cite zigzag for * more details. * - * @tparam Master_matrix An instanciation of @ref Matrix from which all types and options are deduced. + * @tparam Master_matrix An instantiation of @ref Matrix from which all types and options are deduced. */ template class Chain_column_extra_properties @@ -113,7 +113,7 @@ class Chain_column_extra_properties */ void assign_paired_chain(index other_col) { pairedColumn_ = other_col; } /** - * @brief Unpairs a column. + * @brief Un-pairs a column. */ void unassign_paired_chain() { pairedColumn_ = -1; }; diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/column_dimension_holder.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/column_dimension_holder.h index d32af86c1b..5ec0157609 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/column_dimension_holder.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/column_dimension_holder.h @@ -27,7 +27,7 @@ namespace persistence_matrix { * @ingroup persistence_matrix * * @brief Empty structure. - * Inheritated instead of @ref Column_dimension_holder, when the columns are not storing a dimension. + * Inherited instead of @ref Column_dimension_holder, when the columns are not storing a dimension. */ struct Dummy_dimension_holder { @@ -44,7 +44,7 @@ struct Dummy_dimension_holder * * @brief Class managing the dimension access of a column. * - * @tparam Master_matrix An instanciation of @ref Matrix from which all types and options are deduced. + * @tparam Master_matrix An instantiation of @ref Matrix from which all types and options are deduced. */ template struct Column_dimension_holder diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/column_utilities.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/column_utilities.h index 642a9142a6..34643badf5 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/column_utilities.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/column_utilities.h @@ -200,7 +200,7 @@ bool _multiply_source_and_add_to_column(const typename Column_type::Field_elemen } // column has to be ordered (ie. not suited for unordered_map and heap) and contain the exact values -// (ie. not suited for vector and heap). A same colonne but ordered differently will have another hash value. +// (ie. not suited for vector and heap). A same column but ordered differently will have another hash value. template std::size_t hash_column(const Column_type& column) { std::size_t seed = 0; diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/heap_column.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/heap_column.h index 947bedacb0..a0ba011807 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/heap_column.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/heap_column.h @@ -40,10 +40,10 @@ namespace persistence_matrix { * Column based on a heap structure. The heap is represented as a vector sorted as a heap. The top of the heap is * the cell with the biggest row index. The sum of two columns is lazy: the content of the source is simply inserted * into the heap of the target. Therefore the underlying vector can contain several cells with the same row index. - * The real value of a cell at a row index corresponds to the sum in the coeffcient field of all values with same - * row index. Additionaly, the given cell range added into the heap does not need to be somehow ordered. + * The real value of a cell at a row index corresponds to the sum in the coefficient field of all values with same + * row index. Additionally, the given cell range added into the heap does not need to be somehow ordered. * - * @tparam Master_matrix An instanciation of @ref Matrix from which all types and options are deduced. + * @tparam Master_matrix An instantiation of @ref Matrix from which all types and options are deduced. * @tparam Cell_constructor Factory of @ref Cell classes. */ template @@ -254,10 +254,15 @@ class Heap_column : public Master_matrix::Column_dimension_option, public Master template inline Heap_column::Heap_column(Column_settings* colSettings) - : dim_opt(), chain_opt(), insertsSinceLastPrune_(0), operators_(nullptr), cellPool_(colSettings == nullptr ? nullptr : &(colSettings->cellConstructor)) + : dim_opt(), + chain_opt(), + insertsSinceLastPrune_(0), + operators_(nullptr), + cellPool_(colSettings == nullptr ? nullptr : &(colSettings->cellConstructor)) { - if (colSettings == nullptr) return; //to allow default constructor which gives a dummy column - if constexpr (!Master_matrix::Option_list::is_z2){ + if (colSettings == nullptr) return; // to allow default constructor which gives a dummy column + + if constexpr (!Master_matrix::Option_list::is_z2) { operators_ = &(colSettings->operators); } } @@ -596,7 +601,7 @@ inline typename Heap_column::id_index Heap_column::get_pivot() { static_assert(Master_matrix::isNonBasic, - "Method not available for base columns."); // could technically be, but is the notion usefull then? + "Method not available for base columns."); // could technically be, but is the notion useful then? if constexpr (Master_matrix::Option_list::is_of_boundary_type) { Cell* pivot = _pop_pivot(); @@ -616,7 +621,7 @@ inline typename Heap_column::Field_element_type Heap_column::get_pivot_value() { static_assert(Master_matrix::isNonBasic, - "Method not available for base columns."); // could technically be, but is the notion usefull then? + "Method not available for base columns."); // could technically be, but is the notion useful then? if constexpr (Master_matrix::Option_list::is_z2) { return 1; @@ -702,7 +707,7 @@ inline Heap_column& Heap_column::operator+=(const { static_assert((!Master_matrix::isNonBasic || std::is_same_v), "For boundary columns, the range has to be a column of same type to help ensure the validity of the " - "base element."); // could be removed, if we give the responsability to the user. + "base element."); // could be removed, if we give the responsibility to the user. static_assert((!Master_matrix::isNonBasic || Master_matrix::Option_list::is_of_boundary_type), "For chain columns, the given column cannot be constant."); @@ -767,7 +772,7 @@ inline Heap_column& Heap_column::multiply_target_a { static_assert((!Master_matrix::isNonBasic || std::is_same_v), "For boundary columns, the range has to be a column of same type to help ensure the validity of the " - "base element."); // could be removed, if we give the responsability to the user. + "base element."); // could be removed, if we give the responsibility to the user. static_assert((!Master_matrix::isNonBasic || Master_matrix::Option_list::is_of_boundary_type), "For chain columns, the given column cannot be constant."); @@ -829,7 +834,7 @@ inline Heap_column& Heap_column::multiply_source_a { static_assert((!Master_matrix::isNonBasic || std::is_same_v), "For boundary columns, the range has to be a column of same type to help ensure the validity of the " - "base element."); // could be removed, if we give the responsability to the user. + "base element."); // could be removed, if we give the responsibility to the user. static_assert((!Master_matrix::isNonBasic || Master_matrix::Option_list::is_of_boundary_type), "For chain columns, the given column cannot be constant."); @@ -879,7 +884,7 @@ inline Heap_column& Heap_column::multiply_source_a template inline Heap_column& Heap_column::operator=(const Heap_column& other) { - static_assert(!Master_matrix::Option_list::has_row_access, "= assignement not enabled with row access option."); + static_assert(!Master_matrix::Option_list::has_row_access, "= assignment not enabled with row access option."); dim_opt::operator=(other); chain_opt::operator=(other); diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/intrusive_list_column.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/intrusive_list_column.h index a6381ec3f2..b73ae2806b 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/intrusive_list_column.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/intrusive_list_column.h @@ -40,7 +40,7 @@ namespace persistence_matrix { * Column based on a intrusive list structure. The cells are always ordered by row index and only non-zero values * are stored uniquely in the underlying container. * - * @tparam Master_matrix An instanciation of @ref Matrix from which all types and options are deduced. + * @tparam Master_matrix An instantiation of @ref Matrix from which all types and options are deduced. * @tparam Cell_constructor Factory of @ref Cell classes. */ template @@ -559,7 +559,7 @@ inline typename Intrusive_list_column::id_index Intrusive_list_column::get_pivot() const { static_assert(Master_matrix::isNonBasic, - "Method not available for base columns."); // could technically be, but is the notion usefull then? + "Method not available for base columns."); // could technically be, but is the notion useful then? if constexpr (Master_matrix::Option_list::is_of_boundary_type) { if (column_.empty()) return -1; @@ -574,7 +574,7 @@ inline typename Intrusive_list_column::Field_element_type Intrusive_list_column::get_pivot_value() const { static_assert(Master_matrix::isNonBasic, - "Method not available for base columns."); // could technically be, but is the notion usefull then? + "Method not available for base columns."); // could technically be, but is the notion useful then? if constexpr (Master_matrix::Option_list::is_z2) { return 1; @@ -655,7 +655,7 @@ Intrusive_list_column::operator+=(const Cell_range& column) { static_assert((!Master_matrix::isNonBasic || std::is_same_v), "For boundary columns, the range has to be a column of same type to help ensure the validity of the " - "base element."); // could be removed, if we give the responsability to the user. + "base element."); // could be removed, if we give the responsibility to the user. static_assert((!Master_matrix::isNonBasic || Master_matrix::Option_list::is_of_boundary_type), "For chain columns, the given column cannot be constant."); @@ -724,7 +724,7 @@ Intrusive_list_column::multiply_target_and_add(const Field_elemen { static_assert((!Master_matrix::isNonBasic || std::is_same_v), "For boundary columns, the range has to be a column of same type to help ensure the validity of the " - "base element."); // could be removed, if we give the responsability to the user. + "base element."); // could be removed, if we give the responsibility to the user. static_assert((!Master_matrix::isNonBasic || Master_matrix::Option_list::is_of_boundary_type), "For chain columns, the given column cannot be constant."); @@ -788,7 +788,7 @@ Intrusive_list_column::multiply_source_and_add(const Cell_range& { static_assert((!Master_matrix::isNonBasic || std::is_same_v), "For boundary columns, the range has to be a column of same type to help ensure the validity of the " - "base element."); // could be removed, if we give the responsability to the user. + "base element."); // could be removed, if we give the responsibility to the user. static_assert((!Master_matrix::isNonBasic || Master_matrix::Option_list::is_of_boundary_type), "For chain columns, the given column cannot be constant."); @@ -840,7 +840,7 @@ template inline Intrusive_list_column& Intrusive_list_column::operator=(const Intrusive_list_column& other) { - static_assert(!Master_matrix::Option_list::has_row_access, "= assignement not enabled with row access option."); + static_assert(!Master_matrix::Option_list::has_row_access, "= assignment not enabled with row access option."); dim_opt::operator=(other); chain_opt::operator=(other); diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/intrusive_set_column.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/intrusive_set_column.h index 822bfa3be5..6f23ed07f0 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/intrusive_set_column.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/intrusive_set_column.h @@ -41,7 +41,7 @@ namespace persistence_matrix { * Column based on a intrusive set structure. The cells are ordered by row index and only non-zero values * are stored uniquely in the underlying container. * - * @tparam Master_matrix An instanciation of @ref Matrix from which all types and options are deduced. + * @tparam Master_matrix An instantiation of @ref Matrix from which all types and options are deduced. * @tparam Cell_constructor Factory of @ref Cell classes. */ template @@ -564,7 +564,7 @@ inline typename Intrusive_set_column::id_index Intrusive_set_column::get_pivot() const { static_assert(Master_matrix::isNonBasic, - "Method not available for base columns."); // could technically be, but is the notion usefull then? + "Method not available for base columns."); // could technically be, but is the notion useful then? if constexpr (Master_matrix::Option_list::is_of_boundary_type) { if (column_.empty()) return -1; @@ -579,7 +579,7 @@ inline typename Intrusive_set_column::Field_element_type Intrusive_set_column::get_pivot_value() const { static_assert(Master_matrix::isNonBasic, - "Method not available for base columns."); // could technically be, but is the notion usefull then? + "Method not available for base columns."); // could technically be, but is the notion useful then? if constexpr (Master_matrix::Option_list::is_z2) { return 1; @@ -660,7 +660,7 @@ Intrusive_set_column::operator+=(const Cell_range& column) { static_assert((!Master_matrix::isNonBasic || std::is_same_v), "For boundary columns, the range has to be a column of same type to help ensure the validity of the " - "base element."); // could be removed, if we give the responsability to the user. + "base element."); // could be removed, if we give the responsibility to the user. static_assert((!Master_matrix::isNonBasic || Master_matrix::Option_list::is_of_boundary_type), "For chain columns, the given column cannot be constant."); @@ -729,7 +729,7 @@ Intrusive_set_column::multiply_target_and_add(const Field_element { static_assert((!Master_matrix::isNonBasic || std::is_same_v), "For boundary columns, the range has to be a column of same type to help ensure the validity of the " - "base element."); // could be removed, if we give the responsability to the user. + "base element."); // could be removed, if we give the responsibility to the user. static_assert((!Master_matrix::isNonBasic || Master_matrix::Option_list::is_of_boundary_type), "For chain columns, the given column cannot be constant."); @@ -793,7 +793,7 @@ Intrusive_set_column::multiply_source_and_add(const Cell_range& c { static_assert((!Master_matrix::isNonBasic || std::is_same_v), "For boundary columns, the range has to be a column of same type to help ensure the validity of the " - "base element."); // could be removed, if we give the responsability to the user. + "base element."); // could be removed, if we give the responsibility to the user. static_assert((!Master_matrix::isNonBasic || Master_matrix::Option_list::is_of_boundary_type), "For chain columns, the given column cannot be constant."); @@ -845,7 +845,7 @@ template inline Intrusive_set_column& Intrusive_set_column::operator=(const Intrusive_set_column& other) { - static_assert(!Master_matrix::Option_list::has_row_access, "= assignement not enabled with row access option."); + static_assert(!Master_matrix::Option_list::has_row_access, "= assignment not enabled with row access option."); dim_opt::operator=(other); chain_opt::operator=(other); diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/list_column.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/list_column.h index 0beae05f00..0dd1145b95 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/list_column.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/list_column.h @@ -41,7 +41,7 @@ namespace persistence_matrix { * Column based on a list structure. The cells are always ordered by row index and only non-zero values * are stored uniquely in the underlying container. * - * @tparam Master_matrix An instanciation of @ref Matrix from which all types and options are deduced. + * @tparam Master_matrix An instantiation of @ref Matrix from which all types and options are deduced. * @tparam Cell_constructor Factory of @ref Cell classes. */ template @@ -554,7 +554,7 @@ inline typename List_column::id_index List_column::get_pivot() const { static_assert(Master_matrix::isNonBasic, - "Method not available for base columns."); // could technically be, but is the notion usefull then? + "Method not available for base columns."); // could technically be, but is the notion useful then? if constexpr (Master_matrix::Option_list::is_of_boundary_type) { if (column_.empty()) return -1; @@ -569,7 +569,7 @@ inline typename List_column::Field_element_type List_column::get_pivot_value() const { static_assert(Master_matrix::isNonBasic, - "Method not available for base columns."); // could technically be, but is the notion usefull then? + "Method not available for base columns."); // could technically be, but is the notion useful then? if constexpr (Master_matrix::Option_list::is_z2) { return 1; @@ -650,7 +650,7 @@ inline List_column& List_column::operator+=( { static_assert((!Master_matrix::isNonBasic || std::is_same_v), "For boundary columns, the range has to be a column of same type to help ensure the validity of the " - "base element."); // could be removed, if we give the responsability to the user. + "base element."); // could be removed, if we give the responsibility to the user. static_assert((!Master_matrix::isNonBasic || Master_matrix::Option_list::is_of_boundary_type), "For chain columns, the given column cannot be constant."); @@ -718,7 +718,7 @@ inline List_column& List_column::multiply_target_a { static_assert((!Master_matrix::isNonBasic || std::is_same_v), "For boundary columns, the range has to be a column of same type to help ensure the validity of the " - "base element."); // could be removed, if we give the responsability to the user. + "base element."); // could be removed, if we give the responsibility to the user. static_assert((!Master_matrix::isNonBasic || Master_matrix::Option_list::is_of_boundary_type), "For chain columns, the given column cannot be constant."); @@ -780,7 +780,7 @@ inline List_column& List_column::multiply_source_a { static_assert((!Master_matrix::isNonBasic || std::is_same_v), "For boundary columns, the range has to be a column of same type to help ensure the validity of the " - "base element."); // could be removed, if we give the responsability to the user. + "base element."); // could be removed, if we give the responsibility to the user. static_assert((!Master_matrix::isNonBasic || Master_matrix::Option_list::is_of_boundary_type), "For chain columns, the given column cannot be constant."); @@ -830,7 +830,7 @@ inline List_column& List_column::multiply_source_a template inline List_column& List_column::operator=(const List_column& other) { - static_assert(!Master_matrix::Option_list::has_row_access, "= assignement not enabled with row access option."); + static_assert(!Master_matrix::Option_list::has_row_access, "= assignment not enabled with row access option."); dim_opt::operator=(other); chain_opt::operator=(other); diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/naive_vector_column.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/naive_vector_column.h index b3e4cbff7b..71dd49de87 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/naive_vector_column.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/naive_vector_column.h @@ -41,7 +41,7 @@ namespace persistence_matrix { * Column based on a vector structure. The cells are always ordered by row index and only non-zero values * are stored uniquely in the underlying container. * - * @tparam Master_matrix An instanciation of @ref Matrix from which all types and options are deduced. + * @tparam Master_matrix An instantiation of @ref Matrix from which all types and options are deduced. * @tparam Cell_constructor Factory of @ref Cell classes. */ template @@ -543,7 +543,7 @@ inline typename Naive_vector_column::id_index Naive_vector_column::get_pivot() const { static_assert(Master_matrix::isNonBasic, - "Method not available for base columns."); // could technically be, but is the notion usefull then? + "Method not available for base columns."); // could technically be, but is the notion useful then? if constexpr (Master_matrix::Option_list::is_of_boundary_type) { return column_.empty() ? -1 : column_.back()->get_row_index(); @@ -557,7 +557,7 @@ inline typename Naive_vector_column::Field_element_type Naive_vector_column::get_pivot_value() const { static_assert(Master_matrix::isNonBasic, - "Method not available for base columns."); // could technically be, but is the notion usefull then? + "Method not available for base columns."); // could technically be, but is the notion useful then? if constexpr (Master_matrix::Option_list::is_z2) { return 1; @@ -637,7 +637,7 @@ Naive_vector_column::operator+=(const Cell_range& column) { static_assert((!Master_matrix::isNonBasic || std::is_same_v), "For boundary columns, the range has to be a column of same type to help ensure the validity of the " - "base element."); // could be removed, if we give the responsability to the user. + "base element."); // could be removed, if we give the responsibility to the user. static_assert((!Master_matrix::isNonBasic || Master_matrix::Option_list::is_of_boundary_type), "For chain columns, the given column cannot be constant."); @@ -706,7 +706,7 @@ Naive_vector_column::multiply_target_and_add(const Field_element_ { static_assert((!Master_matrix::isNonBasic || std::is_same_v), "For boundary columns, the range has to be a column of same type to help ensure the validity of the " - "base element."); // could be removed, if we give the responsability to the user. + "base element."); // could be removed, if we give the responsibility to the user. static_assert((!Master_matrix::isNonBasic || Master_matrix::Option_list::is_of_boundary_type), "For chain columns, the given column cannot be constant."); @@ -770,7 +770,7 @@ Naive_vector_column::multiply_source_and_add(const Cell_range& co { static_assert((!Master_matrix::isNonBasic || std::is_same_v), "For boundary columns, the range has to be a column of same type to help ensure the validity of the " - "base element."); // could be removed, if we give the responsability to the user. + "base element."); // could be removed, if we give the responsibility to the user. static_assert((!Master_matrix::isNonBasic || Master_matrix::Option_list::is_of_boundary_type), "For chain columns, the given column cannot be constant."); @@ -822,7 +822,7 @@ template inline Naive_vector_column& Naive_vector_column::operator=(const Naive_vector_column& other) { - static_assert(!Master_matrix::Option_list::has_row_access, "= assignement not enabled with row access option."); + static_assert(!Master_matrix::Option_list::has_row_access, "= assignment not enabled with row access option."); dim_opt::operator=(other); chain_opt::operator=(other); diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/row_access.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/row_access.h index 56f36e2f34..789e0eee04 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/row_access.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/row_access.h @@ -27,7 +27,7 @@ namespace persistence_matrix { * @ingroup persistence_matrix * * @brief Empty structure. - * Inheritated instead of @ref Row_access, if the row access is not enabled. + * Inherited instead of @ref Row_access, if the row access is not enabled. */ struct Dummy_row_access { @@ -44,7 +44,7 @@ struct Dummy_row_access * * @brief Class managing the row access for the columns. * - * @tparam Master_matrix An instanciation of @ref Matrix from which all types and options are deduced. + * @tparam Master_matrix An instantiation of @ref Matrix from which all types and options are deduced. */ template class Row_access @@ -92,7 +92,7 @@ class Row_access * Otherwise does nothing. * * If the rows are intrusive, only a pointer of the cell is stored and therefore any update on the cell (value - * or column index) is automatically forwarded. But for non intrusive rows, any update has to be pushed explicitely. + * or column index) is automatically forwarded. But for non intrusive rows, any update has to be pushed explicitly. * * @param cell Cell to update. */ @@ -116,7 +116,7 @@ class Row_access protected: index columnIndex_; /**< Column index. */ - Row_container_type* rows_; /**< Row container. Be carefull to not destroy before the columns. */ + Row_container_type* rows_; /**< Row container. Be careful to not destroy before the columns. */ private: using base_hook_matrix_row = typename Master_matrix::base_hook_matrix_row; diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/set_column.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/set_column.h index f5bb0bdb38..ecc45b302d 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/set_column.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/set_column.h @@ -41,7 +41,7 @@ namespace persistence_matrix { * Column based on a set structure. The cells are always ordered by row index and only non-zero values * are stored uniquely in the underlying container. * - * @tparam Master_matrix An instanciation of @ref Matrix from which all types and options are deduced. + * @tparam Master_matrix An instantiation of @ref Matrix from which all types and options are deduced. * @tparam Cell_constructor Factory of @ref Cell classes. */ template @@ -545,7 +545,7 @@ inline typename Set_column::id_index Set_column::get_pivot() const { static_assert(Master_matrix::isNonBasic, - "Method not available for base columns."); // could technically be, but is the notion usefull then? + "Method not available for base columns."); // could technically be, but is the notion useful then? if constexpr (Master_matrix::Option_list::is_of_boundary_type) { if (column_.empty()) return -1; @@ -560,7 +560,7 @@ inline typename Set_column::Field_element_type Set_column::get_pivot_value() const { static_assert(Master_matrix::isNonBasic, - "Method not available for base columns."); // could technically be, but is the notion usefull then? + "Method not available for base columns."); // could technically be, but is the notion useful then? if constexpr (Master_matrix::Option_list::is_z2) { return 1; @@ -641,7 +641,7 @@ inline Set_column& Set_column::operator+=( { static_assert((!Master_matrix::isNonBasic || std::is_same_v), "For boundary columns, the range has to be a column of same type to help ensure the validity of the " - "base element."); // could be removed, if we give the responsability to the user. + "base element."); // could be removed, if we give the responsibility to the user. static_assert((!Master_matrix::isNonBasic || Master_matrix::Option_list::is_of_boundary_type), "For chain columns, the given column cannot be constant."); @@ -709,7 +709,7 @@ inline Set_column& Set_column::multiply_target_and { static_assert((!Master_matrix::isNonBasic || std::is_same_v), "For boundary columns, the range has to be a column of same type to help ensure the validity of the " - "base element."); // could be removed, if we give the responsability to the user. + "base element."); // could be removed, if we give the responsibility to the user. static_assert((!Master_matrix::isNonBasic || Master_matrix::Option_list::is_of_boundary_type), "For chain columns, the given column cannot be constant."); @@ -771,7 +771,7 @@ inline Set_column& Set_column::multiply_source_and { static_assert((!Master_matrix::isNonBasic || std::is_same_v), "For boundary columns, the range has to be a column of same type to help ensure the validity of the " - "base element."); // could be removed, if we give the responsability to the user. + "base element."); // could be removed, if we give the responsibility to the user. static_assert((!Master_matrix::isNonBasic || Master_matrix::Option_list::is_of_boundary_type), "For chain columns, the given column cannot be constant."); @@ -822,7 +822,7 @@ template inline Set_column& Set_column::operator=( const Set_column& other) { - static_assert(!Master_matrix::Option_list::has_row_access, "= assignement not enabled with row access option."); + static_assert(!Master_matrix::Option_list::has_row_access, "= assignment not enabled with row access option."); dim_opt::operator=(other); chain_opt::operator=(other); diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/unordered_set_column.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/unordered_set_column.h index e67082503d..cef6779576 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/unordered_set_column.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/unordered_set_column.h @@ -57,7 +57,7 @@ struct CellPointerEq { * are stored uniquely in the underlying container. When adding a cell range into it, the given cell range * also does not need to be ordered (contrary to most other column types). * - * @tparam Master_matrix An instanciation of @ref Matrix from which all types and options are deduced. + * @tparam Master_matrix An instantiation of @ref Matrix from which all types and options are deduced. * @tparam Cell_constructor Factory of @ref Cell classes. */ template @@ -563,7 +563,7 @@ inline typename Unordered_set_column::id_index Unordered_set_column::get_pivot() const { static_assert(Master_matrix::isNonBasic, - "Method not available for base columns."); // could technically be, but is the notion usefull then? + "Method not available for base columns."); // could technically be, but is the notion useful then? if constexpr (Master_matrix::Option_list::is_of_boundary_type) { if (column_.empty()) return -1; @@ -580,7 +580,7 @@ inline typename Unordered_set_column::Field_element_type Unordered_set_column::get_pivot_value() const { static_assert(Master_matrix::isNonBasic, - "Method not available for base columns."); // could technically be, but is the notion usefull then? + "Method not available for base columns."); // could technically be, but is the notion useful then? if constexpr (Master_matrix::Option_list::is_z2) { return 1; @@ -633,7 +633,7 @@ Unordered_set_column::operator+=(const Cell_range& column) { static_assert((!Master_matrix::isNonBasic || std::is_same_v), "For boundary columns, the range has to be a column of same type to help ensure the validity of the " - "base element."); // could be removed, if we give the responsability to the user. + "base element."); // could be removed, if we give the responsibility to the user. static_assert((!Master_matrix::isNonBasic || Master_matrix::Option_list::is_of_boundary_type), "For chain columns, the given column cannot be constant."); @@ -702,7 +702,7 @@ Unordered_set_column::multiply_target_and_add(const Field_element { static_assert((!Master_matrix::isNonBasic || std::is_same_v), "For boundary columns, the range has to be a column of same type to help ensure the validity of the " - "base element."); // could be removed, if we give the responsability to the user. + "base element."); // could be removed, if we give the responsibility to the user. static_assert((!Master_matrix::isNonBasic || Master_matrix::Option_list::is_of_boundary_type), "For chain columns, the given column cannot be constant."); @@ -766,7 +766,7 @@ Unordered_set_column::multiply_source_and_add(const Cell_range& c { static_assert((!Master_matrix::isNonBasic || std::is_same_v), "For boundary columns, the range has to be a column of same type to help ensure the validity of the " - "base element."); // could be removed, if we give the responsability to the user. + "base element."); // could be removed, if we give the responsibility to the user. static_assert((!Master_matrix::isNonBasic || Master_matrix::Option_list::is_of_boundary_type), "For chain columns, the given column cannot be constant."); @@ -818,7 +818,7 @@ template inline Unordered_set_column& Unordered_set_column::operator=(const Unordered_set_column& other) { - static_assert(!Master_matrix::Option_list::has_row_access, "= assignement not enabled with row access option."); + static_assert(!Master_matrix::Option_list::has_row_access, "= assignment not enabled with row access option."); dim_opt::operator=(other); chain_opt::operator=(other); @@ -918,7 +918,7 @@ inline bool Unordered_set_column::_multiply_target_and_add(const } // because the column is unordered, I don't see a way to do both operations in one go - // without garantees on the cell range... + // without guarantees on the cell range... operator*=(val); return _add(column); } diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/vector_column.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/vector_column.h index b200437ee4..b75f212862 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/vector_column.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/columns/vector_column.h @@ -43,7 +43,7 @@ namespace persistence_matrix { * so erased values can still be in the underlying container. * On the other hand, two cells will never have the same row index. * - * @tparam Master_matrix An instanciation of @ref Matrix from which all types and options are deduced. + * @tparam Master_matrix An instantiation of @ref Matrix from which all types and options are deduced. * @tparam Cell_constructor Factory of @ref Cell classes. */ template @@ -520,7 +520,7 @@ inline bool Vector_column::is_empty() const { if constexpr (!Master_matrix::isNonBasic || Master_matrix::Option_list::is_of_boundary_type) { return column_.size() == erasedValues_.size(); // assumes that erasedValues is always a subset of column_, which is - // wrong if someone cleared an non exitsing value... + // wrong if someone cleared an non existing value... } else { return column_.empty(); } @@ -531,7 +531,7 @@ inline std::size_t Vector_column::size() const { if constexpr (!Master_matrix::isNonBasic || Master_matrix::Option_list::is_of_boundary_type) { return column_.size() - erasedValues_.size(); // assumes that erasedValues is always a subset of column_, which is - // wrong if someone cleared an non exitsing value... + // wrong if someone cleared an non existing value... } else { return column_.size(); } @@ -621,7 +621,7 @@ inline typename Vector_column::id_index Vector_column::get_pivot() { static_assert(Master_matrix::isNonBasic, - "Method not available for base columns."); // could technically be, but is the notion usefull then? + "Method not available for base columns."); // could technically be, but is the notion useful then? if constexpr (Master_matrix::Option_list::is_of_boundary_type) { if (column_.empty()) return -1; @@ -647,7 +647,7 @@ inline typename Vector_column::Field_element_type Vector_column::get_pivot_value() { static_assert(Master_matrix::isNonBasic, - "Method not available for base columns."); // could technically be, but is the notion usefull then? + "Method not available for base columns."); // could technically be, but is the notion useful then? if constexpr (Master_matrix::Option_list::is_z2) { return 1; @@ -739,7 +739,7 @@ inline Vector_column& Vector_column::operator+=( { static_assert((!Master_matrix::isNonBasic || std::is_same_v), "For boundary columns, the range has to be a column of same type to help ensure the validity of the " - "base element."); // could be removed, if we give the responsability to the user. + "base element."); // could be removed, if we give the responsibility to the user. static_assert((!Master_matrix::isNonBasic || Master_matrix::Option_list::is_of_boundary_type), "For chain columns, the given column cannot be constant."); @@ -807,7 +807,7 @@ inline Vector_column& Vector_column::multiply_targ { static_assert((!Master_matrix::isNonBasic || std::is_same_v), "For boundary columns, the range has to be a column of same type to help ensure the validity of the " - "base element."); // could be removed, if we give the responsability to the user. + "base element."); // could be removed, if we give the responsibility to the user. static_assert((!Master_matrix::isNonBasic || Master_matrix::Option_list::is_of_boundary_type), "For chain columns, the given column cannot be constant."); @@ -869,7 +869,7 @@ inline Vector_column& Vector_column::multiply_sour { static_assert((!Master_matrix::isNonBasic || std::is_same_v), "For boundary columns, the range has to be a column of same type to help ensure the validity of the " - "base element."); // could be removed, if we give the responsability to the user. + "base element."); // could be removed, if we give the responsibility to the user. static_assert((!Master_matrix::isNonBasic || Master_matrix::Option_list::is_of_boundary_type), "For chain columns, the given column cannot be constant."); @@ -920,7 +920,7 @@ template inline Vector_column& Vector_column::operator=( const Vector_column& other) { - static_assert(!Master_matrix::Option_list::has_row_access, "= assignement not enabled with row access option."); + static_assert(!Master_matrix::Option_list::has_row_access, "= assignment not enabled with row access option."); dim_opt::operator=(other); chain_opt::operator=(other); diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/matrix_dimension_holders.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/matrix_dimension_holders.h index dfc195c57f..53f0662928 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/matrix_dimension_holders.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/matrix_dimension_holders.h @@ -29,7 +29,7 @@ namespace persistence_matrix { * @ingroup persistence_matrix * * @brief Empty structure. - * Inheritated instead of @ref Matrix_max_dimension_holder or @ref Matrix_all_dimension_holder, when the maximal + * Inherited instead of @ref Matrix_max_dimension_holder or @ref Matrix_all_dimension_holder, when the maximal * dimension of a matrix is not stored. */ struct Dummy_matrix_dimension_holder { @@ -43,7 +43,7 @@ struct Dummy_matrix_dimension_holder { /** * @ingroup persistence_matrix * - * @brief Class managing the maximal dimension of a face represented in the inheritating matrix, when the option of + * @brief Class managing the maximal dimension of a face represented in the inheriting matrix, when the option of * face removal is not enabled. * * @tparam dimension_type Dimension value type. Has to be an integer type. @@ -105,7 +105,7 @@ class Matrix_max_dimension_holder /** * @ingroup persistence_matrix * - * @brief Class managing the maximal dimension of a face represented in the inheritating matrix, when the option of + * @brief Class managing the maximal dimension of a face represented in the inheriting matrix, when the option of * face removal is enabled. * * @tparam dimension_type Dimension value type. Has to be an integer type. diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/matrix_row_access.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/matrix_row_access.h index 836302ef15..4eca991c7e 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/matrix_row_access.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/matrix_row_access.h @@ -27,7 +27,7 @@ namespace persistence_matrix { * @ingroup persistence_matrix * * @brief Empty structure. - * Inheritated instead of @ref Matrix_row_access, when the the row access is not enabled. + * Inherited instead of @ref Matrix_row_access, when the the row access is not enabled. */ struct Dummy_matrix_row_access { Dummy_matrix_row_access([[maybe_unused]] unsigned int numberOfRows = 0){}; @@ -39,7 +39,7 @@ struct Dummy_matrix_row_access { * @class Matrix_row_access matrix_row_access.h gudhi/Persistence_matrix/matrix_row_access.h * @ingroup persistence_matrix * - * @brief Class managing the row access for the inheritating matrix. + * @brief Class managing the row access for the inheriting matrix. * * @tparam Row_type Either boost::intrusive::list if @ref PersistenceMatrixOptions::has_intrusive_rows * is true, or std::set otherwise. @@ -96,7 +96,7 @@ class Matrix_row_access * The type of the row depends on the choosen options, see @ref PersistenceMatrixOptions::has_intrusive_rows. * * @param rowIndex @ref rowindex "Row index" of the row to return: @ref IDIdx for @ref chainmatrix "chain matrices" - * or updated @ref IDIdx for @ref boundarymatrix "boundary matrices" if swaps occured. + * or updated @ref IDIdx for @ref boundarymatrix "boundary matrices" if swaps occurred. * @return Reference to the row. */ Row_type& get_row(id_index rowIndex) { @@ -111,7 +111,7 @@ class Matrix_row_access * The type of the row depends on the choosen options, see @ref PersistenceMatrixOptions::has_intrusive_rows. * * @param rowIndex @ref rowindex "Row index" of the row to return: @ref IDIdx for @ref chainmatrix "chain matrices" - * or updated @ref IDIdx for @ref boundarymatrix "boundary matrices" if swaps occured. + * or updated @ref IDIdx for @ref boundarymatrix "boundary matrices" if swaps occurred. * @return Const reference to the row. */ const Row_type& get_row(id_index rowIndex) const { @@ -151,7 +151,7 @@ class Matrix_row_access protected: /** - * @brief Row container. A pointer to faciliate column swaps when two matrices are swapped. + * @brief Row container. A pointer to facilitate column swaps when two matrices are swapped. * Has to be destroyed after matrix_, therefore has to be inherited. */ Row_container_type* rows_; diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/overlay_ididx_to_matidx.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/overlay_ididx_to_matidx.h index f2037318c1..b2dbead4bd 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/overlay_ididx_to_matidx.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/overlay_ididx_to_matidx.h @@ -35,7 +35,7 @@ namespace persistence_matrix { * the original methods with @ref IDIdx indices. * * @tparam Matrix_type %Matrix type taking the overlay. - * @tparam Master_matrix_type An instanciation of @ref Matrix from which all types and options are deduced. + * @tparam Master_matrix_type An instantiation of @ref Matrix from which all types and options are deduced. */ template class Id_to_index_overlay @@ -71,7 +71,7 @@ class Id_to_index_overlay /** * @brief Constructs a new matrix from the given ranges of @ref Matrix::cell_rep_type. Each range corresponds to a * column (the order of the ranges are preserved). The content of the ranges is assumed to be sorted by increasing - * IDs. The IDs of the simplices are also assumed to be consecutifs, ordered by filtration value, starting with 0. + * IDs. The IDs of the simplices are also assumed to be consecutive, ordered by filtration value, starting with 0. * * @tparam Boundary_type Range type for @ref Matrix::cell_rep_type ranges. * Assumed to have a begin(), end() and size() method. @@ -79,7 +79,7 @@ class Id_to_index_overlay * filtered **simplicial** complex, whose boundaries are ordered by filtration order. * Therefore, `orderedBoundaries[i]` should store the boundary of the \f$ i^{th} \f$ simplex in the filtration, * as an ordered list of indices of its facets (again those indices correspond to their respective position - * in the matrix). That is why the indices of the simplices are assumed to be consecutifs and starting with 0 + * in the matrix). That is why the indices of the simplices are assumed to be consecutive and starting with 0 * (an empty boundary is interpreted as a vertex boundary and not as a non existing simplex). * All dimensions up to the maximal dimension of interest have to be present. If only a higher dimension is of * interest and not everything should be stored, then use the @ref insert_boundary method instead @@ -129,7 +129,7 @@ class Id_to_index_overlay * @brief Only available for @ref chainmatrix "chain matrices". * Constructs a new matrix from the given ranges of @ref Matrix::cell_rep_type. Each range corresponds to a column * (the order of the ranges are preserved). The content of the ranges is assumed to be sorted by increasing IDs. - * The IDs of the simplices are also assumed to be consecutifs, ordered by filtration value, starting with 0. + * The IDs of the simplices are also assumed to be consecutive, ordered by filtration value, starting with 0. * * @warning If @ref PersistenceMatrixOptions::has_vine_update is false, the comparators are not used. * And if @ref PersistenceMatrixOptions::has_vine_update is true, but @@ -144,7 +144,7 @@ class Id_to_index_overlay * filtered **simplicial** complex, whose boundaries are ordered by filtration order. * Therefore, `orderedBoundaries[i]` should store the boundary of the \f$ i^{th} \f$ simplex in the filtration, * as an ordered list of indices of its facets (again those indices correspond to their respective position - * in the matrix). That is why the indices of the simplices are assumed to be consecutifs and starting with 0 + * in the matrix). That is why the indices of the simplices are assumed to be consecutive and starting with 0 * (an empty boundary is interpreted as a vertex boundary and not as a non existing simplex). * All dimensions up to the maximal dimension of interest have to be present. If only a higher dimension is of * interest and not everything should be stored, then use the @ref insert_boundary method instead @@ -229,7 +229,7 @@ class Id_to_index_overlay * * The content of the new column will vary depending on the underlying @ref mp_matrices "type of the matrix": * - If it is a boundary type matrix and only \f$ R \f$ is stored, the boundary is just copied. The column will only - * be reduced later when the barcode is requested in order to apply some optimisations with the additional + * be reduced later when the barcode is requested in order to apply some optimizations with the additional * knowledge. Hence, the barcode will also not be updated. * - If it is a boundary type matrix and both \f$ R \f$ and \f$ U \f$ are stored, the new boundary is stored in its * reduced form and the barcode, if active, is also updated. @@ -253,7 +253,7 @@ class Id_to_index_overlay * the faces are inserted by order of filtration), it is sufficient to indicate the ID of the face being inserted. * * @tparam Boundary_type Range of @ref Matrix::cell_rep_type. Assumed to have a begin(), end() and size() method. - * @param faceIndex @ref IDIdx index to use to indentify the new face. + * @param faceIndex @ref IDIdx index to use to identify the new face. * @param boundary Boundary generating the new column. The indices of the boundary have to correspond to the * @p faceIndex values of precedent calls of the method for the corresponding faces and should be ordered in * increasing order. @@ -282,7 +282,7 @@ class Id_to_index_overlay * @ref MatIdx indices for @ref chainmatrix "chain matrices". * * @param rowIndex @ref rowindex "Row index" of the row to return: @ref IDIdx for @ref chainmatrix "chain matrices" - * or updated @ref IDIdx for @ref boundarymatrix "boundary matrices" if swaps occured. + * or updated @ref IDIdx for @ref boundarymatrix "boundary matrices" if swaps occurred. * @return Reference to the row. */ Row_type& get_row(id_index rowIndex); @@ -305,7 +305,7 @@ class Id_to_index_overlay * removed from their columns. And in the case of intrusive rows, this will generate a segmentation fault when * the column cells are destroyed later. The row access is just meant as a "read only" access to the rows and the * @ref erase_empty_row method just as a way to specify that a row is empty and can therefore be removed from - * dictionnaries. This allows to avoid testing the emptiness of a row at each column cell removal, what can be + * dictionaries. This allows to avoid testing the emptiness of a row at each column cell removal, what can be * quite frequent. * * @param rowIndex @ref rowindex "Row index" of the empty row to remove. @@ -356,7 +356,7 @@ class Id_to_index_overlay */ void remove_maximal_face(id_index faceID, const std::vector& columnsToSwap); /** - * @brief Only available if @ref PersistenceMatrixOptions::has_removable_columns is true. Additionnaly, if the + * @brief Only available if @ref PersistenceMatrixOptions::has_removable_columns is true. Additionally, if the * matrix is a @ref chainmatrix "chain matrix", either @ref PersistenceMatrixOptions::has_map_column_container has to * be true or @ref PersistenceMatrixOptions::has_vine_update has to be false. * Removes the last face in the filtration from the matrix and updates the barcode if it is stored. @@ -404,7 +404,7 @@ class Id_to_index_overlay */ void add_to(id_index sourceFaceID, id_index targetFaceID); /** - * @brief Multiplies the target column with the coefficiant and then adds the source column to it. + * @brief Multiplies the target column with the coefficient and then adds the source column to it. * That is: `targetColumn = (targetColumn * coefficient) + sourceColumn`. * * @warning They will be no verification to ensure that the addition makes sense for the validity of the matrix. @@ -417,7 +417,7 @@ class Id_to_index_overlay */ void multiply_target_and_add_to(id_index sourceFaceID, const Field_element_type& coefficient, id_index targetFaceID); /** - * @brief Multiplies the source column with the coefficiant before adding it to the target column. + * @brief Multiplies the source column with the coefficient before adding it to the target column. * That is: `targetColumn += (coefficient * sourceColumn)`. The source column will **not** be modified. * * @warning They will be no verification to ensure that the addition makes sense for the validity of the matrix. @@ -524,7 +524,7 @@ class Id_to_index_overlay void print(); // for debug - // access to optionnal methods + // access to optional methods /** * @brief Returns the current barcode of the matrix. @@ -574,7 +574,7 @@ class Id_to_index_overlay id_index vine_swap_with_z_eq_1_case(id_index faceID1, id_index faceID2); /** * @brief Only available if @ref PersistenceMatrixOptions::has_vine_update is true. - * Does a vine swap between two faces which are consecutives in the filtration. Roughly, if \f$ F \f$ is + * Does a vine swap between two faces which are consecutive in the filtration. Roughly, if \f$ F \f$ is * the current filtration represented by the matrix, the method modifies the matrix such that the new state * corresponds to a valid state for the filtration \f$ F' \f$ equal to \f$ F \f$ but with the two given faces * at swapped positions. Of course, the two faces should not have a face/coface relation which each other ; @@ -590,8 +590,8 @@ class Id_to_index_overlay id_index vine_swap(id_index faceID1, id_index faceID2); /** - * @brief Only available if @ref PersistenceMatrixOptions::can_retrieve_representative_cycles is true. Precomputes the - * representative cycles of the current state of the filtration represented by the matrix. + * @brief Only available if @ref PersistenceMatrixOptions::can_retrieve_representative_cycles is true. Pre-computes + * the representative cycles of the current state of the filtration represented by the matrix. * It does not need to be called before `get_representative_cycles` is called for the first time, but needs to be * called before calling `get_representative_cycles` again if the matrix was modified in between. Otherwise the * old cycles will be returned. @@ -614,10 +614,10 @@ class Id_to_index_overlay const cycle_type& get_representative_cycle(const bar_type& bar); private: - using dictionnary_type = typename Master_matrix_type::template dictionnary_type; + using dictionary_type = typename Master_matrix_type::template dictionary_type; Matrix_type matrix_; /**< Interfaced matrix. */ - dictionnary_type* idToIndex_; /**< Map from @ref IDIdx index to @ref MatIdx index. */ + dictionary_type* idToIndex_; /**< Map from @ref IDIdx index to @ref MatIdx index. */ index nextIndex_; /**< Next unused index. */ void _initialize_map(unsigned int size); @@ -705,7 +705,7 @@ inline Id_to_index_overlay::Id_to_index_overlay nextIndex_(matrixToCopy.nextIndex_) { if constexpr (Master_matrix_type::Option_list::is_of_boundary_type) { - idToIndex_ = new dictionnary_type(*matrixToCopy.idToIndex_); + idToIndex_ = new dictionary_type(*matrixToCopy.idToIndex_); } else { idToIndex_ = &matrix_.pivotToColumnIndex_; } @@ -1068,9 +1068,9 @@ inline void Id_to_index_overlay::_initialize_ma { if constexpr (Master_matrix_type::Option_list::is_of_boundary_type) { if constexpr (Master_matrix_type::Option_list::has_map_column_container) { - idToIndex_ = new dictionnary_type(size); + idToIndex_ = new dictionary_type(size); } else { - idToIndex_ = new dictionnary_type(size, -1); + idToIndex_ = new dictionary_type(size, -1); } } else { idToIndex_ = &matrix_.pivotToColumnIndex_; diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/overlay_posidx_to_matidx.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/overlay_posidx_to_matidx.h index 81776e6de8..84a728cdcb 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/overlay_posidx_to_matidx.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/overlay_posidx_to_matidx.h @@ -33,7 +33,7 @@ namespace persistence_matrix { * as @ref MatIdx == @ref PosIdx for them. * * @tparam %Matrix_type Matrix type taking the overlay. - * @tparam Master_matrix_type An instanciation of @ref Matrix from which all types and options are deduced. + * @tparam Master_matrix_type An instantiation of @ref Matrix from which all types and options are deduced. */ template class Position_to_index_overlay @@ -70,7 +70,7 @@ class Position_to_index_overlay /** * @brief Constructs a new matrix from the given ranges of @ref Matrix::cell_rep_type. Each range corresponds to a * column (the order of the ranges are preserved). The content of the ranges is assumed to be sorted by increasing - * IDs. The IDs of the simplices are also assumed to be consecutifs, ordered by filtration value, starting with 0. + * IDs. The IDs of the simplices are also assumed to be consecutive, ordered by filtration value, starting with 0. * * @tparam Boundary_type Range type for @ref Matrix::cell_rep_type ranges. * Assumed to have a begin(), end() and size() method. @@ -78,7 +78,7 @@ class Position_to_index_overlay * filtered **simplicial** complex, whose boundaries are ordered by filtration order. * Therefore, `orderedBoundaries[i]` should store the boundary of the \f$ i^{th} \f$ simplex in the filtration, * as an ordered list of indices of its facets (again those indices correspond to their respective position - * in the matrix). That is why the indices of the simplices are assumed to be consecutifs and starting with 0 + * in the matrix). That is why the indices of the simplices are assumed to be consecutive and starting with 0 * (an empty boundary is interpreted as a vertex boundary and not as a non existing simplex). * All dimensions up to the maximal dimension of interest have to be present. If only a higher dimension is of * interest and not everything should be stored, then use the @ref insert_boundary method instead (after creating the @@ -129,7 +129,7 @@ class Position_to_index_overlay * @brief Only available for @ref chainmatrix "chain matrices". * Constructs a new matrix from the given ranges of @ref Matrix::cell_rep_type. Each range corresponds to a column * (the order of the ranges are preserved). The content of the ranges is assumed to be sorted by increasing IDs. - * The IDs of the simplices are also assumed to be consecutifs, ordered by filtration value, starting with 0. + * The IDs of the simplices are also assumed to be consecutive, ordered by filtration value, starting with 0. * * @warning If @ref PersistenceMatrixOptions::has_vine_update is false, the comparators are not used. * And if @ref PersistenceMatrixOptions::has_vine_update is true, but @@ -144,7 +144,7 @@ class Position_to_index_overlay * filtered **simplicial** complex, whose boundaries are ordered by filtration order. * Therefore, `orderedBoundaries[i]` should store the boundary of the \f$ i^{th} \f$ simplex in the filtration, * as an ordered list of indices of its facets (again those indices correspond to their respective position - * in the matrix). That is why the indices of the simplices are assumed to be consecutifs and starting with 0 + * in the matrix). That is why the indices of the simplices are assumed to be consecutive and starting with 0 * (an empty boundary is interpreted as a vertex boundary and not as a non existing simplex). * All dimensions up to the maximal dimension of interest have to be present. If only a higher dimension is of * interest and not everything should be stored, then use the @ref insert_boundary method instead @@ -242,7 +242,7 @@ class Position_to_index_overlay * the faces are inserted by order of filtration), it is sufficient to indicate the ID of the face being inserted. * * @tparam Boundary_type Range of @ref Matrix::cell_rep_type. Assumed to have a begin(), end() and size() method. - * @param faceIndex @ref IDIdx index to use to indentify the new face. + * @param faceIndex @ref IDIdx index to use to identify the new face. * @param boundary Boundary generating the new column. The indices of the boundary have to correspond to the * @p faceID values of precedent calls of the method for the corresponding faces and should be ordered in * increasing order. @@ -294,7 +294,7 @@ class Position_to_index_overlay * removed from their columns. And in the case of intrusive rows, this will generate a segmentation fault when * the column cells are destroyed later. The row access is just meant as a "read only" access to the rows and the * @ref erase_empty_row method just as a way to specify that a row is empty and can therefore be removed from - * dictionnaries. This allows to avoid testing the emptiness of a row at each column cell removal, what can be + * dictionaries. This allows to avoid testing the emptiness of a row at each column cell removal, what can be * quite frequent. * * @param rowIndex @ref rowindex "Row index" of the empty row to remove. @@ -357,7 +357,7 @@ class Position_to_index_overlay */ void add_to(pos_index sourcePosition, pos_index targetPosition); /** - * @brief Multiplies the target column with the coefficiant and then adds the source column to it. + * @brief Multiplies the target column with the coefficient and then adds the source column to it. * That is: `targetColumn = (targetColumn * coefficient) + sourceColumn`. * * @warning They will be no verification to ensure that the addition makes sense for the validity of the matrix. @@ -372,7 +372,7 @@ class Position_to_index_overlay const Field_element_type& coefficient, pos_index targetPosition); /** - * @brief Multiplies the source column with the coefficiant before adding it to the target column. + * @brief Multiplies the source column with the coefficient before adding it to the target column. * That is: `targetColumn += (coefficient * sourceColumn)`. The source column will **not** be modified. * * @warning They will be no verification to ensure that the addition makes sense for the validity of the matrix. @@ -455,7 +455,7 @@ class Position_to_index_overlay void print(); // for debug - // access to optionnal methods + // access to optional methods /** * @brief Returns the current barcode of the matrix. @@ -469,7 +469,7 @@ class Position_to_index_overlay const barcode_type& get_current_barcode() const; /** - * @brief Only available if @ref PersistenceMatrixOptions::can_retrieve_representative_cycles is true. Precomputes + * @brief Only available if @ref PersistenceMatrixOptions::can_retrieve_representative_cycles is true. Pre-computes * the representative cycles of the current state of the filtration represented by the matrix. * It does not need to be called before `get_representative_cycles` is called for the first time, but needs to be * called before calling `get_representative_cycles` again if the matrix was modified in between. Otherwise the @@ -504,7 +504,7 @@ class Position_to_index_overlay bool vine_swap_with_z_eq_1_case(pos_index position); /** * @brief Only available if @ref PersistenceMatrixOptions::has_vine_update is true. - * Does a vine swap between two faces which are consecutives in the filtration. Roughly, if \f$ F \f$ is the current + * Does a vine swap between two faces which are consecutive in the filtration. Roughly, if \f$ F \f$ is the current * filtration represented by the matrix, the method modifies the matrix such that the new state corresponds to * a valid state for the filtration \f$ F' \f$ equal to \f$ F \f$ but with the two faces at position `position` * and `position + 1` swapped. Of course, the two faces should not have a face/coface relation which each other ; diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/ru_matrix.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/ru_matrix.h index 63f5578364..8b256caafe 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/ru_matrix.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/ru_matrix.h @@ -33,7 +33,7 @@ namespace persistence_matrix { * Supports vineyards (see @cite vineyards) and the removal of maximal faces while maintaining * a valid barcode. Provides an access to its columns and rows. * - * @tparam Master_matrix An instanciation of @ref Matrix from which all types and options are deduced. + * @tparam Master_matrix An instantiation of @ref Matrix from which all types and options are deduced. */ template class RU_matrix : public Master_matrix::RU_pairing_option, @@ -68,7 +68,7 @@ class RU_matrix : public Master_matrix::RU_pairing_option, /** * @brief Constructs a new matrix from the given ranges of @ref Matrix::cell_rep_type. Each range corresponds to a * column (the order of the ranges are preserved). The content of the ranges is assumed to be sorted by increasing - * IDs. The IDs of the simplices are also assumed to be consecutifs, ordered by filtration value, starting with 0. + * IDs. The IDs of the simplices are also assumed to be consecutive, ordered by filtration value, starting with 0. * * @tparam Boundary_type Range type for @ref Matrix::cell_rep_type ranges. * Assumed to have a begin(), end() and size() method. @@ -76,7 +76,7 @@ class RU_matrix : public Master_matrix::RU_pairing_option, * filtered **simplicial** complex, whose boundaries are ordered by filtration order. * Therefore, `orderedBoundaries[i]` should store the boundary of the \f$ i^{th} \f$ simplex in the filtration, * as an ordered list of indices of its facets (again those indices correspond to their respective position - * in the matrix). That is why the indices of the simplices are assumed to be consecutifs and starting with 0 + * in the matrix). That is why the indices of the simplices are assumed to be consecutive and starting with 0 * (an empty boundary is interpreted as a vertex boundary and not as a non existing simplex). * All dimensions up to the maximal dimension of interest have to be present. If only a higher dimension is of * interest and not everything should be stored, then use the @ref insert_boundary method instead (after creating the @@ -142,7 +142,7 @@ class RU_matrix : public Master_matrix::RU_pairing_option, * the faces are inserted by order of filtration), it is sufficient to indicate the ID of the face being inserted. * * @tparam Boundary_type Range of @ref Matrix::cell_rep_type. Assumed to have a begin(), end() and size() method. - * @param faceIndex @ref IDIdx index to use to indentify the new face. + * @param faceIndex @ref IDIdx index to use to identify the new face. * @param boundary Boundary generating the new column. The indices of the boundary have to correspond to the * @p faceIndex values of precedent calls of the method for the corresponding faces and should be ordered in * increasing order. @@ -158,7 +158,7 @@ class RU_matrix : public Master_matrix::RU_pairing_option, * * Note that before returning the column, all column cells can eventually be reordered, if lazy swaps occurred. * It is therefore recommended to avoid calling @ref get_column between vine swaps, otherwise the benefits - * of the the lazyness is lost. + * of the the laziness is lost. * * @param columnIndex @ref MatIdx index of the column to return. * @param inR If true, returns the column in \f$ R \f$, if false, returns the column in \f$ U \f$. @@ -173,7 +173,7 @@ class RU_matrix : public Master_matrix::RU_pairing_option, * * Note that before returning the row, all column cells can eventually be reordered, if lazy swaps occurred. * It is therefore recommended to avoid calling @ref get_row between vine swaps, otherwise the benefits - * of the the lazyness is lost. + * of the the laziness is lost. * * @param rowIndex @ref rowindex "Row index" of the row to return. * @param inR If true, returns the row in \f$ R \f$, if false, returns the row in \f$ U \f$. @@ -193,7 +193,7 @@ class RU_matrix : public Master_matrix::RU_pairing_option, * cells are not removed from their columns. And in the case of intrusive rows, this will generate a segmentation * fault when the column cells are destroyed later. The row access is just meant as a "read only" access to the * rows and the @ref erase_empty_row method just as a way to specify that a row is empty and can therefore be removed - * from dictionnaries. This allows to avoid testing the emptiness of a row at each column cell removal, what can + * from dictionaries. This allows to avoid testing the emptiness of a row at each column cell removal, what can * be quite frequent. * * @param rowIndex @ref rowindex "Row index" of the empty row. @@ -253,7 +253,7 @@ class RU_matrix : public Master_matrix::RU_pairing_option, */ void add_to(index sourceColumnIndex, index targetColumnIndex); /** - * @brief Multiplies the target column with the coefficiant and then adds the source column to it. + * @brief Multiplies the target column with the coefficient and then adds the source column to it. * That is: `targetColumn = (targetColumn * coefficient) + sourceColumn`. * * @warning They will be no verification to ensure that the addition makes sense for the validity of a @@ -268,7 +268,7 @@ class RU_matrix : public Master_matrix::RU_pairing_option, const Field_element_type& coefficient, index targetColumnIndex); /** - * @brief Multiplies the source column with the coefficiant before adding it to the target column. + * @brief Multiplies the source column with the coefficient before adding it to the target column. * That is: `targetColumn += (coefficient * sourceColumn)`. The source column will **not** be modified. * * @warning They will be no verification to ensure that the addition makes sense for the validity of a @@ -389,9 +389,9 @@ class RU_matrix : public Master_matrix::RU_pairing_option, using swap_opt = typename Master_matrix::RU_vine_swap_option; using pair_opt = typename Master_matrix::RU_pairing_option; using rep_opt = typename Master_matrix::RU_representative_cycles_option; - using dictionnary_type = typename Master_matrix::template dictionnary_type; + using dictionary_type = typename Master_matrix::template dictionary_type; using barcode_type = typename Master_matrix::barcode_type; - using bar_dictionnary_type = typename Master_matrix::bar_dictionnary_type; + using bar_dictionary_type = typename Master_matrix::bar_dictionary_type; using r_matrix_type = typename Master_matrix::Boundary_matrix_type; using u_matrix_type = typename Master_matrix::Base_matrix_type; @@ -402,7 +402,7 @@ class RU_matrix : public Master_matrix::RU_pairing_option, // TODO: make U not accessible by default and add option to enable access? Inaccessible, it // needs less options and we could avoid some ifs. u_matrix_type mirrorMatrixU_; /**< U. */ - dictionnary_type pivotToColumnIndex_; /**< Map from pivot row index to column @ref MatIdx index. */ + dictionary_type pivotToColumnIndex_; /**< Map from pivot row index to column @ref MatIdx index. */ pos_index nextEventIndex_; /**< Next birth or death index. */ Field_operators* operators_; /**< Field operators, can be nullptr if @ref PersistenceMatrixOptions::is_z2 is true. */ @@ -417,7 +417,7 @@ class RU_matrix : public Master_matrix::RU_pairing_option, void _add_bar(dimension_type dim, pos_index birth); constexpr barcode_type& _barcode(); - constexpr bar_dictionnary_type& _indexToBar(); + constexpr bar_dictionary_type& _indexToBar(); }; template @@ -595,7 +595,7 @@ inline void RU_matrix::remove_last() if constexpr (Master_matrix::hasFixedBarcode) { auto& bar = _barcode()[_indexToBar()[nextEventIndex_]]; if (bar.death == static_cast(-1)) { // birth - _barcode().pop_back(); // sorted by birth and nextEventIndex_ has to be the heighest one + _barcode().pop_back(); // sorted by birth and nextEventIndex_ has to be the highest one } else { // death bar.death = -1; }; @@ -916,7 +916,7 @@ inline constexpr typename RU_matrix::barcode_type& RU_matrix -inline constexpr typename RU_matrix::bar_dictionnary_type& RU_matrix::_indexToBar() +inline constexpr typename RU_matrix::bar_dictionary_type& RU_matrix::_indexToBar() { if constexpr (Master_matrix::Option_list::has_vine_update) return swap_opt::template RU_pairing::indexToBar_; diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/ru_pairing.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/ru_pairing.h index dc22999ed0..6719460cf0 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/ru_pairing.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/ru_pairing.h @@ -27,7 +27,7 @@ namespace persistence_matrix { * @ingroup persistence_matrix * * @brief Empty structure. - * Inheritated instead of @ref RU_pairing, when the computation of the barcode was not enabled or if the pairing + * Inherited instead of @ref RU_pairing, when the computation of the barcode was not enabled or if the pairing * is already managed by the vine update classes. */ struct Dummy_ru_pairing { @@ -40,7 +40,7 @@ struct Dummy_ru_pairing { * * @brief Class managing the barcode for @ref RU_matrix if the option was enabled. * - * @tparam Master_matrix An instanciation of @ref Matrix from which all types and options are deduced. + * @tparam Master_matrix An instantiation of @ref Matrix from which all types and options are deduced. */ template class RU_pairing @@ -85,10 +85,10 @@ class RU_pairing } protected: - using dictionnary_type = typename Master_matrix::bar_dictionnary_type; + using dictionary_type = typename Master_matrix::bar_dictionary_type; barcode_type barcode_; /**< Bar container. */ - dictionnary_type indexToBar_; /**< Map from @ref MatIdx index to bar index. */ + dictionary_type indexToBar_; /**< Map from @ref MatIdx index to bar index. */ }; template diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/ru_rep_cycles.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/ru_rep_cycles.h index fa4b314b83..273d6798bb 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/ru_rep_cycles.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/ru_rep_cycles.h @@ -29,7 +29,7 @@ namespace persistence_matrix { * @ingroup persistence_matrix * * @brief Empty structure. - * Inheritated instead of @ref RU_representative_cycles, when the computation of the representative cycles + * Inherited instead of @ref RU_representative_cycles, when the computation of the representative cycles * were not enabled. */ struct Dummy_ru_representative_cycles { @@ -44,7 +44,7 @@ struct Dummy_ru_representative_cycles { * * @brief Class managing the representative cycles for @ref RU_matrix if the option was enabled. * - * @tparam Master_matrix An instanciation of @ref Matrix from which all types and options are deduced. + * @tparam Master_matrix An instantiation of @ref Matrix from which all types and options are deduced. */ template class RU_representative_cycles diff --git a/src/Persistence_matrix/include/gudhi/Persistence_matrix/ru_vine_swap.h b/src/Persistence_matrix/include/gudhi/Persistence_matrix/ru_vine_swap.h index 84f1953486..c439682ce8 100644 --- a/src/Persistence_matrix/include/gudhi/Persistence_matrix/ru_vine_swap.h +++ b/src/Persistence_matrix/include/gudhi/Persistence_matrix/ru_vine_swap.h @@ -34,7 +34,7 @@ namespace persistence_matrix { * @ingroup persistence_matrix * * @brief Empty structure. - * Inheritated instead of @ref RU_vine_swap, when vine swappes are not enabled. + * Inherited instead of @ref RU_vine_swap, when vine swaps are not enabled. */ struct Dummy_ru_vine_swap { friend void swap([[maybe_unused]] Dummy_ru_vine_swap& d1, [[maybe_unused]] Dummy_ru_vine_swap& d2) {} @@ -44,7 +44,7 @@ struct Dummy_ru_vine_swap { * @ingroup persistence_matrix * * @brief Empty structure. - * Inheritated instead of @ref RU_pairing, when the barcode is not stored. + * Inherited instead of @ref RU_pairing, when the barcode is not stored. */ struct Dummy_ru_vine_pairing { friend void swap([[maybe_unused]] Dummy_ru_vine_pairing& d1, [[maybe_unused]] Dummy_ru_vine_pairing& d2) {} @@ -56,7 +56,7 @@ struct Dummy_ru_vine_pairing { * * @brief Class managing the vine swaps for @ref RU_matrix. * - * @tparam Master_matrix An instanciation of @ref Matrix from which all types and options are deduced. + * @tparam Master_matrix An instantiation of @ref Matrix from which all types and options are deduced. */ template class RU_vine_swap : public std::conditional positionToRowIdx_; /**< Map from @ref PosIdx index to row index. */ diff --git a/src/Persistence_matrix/include/gudhi/matrix.h b/src/Persistence_matrix/include/gudhi/matrix.h index 41587b09f6..1c5e82f477 100644 --- a/src/Persistence_matrix/include/gudhi/matrix.h +++ b/src/Persistence_matrix/include/gudhi/matrix.h @@ -132,9 +132,9 @@ namespace persistence_matrix { * @anchor rowindex Let @f$ r @f$ be a row. Rows are indexed in two ways depending only if the matrix is a * @ref chainmatrix "chain matrix" or not. If the matrix is a @ref chainmatrix "chain matrix", @f$ r @f$ is always * indexed by its ID, so it correspond to the @ref IDIdx indexing scheme. If the matrix is not a - * @ref chainmatrix "chain matrix", @f$ r @f$ will originaly also be indexed by the ID, but when a swap occurs, + * @ref chainmatrix "chain matrix", @f$ r @f$ will originally also be indexed by the ID, but when a swap occurs, * the rows also swap IDs and the new ID has to be used to access @f$ r @f$. This means that when the default - * @ref IDIdx scheme is used (the faces are numerated in order of appearence in the filtration starting at 0), + * @ref IDIdx scheme is used (the faces are numerated in order of appearance in the filtration starting at 0), * the indexation of the rows correspond to @ref PosIdx. * * @tparam PersistenceMatrixOptions Structure encoding all the options of the matrix. @@ -150,7 +150,7 @@ class Matrix { using dimension_type = typename PersistenceMatrixOptions::dimension_type; /**< Type for dimension value. */ /** - * @brief Coefficiants field type. + * @brief coefficients field type. */ using Field_operators = typename std::conditional::type >::type; - //Option to store the column index within the cell (additionnaly to the row index). Necessary only with row access. + //Option to store the column index within the cell (additionally to the row index). Necessary only with row access. using Cell_column_index_option = typename std::conditional, @@ -221,7 +221,7 @@ class Matrix { /** * @brief Default cell constructor/destructor, using classic new and delete. * For now, only used as default value for columns constructed independently outside of the matrix by the user. - * Could be used in the futur when parallel options are implemented, as usual pools are not thread safe. + * Could be used in the future when parallel options are implemented, as usual pools are not thread safe. */ inline static New_cell_constructor defaultCellConstructor; /** @@ -231,7 +231,7 @@ class Matrix { using Cell_constructor = Pool_cell_constructor; /** - * @brief Type used to identify a cell, for exemple when inserting a boundary. + * @brief Type used to identify a cell, for example when inserting a boundary. * If @ref PersistenceMatrixOptions::is_z2 is true, the type is an @ref IDIdx and corresponds to the row index of the * cell (the cell value is assumed to be 1). If @ref PersistenceMatrixOptions::is_z2 is false, the type is a pair * whose first element is the row index of the cell and the second element is the value of the cell (which again is @@ -243,7 +243,7 @@ class Matrix { >::type; /** - * @brief Compaires two cells by their position in the row. They are assume to be in the same row. + * @brief Compares two cells by their position in the row. They are assume to be in the same row. */ struct RowCellComp { bool operator()(const Cell_type& c1, const Cell_type& c2) const { @@ -288,7 +288,7 @@ class Matrix { >::type; template - using dictionnary_type = + using dictionary_type = typename std::conditional, std::vector @@ -433,7 +433,7 @@ class Matrix { std::vector >::type >::type; - using bar_dictionnary_type = + using bar_dictionary_type = typename std::conditional, //RU @@ -559,10 +559,10 @@ class Matrix { /** * @brief Constructs a new matrix from the given ranges of @ref cell_rep_type. Each range corresponds to a column (the * order of the ranges are preserved). The content of the ranges is assumed to be sorted by increasing IDs. If the - * columns are representing a boundary matrix, the IDs of the simplices are also assumed to be consecutifs, ordered by + * columns are representing a boundary matrix, the IDs of the simplices are also assumed to be consecutive, ordered by * filtration value, starting with 0. * - * See @ref mp_matrices "matrix descriptions" for futher details on how the given matrix is handled. + * See @ref mp_matrices "matrix descriptions" for further details on how the given matrix is handled. * * @tparam Container_type Range type for @ref cell_rep_type ranges. Assumed to have a begin(), end() and size() * method. @@ -570,7 +570,7 @@ class Matrix { * are activated, @p columns is interpreted as a boundary matrix of a **simplicial** complex. In this case, * `columns[i]` should store the boundary of simplex `i` as an ordered list of indices of its facets (again those * indices correspond to their respective position in the matrix). Therefore the indices of the simplices are assumed - * to be consecutifs and starting with 0 (an empty boundary is interpreted as a vertex boundary and not as a non + * to be consecutive and starting with 0 (an empty boundary is interpreted as a vertex boundary and not as a non * existing simplex). All dimensions up to the maximal dimension of interest have to be present. If only a higher * dimension is of interest and not everything should be stored, then use the @ref insert_boundary method instead * (after creating the matrix with the @ref Matrix(int numberOfColumns, characteristic_type characteristic) @@ -603,7 +603,7 @@ class Matrix { * - @ref PersistenceMatrixOptions::has_vine_update = true * - @ref PersistenceMatrixOptions::has_column_pairings = false * - * Those comparators are necesseray to distinguish cases in a vine update. When the matrix is of + * Those comparators are necessary to distinguish cases in a vine update. When the matrix is of * @ref boundarymatrix "boundary type" or if the column pairing is activated (i.e., the barcode is stored), * the comparators can be easily deduced without overhead. If neither are true, we assume that one has additional * information outside of the matrix about the barcode to provide a better suited comparator adapted to the situation @@ -631,7 +631,7 @@ class Matrix { * for more information about the comparators. * * @tparam Boundary_type Range type for @ref cell_rep_type ranges. Assumed to have a begin(), end() and size() method. - * @param orderedBoundaries Vector of ordered boundaries in filtration order. Indexed continously starting at 0. + * @param orderedBoundaries Vector of ordered boundaries in filtration order. Indexed continuously starting at 0. * @param birthComparator Method taking two @ref PosIdx indices as parameter and returns true if and only if the first * face is associated to a bar with strictly smaller birth than the bar associated to the second one. * @param deathComparator Method taking two @ref PosIdx indices as parameter and returns true if and only if the first @@ -688,7 +688,7 @@ class Matrix { ~Matrix(); - //TODO: compatibily with multi fields: + //TODO: compatibility with multi fields: // - set_characteristic(characteristic_type min, characteristic_type max) // - readapt reduction? /** @@ -720,7 +720,7 @@ class Matrix { void insert_column(const Container_type& column); /** * @brief Inserts a new ordered column at the given index by copying the given range of @ref cell_rep_type. - * There should not be any other column inserted at that index which was not explicitely removed before. + * There should not be any other column inserted at that index which was not explicitly removed before. * The content of the range is assumed to be sorted by increasing ID value. * * Only available for @ref basematrix "base matrices" without column compression and without row access. @@ -748,7 +748,7 @@ class Matrix { * - If it is a @ref basematrix "basic matrix" type, the boundary is copied as it is, i.e., the method is equivalent * to @ref insert_column. * - If it is a @ref boundarymatrix "boundary type matrix" and only \f$ R \f$ is stored, the boundary is also just - * copied. The column will only be reduced later when the barcode is requested in order to apply some optimisations + * copied. The column will only be reduced later when the barcode is requested in order to apply some optimizations * with the additional knowledge. Hence, the barcode will also not be updated, so call @ref get_current_barcode only * when the matrix is complete. * - If it is a @ref boundarymatrix "boundary type matrix" and both \f$ R \f$ and \f$ U \f$ are stored, the new @@ -767,7 +767,7 @@ class Matrix { template insertion_return_type insert_boundary(const Boundary_type& boundary, dimension_type dim = -1); /** - * @brief Only avalaible for @ref mp_matrices "non-basic matrices". + * @brief Only available for @ref mp_matrices "non-basic matrices". * It does the same as the other version, but allows the boundary faces to be identified without restrictions * except that all IDs have to be strictly increasing in the order of filtration. Note that you should avoid then * to use the other insertion method to avoid overwriting IDs. @@ -777,7 +777,7 @@ class Matrix { * indicate the ID of the face being inserted. * * @tparam Boundary_type Range of @ref cell_rep_type. Assumed to have a begin(), end() and size() method. - * @param faceIndex @ref IDIdx index to use to indentify the new face. + * @param faceIndex @ref IDIdx index to use to identify the new face. * @param boundary Boundary generating the new column. The indices of the boundary have to correspond to the * @p faceIndex values of precedent calls of the method for the corresponding faces and should be ordered in * increasing order. @@ -829,7 +829,7 @@ class Matrix { * choosen options, see @ref PersistenceMatrixOptions::has_intrusive_rows. * * @param rowIndex @ref rowindex "Row index" of the row to return: @ref IDIdx for @ref chainmatrix "chain matrices" or - * updated @ref IDIdx for @ref boundarymatrix "boundary matrices" if swaps occured. + * updated @ref IDIdx for @ref boundarymatrix "boundary matrices" if swaps occurred. * @return Reference to the row. Is `const` if the matrix has column compression. */ returned_row_type& get_row(id_index rowIndex); @@ -839,7 +839,7 @@ class Matrix { * The type of the row depends on the choosen options, see @ref PersistenceMatrixOptions::has_intrusive_rows. * * @param rowIndex @ref rowindex "Row index" of the row to return: @ref IDIdx for @ref chainmatrix "chain matrices" - * or updated @ref IDIdx for @ref boundarymatrix "boundary matrices" if swaps occured. + * or updated @ref IDIdx for @ref boundarymatrix "boundary matrices" if swaps occurred. * @return Const reference to the row. */ const Row_type& get_row(id_index rowIndex) const; @@ -851,7 +851,7 @@ class Matrix { * @p inR is false. The type of the row depends on the choosen options, see * @ref PersistenceMatrixOptions::has_intrusive_rows. * - * @param rowIndex @ref rowindex "Row index" of the row to return: updated @ref IDIdx if swaps occured. + * @param rowIndex @ref rowindex "Row index" of the row to return: updated @ref IDIdx if swaps occurred. * @param inR If true, returns the row in \f$ R \f$, if false, returns the row in \f$ U \f$. * @return Const reference to the row. */ @@ -884,13 +884,13 @@ class Matrix { * removed from their columns. And in the case of intrusive rows, this will generate a segmentation fault when * the column cells are destroyed later. The row access is just meant as a "read only" access to the rows and the * @ref erase_empty_row method just as a way to specify that a row is empty and can therefore be removed from - * dictionnaries. This allows to avoid testing the emptiness of a row at each column cell removal, what can be quite + * dictionaries. This allows to avoid testing the emptiness of a row at each column cell removal, what can be quite * frequent. * * @param rowIndex @ref rowindex "Row index" of the empty row to remove. */ void erase_empty_row(id_index rowIndex); - //TODO: for chain matrices, replace IDIdx input with MatIdx input to homogenise. + //TODO: for chain matrices, replace IDIdx input with MatIdx input to homogenize. /** * @brief Only available for @ref boundarymatrix "RU" and @ref chainmatrix "chain matrices" and if * @ref PersistenceMatrixOptions::has_removable_columns and @ref PersistenceMatrixOptions::has_vine_update are true. @@ -939,7 +939,7 @@ class Matrix { /** * @brief Removes the last inserted column/face from the matrix. * If the matrix is @ref mp_matrices "non basic", @ref PersistenceMatrixOptions::has_removable_columns has to be true - * for the method to be available. Additionnaly, if the matrix is a @ref chainmatrix "chain matrix", either + * for the method to be available. Additionally, if the matrix is a @ref chainmatrix "chain matrix", either * @ref PersistenceMatrixOptions::has_map_column_container has to be true or * @ref PersistenceMatrixOptions::has_vine_update has to be false. And if the matrix is a * @ref basematrix "base matrix" it should be without column compression. @@ -1274,7 +1274,7 @@ class Matrix { //TODO: find better name. And benchmark also to verify if it is really worth it to have this extra version in addition //to vine_swap. /** - * @brief Only available if @ref PersistenceMatrixOptions::has_vine_update is true and if it is either a bounary + * @brief Only available if @ref PersistenceMatrixOptions::has_vine_update is true and if it is either a boundary * matrix or @ref PersistenceMatrixOptions::column_indexation_type is set to @ref Column_indexation_types::POSITION. * Does the same than @ref vine_swap, but assumes that the swap is non trivial and therefore skips a part of the case * study. @@ -1302,7 +1302,7 @@ class Matrix { /** * @brief Only available if @ref PersistenceMatrixOptions::has_vine_update is true and if it is either a * @ref boundarymatrix "boundary matrix" or @ref PersistenceMatrixOptions::column_indexation_type is set to - * @ref Column_indexation_types::POSITION. Does a vine swap between two faces which are consecutives in the + * @ref Column_indexation_types::POSITION. Does a vine swap between two faces which are consecutive in the * filtration. Roughly, if \f$ F \f$ is the current filtration represented by the matrix, the method modifies the * matrix such that the new state corresponds to a valid state for the filtration \f$ F' \f$ equal to \f$ F \f$ but * with the two faces at position `index` and `index + 1` swapped. Of course, the two faces should not have a @@ -1318,7 +1318,7 @@ class Matrix { /** * @brief Only available if @ref PersistenceMatrixOptions::has_vine_update is true and if it is either a * @ref chainmatrix "chain matrix" or @ref PersistenceMatrixOptions::column_indexation_type is set to - * @ref Column_indexation_types::IDENTIFIER. Does a vine swap between two faces which are consecutives in the + * @ref Column_indexation_types::IDENTIFIER. Does a vine swap between two faces which are consecutive in the * filtration. Roughly, if \f$ F \f$ is the current filtration represented by the matrix, the method modifies the * matrix such that the new state corresponds to a valid state for the filtration \f$ F' \f$ equal to \f$ F \f$ but * with the two given faces at swapped positions. Of course, the two faces should not have a face/coface relation @@ -1336,8 +1336,8 @@ class Matrix { //TODO: Rethink the interface for representative cycles /** - * @brief Only available if @ref PersistenceMatrixOptions::can_retrieve_representative_cycles is true. Precomputes the - * representative cycles of the current state of the filtration represented by the matrix. It does not need to be + * @brief Only available if @ref PersistenceMatrixOptions::can_retrieve_representative_cycles is true. Pre-computes + * the representative cycles of the current state of the filtration represented by the matrix. It does not need to be * called before @ref get_representative_cycles is called for the first time, but needs to be called before calling * @ref get_representative_cycles again if the matrix was modified in between. Otherwise the old cycles will be * returned. @@ -1447,7 +1447,7 @@ inline Matrix::Matrix(const std::function::Matrix(const std::vector static_assert( !PersistenceMatrixOptions::is_of_boundary_type && PersistenceMatrixOptions::has_vine_update && !PersistenceMatrixOptions::has_column_pairings, - "Constructor only available for chain matrices when vine swaps are enabled, but barcodes are not recorded."); + "Constructor only available for chain matrices when vine swaps are enabled, but the barcode is not recorded."); _assert_options(); } @@ -1478,7 +1478,7 @@ inline Matrix::Matrix(unsigned int numberOfColumns, static_assert( !PersistenceMatrixOptions::is_of_boundary_type && PersistenceMatrixOptions::has_vine_update && !PersistenceMatrixOptions::has_column_pairings, - "Constructor only available for chain matrices when vine swaps are enabled, but barcodes are not recorded."); + "Constructor only available for chain matrices when vine swaps are enabled, but the barcode is not recorded."); _assert_options(); } @@ -1510,7 +1510,7 @@ inline void Matrix::set_characteristic(characteristic_ { if constexpr (!PersistenceMatrixOptions::is_z2) { if (colSettings_->operators.get_characteristic() != static_cast(-1)) { - std::cerr << "Warning: Characteristic already initialised. Changing it could lead to incoherences in the matrice " + std::cerr << "Warning: Characteristic already initialised. Changing it could lead to incoherences in the matrix " "as the modulo was already applied to values in existing columns."; } @@ -1952,7 +1952,7 @@ Matrix::get_current_barcode() const static_assert( !PersistenceMatrixOptions::is_of_boundary_type || PersistenceMatrixOptions::has_vine_update || PersistenceMatrixOptions::can_retrieve_representative_cycles, - "'get_current_barcode' is not const for boundary matrices as the barcode is only computed when explicitely " + "'get_current_barcode' is not const for boundary matrices as the barcode is only computed when explicitly " "asked."); return matrix_.get_current_barcode(); @@ -2059,7 +2059,7 @@ inline constexpr void Matrix::_assert_options() static_assert(!PersistenceMatrixOptions::has_vine_update || PersistenceMatrixOptions::is_z2, "Vine update currently works only for Z_2 coefficients."); // static_assert(!PersistenceMatrixOptions::can_retrieve_representative_cycles || PersistenceMatrixOptions::is_z2, - // "Representaive cycles can currently only be computed with Z_2 coefficients."); + // "Representative cycles can currently only be computed with Z_2 coefficients."); static_assert( PersistenceMatrixOptions::column_type != Column_types::HEAP || !PersistenceMatrixOptions::has_column_compression, "Column compression not compatible with heap columns."); diff --git a/src/Persistence_matrix/test/Persistence_matrix_field_operators_tests.cpp b/src/Persistence_matrix/test/Persistence_matrix_field_operators_tests.cpp index e070e14a3f..4037bd0136 100644 --- a/src/Persistence_matrix/test/Persistence_matrix_field_operators_tests.cpp +++ b/src/Persistence_matrix/test/Persistence_matrix_field_operators_tests.cpp @@ -55,15 +55,15 @@ void test_z2_standart_field_operators(Z2& op) { z23 = op.get_value(z21); //- - BOOST_CHECK_EQUAL(op.substract(z21, z22), 0); - BOOST_CHECK_EQUAL(op.substract(z23, z24), 0); - BOOST_CHECK_EQUAL(op.substract(z23, T(3)), 1); - BOOST_CHECK_EQUAL(op.substract(z24, T(3)), 1); - BOOST_CHECK_EQUAL(op.substract(op.get_value(6u), z23), 0); - BOOST_CHECK_EQUAL(op.substract(op.get_value(6u), z24), 0); - z21 = op.substract(z21, 3u); + BOOST_CHECK_EQUAL(op.subtract(z21, z22), 0); + BOOST_CHECK_EQUAL(op.subtract(z23, z24), 0); + BOOST_CHECK_EQUAL(op.subtract(z23, T(3)), 1); + BOOST_CHECK_EQUAL(op.subtract(z24, T(3)), 1); + BOOST_CHECK_EQUAL(op.subtract(op.get_value(6u), z23), 0); + BOOST_CHECK_EQUAL(op.subtract(op.get_value(6u), z24), 0); + z21 = op.subtract(z21, 3u); BOOST_CHECK_EQUAL(z21, 1); - z21 = op.substract(z21, z22); + z21 = op.subtract(z21, z22); BOOST_CHECK_EQUAL(z21, 1); z23 = op.get_value(z21); @@ -116,15 +116,15 @@ void test_z5_standart_field_operators(Z5& op) { z53 = op.get_value(z51); //- - BOOST_CHECK_EQUAL(op.substract(z51, z52), 0); - BOOST_CHECK_EQUAL(op.substract(z53, z54), 0); - BOOST_CHECK_EQUAL(op.substract(z53, 3), 0); - BOOST_CHECK_EQUAL(op.substract(z54, 3), 0); - BOOST_CHECK_EQUAL(op.substract(7, z53), 4); - BOOST_CHECK_EQUAL(op.substract(7, z54), 4); - z51 = op.substract(z51, 3); + BOOST_CHECK_EQUAL(op.subtract(z51, z52), 0); + BOOST_CHECK_EQUAL(op.subtract(z53, z54), 0); + BOOST_CHECK_EQUAL(op.subtract(z53, 3), 0); + BOOST_CHECK_EQUAL(op.subtract(z54, 3), 0); + BOOST_CHECK_EQUAL(op.subtract(7, z53), 4); + BOOST_CHECK_EQUAL(op.subtract(7, z54), 4); + z51 = op.subtract(z51, 3); BOOST_CHECK_EQUAL(z51, 0); - z51 = op.substract(z51, z52); + z51 = op.subtract(z51, z52); BOOST_CHECK_EQUAL(z51, 2); z53 = op.get_value(z51); @@ -191,19 +191,19 @@ void test_z2_standart_field_inplace_operators(Z2& op) { z23 = 0; //- - op.substract_inplace_front(z23, z24); + op.subtract_inplace_front(z23, z24); BOOST_CHECK_EQUAL(z23, 0); z23 = 0; - op.substract_inplace_front(z23, T(3)); + op.subtract_inplace_front(z23, T(3)); BOOST_CHECK_EQUAL(z23, 1); z23 = 0; - op.substract_inplace_front(z24, T(3)); + op.subtract_inplace_front(z24, T(3)); BOOST_CHECK_EQUAL(z24, 1); z24 = op.get_value(2u); - op.substract_inplace_back(op.get_value(6u), z23); + op.subtract_inplace_back(op.get_value(6u), z23); BOOST_CHECK_EQUAL(z23, 0); z23 = 0; - op.substract_inplace_back(op.get_value(6u), z24); + op.subtract_inplace_back(op.get_value(6u), z24); BOOST_CHECK_EQUAL(z24, 0); z24 = op.get_value(2u); z23 = 1; @@ -267,19 +267,19 @@ void test_z5_standart_field_inplace_operators(Z5& op) { z53 = 3; //- - op.substract_inplace_front(z53, z54); + op.subtract_inplace_front(z53, z54); BOOST_CHECK_EQUAL(z53, 0); z53 = 3; - op.substract_inplace_front(z53, 3); + op.subtract_inplace_front(z53, 3); BOOST_CHECK_EQUAL(z53, 0); z53 = 3; - op.substract_inplace_front(z54, 3); + op.subtract_inplace_front(z54, 3); BOOST_CHECK_EQUAL(z54, 0); z54 = op.get_value(3); - op.substract_inplace_back(7, z53); + op.subtract_inplace_back(7, z53); BOOST_CHECK_EQUAL(z53, 4); z53 = 3; - op.substract_inplace_back(7, z54); + op.subtract_inplace_back(7, z54); BOOST_CHECK_EQUAL(z54, 4); z54 = op.get_value(3); z53 = 2; @@ -415,14 +415,14 @@ void test_multi_field_operators(MF& op) { BOOST_CHECK_EQUAL(m1, T(5)); //- - BOOST_CHECK_EQUAL(op.substract(m1, m2), T(3)); - BOOST_CHECK_EQUAL(op.substract(m1, 3), T(2)); - BOOST_CHECK_EQUAL(op.substract(m2, 3), T(5004)); - BOOST_CHECK_EQUAL(op.substract(6, m1), T(1)); - BOOST_CHECK_EQUAL(op.substract(6, m2), T(4)); - m2 = op.substract(m2, 3); + BOOST_CHECK_EQUAL(op.subtract(m1, m2), T(3)); + BOOST_CHECK_EQUAL(op.subtract(m1, 3), T(2)); + BOOST_CHECK_EQUAL(op.subtract(m2, 3), T(5004)); + BOOST_CHECK_EQUAL(op.subtract(6, m1), T(1)); + BOOST_CHECK_EQUAL(op.subtract(6, m2), T(4)); + m2 = op.subtract(m2, 3); BOOST_CHECK_EQUAL(m2, T(5004)); - m2 = op.substract(m2, m1); + m2 = op.subtract(m2, m1); BOOST_CHECK_EQUAL(m2, T(4999)); //* @@ -438,7 +438,7 @@ void test_multi_field_operators(MF& op) { //== BOOST_CHECK(!op.are_equal(m1, m2)); - m2 = op.substract(m2, 84); + m2 = op.subtract(m2, 84); BOOST_CHECK(op.are_equal(m1, T(4915))); BOOST_CHECK(op.are_equal(m1, m2)); } @@ -486,19 +486,19 @@ void test_multi_field_inplace_operators(MF& op) { m1 = 5; //- - op.substract_inplace_front(m1, m2); + op.subtract_inplace_front(m1, m2); BOOST_CHECK_EQUAL(m1, T(3)); m1 = 5; - op.substract_inplace_front(m1, 3); + op.subtract_inplace_front(m1, 3); BOOST_CHECK_EQUAL(m1, T(2)); m1 = 5; - op.substract_inplace_front(m2, 3); + op.subtract_inplace_front(m2, 3); BOOST_CHECK_EQUAL(m2, T(5004)); m2 = 5007; - op.substract_inplace_back(6, m1); + op.subtract_inplace_back(6, m1); BOOST_CHECK_EQUAL(m1, T(1)); m1 = 5; - op.substract_inplace_back(6, m2); + op.subtract_inplace_back(6, m2); BOOST_CHECK_EQUAL(m2, T(4)); m2 = 4999; diff --git a/src/Persistence_matrix/test/pm_column_tests_boost_type_lists.h b/src/Persistence_matrix/test/pm_column_tests_boost_type_lists.h index 41e7188967..1f4b28b349 100644 --- a/src/Persistence_matrix/test/pm_column_tests_boost_type_lists.h +++ b/src/Persistence_matrix/test/pm_column_tests_boost_type_lists.h @@ -53,7 +53,7 @@ struct c_chain_options { template class column_non_validity { private: - static constexpr bool is_non_valide() { + static constexpr bool is_non_valid() { if constexpr (col_type::Master::Option_list::column_type == Column_types::INTRUSIVE_LIST) { return !std::is_same_v >; } else if constexpr (col_type::Master::Option_list::column_type == Column_types::INTRUSIVE_SET) { @@ -76,7 +76,7 @@ class column_non_validity { } public: - static constexpr bool value = is_non_valide(); + static constexpr bool value = is_non_valid(); }; // if a new column type is implemented, create a `ct_*` structure for it and add it to this list... @@ -117,7 +117,7 @@ using z5_only_ra_option_list = option_template using c_matrices_list = boost::mp11::mp_product; -// the remove_if here is quite unefficiant as it has to remove a lot. But I did not found another way to do it without +// the remove_if here is quite non efficient as it has to remove a lot. But I did not found another way to do it without // having to define something for each column type individually. template using columns_list = boost::mp11::mp_remove_if< diff --git a/src/Persistence_matrix/test/pm_matrix_tests.h b/src/Persistence_matrix/test/pm_matrix_tests.h index f3a9e5803d..dca9e8ab95 100644 --- a/src/Persistence_matrix/test/pm_matrix_tests.h +++ b/src/Persistence_matrix/test/pm_matrix_tests.h @@ -875,7 +875,7 @@ void test_boundary_maximal_simplex_removal() { test_content_equality(columns, m); BOOST_CHECK_EQUAL(m.get_number_of_columns(), 7); - // pairing always true for boundary for now (only thing differenciating it from base) + // pairing always true for boundary for now (only thing differentiating it from base) BOOST_CHECK_EQUAL(m.get_current_barcode().back().death, 6); m.remove_last(); diff --git a/src/Persistence_matrix/test/pm_matrix_tests_boost_type_lists.h b/src/Persistence_matrix/test/pm_matrix_tests_boost_type_lists.h index ebe9f545dd..433d5ae705 100644 --- a/src/Persistence_matrix/test/pm_matrix_tests_boost_type_lists.h +++ b/src/Persistence_matrix/test/pm_matrix_tests_boost_type_lists.h @@ -126,12 +126,12 @@ struct m_chain_options { template class matrix_non_validity { private: - static constexpr bool is_non_valide() { + static constexpr bool is_non_valid() { return (option::has_row_access || option::has_column_compression) && option::column_type == Column_types::HEAP; } public: - static constexpr bool value = is_non_valide(); + static constexpr bool value = is_non_valid(); }; // to avoid long compilation time and high memory usage, the tests are restricted to one column type by default for