polybori::COrderingBase Class Referenceabstract

`#include <COrderingBase.h>`

Inheritance diagram for polybori::COrderingBase:

## Public Types

typedef CCheckedIdx | checked_idx_type
| Check index on input. More...
typedef std::vector< idx_type > | block_idx_type
| Type for block indices. More...
typedef block_idx_type::const_iterator | block_iterator
| Type for block iterators. More...
typedef BooleSet | set_type
| Type of Boolean sets. More...
Adopt polynomial type definitions
typedef BoolePolynomial | poly_type
typedef BooleMonomial | monom_type
typedef CCuddNavigator | navigator
typedef BooleExponent | exp_type
typedef COrderedIter< navigator, monom_type > | ordered_iterator
typedef COrderedIter< navigator, exp_type > | ordered_exp_iterator
Public Types inherited from polybori::CAuxTypes
typedef bool | bool_type
| Type for standard true/false statements. More...
typedef std::size_t | size_type
| Type for lengths, dimensions, etc. More...
typedef int | deg_type
| Type for polynomial degrees (ranges from -1 to maxint) More...
typedef int | integer_type
| Type for integer numbers. More...
typedef int | idx_type
| Type for indices. More...
typedef std::size_t | hash_type
| Type for hashing. More...
typedef unsigned int | errornum_type
| Type used to store error codes. More...
typedef short int | comp_type
| Type for comparisons. More...
typedef int | ordercode_type
| Type for ordering codes. More...
typedef const char * | errortext_type
| Type used to verbose error information. More...
typedef std::ostream | ostream_type
| Type for out-stream. More...
typedef const char * | vartext_type
| Type for setting/getting names of variables. More...
typedef unsigned long | large_size_type
| large size_type (necessary?) More...
typedef std::size_t | refcount_type
| Type for counting references. More...

## Public Member Functions

| COrderingBase ()
| Default constructor. More...
virtual | ~COrderingBase ()=0
virtual comp_type | compare (idx_type, idx_type) const =0
| Comparison of monomials. More...
virtual comp_type | compare (const monom_type &, const monom_type &) const =0
virtual comp_type | compare (const exp_type &, const exp_type &) const =0
virtual monom_type | lead (const poly_type &) const =0
| Get leading term. More...
virtual monom_type | lead (const poly_type &, deg_type) const =0
| Get leading term (using upper bound) More...
virtual exp_type | leadExp (const poly_type &) const =0
| Get leading exponent. More...
virtual exp_type | leadExp (const poly_type &, deg_type) const =0
| Get leading exponent (using upper bound) More...
virtual poly_type | leadFirst (const poly_type &) const =0
| Generates polynomial with leading term first (other terms may be skipped) More...
virtual bool_type | isLexicographical () const =0
| Check whether ring is lexicographical. More...
virtual bool_type | orderedStandardIteration () const =0
| Test whether iterators respect order. More...
virtual bool_type | isSymmetric () const =0
| Test whether variable pertubation do not change the order. More...
virtual bool_type | isDegreeOrder () const =0
| Test whether we deal with a degree-ordering. More...
virtual bool_type | isBlockOrder () const =0
| Test whether we deal with a block-ordering. More...
virtual bool_type | isTotalDegreeOrder () const =0
| Test whether we deal with a total degree-ordering. More...
virtual bool_type | ascendingVariables () const =0
| Test whether variables are in ascending order. More...
virtual bool_type | descendingVariables () const =0
| Test whether variables are in descending order. More...
virtual bool_type | isDegreeReverseLexicographical () const =0
| Test whether ordering is deg-rev-lex ordering. More...
virtual ordered_iterator | leadIteratorBegin (const poly_type &) const =0
| Initialize iterator corresponding to leading term. More...
virtual ordered_iterator | leadIteratorEnd (const poly_type &) const =0
| End marker for iterator corresponding to leading term. More...
virtual ordered_exp_iterator | leadExpIteratorBegin (const poly_type &) const =0
| Initialize exponent iterator corresponding to leading term. More...
virtual ordered_exp_iterator | leadExpIteratorEnd (const poly_type &) const =0
| End marker for exponent iterator corresponding to leading term. More...
virtual ordercode_type | getOrderCode () const =0
| Get numerical code for ordering. More...
virtual ordercode_type | getBaseOrderCode () const =0
| Get numerical code for base ordering (the same for non-block orderings) More...
virtual bool_type | lieInSameBlock (idx_type, idx_type) const =0
virtual idx_type | lastBlockStart () const =0
| Generic procedure to get index, where last block starts. More...
interface for block orderings
virtual block_iterator | blockBegin () const
virtual block_iterator | blockEnd () const
virtual void | appendBlock (checked_idx_type)
virtual void | clearBlocks ()

