carl  24.04
Computer ARithmetic Library
carl::GFNumber< IntegerType > Class Template Reference

Galois Field numbers, i.e. More...

#include <GFNumber.h>

Public Member Functions

 GFNumber ()=default
 
 GFNumber (IntegerType n, const GaloisField< IntegerType > *gf=nullptr)
 
 GFNumber (const GFNumber &n, const GaloisField< IntegerType > *gf)
 
const GaloisField< IntegerType > * gf () const
 
GFNumber< IntegerType > toGF (const GaloisField< IntegerType > *newfield) const
 
void normalize ()
 
bool is_zero () const
 
bool is_one () const
 
bool is_unit () const
 
const IntegerType & representing_integer () const
 
GFNumber inverse () const
 
const GFNumber operator- () const
 
GFNumberoperator++ ()
 
GFNumberoperator+= (const GFNumber &rhs)
 
GFNumberoperator+= (const IntegerType &rhs)
 
GFNumberoperator-- ()
 
GFNumberoperator-= (const GFNumber &rhs)
 
GFNumberoperator-= (const IntegerType &rhs)
 
GFNumberoperator*= (const GFNumber &rhs)
 
GFNumberoperator*= (const IntegerType &rhs)
 
GFNumberoperator/= (const GFNumber &rhs)
 

Private Attributes

IntegerType mN = carl::constant_zero<IntegerType>::get()
 
const GaloisField< IntegerType > * mGf = nullptr
 

Friends

template<typename IntegerT >
bool operator== (const GFNumber< IntegerT > &lhs, const GFNumber< IntegerT > &rhs)
 
template<typename IntegerT >
bool operator== (const GFNumber< IntegerT > &lhs, const IntegerT &rhs)
 lhs == rhs, if rhs \in [lhs]. More...
 
template<typename IntegerT >
bool operator== (const IntegerT &lhs, const GFNumber< IntegerT > &rhs)
 lhs == rhs, if lhs \in [rhs]. More...
 
template<typename IntegerT >
bool operator== (const GFNumber< IntegerT > &lhs, const GFNumber< IntegerT > &rhs)
 
template<typename IntegerT >
bool operator== (const GFNumber< IntegerT > &lhs, int rhs)
 lhs == rhs, if rhs \in [lhs]. More...
 
template<typename IntegerT >
bool operator== (int lhs, const GFNumber< IntegerT > &rhs)
 lhs == rhs, if lhs \in [rhs]. More...
 
template<typename IntegerT >
bool operator!= (const GFNumber< IntegerT > &lhs, const GFNumber< IntegerT > &rhs)
 
template<typename IntegerT >
bool operator!= (const GFNumber< IntegerT > &lhs, const IntegerT &rhs)
 
template<typename IntegerT >
bool operator!= (const IntegerT &lhs, const GFNumber< IntegerT > &rhs)
 
template<typename IntegerT >
bool operator!= (const GFNumber< IntegerT > &lhs, int rhs)
 
template<typename IntegerT >
bool operator!= (int lhs, const GFNumber< IntegerT > &rhs)
 
template<typename IntegerT >
GFNumber< IntegerT > operator+ (const GFNumber< IntegerT > &lhs, const GFNumber< IntegerT > &rhs)
 
template<typename IntegerT >
GFNumber< IntegerT > operator+ (const GFNumber< IntegerT > &lhs, const IntegerT &rhs)
 
template<typename IntegerT >
GFNumber< IntegerT > operator+ (const IntegerT &lhs, const GFNumber< IntegerT > &rhs)
 
template<typename IntegerT >
GFNumber< IntegerT > operator- (const GFNumber< IntegerT > &lhs, const GFNumber< IntegerT > &rhs)
 
template<typename IntegerT >
GFNumber< IntegerT > operator- (const GFNumber< IntegerT > &lhs, const IntegerT &rhs)
 
template<typename IntegerT >
GFNumber< IntegerT > operator- (const IntegerT &lhs, const GFNumber< IntegerT > &rhs)
 
template<typename IntegerT >
GFNumber< IntegerT > operator* (const GFNumber< IntegerT > &lhs, const GFNumber< IntegerT > &rhs)
 
template<typename IntegerT >
GFNumber< IntegerT > operator* (const GFNumber< IntegerT > &lhs, const IntegerT &rhs)
 
template<typename IntegerT >
GFNumber< IntegerT > operator* (const IntegerT &lhs, const GFNumber< IntegerT > &rhs)
 
template<typename IntegerT >
GFNumber< IntegerT > operator/ (const GFNumber< IntegerT > &lhs, const GFNumber< IntegerT > &rhs)
 
std::ostream & operator<< (std::ostream &os, const GFNumber &rhs)
 

Detailed Description

