16 #ifndef polybori_groebner_tables_h_
17 #define polybori_groebner_tables_h_
25 #define PBORI_HAVE_DLEX4_DATA 1
27 #ifdef PBORI_HAVE_DLEX4_DATA
31 #define PBORI_HAVE_LP4_DATA 1
33 #ifdef PBORI_HAVE_LP4_DATA
37 #define PBORI_HAVE_DP_ASC4_DATA 1
39 #ifdef PBORI_HAVE_DP_ASC4_DATA
46 template<
class value_type,
class initializer,
class set_bit>
52 value_type p_code=init(max_vars);
59 unsigned int exp_code=0;
63 exp_code|=(1<<ring_2_0123[(*it_v)]);
69 bit_setter(p_code,exp_code);
79 return p2code<unsigned int, ZeroFunction, SetBitUInt>(p,ring_2_0123, 4);
85 #ifdef PBORI_HAVE_LP4_DATA
89 #ifdef PBORI_HAVE_DLEX4_DATA
93 #ifdef PBORI_HAVE_DP_ASC4_DATA
98 throw std::runtime_error(
"Groebner tables used with forbidden order");
106 unsigned int code,
const std::vector<idx_type>& back_2_ring){
109 for(
int idx = 3; idx >= 0; --idx){
110 if ((code & (1<<idx)) != 0){
111 result *= ring.
variable(back_2_ring[idx]);
120 unsigned int code,
const std::vector<idx_type>& back_2_ring){
123 for(
int idx = 15; idx >= 0; --idx){
124 if ((code & (1<<idx)) != 0){
133 #ifdef PBORI_HAVE_DLEX4_DATA
137 #ifdef PBORI_HAVE_LP4_DATA
141 #ifdef PBORI_HAVE_DP_ASC4_DATA
This class is just a wrapper for using variables for storing indices as interim data structure for Bo...
Definition: BooleExponent.h:34
exp_iterator expEnd() const
Finish of iteration over exponent vectors.
Definition: BoolePolynomial.cc:548
const unsigned short dlex4var_data[][7]
const_iterator begin() const
Start iteration over indices (constant access)
Definition: BooleExponent.h:97
#define END_NAMESPACE_PBORIGB
Definition: groebner_defs.h:16
const unsigned short dp_asc4var_data[][7]
var_type variable(checked_idx_type nvar) const
Access nvar-th ring variable as diagram.
Definition: BoolePolyRing.cc:99
unsigned int p2code_4(Polynomial p, const std::vector< char > &ring_2_0123)
Definition: tables.h:78
bool have_base_ordering_for_tables(const BoolePolyRing &ring)
Definition: tables.h:154
This class reinterprets decicion diagram managers as Boolean polynomial rings, adds an ordering and v...
Definition: BoolePolyRing.h:40
#define BEGIN_NAMESPACE_PBORIGB
Definition: groebner_defs.h:15
order_reference ordering() const
Access ordering of *this.
Definition: BoolePolyRing.h:156
This class wraps the underlying decicion diagram type and defines the necessary operations.
Definition: BoolePolynomial.h:85
unsigned int get_table_entry4(const BoolePolyRing &ring, int p_code, int pos)
Definition: tables.h:83
bool have_ordering_for_tables(const BoolePolyRing &ring)
Definition: tables.h:149
const unsigned short lp4var_data[][7]
value_type p2code(Polynomial p, const std::vector< char > &ring_2_0123, int max_vars)
Definition: tables.h:48
#define PBORI_ASSERT(arg)
Definition: pbori_defs.h:118
const_iterator end() const
Finish iteration over indices (constant access)
Definition: BooleExponent.h:100
Polynomial code_2_poly_4(const BoolePolyRing &ring, unsigned int code, const std::vector< idx_type > &back_2_ring)
Definition: tables.h:119
exp_iterator expBegin() const
Start of iteration over exponent vectors.
Definition: BoolePolynomial.cc:540
data_type::const_iterator const_iterator
Definition: BooleExponent.h:52
Monomial code_2_m_4(const BoolePolyRing &ring, unsigned int code, const std::vector< idx_type > &back_2_ring)
Definition: tables.h:105
This class is just a wrapper for using variables from cudd's decicion diagram.
Definition: BooleMonomial.h:50
virtual ordercode_type getBaseOrderCode() const =0
Get numerical code for base ordering (the same for non-block orderings)
virtual ordercode_type getOrderCode() const =0
Get numerical code for ordering.
Definition: BoolePolynomial.h:73