## Protected Member Functions

monom_type | monom (const set_type &rhs) const
| Get monomial from set of subsets of Boolean variables (internal use only) More...

## Detailed Description

This class is the base of all PolyBoRi orderings.

It can be used as an abstract base for runtime-selectable orderings.

## Member Typedef Documentation

typedef std::vector<idx_type> polybori::COrderingBase::block_idx_type

Type for block indices.

typedef block_idx_type::const_iterator polybori::COrderingBase::block_iterator

Type for block iterators.

typedef CCheckedIdx polybori::COrderingBase::checked_idx_type

Check index on input.

typedef BooleExponent polybori::COrderingBase::exp_type

typedef BooleMonomial polybori::COrderingBase::monom_type

typedef CCuddNavigator polybori::COrderingBase::navigator

typedef COrderedIter<navigator, exp_type> polybori::COrderingBase::ordered_exp_iterator

typedef COrderedIter<navigator, monom_type> polybori::COrderingBase::ordered_iterator

typedef BoolePolynomial polybori::COrderingBase::poly_type

typedef BooleSet polybori::COrderingBase::set_type

Type of Boolean sets.

## Constructor & Destructor Documentation

polybori::COrderingBase::COrderingBase | ( |  | ) |

inline

Default constructor.

polybori::COrderingBase::~COrderingBase | ( |  | ) |

inline pure virtual

## Member Function Documentation

virtual void polybori::COrderingBase::appendBlock | ( | checked_idx_type |  | ) |

inline virtual

Reimplemented in polybori::CBlockOrderingFacade< OrderType, OrderTag >, polybori::CBlockOrderingFacade< BlockDegLexOrder, block_dlex_tag >, and polybori::CBlockOrderingFacade< BlockDegRevLexAscOrder, block_dp_asc_tag >.

virtual bool_type polybori::COrderingBase::ascendingVariables | ( |  | ) | const

pure virtual

Test whether variables are in ascending order.

Implemented in polybori::COrderingFacade< OrderType, OrderTag >, polybori::COrderingFacade< BlockDegLexOrder, block_dlex_tag >, polybori::COrderingFacade< LexOrder, lex_tag >, polybori::COrderingFacade< DegLexOrder, dlex_tag >, polybori::COrderingFacade< DegRevLexAscOrder, dp_asc_tag >, and polybori::COrderingFacade< BlockDegRevLexAscOrder, block_dp_asc_tag >.

virtual block_iterator polybori::COrderingBase::blockBegin | ( |  | ) | const

inline virtual

Reimplemented in polybori::CBlockOrderingFacade< OrderType, OrderTag >, polybori::CBlockOrderingFacade< BlockDegLexOrder, block_dlex_tag >, and polybori::CBlockOrderingFacade< BlockDegRevLexAscOrder, block_dp_asc_tag >.

Referenced by polybori::block_begin().

virtual block_iterator polybori::COrderingBase::blockEnd | ( |  | ) | const

inline virtual

Reimplemented in polybori::CBlockOrderingFacade< OrderType, OrderTag >, polybori::CBlockOrderingFacade< BlockDegLexOrder, block_dlex_tag >, and polybori::CBlockOrderingFacade< BlockDegRevLexAscOrder, block_dp_asc_tag >.

Referenced by polybori::block_end().