template<typename IntegerType>
class carl::GFNumber< IntegerType >

Galois Field numbers, i.e.

numbers from fields with a finite characteristic.

Definition at line 20 of file GFNumber.h.

Constructor & Destructor Documentation

◆ GFNumber() [1/3]

template<typename IntegerType >
carl::GFNumber< IntegerType >::GFNumber ( )
default
Here is the caller graph for this function:

◆ GFNumber() [2/3]

template<typename IntegerType >
carl::GFNumber< IntegerType >::GFNumber ( IntegerType  n,
const GaloisField< IntegerType > *  gf = nullptr 
)
inlineexplicit

Definition at line 28 of file GFNumber.h.

◆ GFNumber() [3/3]

template<typename IntegerType >
carl::GFNumber< IntegerType >::GFNumber ( const GFNumber< IntegerType > &  n,
const GaloisField< IntegerType > *  gf 
)
inline

Definition at line 34 of file GFNumber.h.

Member Function Documentation

◆ gf()

template<typename IntegerType >
const GaloisField<IntegerType>* carl::GFNumber< IntegerType >::gf ( ) const
inline

Definition at line 40 of file GFNumber.h.

◆ inverse()

template<typename IntegerType >
GFNumber carl::GFNumber< IntegerType >::inverse ( ) const

◆ is_one()

template<typename IntegerType >
bool carl::GFNumber< IntegerType >::is_one ( ) const
inline

Definition at line 62 of file GFNumber.h.

Here is the call graph for this function:

◆ is_unit()

template<typename IntegerType >
bool carl::GFNumber< IntegerType >::is_unit ( ) const
inline

Definition at line 67 of file GFNumber.h.

Here is the caller graph for this function:

◆ is_zero()

template<typename IntegerType >
bool carl::GFNumber< IntegerType >::is_zero ( ) const
inline

Definition at line 57 of file GFNumber.h.

Here is the caller graph for this function:

◆ normalize()

template<typename IntegerType >
void carl::GFNumber< IntegerType >::normalize ( )
inline

Definition at line 50 of file GFNumber.h.

Here is the call graph for this function:

◆ operator*=() [1/2]

template<typename IntegerType >
GFNumber& carl::GFNumber< IntegerType >::operator*= ( const GFNumber< IntegerType > &  rhs)

◆ operator*=() [2/2]

template<typename IntegerType >
GFNumber& carl::GFNumber< IntegerType >::operator*= ( const IntegerType &  rhs)

◆ operator++()

template<typename IntegerType >
GFNumber& carl::GFNumber< IntegerType >::operator++ ( )

◆ operator+=() [1/2]

template<typename IntegerType >
GFNumber& carl::GFNumber< IntegerType >::operator+= ( const GFNumber< IntegerType > &  rhs)

◆ operator+=() [2/2]

template<typename IntegerType >
GFNumber& carl::GFNumber< IntegerType >::operator+= ( const IntegerType &  rhs)

◆ operator-()

template<typename IntegerType >
const GFNumber carl::GFNumber< IntegerType >::operator- ( ) const

◆ operator--()

template<typename IntegerType >
GFNumber& carl::GFNumber< IntegerType >::operator-- ( )

◆ operator-=() [1/2]

template<typename IntegerType >
GFNumber& carl::GFNumber< IntegerType >::operator-= ( const GFNumber< IntegerType > &  rhs)

◆ operator-=() [2/2]

template<typename IntegerType >
GFNumber& carl::GFNumber< IntegerType >::operator-= ( const IntegerType &  rhs)

◆ operator/=()

template<typename IntegerType >
GFNumber& carl::GFNumber< IntegerType >::operator/= ( const GFNumber< IntegerType > &  rhs)

◆ representing_integer()

template<typename IntegerType >
const IntegerType& carl::GFNumber< IntegerType >::representing_integer ( ) const
inline

Definition at line 72 of file GFNumber.h.

Here is the caller graph for this function:

◆ toGF()

template<typename IntegerType >
GFNumber<IntegerType> carl::GFNumber< IntegerType >::toGF ( const GaloisField< IntegerType > *  newfield) const
inline

Definition at line 45 of file GFNumber.h.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator!= [1/5]

template<typename IntegerType >
template<typename IntegerT >
bool operator!= ( const GFNumber< IntegerT > &  lhs,
const GFNumber< IntegerT > &  rhs 
)
friend

◆ operator!= [2/5]

template<typename IntegerType >
template<typename IntegerT >
bool operator!= ( const GFNumber< IntegerT > &  lhs,
const IntegerT &  rhs 
)
friend

◆ operator!= [3/5]

template<typename IntegerType >
template<typename IntegerT >
bool operator!= ( const GFNumber< IntegerT > &  lhs,
int  rhs 
)
friend

◆ operator!= [4/5]

