carl  24.04
Computer ARithmetic Library
carl::GBProcedure< Polynomial, Procedure, AddingPolynomialPolicy > Class Template Reference

A general class for Groebner Basis calculation. More...

#include <GBProcedure.h>

Inheritance diagram for carl::GBProcedure< Polynomial, Procedure, AddingPolynomialPolicy >:
Collaboration diagram for carl::GBProcedure< Polynomial, Procedure, AddingPolynomialPolicy >:

Public Member Functions

 GBProcedure ()
 
 GBProcedure (const GBProcedure &old)
 
virtual ~GBProcedure ()=default
 
GBProcedureoperator= (const GBProcedure &rhs)
 
bool inputEmpty () const
 Check whether a polynomial is scheduled to be added to the Groebner basis. More...
 
size_t nrOrigGenerators () const
 The number of polynomials which were originally added to the GB. More...
 
void addPolynomial (const Polynomial &p)
 Add a polynmomial which is added to the groebner basis during the next calculate call. More...
 
bool basisis_constant () const
 Checks whether the current representants of the GB contain a constant polynomial. More...
 
std::list< Polynomial > listBasisPolynomials () const
 
const std::vector< Polynomial > & getBasisPolynomials () const
 
void printScheduledPolynomials (bool breakLines=true, bool printReasons=true, std::ostream &os=std::cout) const
 
void reset ()
 Remove all polynomials from the Groebner basis. More...
 
const Ideal< Polynomial > & getIdeal () const
 Get the ideal which encodes the GB. More...
 
void calculate ()
 Calculate the Groebner basis of the current GB union the scheduled polynomials. More...
 
std::list< std::pair< BitVector, BitVector > > reduceInput ()
 Reduce the input polynomials using the other input polynomials and the current Groebner basis. More...
 

Private Member Functions

void reduceGB ()
 

Private Attributes

std::shared_ptr< Ideal< Polynomial > > mGb
 The ideal represented by the current elements of the Groebner basis. More...
 
std::list< Polynomial > mInputScheduled
 The polynomials which are added during the next call for calculate. More...
 
std::vector< Polynomial > mOrigGenerators
 The input polynomials. More...
 
std::vector< size_t > mOrigGeneratorsIndices
 Indices of the input polynomials. More...
 

Detailed Description

template<typename Polynomial, template< typename, template< typename > class > class Procedure, template< typename > class AddingPolynomialPolicy>
class carl::GBProcedure< Polynomial, Procedure, AddingPolynomialPolicy >

A general class for Groebner Basis calculation.

It is parameterized not only in the type of polynomial to be used, but also in the concrete procedure to be used, and the way polynomials should be added to this procedure.

Please notice that this class is designed to support incremental calls. Therefore, it holds a queue with the polynomials which are added. Only upon calling the calculate method, these polynoimials are added to the actual groebner basis.

Moreover, we can

Definition at line 45 of file GBProcedure.h.

Constructor & Destructor Documentation

◆ GBProcedure() [1/2]

template<typename Polynomial , template< typename, template< typename > class > class Procedure, template< typename > class AddingPolynomialPolicy>
carl::GBProcedure< Polynomial, Procedure, AddingPolynomialPolicy >::GBProcedure ( )
inline

Definition at line 59 of file GBProcedure.h.

◆ GBProcedure() [2/2]

template<typename Polynomial , template< typename, template< typename > class > class Procedure, template< typename > class AddingPolynomialPolicy>
carl::GBProcedure< Polynomial, Procedure, AddingPolynomialPolicy >::GBProcedure ( const GBProcedure< Polynomial, Procedure, AddingPolynomialPolicy > &  old)
inline

Definition at line 70 of file GBProcedure.h.

◆ ~GBProcedure()

template<typename Polynomial , template< typename, template< typename > class > class Procedure, template< typename > class AddingPolynomialPolicy>
virtual carl::GBProcedure< Polynomial, Procedure, AddingPolynomialPolicy >::~GBProcedure ( )
virtualdefault

Member Function Documentation

◆ addPolynomial()

template<typename Polynomial , template< typename, template< typename > class > class Procedure, template< typename > class AddingPolynomialPolicy>
void carl::GBProcedure< Polynomial, Procedure, AddingPolynomialPolicy >::addPolynomial ( const Polynomial &  p)
inlinevirtual

Add a polynmomial which is added to the groebner basis during the next calculate call.

Parameters
pThe polynomial to be added.

Implements carl::AbstractGBProcedure< Polynomial >.

Definition at line 116 of file GBProcedure.h.

Here is the caller graph for this function:

◆ basisis_constant()

template<typename Polynomial , template< typename, template< typename > class > class Procedure, template< typename > class AddingPolynomialPolicy>
bool carl::GBProcedure< Polynomial, Procedure, AddingPolynomialPolicy >::basisis_constant ( ) const
inline

Checks whether the current representants of the GB contain a constant polynomial.

Returns

Definition at line 126 of file GBProcedure.h.

◆ calculate()

template<typename Polynomial , template< typename, template< typename > class > class Procedure, template< typename > class AddingPolynomialPolicy>
void carl::GBProcedure< Polynomial, Procedure, AddingPolynomialPolicy >::calculate ( )
inlinevirtual

Calculate the Groebner basis of the current GB union the scheduled polynomials.

Implements carl::AbstractGBProcedure< Polynomial >.

Definition at line 194 of file GBProcedure.h.

Here is the caller graph for this function:

◆ getBasisPolynomials()

template<typename Polynomial , template< typename, template< typename > class > class Procedure, template< typename > class AddingPolynomialPolicy>
const std::vector<Polynomial>& carl::GBProcedure< Polynomial, Procedure, AddingPolynomialPolicy >::getBasisPolynomials ( ) const
inline
Returns