virtual void polybori::COrderingBase::clearBlocks | ( |  | ) |

inline virtual

Reimplemented in polybori::CBlockOrderingFacade< OrderType, OrderTag >, polybori::CBlockOrderingFacade< BlockDegLexOrder, block_dlex_tag >, and polybori::CBlockOrderingFacade< BlockDegRevLexAscOrder, block_dp_asc_tag >.

virtual comp_type polybori::COrderingBase::compare | ( | idx_type | ,
|  | idx_type |
| ) |  | const

pure virtual

Comparison of monomials.

Implemented in polybori::DegLexOrder, polybori::LexOrder, polybori::BlockDegLexOrder, polybori::BlockDegRevLexAscOrder, and polybori::DegRevLexAscOrder.

Referenced by polybori::BooleMonomial::compare(), and polybori::groebner::LiteralFactorization::LiteralFactorization().

virtual comp_type polybori::COrderingBase::compare | ( | const monom_type & | ,
|  | const monom_type & |
| ) |  | const

pure virtual

Implemented in polybori::DegLexOrder, polybori::LexOrder, polybori::BlockDegLexOrder, polybori::BlockDegRevLexAscOrder, and polybori::DegRevLexAscOrder.

virtual comp_type polybori::COrderingBase::compare | ( | const exp_type & | ,
|  | const exp_type & |
| ) |  | const

pure virtual

Implemented in polybori::DegLexOrder, polybori::LexOrder, polybori::BlockDegLexOrder, polybori::BlockDegRevLexAscOrder, and polybori::DegRevLexAscOrder.

virtual bool_type polybori::COrderingBase::descendingVariables | ( |  | ) | const

pure virtual

Test whether variables are in descending order.

Implemented in polybori::COrderingFacade< OrderType, OrderTag >, polybori::COrderingFacade< BlockDegLexOrder, block_dlex_tag >, polybori::COrderingFacade< LexOrder, lex_tag >, polybori::COrderingFacade< DegLexOrder, dlex_tag >, polybori::COrderingFacade< DegRevLexAscOrder, dp_asc_tag >, and polybori::COrderingFacade< BlockDegRevLexAscOrder, block_dp_asc_tag >.

virtual ordercode_type polybori::COrderingBase::getBaseOrderCode | ( |  | ) | const

pure virtual

Get numerical code for base ordering (the same for non-block orderings)

Implemented in polybori::COrderingFacade< OrderType, OrderTag >, polybori::COrderingFacade< BlockDegLexOrder, block_dlex_tag >, polybori::COrderingFacade< LexOrder, lex_tag >, polybori::COrderingFacade< DegLexOrder, dlex_tag >, polybori::COrderingFacade< DegRevLexAscOrder, dp_asc_tag >, and polybori::COrderingFacade< BlockDegRevLexAscOrder, block_dp_asc_tag >.

Referenced by polybori::groebner::get_table_entry4(), and polybori::groebner::have_base_ordering_for_tables().

virtual ordercode_type polybori::COrderingBase::getOrderCode | ( |  | ) | const

pure virtual

Get numerical code for ordering.

Implemented in polybori::COrderingFacade< OrderType, OrderTag >, polybori::COrderingFacade< BlockDegLexOrder, block_dlex_tag >, polybori::COrderingFacade< LexOrder, lex_tag >, polybori::COrderingFacade< DegLexOrder, dlex_tag >, polybori::COrderingFacade< DegRevLexAscOrder, dp_asc_tag >, and polybori::COrderingFacade< BlockDegRevLexAscOrder, block_dp_asc_tag >.

Referenced by polybori::groebner::have_ordering_for_tables().

virtual bool_type polybori::COrderingBase::isBlockOrder | ( |  | ) | const

pure virtual

Test whether we deal with a block-ordering.

Implemented in polybori::COrderingFacade< OrderType, OrderTag >, polybori::COrderingFacade< BlockDegLexOrder, block_dlex_tag >, polybori::COrderingFacade< LexOrder, lex_tag >, polybori::COrderingFacade< DegLexOrder, dlex_tag >, polybori::COrderingFacade< DegRevLexAscOrder, dp_asc_tag >, and polybori::COrderingFacade< BlockDegRevLexAscOrder, block_dp_asc_tag >.

