Defines | |
| #define | MON_GET_EXP(x, i) ((exponent_t) (((x) >> ((i) * MON_BITS_PER_EXP)) & MON_BITMASK_BLOCK)) |
| #define | MON_SET_EXP(x, i, e) ((x) = (((x) & (MON_BITMASK_ALL - (MON_BITMASK_BLOCK << ((i) * MON_BITS_PER_EXP)))) | (((monomial_t)(e)) << ((i) * MON_BITS_PER_EXP)))) |
| #define | MON_INC_EXP(x, i, e) ((x) = ((x) + (((monomial_t)(e)) << ((i) * MON_BITS_PER_EXP)))) |
| #define | MON_DEC_EXP(x, i, e) ((x) = ((x) - (((monomial_t)(e)) << ((i) * MON_BITS_PER_EXP)))) |
Functions | |
| uint32_t | mon_degree (monomial_t op) |
| #define MON_DEC_EXP | ( | x, | |||
| i, | |||||
| e | ) | ((x) = ((x) - (((monomial_t)(e)) << ((i) * MON_BITS_PER_EXP)))) |
Decrements the current value of the ith exponent of the monomial x by e.
| #define MON_GET_EXP | ( | x, | |||
| i | ) | ((exponent_t) (((x) >> ((i) * MON_BITS_PER_EXP)) & MON_BITMASK_BLOCK)) |
Returns the ith exponent of the monomial x.
| #define MON_INC_EXP | ( | x, | |||
| i, | |||||
| e | ) | ((x) = ((x) + (((monomial_t)(e)) << ((i) * MON_BITS_PER_EXP)))) |
Increments the current value of the ith exponent of the monomial x by e.
| #define MON_SET_EXP | ( | x, | |||
| i, | |||||
| e | ) | ((x) = (((x) & (MON_BITMASK_ALL - (MON_BITMASK_BLOCK << ((i) * MON_BITS_PER_EXP)))) | (((monomial_t)(e)) << ((i) * MON_BITS_PER_EXP)))) |
Sets the ith exponent of the monomial x to the value e.
| uint32_t mon_degree | ( | monomial_t | op | ) |
Returns the total degree of the monomial op.
Note that, since we assume the individual degrees to be less than 256 and support at most eight variables, the result fits comfortably in a 32-bit unsigned integer.
1.5.6