OPENF4
Library for Gröebner basis computations over finite fields.
 All Classes Namespaces Files Functions Variables Friends Pages
Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
F4::Term< Element > Class Template Reference

Represent a term. More...

#include <term.h>

Public Member Functions

 Term ()
 Constructor.
 
 Term (Element coeff, Monomial const &mon)
 Constructor. More...
 
 Term (Element coeff, int numMon)
 Constructor. More...
 
 Term (std::string const s)
 Constructor. More...
 
 Term (Term const &toCopy)
 Copy constructor. More...
 
Element getCoefficient () const
 Get the coefficient of this. More...
 
void setCoefficient (Element coeff)
 Set the coefficient of this. More...
 
void setCoefficientOne ()
 Set the coefficient of this to 1. More...
 
int getNumMonomial () const
 Get the number of the monomial of this. More...
 
void setNumMonomial (int numMon)
 Set the number of the monomial of this. More...
 
void setTerm (std::string const s)
 Initialize this with s. More...
 
void readCoefficient (std::string const s)
 Get the coefficient of the term written s. Must be specialized for each type of Element. More...
 
void printTerm (std::ostream &stream) const
 Print the term.
 
void multNumMon (int numMon)
 Multiply this with a monomial under integer form. More...
 
int compareTerm (Term< Element > const &term) const
 Compare terms according to the grevlex order. Coefficient are not taking into accout. More...
 
Termoperator= (Term const &term)
 Overload the operator =. More...
 
Termoperator*= (Monomial const &monomial)
 Overload the operator *= to multiply this with a monomial. More...
 
Termoperator*= (Element element)
 Overload the operator *= to multiply this with an Element. More...
 
Termoperator*= (Term const &term)
 Overload the operator *= to multiply this with a term. More...
 

Static Public Member Functions

static void setMonomialArray (MonomialArray *monomialArray)
 Set the monomial array to use. More...
 

Private Attributes

Element _coefficient
 
int _numMonomial
 

Static Private Attributes

static MonomialArrayMONOMIAL_ARRAY
 

Detailed Description

template<typename Element>
class F4::Term< Element >

Represent a term.

Definition at line 50 of file term.h.

Constructor & Destructor Documentation

template<typename Element>
F4::Term< Element >::Term ( Element  coeff,
Monomial const &  mon 
)

Constructor.

Parameters
coeffCoefficient of the term.
monMonomial of the term.
template<typename Element>
F4::Term< Element >::Term ( Element  coeff,
int  numMon 
)

Constructor.

Parameters
coeffCoefficient of the term.
numMonNumber of the monomial of the term.
template<typename Element>
F4::Term< Element >::Term ( std::string const  s)

Constructor.

Parameters
sString representing the term.
template<typename Element>
F4::Term< Element >::Term ( Term< Element > const &  toCopy)

Copy constructor.

Parameters
toCopyTerm.

Member Function Documentation

template<typename Element>
int F4::Term< Element >::compareTerm ( Term< Element > const &  term) const

Compare terms according to the grevlex order. Coefficient are not taking into accout.

Parameters
termTerm.
Returns
0 if this==term.
1 if this>term.
-1 if this<term.
template<typename Element>
Element F4::Term< Element >::getCoefficient ( ) const

Get the coefficient of this.

Returns
Coefficient of this.
template<typename Element>
int F4::Term< Element >::getNumMonomial ( ) const

Get the number of the monomial of this.

Returns
numMonomial of this.
template<typename Element>
void F4::Term< Element >::multNumMon ( int  numMon)

Multiply this with a monomial under integer form.

Parameters
numMonnumber of a monomial.
template<typename Element>
Term& F4::Term< Element >::operator*= ( Monomial const &  monomial)

Overload the operator *= to multiply this with a monomial.

Parameters
monMonomial.
Returns
Reference on this.
template<typename Element>
Term& F4::Term< Element >::operator*= ( Element  element)

Overload the operator *= to multiply this with an Element.

Parameters
elementElement.
Returns
Reference on this.
template<typename Element>
Term& F4::Term< Element >::operator*= ( Term< Element > const &  term)

Overload the operator *= to multiply this with a term.

Parameters
termTerm.
Returns
Reference on this.
template<typename Element>
Term& F4::Term< Element >::operator= ( Term< Element > const &  term)

Overload the operator =.

Parameters
termTerm to copy.
Returns
Reference on this.
template<typename Element>
void F4::Term< Element >::readCoefficient ( std::string const  s)

Get the coefficient of the term written s. Must be specialized for each type of Element.

Parameters
sString representing the term.
Returns
Coefficent the term.
template<typename Element>
void F4::Term< Element >::setCoefficient ( Element  coeff)

Set the coefficient of this.

Parameters
Coefficient.
template<typename Element>
void F4::Term< Element >::setCoefficientOne ( )

Set the coefficient of this to 1.

Parameters
Coefficient.
template<typename Element>
static void F4::Term< Element >::setMonomialArray ( MonomialArray monomialArray)
static

Set the monomial array to use.

Parameters
monomialArrayAddress of the array.
template<typename Element>
void F4::Term< Element >::setNumMonomial ( int  numMon)

Set the number of the monomial of this.

Parameters
numMonNumber of the monomial of this.
template<typename Element>
void F4::Term< Element >::setTerm ( std::string const  s)

Initialize this with s.

Parameters
sString representing the term.

Member Data Documentation

template<typename Element>
Element F4::Term< Element >::_coefficient
private

Coefficient of the term.

Definition at line 197 of file term.h.

template<typename Element>
int F4::Term< Element >::_numMonomial
private

Number of the monomial of the term.

Definition at line 198 of file term.h.

template<typename Element>
MonomialArray* F4::Term< Element >::MONOMIAL_ARRAY
staticprivate

Pointer on a monomial array

Definition at line 200 of file term.h.


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