Referenced by polybori::groebner::red_tail().

virtual bool_type polybori::COrderingBase::isDegreeOrder | ( |  | ) | const

pure virtual

Test whether we deal with a degree-ordering.

Implemented in polybori::COrderingFacade< OrderType, OrderTag >, polybori::COrderingFacade< BlockDegLexOrder, block_dlex_tag >, polybori::COrderingFacade< LexOrder, lex_tag >, polybori::COrderingFacade< DegLexOrder, dlex_tag >, polybori::COrderingFacade< DegRevLexAscOrder, dp_asc_tag >, and polybori::COrderingFacade< BlockDegRevLexAscOrder, block_dp_asc_tag >.

Referenced by polybori::groebner::ReductionStrategy::headNormalForm(), polybori::groebner::red_tail(), and polybori::groebner::red_tail_general().

virtual bool_type polybori::COrderingBase::isDegreeReverseLexicographical | ( |  | ) | const

pure virtual

Test whether ordering is deg-rev-lex ordering.

Implemented in polybori::COrderingFacade< OrderType, OrderTag >, polybori::COrderingFacade< BlockDegLexOrder, block_dlex_tag >, polybori::COrderingFacade< LexOrder, lex_tag >, polybori::COrderingFacade< DegLexOrder, dlex_tag >, polybori::COrderingFacade< DegRevLexAscOrder, dp_asc_tag >, and polybori::COrderingFacade< BlockDegRevLexAscOrder, block_dp_asc_tag >.

virtual bool_type polybori::COrderingBase::isLexicographical | ( |  | ) | const

pure virtual

Check whether ring is lexicographical.

Implemented in polybori::COrderingFacade< OrderType, OrderTag >, polybori::COrderingFacade< BlockDegLexOrder, block_dlex_tag >, polybori::COrderingFacade< LexOrder, lex_tag >, polybori::COrderingFacade< DegLexOrder, dlex_tag >, polybori::COrderingFacade< DegRevLexAscOrder, dp_asc_tag >, and polybori::COrderingFacade< BlockDegRevLexAscOrder, block_dp_asc_tag >.

Referenced by polybori::groebner::red_tail(), and polybori::groebner::ReductionStrategy::select1().

virtual bool_type polybori::COrderingBase::isSymmetric | ( |  | ) | const

pure virtual

Test whether variable pertubation do not change the order.

Implemented in polybori::COrderingFacade< OrderType, OrderTag >, polybori::COrderingFacade< BlockDegLexOrder, block_dlex_tag >, polybori::COrderingFacade< LexOrder, lex_tag >, polybori::COrderingFacade< DegLexOrder, dlex_tag >, polybori::COrderingFacade< DegRevLexAscOrder, dp_asc_tag >, and polybori::COrderingFacade< BlockDegRevLexAscOrder, block_dp_asc_tag >.

virtual bool_type polybori::COrderingBase::isTotalDegreeOrder | ( |  | ) | const

pure virtual

Test whether we deal with a total degree-ordering.

Implemented in polybori::COrderingFacade< OrderType, OrderTag >, polybori::COrderingFacade< BlockDegLexOrder, block_dlex_tag >, polybori::COrderingFacade< LexOrder, lex_tag >, polybori::COrderingFacade< DegLexOrder, dlex_tag >, polybori::COrderingFacade< DegRevLexAscOrder, dp_asc_tag >, and polybori::COrderingFacade< BlockDegRevLexAscOrder, block_dp_asc_tag >.

virtual idx_type polybori::COrderingBase::lastBlockStart | ( |  | ) | const

pure virtual

Generic procedure to get index, where last block starts.

