Loading...
Searching...
No Matches
FieldOperators.h
Go to the documentation of this file.
1/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT.
2 * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details.
3 * Author(s): Hannah Schreiber
4 *
5 * Copyright (C) 2024 Inria
6 *
7 * Modification(s):
8 * - YYYY/MM Author: Description of the modification
9 */
10
17namespace Gudhi {
18namespace persistence_matrix {
19
31{
32 public:
33 using element_type = unspecified;
34 using characteristic_type = unspecified;
43
50 void set_characteristic(const characteristic_type& characteristic);
57
66 template <typename Integer_type>
67 element_type get_value(Integer_type e) const;
68
69 // void get_value(element_type& e) const;
70
78 void add_inplace(element_type& e1, const element_type& e2) const;
79
87 void multiply_inplace(element_type& e1, const element_type& e2) const;
88
107
115
128
136 friend void swap(FieldOperators& f1, FieldOperators& f2);
137};
138
139} // namespace persistence_matrix
140} // namespace Gudhi
Concept of the field operator classes needed for the class Matrix.
Definition FieldOperators.h:31
void multiply_and_add_inplace_back(const element_type &e, const element_type &m, element_type &a) const
Multiplies the first element with the second one and adds the third one, that is (e * m + a) % charac...
void multiply_inplace(element_type &e1, const element_type &e2) const
Stores in the first element the multiplication of two given elements in the field,...
void set_characteristic(const characteristic_type &characteristic)
Sets the characteristic of the field. Can eventually be omitted if the characteristic of the class is...
element_type get_value(Integer_type e) const
Returns the value of an integer in the field. That is the positive value of the integer modulo the cu...
static const element_type & get_multiplicative_identity()
Returns the multiplicative identity of the field.
unspecified element_type
Definition FieldOperators.h:33
void multiply_and_add_inplace_front(element_type &e, const element_type &m, const element_type &a) const
Multiplies the first element with the second one and adds the third one, that is (e * m + a) % charac...
FieldOperators & operator=(FieldOperators other)
Assign operator.
static const element_type & get_additive_identity()
Returns the additive identity of the field.
FieldOperators(characteristic_type characteristic=0)
Default constructor. If a non-zero characteristic is given, initializes the field with it....
element_type get_inverse(const element_type &e) const
Returns the inverse of the given element in the field.
unspecified characteristic_type
Definition FieldOperators.h:34
void add_inplace(element_type &e1, const element_type &e2) const
Stores in the first element the sum of two given elements in the field, that is (e1 + e2) % character...
const characteristic_type & get_characteristic() const
Returns the current characteristic.
friend void swap(FieldOperators &f1, FieldOperators &f2)
Swap operator.
Gudhi namespace.
Definition SimplicialComplexForAlpha.h:14