PolyBoRi
|
This class is just a wrapper for using variables for storing indices as interim data structure for BooleMonomial. More...
#include <BooleExponent.h>
Public Types | |
typedef std::vector< idx_type > | data_type |
Define the underlying data structure. More... | |
typedef data_type::value_type | value_type |
Generic access to actual data. More... | |
typedef BooleExponent | self |
Generic access to current type. More... | |
typedef BoolePolynomial | poly_type |
Type of Boolean polynomials. More... | |
typedef poly_type::ring_type | ring_type |
Type of Boolean variables. More... | |
typedef poly_type::var_type | var_type |
Type of Boolean variables. More... | |
typedef poly_type::monom_type | monom_type |
Type of Boolean variables. More... | |
typedef poly_type::set_type | set_type |
Type of sets of Boolean variables. More... | |
typedef generate_index_map < self >::type | idx_map_type |
Type for index maps. More... | |
typedef invalid_tag | easy_equality_property |
This type has no easy equality check. More... | |
Generic access to iterator types | |
typedef data_type::iterator | iterator |
typedef data_type::const_iterator | const_iterator |
typedef data_type::reverse_iterator | reverse_iterator |
typedef data_type::const_reverse_iterator | const_reverse_iterator |
![]() | |
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 | |
BooleExponent () | |
Default Constructor. More... | |
BooleExponent (const self &) | |
Copy constructor. More... | |
self & | get (const monom_type &) |
Construct from Boolean monomial. More... | |
BooleExponent (const monom_type &rhs) | |
~BooleExponent () | |
Destructor. More... | |
const_iterator | begin () const |
Start iteration over indices (constant access) More... | |
const_iterator | end () const |
Finish iteration over indices (constant access) More... | |
const_reverse_iterator | rbegin () const |
Start reverse iteration over indices (constant access) More... | |
const_reverse_iterator | rend () const |
Finish reverse iteration over indices (constant access) More... | |
size_type | size () const |
Degree of the corresponding monomial. More... | |
void | reserve (size_type nsize) |
Prepare memory for exponents. More... | |
void | resize (size_type nsize) |
Drop compoents from the nsize-th element on. More... | |
deg_type | deg () const |
Degree of the corresponding monomial. More... | |
set_type | divisors (const ring_type &) const |
Divisors of the monomial. More... | |
set_type | multiples (const self &, const ring_type &) const |
multiples of the monomial wrt. given monomial (both given as exponents) More... | |
set_type | multiples (const monom_type &) const |
multiples of the monomial wrt. given monomial More... | |
hash_type | stableHash () const |
Hash value for the exponent. More... | |
hash_type | hash () const |
For the exponent we only have one type of hashes. More... | |
self & | changeAssign (idx_type) |
Insert a given index, if it is not there, remove otherwise; assign the result. More... | |
self | change (idx_type) const |
Insert a given index, if it is not there, remove otherwise; return the result. More... | |
self & | insert (idx_type) |
Insert variable with index idx in exponent vector. More... | |
self & | push_back (idx_type idx) |
Insert variable with index idx in exponent vector (trying end first) More... | |
self & | remove (idx_type) |
Remove variable with index idx in exponent vector. More... | |
self | insertConst (idx_type) const |
Insert variable with index idx in exponent vector. More... | |
self | removeConst (idx_type) const |
Remove variable with index idx in exponent vector. More... | |
self | divide (const self &) const |
Corresponds to division of monomials. More... | |
self | divideByIndex (const idx_type &rhs) const |
self | divide (const var_type &rhs) const |
self | divide (const monom_type &) const |
self | multiply (const self &) const |
Corresponds to multiplication of monomials. More... | |
self | multiply (const idx_type &rhs) const |
self | multiply (const var_type &rhs) const |
self | multiply (const monom_type &) const |
self | multiplyFirst (const set_type &) const |
self & | operator= (const self &rhs) |
Assignment operation. More... | |
self & | operator= (const monom_type &rhs) |
bool_type | reducibleBy (const self &rhs) const |
Test for reducibility. More... | |
bool_type | reducibleBy (const monom_type &rhs) const |
bool_type | reducibleBy (const idx_type &rhs) const |
bool_type | reducibleBy (const var_type &rhs) const |
deg_type | LCMDeg (const self &) const |
Degree of the least common multiple. More... | |
self | LCM (const self &) const |
Compute the greatest common divisor. More... | |
self | GCD (const self &) const |
Compute the greatest common divisor and assign. More... | |
self & | popFirst () |
Removes the first index from exponent. More... | |
ostream_type & | print (ostream_type &) const |
Print current polynomial to output stream. More... | |
Logical operations | |
bool_type | operator== (const self &rhs) const |
bool_type | operator!= (const self &rhs) const |
Protected Member Functions | |
iterator | internalBegin () |
Start iteration over indices (constant access) More... | |
iterator | internalEnd () |
Finish iteration over indices (constant access) More... | |
reverse_iterator | rInternalBegin () |
Start reverse iteration over indices (constant access) More... | |
reverse_iterator | rInternalEnd () |
Finish reverse iteration over indices (constant access) More... | |
Protected Attributes | |
data_type | m_data |
The actual exponent indices. More... | |
This class is just a wrapper for using variables for storing indices as interim data structure for BooleMonomial.
typedef data_type::const_iterator polybori::BooleExponent::const_iterator |
typedef data_type::const_reverse_iterator polybori::BooleExponent::const_reverse_iterator |
typedef std::vector<idx_type> polybori::BooleExponent::data_type |
Define the underlying data structure.
This type has no easy equality check.
typedef generate_index_map<self>::type polybori::BooleExponent::idx_map_type |
Type for index maps.
typedef data_type::iterator polybori::BooleExponent::iterator |
Type of Boolean variables.
Type of Boolean polynomials.
typedef data_type::reverse_iterator polybori::BooleExponent::reverse_iterator |
Type of Boolean variables.
Generic access to current type.
Type of sets of Boolean variables.
typedef data_type::value_type polybori::BooleExponent::value_type |
Generic access to actual data.
Type of Boolean variables.
polybori::BooleExponent::BooleExponent | ( | ) |
Default Constructor.
References PBORI_TRACE_FUNC.
polybori::BooleExponent::BooleExponent | ( | const self & | rhs | ) |
Copy constructor.
References PBORI_TRACE_FUNC.
|
explicit |
References polybori::BooleMonomial::begin(), polybori::BooleMonomial::end(), m_data, and PBORI_TRACE_FUNC.
polybori::BooleExponent::~BooleExponent | ( | ) |
Destructor.
References PBORI_TRACE_FUNC.
|
inline |
Start iteration over indices (constant access)
Referenced by polybori::groebner::GroebnerStrategy::addVariablePairs(), change(), changeAssign(), polybori::BooleSet::containsDivisorsOfDecDeg(), GCD(), insertConst(), polybori::groebner::LiteralFactorization::LiteralFactorization(), polybori::groebner::FGLMStrategy::main(), polybori::groebner::LiteralFactorization::occursAsLeadOfFactor(), polybori::groebner::IsVariableOfIndex::operator()(), polybori::BoolePolynomial::operator*=(), polybori::BoolePolynomial::operator/=(), polybori::BooleSet::owns(), polybori::groebner::p2code(), print(), polybori::groebner::random_set_using_generator(), polybori::groebner::reduce_complete(), reducibleBy(), removeConst(), polybori::groebner::RankingVector::rerank(), and polybori::groebner::set_up_translation_vectors().
BooleExponent polybori::BooleExponent::change | ( | idx_type | idx | ) | const |
Insert a given index, if it is not there, remove otherwise; return the result.
References begin(), end(), and PBORI_TRACE_FUNC.
BooleExponent & polybori::BooleExponent::changeAssign | ( | idx_type | idx | ) |
Insert a given index, if it is not there, remove otherwise; assign the result.
References begin(), end(), insert(), and PBORI_TRACE_FUNC.
|
inline |
Degree of the corresponding monomial.
Referenced by polybori::groebner::GroebnerStrategy::addAsYouWish(), polybori::groebner::GroebnerStrategy::addGeneratorTrySplit(), polybori::groebner::ReductionStrategy::llReduce(), polybori::groebner::FGLMStrategy::main(), polybori::groebner::nf3_degree_order(), polybori::groebner::LargerDegreeComparer::operator()(), polybori::groebner::IsVariableOfIndex::operator()(), polybori::groebner::CountCriterion::operator()(), polybori::groebner::ShorterEliminationLengthModified::operator()(), polybori::groebner::RankingVector::rerank(), and polybori::groebner::GroebnerStrategy::treatVariablePairs().
BooleExponent polybori::BooleExponent::divide | ( | const self & | rhs | ) | const |
Corresponds to division of monomials.
References polybori::exp_divide(), and PBORI_TRACE_FUNC.
Referenced by polybori::operator-().
References polybori::BooleVariable::index().
BooleExponent polybori::BooleExponent::divide | ( | const monom_type & | rhs | ) | const |
References polybori::exp_divide(), and PBORI_TRACE_FUNC.
BooleExponent::set_type polybori::BooleExponent::divisors | ( | const ring_type & | ring | ) | const |
Divisors of the monomial.
References polybori::cudd_generate_divisors(), m_data, and PBORI_TRACE_FUNC.
Referenced by polybori::groebner::GroebnerStrategy::checkChainCriterion(), and polybori::groebner::CountCriterion::operator()().
|
inline |
Finish iteration over indices (constant access)
Referenced by polybori::groebner::GroebnerStrategy::addVariablePairs(), change(), changeAssign(), polybori::BooleSet::containsDivisorsOfDecDeg(), GCD(), insert(), insertConst(), polybori::groebner::LiteralFactorization::LiteralFactorization(), polybori::BoolePolynomial::operator*=(), polybori::BoolePolynomial::operator/=(), polybori::BooleSet::owns(), polybori::groebner::p2code(), print(), polybori::groebner::random_set_using_generator(), polybori::groebner::reduce_complete(), reducibleBy(), remove(), removeConst(), polybori::groebner::RankingVector::rerank(), and polybori::groebner::set_up_translation_vectors().
BooleExponent polybori::BooleExponent::GCD | ( | const self & | rhs | ) | const |
Compute the greatest common divisor and assign.
Compute the greatest common divisor
References begin(), end(), PBORI_TRACE_FUNC, and size().
Referenced by polybori::GCD(), and polybori::groebner::ReductionStrategy::llReduce().
BooleExponent & polybori::BooleExponent::get | ( | const monom_type & | rhs | ) |
Construct from Boolean monomial.
References polybori::BooleMonomial::begin(), polybori::BooleMonomial::end(), m_data, PBORI_TRACE_FUNC, and polybori::BooleMonomial::size().
Referenced by polybori::BooleMonomial::exp().
|
inline |
For the exponent we only have one type of hashes.
BooleExponent & polybori::BooleExponent::insert | ( | idx_type | idx | ) |
Insert variable with index idx in exponent vector.
References end(), internalBegin(), internalEnd(), m_data, and PBORI_TRACE_FUNC.
Referenced by changeAssign(), polybori::groebner::minimal_elements_internal3(), and polybori::groebner::random_set_using_generator().
BooleExponent polybori::BooleExponent::insertConst | ( | idx_type | idx | ) | const |
Insert variable with index idx in exponent vector.
References begin(), end(), PBORI_TRACE_FUNC, and size().
|
inlineprotected |
Start iteration over indices (constant access)
Referenced by insert(), push_back(), and remove().
|
inlineprotected |
Finish iteration over indices (constant access)
Referenced by insert(), push_back(), and remove().
BooleExponent polybori::BooleExponent::LCM | ( | const self & | rhs | ) | const |
Compute the greatest common divisor.
Compute theleast common multiple and assign self& LCMAssign(const self&);
References multiply(), and PBORI_TRACE_FUNC.
Referenced by polybori::LCM(), LCMDeg(), and polybori::groebner::CountCriterion::operator()().
BooleExponent::deg_type polybori::BooleExponent::LCMDeg | ( | const self & | rhs | ) | const |
Degree of the least common multiple.
References LCM(), PBORI_TRACE_FUNC, and size().
Referenced by polybori::groebner::CountCriterion::operator()().
BooleExponent::set_type polybori::BooleExponent::multiples | ( | const self & | multipliers, |
const ring_type & | ring | ||
) | const |
multiples of the monomial wrt. given monomial (both given as exponents)
References polybori::cudd_generate_multiples(), m_data, and PBORI_TRACE_FUNC.
BooleExponent::set_type polybori::BooleExponent::multiples | ( | const monom_type & | mult | ) | const |
multiples of the monomial wrt. given monomial
References polybori::cudd_generate_multiples(), m_data, PBORI_TRACE_FUNC, and polybori::BooleMonomial::ring().
BooleExponent polybori::BooleExponent::multiply | ( | const self & | rhs | ) | const |
Corresponds to multiplication of monomials.
References polybori::exp_multiply(), and PBORI_TRACE_FUNC.
Referenced by LCM(), and polybori::operator+().
References polybori::BooleVariable::index(), and multiply().
Referenced by multiply().
BooleExponent polybori::BooleExponent::multiply | ( | const monom_type & | rhs | ) | const |
References polybori::exp_multiply(), and PBORI_TRACE_FUNC.
BooleExponent polybori::BooleExponent::multiplyFirst | ( | const set_type & | rhs | ) | const |
Assignment operation.
References m_data.
|
inline |
|
inline |
Removes the first index from exponent.
BooleExponent::ostream_type & polybori::BooleExponent::print | ( | ostream_type & | os | ) | const |
Print current polynomial to output stream.
References begin(), end(), and PBORI_TRACE_FUNC.
Referenced by polybori::operator<<().
BooleExponent & polybori::BooleExponent::push_back | ( | idx_type | idx | ) |
Insert variable with index idx in exponent vector (trying end first)
References internalBegin(), internalEnd(), m_data, and PBORI_TRACE_FUNC.
Referenced by polybori::groebner::minimal_elements_internal3(), and polybori::groebner::random_set_using_generator().
|
inline |
Start reverse iteration over indices (constant access)
Referenced by polybori::BoolePolynomial::BoolePolynomial().
BooleExponent::bool_type polybori::BooleExponent::reducibleBy | ( | const self & | rhs | ) | const |
Test for reducibility.
References begin(), end(), and PBORI_TRACE_FUNC.
BooleExponent::bool_type polybori::BooleExponent::reducibleBy | ( | const monom_type & | rhs | ) | const |
References begin(), polybori::BooleMonomial::begin(), end(), polybori::BooleMonomial::end(), and PBORI_TRACE_FUNC.
BooleExponent::bool_type polybori::BooleExponent::reducibleBy | ( | const idx_type & | rhs | ) | const |
References begin(), end(), and PBORI_TRACE_FUNC.
References polybori::BooleVariable::index().
BooleExponent & polybori::BooleExponent::remove | ( | idx_type | idx | ) |
Remove variable with index idx in exponent vector.
References end(), internalBegin(), internalEnd(), m_data, and PBORI_TRACE_FUNC.
BooleExponent polybori::BooleExponent::removeConst | ( | idx_type | idx | ) | const |
Remove variable with index idx in exponent vector.
References begin(), end(), PBORI_TRACE_FUNC, and size().
Referenced by polybori::groebner::FGLMStrategy::writeRowToVariableDivisors().
|
inline |
Finish reverse iteration over indices (constant access)
Referenced by polybori::BoolePolynomial::BoolePolynomial().
|
inline |
Prepare memory for exponents.
Referenced by polybori::LexOrder::leadExp(), polybori::DegRevLexAscOrder::leadExp(), and polybori::DegLexOrder::leadExp().
|
inline |
Drop compoents from the nsize-th element on.
Referenced by operator=().
|
inlineprotected |
Start reverse iteration over indices (constant access)
|
inlineprotected |
Finish reverse iteration over indices (constant access)
|
inline |
Degree of the corresponding monomial.
Referenced by GCD(), polybori::groebner::CacheManager::insert(), insertConst(), LCMDeg(), polybori::groebner::CacheManager::lookup(), polybori::groebner::CountCriterion::operator()(), and removeConst().
|
inline |
Hash value for the exponent.
References polybori::stable_term_hash().
|
protected |
The actual exponent indices.
Referenced by BooleExponent(), divisors(), get(), insert(), multiples(), operator=(), push_back(), and remove().