Implemented in polybori::COrderingFacade< OrderType, OrderTag >, polybori::COrderingFacade< BlockDegLexOrder, block_dlex_tag >, polybori::COrderingFacade< LexOrder, lex_tag >, polybori::COrderingFacade< DegLexOrder, dlex_tag >, polybori::COrderingFacade< DegRevLexAscOrder, dp_asc_tag >, and polybori::COrderingFacade< BlockDegRevLexAscOrder, block_dp_asc_tag >.

Referenced by polybori::groebner::red_tail_in_last_block().

virtual monom_type polybori::COrderingBase::lead | ( | const poly_type & |  | ) | const

pure virtual

Get leading term.

Implemented in polybori::CBlockOrderingFacade< OrderType, OrderTag >, polybori::CBlockOrderingFacade< BlockDegLexOrder, block_dlex_tag >, polybori::CBlockOrderingFacade< BlockDegRevLexAscOrder, block_dp_asc_tag >, polybori::DegLexOrder, polybori::LexOrder, and polybori::DegRevLexAscOrder.

Referenced by polybori::BoolePolynomial::boundedLead(), and polybori::BoolePolynomial::lead().

virtual monom_type polybori::COrderingBase::lead | ( | const poly_type & | ,
|  | deg_type |
| ) |  | const

pure virtual

Get leading term (using upper bound)

Implemented in polybori::CBlockOrderingFacade< OrderType, OrderTag >, polybori::CBlockOrderingFacade< BlockDegLexOrder, block_dlex_tag >, polybori::CBlockOrderingFacade< BlockDegRevLexAscOrder, block_dp_asc_tag >, polybori::DegLexOrder, polybori::LexOrder, and polybori::DegRevLexAscOrder.

virtual exp_type polybori::COrderingBase::leadExp | ( | const poly_type & |  | ) | const

pure virtual

Get leading exponent.

Implemented in polybori::CBlockOrderingFacade< OrderType, OrderTag >, polybori::CBlockOrderingFacade< BlockDegLexOrder, block_dlex_tag >, polybori::CBlockOrderingFacade< BlockDegRevLexAscOrder, block_dp_asc_tag >, polybori::LexOrder, polybori::DegLexOrder, and polybori::DegRevLexAscOrder.

Referenced by polybori::BoolePolynomial::boundedLeadExp(), and polybori::BoolePolynomial::leadExp().

virtual exp_type polybori::COrderingBase::leadExp | ( | const poly_type & | ,
|  | deg_type |
| ) |  | const

pure virtual

Get leading exponent (using upper bound)

Implemented in polybori::CBlockOrderingFacade< OrderType, OrderTag >, polybori::CBlockOrderingFacade< BlockDegLexOrder, block_dlex_tag >, polybori::CBlockOrderingFacade< BlockDegRevLexAscOrder, block_dp_asc_tag >, polybori::LexOrder, polybori::DegLexOrder, and polybori::DegRevLexAscOrder.

virtual ordered_exp_iterator polybori::COrderingBase::leadExpIteratorBegin | ( | const poly_type & |  | ) | const

pure virtual

Initialize exponent iterator corresponding to leading term.

Implemented in polybori::COrderingFacade< OrderType, OrderTag >, polybori::COrderingFacade< BlockDegLexOrder, block_dlex_tag >, polybori::COrderingFacade< LexOrder, lex_tag >, polybori::COrderingFacade< DegLexOrder, dlex_tag >, polybori::COrderingFacade< DegRevLexAscOrder, dp_asc_tag >, and polybori::COrderingFacade< BlockDegRevLexAscOrder, block_dp_asc_tag >.

Referenced by polybori::BoolePolynomial::orderedExpBegin().

virtual ordered_exp_iterator polybori::COrderingBase::leadExpIteratorEnd | ( | const poly_type & |  | ) | const

pure virtual

End marker for exponent iterator corresponding to leading term.

Implemented in polybori::COrderingFacade< OrderType, OrderTag >, polybori::COrderingFacade< BlockDegLexOrder, block_dlex_tag >, polybori::COrderingFacade< LexOrder, lex_tag >, polybori::COrderingFacade< DegLexOrder, dlex_tag >, polybori::COrderingFacade< DegRevLexAscOrder, dp_asc_tag >, and polybori::COrderingFacade< BlockDegRevLexAscOrder, block_dp_asc_tag >.

