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
16
17namespace Gudhi {
19
31{
32 public:
33 using Element = unspecified;
34 using Characteristic = unspecified;
35
40
47 FieldOperators(Characteristic characteristic = 0);
48
55 void set_characteristic(const Characteristic& characteristic);
62
71 template <typename Integer_type>
72 Element get_value(Integer_type e) const;
73
74 // void get_value(Element& e) const;
75
83 void add_inplace(Element& e1, const Element& e2) const;
84
92 void multiply_inplace(Element& e1, const Element& e2) const;
93
102 void multiply_and_add_inplace_front(Element& e, const Element& m, const Element& a) const;
111 void multiply_and_add_inplace_back(const Element& e, const Element& m, Element& a) const;
112
119 Element get_inverse(const Element& e) const;
120
133
141 friend void swap(FieldOperators& f1, FieldOperators& f2);
142};
143
144} // namespace persistence_matrix
145} // namespace Gudhi
Element 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...
void multiply_and_add_inplace_front(Element &e, const Element &m, const Element &a) const
Multiplies the first element with the second one and adds the third one, that is (e * m + a) % charac...
static const Characteristic nullCharacteristic
Indicates the value of the characteristic when not initialized.
Definition FieldOperators.h:39
unspecified Characteristic
Definition FieldOperators.h:34
FieldOperators(Characteristic characteristic=0)
Default constructor. If a non-zero characteristic is given, initializes the field with it....
FieldOperators & operator=(FieldOperators other)
Assign operator.
void multiply_inplace(Element &e1, const Element &e2) const
Stores in the first element the multiplication of two given elements in the field,...
unspecified Element
Definition FieldOperators.h:33
static const Element & get_additive_identity()
Returns the additive identity of the field.
void set_characteristic(const Characteristic &characteristic)
Sets the characteristic of the field. Can eventually be omitted if the characteristic of the class is...
void add_inplace(Element &e1, const Element &e2) const
Stores in the first element the sum of two given elements in the field, that is (e1 + e2) % character...
Element get_inverse(const Element &e) const
Returns the inverse of the given element in the field.
const Characteristic & get_characteristic() const
Returns the current characteristic.
void multiply_and_add_inplace_back(const Element &e, const Element &m, Element &a) const
Multiplies the first element with the second one and adds the third one, that is (e * m + a) % charac...
static const Element & get_multiplicative_identity()
Returns the multiplicative identity of the field.
friend void swap(FieldOperators &f1, FieldOperators &f2)
Swap operator.
Persistence matrix namespace.
Definition FieldOperators.h:18
Gudhi namespace.
Definition SimplicialComplexForAlpha.h:14