Class representing an element of the \( \mathbb{F}_p \) field for any prime number \( p \). More...
#include <gudhi/Fields/Zp_field.h>
Public Types | |
| using | Element = Unsigned_integer_type |
| using | Characteristic = Element |
Public Member Functions | |
| Zp_field_element () | |
| Default constructor. Sets the element to 0. | |
| template<typename Integer_type, class = isInteger<Integer_type>> | |
| Zp_field_element (Integer_type element) | |
| Constructor setting the element to the given value. | |
| Zp_field_element (const Zp_field_element &toCopy)=default | |
| Copy constructor. | |
| Zp_field_element (Zp_field_element &&toMove) noexcept | |
| Move constructor. | |
| Zp_field_element & | operator= (Zp_field_element other) |
| Assign operator. | |
| Zp_field_element & | operator= (Zp_field_element &&other) noexcept |
| Move assign operator. | |
| template<typename Integer_type, class = isInteger<Integer_type>> | |
| Zp_field_element & | operator= (const Integer_type &value) |
| Assign operator. | |
| operator unsigned int () const | |
| Casts the element into an unsigned int. | |
| Zp_field_element | get_inverse () const |
| Returns the inverse of the element in the field. | |
| std::pair< Zp_field_element, unsigned int > | get_partial_inverse (unsigned int productOfCharacteristics) const |
| For interface purposes with multi-fields. Returns the inverse together with the argument. | |
| Element | get_value () const |
| Returns the value of the element. | |
Static Public Member Functions | |
| static Zp_field_element | get_additive_identity () |
| Returns the additive identity of the field. | |
| static Zp_field_element | get_multiplicative_identity () |
| Returns the multiplicative identity of the field. | |
| static Zp_field_element | get_partial_multiplicative_identity (unsigned int productOfCharacteristics) |
| For interface purposes with multi-fields. Returns the multiplicative identity of the field. | |
| static constexpr unsigned int | get_characteristic () |
| Returns the current characteristic. | |
Friends | |
| void | operator+= (Zp_field_element &f1, const Zp_field_element &f2) |
| operator+= | |
| template<typename Integer_type, class = isInteger<Integer_type>> | |
| void | operator+= (Zp_field_element &f, const Integer_type &v) |
| operator+= | |
| Zp_field_element | operator+ (Zp_field_element f1, const Zp_field_element &f2) |
| operator+ | |
| template<typename Integer_type, class = isInteger<Integer_type>> | |
| Zp_field_element | operator+ (Zp_field_element f, const Integer_type &v) |
| operator+ | |
| template<typename Integer_type, class = isInteger<Integer_type>> | |
| Integer_type | operator+ (const Integer_type &v, Zp_field_element f) |
| operator+ | |
| void | operator-= (Zp_field_element &f1, const Zp_field_element &f2) |
| operator-= | |
| template<typename Integer_type, class = isInteger<Integer_type>> | |
| void | operator-= (Zp_field_element &f, const Integer_type &v) |
| operator-= | |
| Zp_field_element | operator- (Zp_field_element f1, const Zp_field_element &f2) |
| operator- | |
| template<typename Integer_type, class = isInteger<Integer_type>> | |
| Zp_field_element | operator- (Zp_field_element f, const Integer_type &v) |
| operator- | |
| template<typename Integer_type, class = isInteger<Integer_type>> | |
| Integer_type | operator- (const Integer_type &v, const Zp_field_element &f) |
| operator- | |
| void | operator*= (Zp_field_element &f1, const Zp_field_element &f2) |
| operator*= | |
| template<typename Integer_type, class = isInteger<Integer_type>> | |
| void | operator*= (Zp_field_element &f, const Integer_type &v) |
| operator*= | |
| Zp_field_element | operator* (Zp_field_element f1, const Zp_field_element &f2) |
| operator* | |
| template<typename Integer_type, class = isInteger<Integer_type>> | |
| Zp_field_element | operator* (Zp_field_element f, const Integer_type &v) |
| operator* | |
| template<typename Integer_type, class = isInteger<Integer_type>> | |
| Integer_type | operator* (const Integer_type &v, Zp_field_element f) |
| operator* | |
| bool | operator== (const Zp_field_element &f1, const Zp_field_element &f2) |
| operator== | |
| template<typename Integer_type, class = isInteger<Integer_type>> | |
| bool | operator== (const Integer_type &v, const Zp_field_element &f) |
| operator== | |
| template<typename Integer_type, class = isInteger<Integer_type>> | |
| bool | operator== (const Zp_field_element &f, const Integer_type &v) |
| operator== | |
| bool | operator!= (const Zp_field_element &f1, const Zp_field_element &f2) |
| operator!= | |
| template<typename Integer_type, class = isInteger<Integer_type>> | |
| bool | operator!= (const Integer_type &v, const Zp_field_element &f) |
| operator!= | |
| template<typename Integer_type, class = isInteger<Integer_type>> | |
| bool | operator!= (const Zp_field_element &f, const Integer_type &v) |
| operator!= | |
| void | swap (Zp_field_element &f1, Zp_field_element &f2) noexcept |
| Swap operator. | |
Class representing an element of the \( \mathbb{F}_p \) field for any prime number \( p \).
| characteristic | Value of the characteristic of the field. Has to be a positive prime number. |
| Unsigned_integer_type | A native unsigned integer type: unsigned int, long unsigned int, etc. Will be used as the field element type. |
| using Gudhi::persistence_fields::Zp_field_element< characteristic, Unsigned_integer_type, class >::Characteristic = Element |
Type for the field characteristic.
| using Gudhi::persistence_fields::Zp_field_element< characteristic, Unsigned_integer_type, class >::Element = Unsigned_integer_type |
Type for the elements in the field.
|
inline |
Constructor setting the element to the given value.
| Integer_type | A native integer type. Should be able to contain the characteristic if signed. |
| element | Value of the element. |
|
default |
Copy constructor.
| toCopy | Element to copy. |
|
inlinenoexcept |
Move constructor.
| toMove | Element to move. |
|
inlinestatic |
Returns the additive identity of the field.
|
inlinestaticconstexpr |
Returns the current characteristic.
|
inline |
Returns the inverse of the element in the field.
|
inlinestatic |
Returns the multiplicative identity of the field.
|
inline |
For interface purposes with multi-fields. Returns the inverse together with the argument.
| productOfCharacteristics | Some value. |
productOfCharacteristics.
|
inlinestatic |
For interface purposes with multi-fields. Returns the multiplicative identity of the field.
| productOfCharacteristics | Some value. |
|
inline |
Returns the value of the element.
|
inline |
Assign operator.
| Integer_type | A native integer type. Should be able to contain the characteristic if signed. |
|
friend |
operator!=
| Integer_type | A native integer type. Should be able to contain the characteristic if signed. |
|
friend |
operator!=
| Integer_type | A native integer type. Should be able to contain the characteristic if signed. |
|
friend |
operator*
| Integer_type | A native integer type. Should be able to contain the characteristic if signed. |
|
friend |
operator*
| Integer_type | A native integer type. Should be able to contain the characteristic if signed. |
|
friend |
operator+
| Integer_type | A native integer type. Should be able to contain the characteristic if signed. |
|
friend |
operator+
| Integer_type | A native integer type. Should be able to contain the characteristic if signed. |
|
friend |
operator-
| Integer_type | A native integer type. Should be able to contain the characteristic if signed. |
|
friend |
operator-
| Integer_type | A native integer type. Should be able to contain the characteristic if signed. |
|
friend |
operator==
| Integer_type | A native integer type. Should be able to contain the characteristic if signed. |
|
friend |
operator==
| Integer_type | A native integer type. Should be able to contain the characteristic if signed. |