Referenced by polybori::BoolePolynomial::orderedExpEnd().

virtual poly_type polybori::COrderingBase::leadFirst | ( | const poly_type & |  | ) | const

pure virtual

Generates polynomial with leading term first (other terms may be skipped)

Implemented in polybori::COrderingFacade< OrderType, OrderTag >, polybori::COrderingFacade< BlockDegLexOrder, block_dlex_tag >, polybori::COrderingFacade< LexOrder, lex_tag >, polybori::COrderingFacade< DegLexOrder, dlex_tag >, polybori::COrderingFacade< DegRevLexAscOrder, dp_asc_tag >, and polybori::COrderingFacade< BlockDegRevLexAscOrder, block_dp_asc_tag >.

Referenced by polybori::BoolePolynomial::leadFirst().

virtual ordered_iterator polybori::COrderingBase::leadIteratorBegin | ( | const poly_type & |  | ) | const

pure virtual

Initialize iterator corresponding to leading term.

Implemented in polybori::COrderingFacade< OrderType, OrderTag >, polybori::COrderingFacade< BlockDegLexOrder, block_dlex_tag >, polybori::COrderingFacade< LexOrder, lex_tag >, polybori::COrderingFacade< DegLexOrder, dlex_tag >, polybori::COrderingFacade< DegRevLexAscOrder, dp_asc_tag >, and polybori::COrderingFacade< BlockDegRevLexAscOrder, block_dp_asc_tag >.

Referenced by polybori::BoolePolynomial::orderedBegin().

virtual ordered_iterator polybori::COrderingBase::leadIteratorEnd | ( | const poly_type & |  | ) | const

pure virtual

End marker for iterator corresponding to leading term.

Implemented in polybori::COrderingFacade< OrderType, OrderTag >, polybori::COrderingFacade< BlockDegLexOrder, block_dlex_tag >, polybori::COrderingFacade< LexOrder, lex_tag >, polybori::COrderingFacade< DegLexOrder, dlex_tag >, polybori::COrderingFacade< DegRevLexAscOrder, dp_asc_tag >, and polybori::COrderingFacade< BlockDegRevLexAscOrder, block_dp_asc_tag >.

Referenced by polybori::BoolePolynomial::orderedEnd().

virtual bool_type polybori::COrderingBase::lieInSameBlock | ( | idx_type | ,
|  | idx_type |
| ) |  | const

pure virtual

Check, whether two indices are in the same block (true for nonblock orderings)

Implemented in polybori::COrderingFacade< OrderType, OrderTag >, polybori::COrderingFacade< BlockDegLexOrder, block_dlex_tag >, polybori::COrderingFacade< LexOrder, lex_tag >, polybori::COrderingFacade< DegLexOrder, dlex_tag >, polybori::COrderingFacade< DegRevLexAscOrder, dp_asc_tag >, and polybori::COrderingFacade< BlockDegRevLexAscOrder, block_dp_asc_tag >.

Referenced by polybori::BoolePolynomial::inSingleBlock().

monom_type polybori::COrderingBase::monom | ( | const set_type & | rhs | ) | const

inline protected

Get monomial from set of subsets of Boolean variables (internal use only)

References polybori::CCuddDDFacade< RingType, DiagramType >::isZero(), and PBORI_UNLIKELY.

virtual bool_type polybori::COrderingBase::orderedStandardIteration | ( |  | ) | const

pure virtual

Test whether iterators respect order.

Implemented in polybori::COrderingFacade< OrderType, OrderTag >, polybori::COrderingFacade< BlockDegLexOrder, block_dlex_tag >, polybori::COrderingFacade< LexOrder, lex_tag >, polybori::COrderingFacade< DegLexOrder, dlex_tag >, polybori::COrderingFacade< DegRevLexAscOrder, dp_asc_tag >, and polybori::COrderingFacade< BlockDegRevLexAscOrder, block_dp_asc_tag >.

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

- COrderingBase.h