Loading...
Searching...
No Matches
FieldOperators.h
Go to the documentation of this file.
/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT.
* See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details.
* Author(s): Hannah Schreiber
*
* Copyright (C) 2024 Inria
*
* Modification(s):
* - YYYY/MM Author: Description of the modification
*/
namespace Gudhi {
namespace persistence_matrix {
class FieldOperators
{
public:
using Element = unspecified;
using Characteristic = unspecified;
FieldOperators(Characteristic characteristic = 0);
void set_characteristic(const Characteristic& characteristic);
const Characteristic& get_characteristic() const;
template <typename Integer_type>
Element get_value(Integer_type e) const;
// void get_value(Element& e) const;
void add_inplace(Element& e1, const Element& e2) const;
void multiply_inplace(Element& e1, const Element& e2) const;
void multiply_and_add_inplace_front(Element& e, const Element& m, const Element& a) const;
void multiply_and_add_inplace_back(const Element& e, const Element& m, Element& a) const;
Element get_inverse(const Element& e) const;
static const Element& get_additive_identity();
static const Element& get_multiplicative_identity();
FieldOperators& operator=(FieldOperators other);
friend void swap(FieldOperators& f1, FieldOperators& f2);
};
} // namespace persistence_matrix
} // namespace Gudhi
Gudhi::persistence_matrix::FieldOperators::get_value
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...
Gudhi::persistence_matrix::FieldOperators::multiply_and_add_inplace_front
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...
Gudhi::persistence_matrix::FieldOperators::Characteristic
unspecified Characteristic
Definition FieldOperators.h:34
Gudhi::persistence_matrix::FieldOperators::FieldOperators
FieldOperators(Characteristic characteristic=0)
Default constructor. If a non-zero characteristic is given, initializes the field with it....
Gudhi::persistence_matrix::FieldOperators::operator=
FieldOperators & operator=(FieldOperators other)
Assign operator.
Gudhi::persistence_matrix::FieldOperators::multiply_inplace
void multiply_inplace(Element &e1, const Element &e2) const
Stores in the first element the multiplication of two given elements in the field,...
Gudhi::persistence_matrix::FieldOperators::Element
unspecified Element
Definition FieldOperators.h:33
Gudhi::persistence_matrix::FieldOperators::get_additive_identity
static const Element & get_additive_identity()
Returns the additive identity of the field.
Gudhi::persistence_matrix::FieldOperators::set_characteristic
void set_characteristic(const Characteristic &characteristic)
Sets the characteristic of the field. Can eventually be omitted if the characteristic of the class is...
Gudhi::persistence_matrix::FieldOperators::add_inplace
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...
Gudhi::persistence_matrix::FieldOperators::get_inverse
Element get_inverse(const Element &e) const
Returns the inverse of the given element in the field.
Gudhi::persistence_matrix::FieldOperators::get_characteristic
const Characteristic & get_characteristic() const
Returns the current characteristic.
Gudhi::persistence_matrix::FieldOperators::multiply_and_add_inplace_back
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...
Gudhi::persistence_matrix::FieldOperators::get_multiplicative_identity
static const Element & get_multiplicative_identity()
Returns the multiplicative identity of the field.
Gudhi::persistence_matrix::FieldOperators::swap
friend void swap(FieldOperators &f1, FieldOperators &f2)
Swap operator.
Gudhi::persistence_matrix
Persistence matrix namespace.
Definition FieldOperators.h:18
Gudhi
Gudhi namespace.
Definition SimplicialComplexForAlpha.h:14