template<typename IntegerType >
template<typename IntegerT >
bool operator!= ( const IntegerT &  lhs,
const GFNumber< IntegerT > &  rhs 
)
friend

◆ operator!= [5/5]

template<typename IntegerType >
template<typename IntegerT >
bool operator!= ( int  lhs,
const GFNumber< IntegerT > &  rhs 
)
friend

◆ operator* [1/3]

template<typename IntegerType >
template<typename IntegerT >
GFNumber<IntegerT> operator* ( const GFNumber< IntegerT > &  lhs,
const GFNumber< IntegerT > &  rhs 
)
friend

◆ operator* [2/3]

template<typename IntegerType >
template<typename IntegerT >
GFNumber<IntegerT> operator* ( const GFNumber< IntegerT > &  lhs,
const IntegerT &  rhs 
)
friend

◆ operator* [3/3]

template<typename IntegerType >
template<typename IntegerT >
GFNumber<IntegerT> operator* ( const IntegerT &  lhs,
const GFNumber< IntegerT > &  rhs 
)
friend

◆ operator+ [1/3]

template<typename IntegerType >
template<typename IntegerT >
GFNumber<IntegerT> operator+ ( const GFNumber< IntegerT > &  lhs,
const GFNumber< IntegerT > &  rhs 
)
friend

◆ operator+ [2/3]

template<typename IntegerType >
template<typename IntegerT >
GFNumber<IntegerT> operator+ ( const GFNumber< IntegerT > &  lhs,
const IntegerT &  rhs 
)
friend

◆ operator+ [3/3]

template<typename IntegerType >
template<typename IntegerT >
GFNumber<IntegerT> operator+ ( const IntegerT &  lhs,
const GFNumber< IntegerT > &  rhs 
)
friend

◆ operator- [1/3]

template<typename IntegerType >
template<typename IntegerT >
GFNumber<IntegerT> operator- ( const GFNumber< IntegerT > &  lhs,
const GFNumber< IntegerT > &  rhs 
)
friend

◆ operator- [2/3]

template<typename IntegerType >
template<typename IntegerT >
GFNumber<IntegerT> operator- ( const GFNumber< IntegerT > &  lhs,
const IntegerT &  rhs 
)
friend

◆ operator- [3/3]

template<typename IntegerType >
template<typename IntegerT >
GFNumber<IntegerT> operator- ( const IntegerT &  lhs,
const GFNumber< IntegerT > &  rhs 
)
friend

◆ operator/

template<typename IntegerType >
template<typename IntegerT >
GFNumber<IntegerT> operator/ ( const GFNumber< IntegerT > &  lhs,
const GFNumber< IntegerT > &  rhs 
)
friend

◆ operator<<

template<typename IntegerType >
std::ostream& operator<< ( std::ostream &  os,
const GFNumber< IntegerType > &  rhs 
)
friend

Definition at line 158 of file GFNumber.h.

◆ operator== [1/6]

template<typename IntegerType >
template<typename IntegerT >
bool operator== ( const GFNumber< IntegerT > &  lhs,
const GFNumber< IntegerT > &  rhs 
)
friend

◆ operator== [2/6]

template<typename IntegerType >
template<typename IntegerT >
bool operator== ( const GFNumber< IntegerT > &  lhs,
const GFNumber< IntegerT > &  rhs 
)
friend

◆ operator== [3/6]

template<typename IntegerType >
template<typename IntegerT >
bool operator== ( const GFNumber< IntegerT > &  lhs,
const IntegerT &  rhs 
)
friend

lhs == rhs, if rhs \in [lhs].

Returns

◆ operator== [4/6]

template<typename IntegerType >
template<typename IntegerT >
bool operator== ( const GFNumber< IntegerT > &  lhs,
int  rhs 
)
friend

lhs == rhs, if rhs \in [lhs].

Returns

◆ operator== [5/6]

template<typename IntegerType >
template<typename IntegerT >
bool operator== ( const IntegerT &  lhs,
const GFNumber< IntegerT > &  rhs 
)
friend

lhs == rhs, if lhs \in [rhs].

Returns

◆ operator== [6/6]

template<typename IntegerType >
template<typename IntegerT >
bool operator== ( int  lhs,
const GFNumber< IntegerT > &  rhs 
)
friend

lhs == rhs, if lhs \in [rhs].

Returns

Field Documentation

◆ mGf

template<typename IntegerType >
const GaloisField<IntegerType>* carl::GFNumber< IntegerType >::mGf = nullptr
private

Definition at line 23 of file GFNumber.h.

◆ mN

template<typename IntegerType >
IntegerType carl::GFNumber< IntegerType >::mN = carl::constant_zero<IntegerType>::get()
private

Definition at line 22 of file GFNumber.h.


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