Gudhi::persistence_fields::Multi_field_element< minimum, maximum > Class Template Reference

Class representing an element of a multi-field. The characteristics will corresponds to all prime numbers in the interval given as template. More...

Public Types

using element_type = mpz_class
 
using characteristic_type = element_type
 

Public Member Functions

 Multi_field_element ()
 Default constructor. Sets the element to 0.
 
 Multi_field_element (const element_type &element)
 Constructor setting the element to the given value. More...
 
 Multi_field_element (const Multi_field_element &toCopy)
 Copy constructor. More...
 
 Multi_field_element (Multi_field_element &&toMove) noexcept
 Move constructor. More...
 
Multi_field_elementoperator= (Multi_field_element other)
 Assign operator.
 
Multi_field_elementoperator= (const element_type &value)
 Assign operator.
 
 operator unsigned int () const
 Casts the element into an unsigned int.
 
 operator mpz_class () const
 Casts the element into an mpz_class.
 
Multi_field_element get_inverse () const
 Returns the inverse of the element in the multi-field, see [6]. More...
 
std::pair< Multi_field_element, characteristic_typeget_partial_inverse (const characteristic_type &productOfCharacteristics) const
 Returns the inverse of the element with respect to a sub-product of the characteristics in the multi-field, see [6]. More...
 
element_type get_value () const
 Returns the value of the element. More...
 

Static Public Member Functions

static Multi_field_element get_additive_identity ()
 Returns the additive identity of a field. More...
 
static Multi_field_element get_multiplicative_identity ()
 Returns the multiplicative identity of a field. More...
 
static Multi_field_element get_partial_multiplicative_identity (const characteristic_type &productOfCharacteristics)
 Returns the partial multiplicative identity of the multi-field from the given product. See [6] for more details. More...
 
static characteristic_type get_characteristic ()
 Returns the product of all characteristics. More...
 

Friends

void operator+= (Multi_field_element &f1, Multi_field_element const &f2)
 operator+=
 
Multi_field_element operator+ (Multi_field_element f1, Multi_field_element const &f2)
 operator+
 
void operator+= (Multi_field_element &f, const element_type &v)
 operator+=
 
Multi_field_element operator+ (Multi_field_element f, const element_type &v)
 operator+
 
element_type operator+ (element_type v, Multi_field_element const &f)
 operator+
 
void operator-= (Multi_field_element &f1, Multi_field_element const &f2)
 operator-=
 
Multi_field_element operator- (Multi_field_element f1, Multi_field_element const &f2)
 operator-
 
void operator-= (Multi_field_element &f, const element_type &v)
 operator-=
 
Multi_field_element operator- (Multi_field_element f, const element_type &v)
 operator-
 
element_type operator- (element_type v, Multi_field_element const &f)
 operator-
 
void operator*= (Multi_field_element &f1, Multi_field_element const &f2)
 operator*=
 
Multi_field_element operator* (Multi_field_element f1, Multi_field_element const &f2)
 operator*
 
void operator*= (Multi_field_element &f, const element_type &v)
 operator*=
 
Multi_field_element operator* (Multi_field_element f, const element_type &v)
 operator*
 
element_type operator* (element_type v, Multi_field_element const &f)
 operator*
 
bool operator== (const Multi_field_element &f1, const Multi_field_element &f2)
 operator==
 
bool operator== (const element_type &v, const Multi_field_element &f)
 operator==
 
bool operator== (const Multi_field_element &f, const element_type &v)
 operator==
 
bool operator!= (const Multi_field_element &f1, const Multi_field_element &f2)
 operator!=
 
bool operator!= (const element_type &v, const Multi_field_element &f)
 operator!=
 
bool operator!= (const Multi_field_element &f, const element_type &v)
 operator!=
 
void swap (Multi_field_element &f1, Multi_field_element &f2)
 Swap operator.
 

Detailed Description

template<unsigned int minimum, unsigned int maximum>
class Gudhi::persistence_fields::Multi_field_element< minimum, maximum >

Class representing an element of a multi-field. The characteristics will corresponds to all prime numbers in the interval given as template.

Template Parameters
minimumInterval closed lower bound.
maximumInterval closed upper bound.

