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::CriticalPair< Element > Class Template Reference

Represent a critical pair. More...

#include <critical-pair.h>

Public Member Functions

 CriticalPair ()
 Constructor.
 
 CriticalPair (int p1, int p2)
 Constructor. More...
 
 CriticalPair (CriticalPair const &cp)
 Copy constructor.
 
 ~CriticalPair ()
 Destructor.
 
int getP1 () const
 Get the index of the first tagged polynomial. More...
 
int getP2 () const
 Get the index of the second tagged polynomial. More...
 
Monomial const & getLcm () const
 Get _lcm. More...
 
Monomial const & getU1 () const
 Get the number of the monomial u1. More...
 
Monomial const & getU2 () const
 Get the number of the monomial u2. More...
 
int getDegree () const
 Get the degree of this. More...
 
bool setCriticalPair (int p1, int p2)
 Modify an already created critical pair. More...
 
void printCriticalPair (std::ostream &stream=std::cout) const
 Print the critical pair.
 
int compareCriticalPair (CriticalPair const &criticalPair) const
 Compare this with criticalPair. More...
 
CriticalPairoperator= (CriticalPair const &criticalPair)
 Overload the operator =. More...
 

Static Public Member Functions

static void setTaggedPolynomialArray (vector< TaggedPolynomial< Element >> *taggedPolynomialArray)
 Set the array of tagged polynomial to use. More...
 
static TaggedPolynomial
< Element > const & 
getTaggedPolynomialArray (int numTaggedPolynomial)
 Get a tagged polynomial from the array of tagged polynomial. More...
 
static int getSizeTaggedPolynomialArray ()
 Get the size of the array pointed by TAGGEG_POLYNOMIAL_ARRAY.
 
static void setMonomialArray (MonomialArray *monomialArray)
 Set the monomial array to use. More...
 

Private Attributes

Monomial _lcm
 
Monomial _u1
 
int _p1
 
Monomial _u2
 
int _p2
 

Static Private Attributes

static std::vector
< TaggedPolynomial< Element > > * 
TAGGEG_POLYNOMIAL_ARRAY
 
static MonomialArrayMONOMIAL_ARRAY
 

Detailed Description

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

Represent a critical pair.

Definition at line 44 of file critical-pair.h.

Constructor & Destructor Documentation

template<typename Element>
F4::CriticalPair< Element >::CriticalPair ( int  p1,
int  p2 
)

Constructor.

Precondition
The static variable TAGGEG_POLYNOMIAL_ARRAY must be set beforhand.
Parameters
p1Index of a tagged polynomial in TAGGEG_POLYNOMIAL_ARRAY.
p2Index of a tagged polynomial in TAGGEG_POLYNOMIAL_ARRAY.

Member Function Documentation

template<typename Element>
int F4::CriticalPair< Element >::compareCriticalPair ( CriticalPair< Element > const &  criticalPair) const

Compare this with criticalPair.

Parameters
criticalPairCriticalPair.
Returns
1 if LM(this) > LM(criticalPair) or if (lcm1 = lcm2) & this.(_p1,_p2) newer than criticalPair.(_p1,_p2)
0 if this == criticalPair.
-1 otherwise.
template<typename Element>
int F4::CriticalPair< Element >::getDegree ( ) const

Get the degree of this.

Returns
Degree of the critical pair.
template<typename Element>
Monomial const& F4::CriticalPair< Element >::getLcm ( ) const

Get _lcm.

Returns
lcm of the critical pair.
template<typename Element>
int F4::CriticalPair< Element >::getP1 ( ) const

Get the index of the first tagged polynomial.

Returns
Index of the first tagged polynomial.
template<typename Element>
int F4::CriticalPair< Element >::getP2 ( ) const

Get the index of the second tagged polynomial.

Returns
Index of the second tagged polynomial.
template<typename Element>
static TaggedPolynomial<Element> const& F4::CriticalPair< Element >::getTaggedPolynomialArray ( int  numTaggedPolynomial)
static

Get a tagged polynomial from the array of tagged polynomial.

Parameters
numTaggedPolynomialIndex of a tagged polynomial in the array pointed by TAGGEG_POLYNOMIAL_ARRAY.
template<typename Element>
Monomial const& F4::CriticalPair< Element >::getU1 ( ) const

Get the number of the monomial u1.

Returns
Monomial u1.
template<typename Element>
Monomial const& F4::CriticalPair< Element >::getU2 ( ) const

Get the number of the monomial u2.

Returns
Monomial u2.
template<typename Element>
CriticalPair& F4::CriticalPair< Element >::operator= ( CriticalPair< Element > const &  criticalPair)

Overload the operator =.

Parameters
criticalPairCritical pair to copy.
Returns
Reference on this.
template<typename Element>
bool F4::CriticalPair< Element >::setCriticalPair ( int  p1,
int  p2 
)

Modify an already created critical pair.

Precondition
The static variable TAGGEG_POLYNOMIAL_ARRAY must be set beforhand.
Parameters
p1Index of a tagged polynomial in TAGGEG_POLYNOMIAL_ARRAY.
p2Index of a tagged polynomial in TAGGEG_POLYNOMIAL_ARRAY.
Returns
true if the critical pair cannot be skipped with the 1st Buchberger criteria.
false if it can.
template<typename Element>
static void F4::CriticalPair< Element >::setMonomialArray ( MonomialArray monomialArray)
static

Set the monomial array to use.

Parameters
monomialArrayAddress of the array.
template<typename Element>
static void F4::CriticalPair< Element >::setTaggedPolynomialArray ( vector< TaggedPolynomial< Element >> *  taggedPolynomialArray)
static

Set the array of tagged polynomial to use.

Parameters
taggedPolynomialArrayAddress of the array.

Member Data Documentation

template<typename Element>
Monomial F4::CriticalPair< Element >::_lcm
private

lcm of the critical pair

Definition at line 180 of file critical-pair.h.

template<typename Element>
int F4::CriticalPair< Element >::_p1
private

Index of a tagged polynomial in an array.

Definition at line 182 of file critical-pair.h.

template<typename Element>
int F4::CriticalPair< Element >::_p2
private

Index of a tagged polynomial in an array.

Definition at line 184 of file critical-pair.h.

template<typename Element>
Monomial F4::CriticalPair< Element >::_u1
private

Monomial such that lcm(u1*p1)=lcm=lcm(u2*p2).

Definition at line 181 of file critical-pair.h.

template<typename Element>
Monomial F4::CriticalPair< Element >::_u2
private

Monomial such that lcm(u1*p1)=lcm=lcm(u2*p2).

Definition at line 183 of file critical-pair.h.

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

Pointer on a monomial array

Definition at line 187 of file critical-pair.h.

template<typename Element>
std::vector<TaggedPolynomial<Element> >* F4::CriticalPair< Element >::TAGGEG_POLYNOMIAL_ARRAY
staticprivate

Pointer on a dynamic array of TaggedPolynomial

Definition at line 186 of file critical-pair.h.


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