PolyBoRi
|
#include <BooleSet.h>
Public Types | |
typedef self | dd_type |
Generic access to type of *this. More... | |
typedef CCuddDDFacade < BoolePolyRing, BooleSet > | base |
Generic access to base type. More... | |
typedef BooleMonomial | term_type |
Type of terms. More... | |
typedef BooleExponent | exp_type |
Fix type for treatment of exponent vectors. More... | |
typedef BoolePolyRing | ring_type |
Type for Boolean polynomial rings (without ordering) More... | |
typedef CGenericIter< LexOrder, navigator, term_type > | const_iterator |
Iterator type for iterating all monomials. More... | |
typedef CGenericIter< LexOrder, navigator, exp_type > | exp_iterator |
Iterator type for iterating all exponent vectors. More... | |
typedef CReverseIter< LexOrder, navigator, exp_type > | reverse_exp_iterator |
Iterator type for iterating all exponent vectors. More... | |
typedef CReverseIter< LexOrder, navigator, term_type > | const_reverse_iterator |
Iterator type for iterating all monomials. More... | |
![]() | |
typedef CTypes::ostream_type | ostream_type |
Type for output streams. More... | |
typedef BoolePolyRing | ring_type |
Type for diagrams. More... | |
typedef BooleSet | diagram_type |
Type for diagrams. More... | |
typedef DdNode | node_type |
Type for C-style struct. More... | |
typedef node_type * | node_ptr |
Pointer type for nodes. More... | |
typedef CApplyNodeFacade < diagram_type, node_ptr > | base |
Type this is inherited from the following. More... | |
typedef CCuddFirstIter | first_iterator |
Iterator type for retrieving first term from Cudd's ZDDs. More... | |
typedef CCuddLastIter | last_iterator |
Iterator type for retrieving last term from Cudd's ZDDs. More... | |
typedef CCuddNavigator | navigator |
Iterator type for navigation throught Cudd's ZDDs structure. More... | |
typedef valid_tag | easy_equality_property |
This type has an easy equality check. More... | |
typedef ring_type::mgr_type | mgr_type |
Raw context. More... | |
typedef int | cudd_idx_type |
Cudd's index type. More... | |
typedef CCheckedIdx | checked_idx_type |
Cudd's index type. More... | |
![]() | |
typedef BooleSet | diagram_type |
typedef DdNode * | node_ptr |
![]() | |
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 | |
BooleSet (const self &rhs) | |
Copy constructor. More... | |
BooleSet (const base &rhs) | |
Copy constructor. More... | |
BooleSet (idx_type idx, const self &first, const self &second) | |
Construct new node. More... | |
BooleSet (idx_type idx, navigator first, navigator second, const ring_type &ring) | |
Construct new node (using navigator nodes) More... | |
BooleSet (const ring_type &ring, node_ptr node) | |
Construct new node (using nodes) More... | |
BooleSet (const ring_type &ring, navigator navi) | |
Construct new node (using navigator nodes) More... | |
BooleSet (const ring_type &ring) | |
Construct empty set in ring. More... | |
BooleSet (idx_type idx, const self &rhs) | |
Construct new node (using navigator for then and else-branches) More... | |
BooleSet (navigator navi, const ring_type &ring) | |
Construct from navigator node. More... | |
~BooleSet () | |
Destructor. More... | |
const_iterator | begin () const |
Start of iteration over terms. More... | |
const_iterator | end () const |
Finish of iteration over terms. More... | |
const_reverse_iterator | rbegin () const |
Start of backward iteration over terms. More... | |
const_reverse_iterator | rend () const |
Finish of backward iteration over terms. More... | |
reverse_exp_iterator | rExpBegin () const |
Start of backward exponent iteration over terms. More... | |
reverse_exp_iterator | rExpEnd () const |
Finish of backward iteration over terms. More... | |
exp_iterator | expBegin () const |
Start of iteration over exponent vectors. More... | |
exp_iterator | expEnd () const |
Finish of iteration over exponent vectors. More... | |
hash_type | hash () const |
Get unique hash value (valid only per runtime) More... | |
hash_type | stableHash () const |
Get stable hash value, which is reproducible. More... | |
term_type | usedVariables () const |
Set of variables of the whole set. More... | |
exp_type | usedVariablesExp () const |
Exponent vector of variables of the whole set. More... | |
self | change (idx_type idx) const |
self | add (const term_type &rhs) const |
Add given monomial to sets. More... | |
bool_type | owns (const term_type &rhs) const |
bool_type | owns (const exp_type &) const |
Check whether rhs is included in *this. More... | |
term_type | lastLexicographicalTerm () const |
Get last term (wrt. lexicographical order) More... | |
self | divisorsOf (const term_type &rhs) const |
Compute intersection with divisors of rhs. More... | |
self | divisorsOf (const exp_type &rhs) const |
Compute intersection with divisors of rhs. More... | |
self | firstDivisorsOf (const self &rhs) const |
Intersection with divisors of first (lexicographical) term of rhs. More... | |
self | multiplesOf (const term_type &rhs) const |
Compute intersection with multiples of rhs. More... | |
self | divide (const term_type &rhs) const |
Division by given term. More... | |
bool_type | hasTermOfVariables (const term_type &rhs) const |
self | minimalElements () const |
Get minimal elements wrt. inclusion. More... | |
bool_type | ownsOne () const |
Test whether the empty set is included. More... | |
bool_type | isSingleton () const |
Test, whether we have one term only. More... | |
bool_type | isSingletonOrPair () const |
Test, whether we have one or two terms only. More... | |
bool_type | isPair () const |
Test, whether we have two terms only. More... | |
self | existAbstract (const term_type &rhs) const |
const self & | diagram () const |
Access internal decision diagram. More... | |
self | cartesianProduct (const self &rhs) const |
Cartesean product. More... | |
bool_type | contains (const self &rhs) const |
Test containment. More... | |
size_type | size () const |
Returns number of terms. More... | |
size_type | length () const |
Returns number of terms (deprecated) More... | |
size_type | nVariables () const |
Returns number of variables in manager. More... | |
double | sizeDouble () const |
Approximation of number of terms. More... | |
ostream_type & | print (ostream_type &) const |
Print current set to output stream. More... | |
self | emptyElement () const |
Get corresponding zero element (may be removed in the future) More... | |
size_type | countIndex (idx_type idx) const |
Count terms containing BooleVariable(idx) More... | |
double | countIndexDouble (idx_type idx) const |
Count many terms containing BooleVariable(idx) More... | |
bool_type | containsDivisorsOfDecDeg (const term_type &rhs) const |
Test whether, all divisors of degree -1 of term rhs are contained in this. More... | |
bool_type | containsDivisorsOfDecDeg (const exp_type &rhs) const |
Test for term corresponding to exponent rhs. More... | |
![]() | |
CCuddDDFacade (const ring_type &ring, node_ptr node) | |
Construct diagram from ring and node. More... | |
CCuddDDFacade (const ring_type &ring, const navigator &navi) | |
Construct from Manager and navigator. More... | |
CCuddDDFacade (const ring_type &ring, idx_type idx, navigator thenNavi, navigator elseNavi) | |
Construct new node from manager, index, and navigators. More... | |
CCuddDDFacade (const ring_type &ring, idx_type idx, navigator navi) | |
CCuddDDFacade (idx_type idx, const self &thenDD, const self &elseDD) | |
Construct new node. More... | |
CCuddDDFacade (const self &from) | |
Copy constructor. More... | |
~CCuddDDFacade () | |
Destructor. More... | |
diagram_type & | operator= (const diagram_type &rhs) |
Assignment operator. More... | |
*bool | implies (const self &rhs) const |
Performs the inclusion test for ZDDs. More... | |
size_type | count () const |
Determine the number of terms. More... | |
double | countDouble () const |
Appriximate the number of terms. More... | |
size_type | rootIndex () const |
Get index of curent node. More... | |
size_type | nNodes () const |
Number of nodes in the current decision diagram. More... | |
size_type | refCount () const |
Number of references pointing here. More... | |
bool | isZero () const |
Test whether diagram represents the empty set. More... | |
bool | isOne () const |
Test whether diagram represents the empty set. More... | |
const ring_type & | ring () const |
Get reference to ring. More... | |
node_ptr | getNode () const |
Get raw node structure. More... | |
mgr_type * | getManager () const |
Get raw decision diagram manager. More... | |
diagram_type | Xor (const diagram_type &rhs) const |
Union Xor. More... | |
diagram_type | divideFirst (const diagram_type &rhs) const |
Division with first term of right-hand side. More... | |
ostream_type & | print (ostream_type &os) const |
Get number of nodes in decision diagram. More... | |
first_iterator | firstBegin () const |
Get numbers of used variables. More... | |
first_iterator | firstEnd () const |
Finish of first term. More... | |
last_iterator | lastBegin () const |
Start of first term. More... | |
last_iterator | lastEnd () const |
Finish of first term. More... | |
diagram_type | firstMultiples (const std::vector< idx_type > &input_multipliers) const |
Get decison diagram representing the multiples of the first term. More... | |
diagram_type | firstDivisors () const |
Get decison diagram representing the divisors of the first term. More... | |
navigator | navigation () const |
Navigate through ZDD by incrementThen(), incrementElse(), and terminated() More... | |
bool_type | isConstant () const |
Checks whether the the diagram corresponds to {} or {{}} (polynomial 0 or 1) More... | |
std::ostream & | printIntern (std::ostream &os) const |
void | PrintMinterm () const |
![]() | |
bool | operator== (const diagram_type &rhs) const |
Equality. More... | |
bool | operator!= (const diagram_type &rhs) const |
Nonequality. More... | |
Additional Inherited Members | |
![]() | |
ResultType | memApply (ResultType(*func)(mgr_type *, node_ptr)) const |
void | checkAssumption (bool isValid) const |
Check whether previous decision diagram operation for validity. More... | |
diagram_type | cudd_generate_multiples (const ManagerType &mgr, ReverseIterator start, ReverseIterator finish, MultReverseIterator multStart, MultReverseIterator multFinish) const |
temporarily (needs to be more generic) (similar fct in pbori_algo.h) More... | |
diagram_type | cudd_generate_divisors (const ManagerType &mgr, ReverseIterator start, ReverseIterator finish) const |
temporarily (needs to be more generic) (similar fct in pbori_algo.h) More... | |
Generic access to base type.
Iterator type for iterating all monomials.
Iterator type for iterating all monomials.
typedef self polybori::BooleSet::dd_type |
Generic access to type of *this.
Iterator type for iterating all exponent vectors.
Fix type for treatment of exponent vectors.
Iterator type for iterating all exponent vectors.
Type for Boolean polynomial rings (without ordering)
Type of terms.
|
inline |
Copy constructor.
|
inline |
Copy constructor.
Construct new node.
|
inline |
Construct new node (using navigator nodes)
Construct new node (using nodes)
Construct new node (using navigator nodes)
|
inline |
Construct empty set in ring.
Construct new node (using navigator for then and else-branches)
Construct from navigator node.
|
inline |
Destructor.
Add given monomial to sets.
References PBORI_TRACE_FUNC, and polybori::BooleMonomial::set().
BooleSet::const_iterator polybori::BooleSet::begin | ( | ) | const |
Start of iteration over terms.
References PBORI_TRACE_FUNC.
Referenced by polybori::groebner::gen_random_subset(), polybori::groebner::minimal_elements_internal(), polybori::groebner::minimal_elements_multiplied(), polybori::groebner::GroebnerStrategy::minimalize(), polybori::groebner::FGLMStrategy::setupMultiplicationTables(), polybori::groebner::variety_lex_groebner_basis(), and polybori::groebner::variety_lex_leading_terms().
Cartesean product.
Referenced by polybori::groebner::FGLMStrategy::setupMultiplicationTables().
References PBORI_UNLIKELY.
Referenced by polybori::BoolePolynomial::BoolePolynomial(), polybori::groebner::LiteralFactorization::LiteralFactorization(), polybori::lower_term_accumulate(), polybori::groebner::minimal_elements_internal(), polybori::groebner::minimal_elements_internal2(), polybori::groebner::multiply_with_literal_factors(), polybori::BooleMonomial::operator*=(), polybori::term_accumulate(), and polybori::groebner::translate_indices().
BooleSet::bool_type polybori::BooleSet::containsDivisorsOfDecDeg | ( | const term_type & | rhs | ) | const |
Test whether, all divisors of degree -1 of term rhs are contained in this.
References polybori::BooleMonomial::begin(), polybori::dd_contains_divs_of_dec_deg(), and polybori::BooleMonomial::end().
Referenced by polybori::groebner::FGLMStrategy::main().
BooleSet::bool_type polybori::BooleSet::containsDivisorsOfDecDeg | ( | const exp_type & | rhs | ) | const |
Test for term corresponding to exponent rhs.
References polybori::BooleExponent::begin(), polybori::dd_contains_divs_of_dec_deg(), and polybori::BooleExponent::end().
BooleSet::size_type polybori::BooleSet::countIndex | ( | idx_type | idx | ) | const |
Count terms containing BooleVariable(idx)
References polybori::count_index().
double polybori::BooleSet::countIndexDouble | ( | idx_type | idx | ) | const |
Count many terms containing BooleVariable(idx)
References polybori::count_index().
|
inline |
Access internal decision diagram.
Referenced by polybori::BooleMonomial::diagram().
Division by given term.
References polybori::dd_divide_recursively(), polybori::CCuddDDFacade< RingType, DiagramType >::navigation(), and polybori::BooleMonomial::set().
Referenced by polybori::BoolePolynomial::operator/=().
Compute intersection with divisors of rhs.
References polybori::BooleMonomial::diagram(), and PBORI_TRACE_FUNC.
Referenced by polybori::groebner::GroebnerStrategy::addAsYouWish(), polybori::groebner::GroebnerStrategy::addGeneratorTrySplit(), polybori::groebner::FGLMStrategy::main(), polybori::groebner::minimal_elements_divided(), polybori::groebner::minimal_elements_multiplied_monoms(), polybori::groebner::NextSpoly::replacePair(), polybori::groebner::ReductionStrategy::select1(), polybori::groebner::select_largest_degree(), and polybori::groebner::select_no_deg_growth().
Compute intersection with divisors of rhs.
References PBORI_TRACE_FUNC.
|
inline |
Get corresponding zero element (may be removed in the future)
BooleSet::const_iterator polybori::BooleSet::end | ( | ) | const |
Finish of iteration over terms.
References PBORI_TRACE_FUNC.
Referenced by polybori::groebner::minimal_elements_multiplied(), polybori::groebner::GroebnerStrategy::minimalize(), polybori::groebner::variety_lex_groebner_basis(), and polybori::groebner::variety_lex_leading_terms().
Compute existential abstraction: Given a diagram F
, and a set of variables S
, remove all occurrences of each s
in S
from any subset in F
. This can be implemented by cofactoring F
w.r.t. s
= 1 and s
= 0, then forming their union
References polybori::dd_existential_abstraction(), polybori::BooleMonomial::diagram(), polybori::CCuddDDFacade< RingType, DiagramType >::navigation(), and PBORI_TRACE_FUNC.
Referenced by polybori::groebner::minimal_elements_divided(), and polybori::groebner::minimal_elements_multiplied_monoms().
BooleSet::exp_iterator polybori::BooleSet::expBegin | ( | ) | const |
Start of iteration over exponent vectors.
References PBORI_TRACE_FUNC.
Referenced by polybori::groebner::GroebnerStrategy::checkChainCriterion(), polybori::groebner::LexHelper::irreducible_lead(), polybori::groebner::minimal_elements_divided(), polybori::groebner::minimal_elements_internal3(), polybori::groebner::GroebnerStrategy::normalPairsWithLast(), polybori::groebner::NextSpoly::replacePair(), polybori::groebner::ReductionStrategy::select1(), polybori::groebner::select_largest_degree(), polybori::groebner::select_no_deg_growth(), polybori::groebner::GroebnerStrategy::suggestPluginVariable(), polybori::groebner::ReductionStrategy::unmarkNonMinimalLeadingTerms(), and polybori::groebner::FGLMStrategy::writeTailToRow().
BooleSet::exp_iterator polybori::BooleSet::expEnd | ( | ) | const |
Finish of iteration over exponent vectors.
References PBORI_TRACE_FUNC.
Referenced by polybori::groebner::GroebnerStrategy::checkChainCriterion(), polybori::groebner::LexHelper::irreducible_lead(), polybori::groebner::minimal_elements_divided(), polybori::groebner::minimal_elements_internal3(), polybori::groebner::GroebnerStrategy::normalPairsWithLast(), polybori::groebner::NextSpoly::replacePair(), polybori::groebner::select_largest_degree(), polybori::groebner::select_no_deg_growth(), polybori::groebner::GroebnerStrategy::suggestPluginVariable(), polybori::groebner::ReductionStrategy::unmarkNonMinimalLeadingTerms(), and polybori::groebner::FGLMStrategy::writeTailToRow().
Intersection with divisors of first (lexicographical) term of rhs.
References polybori::dd_first_divisors_of(), and PBORI_TRACE_FUNC.
|
inline |
Get unique hash value (valid only per runtime)
BooleSet::bool_type polybori::BooleSet::hasTermOfVariables | ( | const term_type & | rhs | ) | const |
Check for empty intersection with divisors of rhs, i.e. test whether there are terms made of the given variables.
References polybori::BooleMonomial::begin(), polybori::dd_owns_term_of_indices(), polybori::BooleMonomial::end(), PBORI_ASSERT, and PBORI_TRACE_FUNC.
Referenced by polybori::groebner::irreducible_lead().
|
inline |
Test, whether we have two terms only.
References polybori::dd_is_pair().
|
inline |
Test, whether we have one term only.
References polybori::dd_is_singleton().
|
inline |
Test, whether we have one or two terms only.
References polybori::dd_is_singleton_or_pair().
BooleSet::term_type polybori::BooleSet::lastLexicographicalTerm | ( | ) | const |
Get last term (wrt. lexicographical order)
References polybori::dd_last_lexicographical_term(), PBORI_TRACE_FUNC, and PBORI_UNLIKELY.
|
inline |
Returns number of terms (deprecated)
Referenced by polybori::BoolePolynomial::length(), polybori::groebner::LiteralFactorization::LiteralFactorization(), polybori::groebner::minimal_elements_divided(), polybori::groebner::minimal_elements_internal(), polybori::groebner::minimal_elements_internal2(), polybori::groebner::reduce_complete(), and polybori::groebner::sum_size().
BooleSet polybori::BooleSet::minimalElements | ( | ) | const |
Get minimal elements wrt. inclusion.
References polybori::dd_minimal_elements().
Referenced by polybori::groebner::minimal_elements(), and polybori::groebner::variety_lex_leading_terms().
Compute intersection with multiples of rhs.
References polybori::dd_first_multiples_of(), polybori::BooleMonomial::diagram(), and polybori::CCuddDDFacade< RingType, DiagramType >::navigation().
Referenced by polybori::groebner::reduce_by_binom().
|
inline |
Returns number of variables in manager.
BooleSet::bool_type polybori::BooleSet::owns | ( | const term_type & | rhs | ) | const |
References PBORI_TRACE_FUNC, and polybori::BooleMonomial::set().
Referenced by polybori::groebner::GroebnerStrategy::addAsYouWish(), and polybori::groebner::FGLMStrategy::FGLMStrategy().
BooleSet::bool_type polybori::BooleSet::owns | ( | const exp_type & | rhs | ) | const |
Check whether rhs is included in *this.
References polybori::BooleExponent::begin(), polybori::dd_owns(), polybori::BooleExponent::end(), and PBORI_TRACE_FUNC.
|
inline |
Test whether the empty set is included.
References polybori::owns_one().
Referenced by polybori::groebner::do_is_rewriteable(), polybori::groebner::do_minimal_elements_cudd_style(), and polybori::groebner::minimal_elements_cudd_style_unary().
BooleSet::ostream_type & polybori::BooleSet::print | ( | ostream_type & | os | ) | const |
Print current set to output stream.
References polybori::dd_print_terms(), and PBORI_TRACE_FUNC.
Referenced by polybori::operator<<().
BooleSet::const_reverse_iterator polybori::BooleSet::rbegin | ( | ) | const |
Start of backward iteration over terms.
References PBORI_TRACE_FUNC.
Referenced by polybori::groebner::FGLMStrategy::setupMultiplicationTables().
BooleSet::const_reverse_iterator polybori::BooleSet::rend | ( | ) | const |
Finish of backward iteration over terms.
References PBORI_TRACE_FUNC.
BooleSet::reverse_exp_iterator polybori::BooleSet::rExpBegin | ( | ) | const |
Start of backward exponent iteration over terms.
References PBORI_TRACE_FUNC.
Referenced by polybori::groebner::GroebnerStrategy::minimalizeAndTailReduce().
BooleSet::reverse_exp_iterator polybori::BooleSet::rExpEnd | ( | ) | const |
Finish of backward iteration over terms.
References PBORI_TRACE_FUNC.
Referenced by polybori::groebner::GroebnerStrategy::minimalizeAndTailReduce().
|
inline |
Returns number of terms.
Referenced by polybori::groebner::FGLMStrategy::analyzeGB(), polybori::groebner::GroebnerStrategy::minimalize(), polybori::groebner::GroebnerStrategy::minimalizeAndTailReduce(), polybori::groebner::CountCriterion::operator()(), polybori::groebner::FGLMStrategy::setupMultiplicationTables(), polybori::groebner::GroebnerStrategy::treatVariablePairs(), and polybori::groebner::variety_lex_leading_terms().
|
inline |
Approximation of number of terms.
|
inline |
Get stable hash value, which is reproducible.
References polybori::stable_hash_range().
BooleSet::term_type polybori::BooleSet::usedVariables | ( | ) | const |
Set of variables of the whole set.
References PBORI_TRACE_FUNC.
Referenced by polybori::groebner::FGLMStrategy::analyzeGB().
BooleSet::exp_type polybori::BooleSet::usedVariablesExp | ( | ) | const |
Exponent vector of variables of the whole set.
References PBORI_TRACE_FUNC.
Referenced by polybori::BoolePolynomial::usedVariablesExp().