17 #ifndef polybori_BooleExponent_h_
18 #define polybori_BooleExponent_h_
85 BooleExponent(
const self&);
90 self&
get(
const monom_type&);
91 explicit BooleExponent(
const monom_type& rhs);
97 const_iterator
begin()
const {
return m_data.begin(); }
100 const_iterator
end()
const {
return m_data.end(); }
103 const_reverse_iterator
rbegin()
const {
return m_data.rbegin(); }
106 const_reverse_iterator
rend()
const {
return m_data.rend(); }
121 set_type divisors(
const ring_type&)
const;
124 set_type multiples(
const self&,
const ring_type&)
const;
127 set_type multiples(
const monom_type&)
const;
159 self divide(
const self&)
const;
161 return (reducibleBy(rhs)? removeConst(rhs) :
self() ); }
163 self divide(
const var_type& rhs)
const {
return divideByIndex(rhs.
index()); }
164 self divide(
const monom_type&)
const;
171 self multiply(
const monom_type&)
const;
172 self multiplyFirst(
const set_type&)
const;
193 std::copy(rhs.
begin(), rhs.
end(), internalBegin());
198 bool_type reducibleBy(
const self& rhs)
const;
199 bool_type reducibleBy(
const monom_type& rhs)
const;
200 bool_type reducibleBy(
const idx_type& rhs)
const;
202 return reducibleBy(rhs.
index()); }
215 self LCM(
const self&)
const;
221 self GCD(
const self&)
const;
226 m_data.erase(m_data.begin());
231 ostream_type& print(ostream_type&)
const;
252 template <
class RHSType>
259 template <
class RHSType>
281 inline BooleExponent::ostream_type&
283 return rhs.
print(os);
288 #endif // of polybori_BooleExponent_h_
This class shows, whether a property of an order is invalid.
Definition: tags.h:27
poly_type::set_type set_type
Type of sets of Boolean variables.
Definition: BooleExponent.h:73
self divide(const var_type &rhs) const
Definition: BooleExponent.h:163
This class is just a wrapper for using variables for storing indices as interim data structure for Bo...
Definition: BooleExponent.h:34
#define END_NAMESPACE_PBORI
Finish project's namespace.
Definition: pbori_defs.h:77
hash_type stableHash() const
Hash value for the exponent.
Definition: BooleExponent.h:130
self GCD(const self &) const
Compute the greatest common divisor and assign.
Definition: BooleExponent.cc:303
reverse_iterator rInternalBegin()
Start reverse iteration over indices (constant access)
Definition: BooleExponent.h:241
BoolePolynomial poly_type
Type of Boolean polynomials.
Definition: BooleExponent.h:61
#define BEGIN_NAMESPACE_PBORI
Start project's namespace.
Definition: pbori_defs.h:74
const_iterator begin() const
Start iteration over indices (constant access)
Definition: BooleExponent.h:97
poly_type::monom_type monom_type
Type of Boolean variables.
Definition: BooleExponent.h:70
self multiply(const var_type &rhs) const
Definition: BooleExponent.h:170
self LCM(const self &) const
Compute the greatest common divisor.
Definition: BooleExponent.cc:319
int deg_type
Type for polynomial degrees (ranges from -1 to maxint)
Definition: pbori_defs.h:222
self & operator=(const self &rhs)
Assignment operation.
Definition: BooleExponent.h:190
data_type::value_type value_type
Generic access to actual data.
Definition: BooleExponent.h:47
int deg_type
Definition: groebner_defs.h:42
BooleExponent LCM(const BooleExponent &lhs, const BooleExponent &rhs)
Compute the greatest common divisor of two monomials.
Definition: BooleExponent.h:274
const_iterator begin() const
Start iteration over indices.
Definition: BooleMonomial.h:130
BooleExponent operator+(const BooleExponent &lhs, const RHSType &rhs)
Multiplication of monomials.
Definition: BooleExponent.h:254
void stable_term_hash(HashType &seed, Iterator start, Iterator finish)
Definition: pbori_routines_hash.h:83
Accessing .push_back()
Definition: pbori_func.h:48
data_type::iterator iterator
Definition: BooleExponent.h:51
invalid_tag easy_equality_property
This type has no easy equality check.
Definition: BooleExponent.h:79
self & popFirst()
Removes the first index from exponent.
Definition: BooleExponent.h:224
self divideByIndex(const idx_type &rhs) const
Definition: BooleExponent.h:160
poly_type::ring_type ring_type
Type of Boolean variables.
Definition: BooleExponent.h:64
This class reinterprets decicion diagram managers as Boolean polynomial rings, adds an ordering and v...
Definition: BoolePolyRing.h:40
const_iterator end() const
Finish iteration over indices.
Definition: BooleMonomial.h:133
BooleExponent operator-(const BooleExponent &lhs, const RHSType &rhs)
Division of monomials.
Definition: BooleExponent.h:261
iterator internalEnd()
Finish iteration over indices (constant access)
Definition: BooleExponent.h:238
ostream_type & print(ostream_type &) const
Print current polynomial to output stream.
Definition: BooleExponent.cc:428
This struct contains auxiliary type definitions.
Definition: pbori_defs.h:210
bool_type operator==(const self &rhs) const
Definition: BooleExponent.h:185
idx_type index() const
Get index of the variable.
Definition: BooleVariable.h:74
self & operator=(const monom_type &rhs)
Definition: BooleExponent.h:191
This class wraps the underlying decicion diagram type and defines the necessary operations.
Definition: BoolePolynomial.h:85
bool_type reducibleBy(const var_type &rhs) const
Definition: BooleExponent.h:201
std::size_t hash_type
Type for hashing.
Definition: pbori_defs.h:231
BooleExponent::ostream_type & operator<<(BooleExponent::ostream_type &os, const BooleExponent &rhs)
Stream output operator.
Definition: BooleExponent.h:282
generate_index_map< self >::type idx_map_type
Type for index maps.
Definition: BooleExponent.h:76
Polynomial multiply(const Polynomial &p, const Polynomial &q)
Definition: ll_red_nf.h:34
void resize(size_type nsize)
Drop compoents from the nsize-th element on.
Definition: BooleExponent.h:115
self divide(const self &) const
Corresponds to division of monomials.
Definition: BooleExponent.cc:268
reverse_iterator rInternalEnd()
Finish reverse iteration over indices (constant access)
Definition: BooleExponent.h:244
int idx_type
Type for indices.
Definition: pbori_defs.h:228
hash_type hash() const
For the exponent we only have one type of hashes.
Definition: BooleExponent.h:135
const_iterator end() const
Finish iteration over indices (constant access)
Definition: BooleExponent.h:100
std::map< Type, idx_type > type
Type for index maps.
Definition: pbori_func.h:642
const_reverse_iterator rend() const
Finish reverse iteration over indices (constant access)
Definition: BooleExponent.h:106
data_type::const_reverse_iterator const_reverse_iterator
Definition: BooleExponent.h:54
data_type::reverse_iterator reverse_iterator
Definition: BooleExponent.h:53
size_type size() const
Size of the exponents.
Definition: BooleMonomial.h:151
poly_type::var_type var_type
Type of Boolean variables.
Definition: BooleExponent.h:67
polybori::CTypes::idx_type idx_type
Definition: groebner_defs.h:44
data_type m_data
The actual exponent indices.
Definition: BooleExponent.h:247
std::size_t size_type
Type for lengths, dimensions, etc.
Definition: pbori_defs.h:219
void reserve(size_type nsize)
Prepare memory for exponents.
Definition: BooleExponent.h:112
data_type::const_iterator const_iterator
Definition: BooleExponent.h:52
BooleExponent GCD(const BooleExponent &lhs, const BooleExponent &rhs)
Compute the greatest common divisor of two monomials.
Definition: BooleExponent.h:267
const_reverse_iterator rbegin() const
Start reverse iteration over indices (constant access)
Definition: BooleExponent.h:103
Definition: BooleSet.h:57
self multiply(const idx_type &rhs) const
Definition: BooleExponent.h:169
This class is just a wrapper for using variables from cudd's decicion diagram.
Definition: BooleMonomial.h:50
size_type size() const
Degree of the corresponding monomial.
Definition: BooleExponent.h:109
bool_type operator!=(const self &rhs) const
Definition: BooleExponent.h:186
bool bool_type
Type for standard true/false statements.
Definition: pbori_defs.h:216
iterator internalBegin()
Start iteration over indices (constant access)
Definition: BooleExponent.h:235
This class is just a wrapper for using variables from cudd's decicion diagram.
Definition: BooleVariable.h:39
std::vector< idx_type > data_type
Define the underlying data structure.
Definition: BooleExponent.h:44
deg_type deg() const
Degree of the corresponding monomial.
Definition: BooleExponent.h:118
self multiply(const self &) const
Corresponds to multiplication of monomials.
Definition: BooleExponent.cc:349