Basic access


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 Documentation

#define MON_DEC_EXP ( x,
i,
 )     ((x) = ((x) - (((monomial_t)(e)) << ((i) * MON_BITS_PER_EXP))))

Decrements the current value of the ith exponent of the monomial x by e.

Warning:
This macro possibly evaluates its arguments multiple times.

#define MON_GET_EXP ( x,
 )     ((exponent_t) (((x) >> ((i) * MON_BITS_PER_EXP)) & MON_BITMASK_BLOCK))

Returns the ith exponent of the monomial x.

Note:
This macro evaluates each argument only once.

#define MON_INC_EXP ( x,
i,
 )     ((x) = ((x) + (((monomial_t)(e)) << ((i) * MON_BITS_PER_EXP))))

Increments the current value of the ith exponent of the monomial x by e.

Warning:
This macro possibly evaluates its arguments multiple times.

#define MON_SET_EXP ( x,
i,
 )     ((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.

Warning:
This macro possibly evaluates its arguments multiple times.


Function Documentation

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.


Generated on Sat Nov 14 23:24:59 2009 for MONV by  doxygen 1.5.6