Member Typedef Documentation

◆ characteristic_type

template<unsigned int minimum, unsigned int maximum>
using Gudhi::persistence_fields::Multi_field_element< minimum, maximum >::characteristic_type = element_type

Type for the field characteristic.

◆ element_type

template<unsigned int minimum, unsigned int maximum>
using Gudhi::persistence_fields::Multi_field_element< minimum, maximum >::element_type = mpz_class

Type for the elements in the field.

Constructor & Destructor Documentation

◆ Multi_field_element() [1/3]

template<unsigned int minimum, unsigned int maximum>
Gudhi::persistence_fields::Multi_field_element< minimum, maximum >::Multi_field_element ( const element_type element)
inline

Constructor setting the element to the given value.

Parameters
elementValue of the element.

◆ Multi_field_element() [2/3]

template<unsigned int minimum, unsigned int maximum>
Gudhi::persistence_fields::Multi_field_element< minimum, maximum >::Multi_field_element ( const Multi_field_element< minimum, maximum > &  toCopy)
inline

Copy constructor.

Parameters
toCopyElement to copy.

◆ Multi_field_element() [3/3]

template<unsigned int minimum, unsigned int maximum>
Gudhi::persistence_fields::Multi_field_element< minimum, maximum >::Multi_field_element ( Multi_field_element< minimum, maximum > &&  toMove)
inlinenoexcept

Move constructor.

Parameters
toMoveElement to move.

Member Function Documentation

◆ get_additive_identity()

template<unsigned int minimum, unsigned int maximum>
Multi_field_element< minimum, maximum > Gudhi::persistence_fields::Multi_field_element< minimum, maximum >::get_additive_identity
inlinestatic

Returns the additive identity of a field.

Returns
The additive identity of a field.

◆ get_characteristic()

template<unsigned int minimum, unsigned int maximum>
Multi_field_element< minimum, maximum >::characteristic_type Gudhi::persistence_fields::Multi_field_element< minimum, maximum >::get_characteristic
inlinestatic

Returns the product of all characteristics.

Returns
The product of all characteristics.

◆ get_inverse()

template<unsigned int minimum, unsigned int maximum>
Multi_field_element< minimum, maximum > Gudhi::persistence_fields::Multi_field_element< minimum, maximum >::get_inverse
inline

Returns the inverse of the element in the multi-field, see [6].

Returns
The inverse.

◆ get_multiplicative_identity()

template<unsigned int minimum, unsigned int maximum>
Multi_field_element< minimum, maximum > Gudhi::persistence_fields::Multi_field_element< minimum, maximum >::get_multiplicative_identity
inlinestatic

Returns the multiplicative identity of a field.

Returns
The multiplicative identity of a field.

◆ get_partial_inverse()

template<unsigned int minimum, unsigned int maximum>
std::pair< Multi_field_element< minimum, maximum >, typename Multi_field_element< minimum, maximum >::characteristic_type > Gudhi::persistence_fields::Multi_field_element< minimum, maximum >::get_partial_inverse ( const characteristic_type productOfCharacteristics) const
inline

Returns the inverse of the element with respect to a sub-product of the characteristics in the multi-field, see [6].

Parameters
productOfCharacteristicsSub-product of the characteristics.
Returns
Pair of the inverse and the characteristic the inverse corresponds to.

◆ get_partial_multiplicative_identity()

template<unsigned int minimum, unsigned int maximum>
Multi_field_element< minimum, maximum > Gudhi::persistence_fields::Multi_field_element< minimum, maximum >::get_partial_multiplicative_identity ( const characteristic_type productOfCharacteristics)
inlinestatic

Returns the partial multiplicative identity of the multi-field from the given product. See [6] for more details.

Parameters
productOfCharacteristicsProduct of the different characteristics to take into account in the multi-field.
Returns
The partial multiplicative identity of the multi-field.

◆ get_value()

template<unsigned int minimum, unsigned int maximum>
Multi_field_element< minimum, maximum >::element_type Gudhi::persistence_fields::Multi_field_element< minimum, maximum >::get_value
inline

Returns the value of the element.

Returns
Value of the element.

The documentation for this class was generated from the following file: