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