Definition at line 144 of file GBProcedure.h.

◆ getIdeal()

template<typename Polynomial , template< typename, template< typename > class > class Procedure, template< typename > class AddingPolynomialPolicy>
const Ideal<Polynomial>& carl::GBProcedure< Polynomial, Procedure, AddingPolynomialPolicy >::getIdeal ( ) const
inlinevirtual

Get the ideal which encodes the GB.

Returns

Implements carl::AbstractGBProcedure< Polynomial >.

Definition at line 186 of file GBProcedure.h.

Here is the caller graph for this function:

◆ inputEmpty()

template<typename Polynomial , template< typename, template< typename > class > class Procedure, template< typename > class AddingPolynomialPolicy>
bool carl::GBProcedure< Polynomial, Procedure, AddingPolynomialPolicy >::inputEmpty ( ) const
inline

Check whether a polynomial is scheduled to be added to the Groebner basis.

Returns
whether the input is empty.

Definition at line 98 of file GBProcedure.h.

◆ listBasisPolynomials()

template<typename Polynomial , template< typename, template< typename > class > class Procedure, template< typename > class AddingPolynomialPolicy>
std::list<Polynomial> carl::GBProcedure< Polynomial, Procedure, AddingPolynomialPolicy >::listBasisPolynomials ( ) const
inline
Returns

Definition at line 135 of file GBProcedure.h.

◆ nrOrigGenerators()

template<typename Polynomial , template< typename, template< typename > class > class Procedure, template< typename > class AddingPolynomialPolicy>
size_t carl::GBProcedure< Polynomial, Procedure, AddingPolynomialPolicy >::nrOrigGenerators ( ) const
inline

The number of polynomials which were originally added to the GB.

Returns
number of polynomials added.

Definition at line 107 of file GBProcedure.h.

◆ operator=()

template<typename Polynomial , template< typename, template< typename > class > class Procedure, template< typename > class AddingPolynomialPolicy>
GBProcedure& carl::GBProcedure< Polynomial, Procedure, AddingPolynomialPolicy >::operator= ( const GBProcedure< Polynomial, Procedure, AddingPolynomialPolicy > &  rhs)
inline

Definition at line 82 of file GBProcedure.h.

Here is the call graph for this function:

◆ printScheduledPolynomials()

template<typename Polynomial , template< typename, template< typename > class > class Procedure, template< typename > class AddingPolynomialPolicy>
void carl::GBProcedure< Polynomial, Procedure, AddingPolynomialPolicy >::printScheduledPolynomials ( bool  breakLines = true,
bool  printReasons = true,
std::ostream &  os = std::cout 
) const
inline

Definition at line 149 of file GBProcedure.h.

◆ reduceGB()

template<typename Polynomial , template< typename, template< typename > class > class Procedure, template< typename > class AddingPolynomialPolicy>
void carl::GBProcedure< Polynomial, Procedure, AddingPolynomialPolicy >::reduceGB ( )
inlineprivate

Definition at line 261 of file GBProcedure.h.

Here is the call graph for this function:

◆ reduceInput()

template<typename Polynomial , template< typename, template< typename > class > class Procedure, template< typename > class AddingPolynomialPolicy>
std::list<std::pair<BitVector, BitVector> > carl::GBProcedure< Polynomial, Procedure, AddingPolynomialPolicy >::reduceInput ( )
inlinevirtual

Reduce the input polynomials using the other input polynomials and the current Groebner basis.

Returns

Implements carl::AbstractGBProcedure< Polynomial >.

Definition at line 216 of file GBProcedure.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset()

template<typename Polynomial , template< typename, template< typename > class > class Procedure, template< typename > class AddingPolynomialPolicy>
void carl::GBProcedure< Polynomial, Procedure, AddingPolynomialPolicy >::reset ( )
inlinevirtual

Remove all polynomials from the Groebner basis.

Implements carl::AbstractGBProcedure< Polynomial >.

Definition at line 176 of file GBProcedure.h.

Here is the caller graph for this function:

Field Documentation

◆ mGb

template<typename Polynomial , template< typename, template< typename > class > class Procedure, template< typename > class AddingPolynomialPolicy>
std::shared_ptr<Ideal<Polynomial> > carl::GBProcedure< Polynomial, Procedure, AddingPolynomialPolicy >::mGb
private

The ideal represented by the current elements of the Groebner basis.

Definition at line 49 of file GBProcedure.h.

◆ mInputScheduled

template<typename Polynomial , template< typename, template< typename > class > class Procedure, template< typename > class AddingPolynomialPolicy>
std::list<Polynomial> carl::GBProcedure< Polynomial, Procedure, AddingPolynomialPolicy >::mInputScheduled
private

The polynomials which are added during the next call for calculate.

Definition at line 51 of file GBProcedure.h.

◆ mOrigGenerators

template<typename Polynomial , template< typename, template< typename > class > class Procedure, template< typename > class AddingPolynomialPolicy>
std::vector<Polynomial> carl::GBProcedure< Polynomial, Procedure, AddingPolynomialPolicy >::mOrigGenerators
private

The input polynomials.

Definition at line 53 of file GBProcedure.h.

◆ mOrigGeneratorsIndices

template<typename Polynomial , template< typename, template< typename > class > class Procedure, template< typename > class AddingPolynomialPolicy>
std::vector<size_t> carl::GBProcedure< Polynomial, Procedure, AddingPolynomialPolicy >::mOrigGeneratorsIndices
private

Indices of the input polynomials.

Definition at line 55 of file GBProcedure.h.


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