Previous: Intervals, Up: Scalars & Intervals & Coefficients
typedef enum ap_coeff_discr_t { AP_COEFF_SCALAR, AP_COEFF_INTERVAL } ap_coeff_discr_t;
Discriminant indicating the underlying type of a coefficient.
typedef struct ap_coeff_t { ap_coeff_discr_t discr; union { ap_scalar_t* scalar; ap_interval_t* interval; } val; } ap_coeff_t;
A coefficient is either a scalar or an interval.
• Initializing coefficients | ||
• Assigning coefficients | ||
• Comparing coefficients | ||
• Other operations on coefficients |
Next: Assigning coefficients, Previous: Coefficients, Up: Coefficients
Allocate a coefficient, using discr to specify the type of coefficient (scalar or interval).
Deallocate a coefficient.
Changing the type of the coefficient and also the type of the underlting scalar(s).
If the coefficient is an interval [a;a], convert it to a scalar. */
Initialize, initialize and assign, and clear a scalar \‘a la GMP (internal use).
Next: Comparing coefficients, Previous: Initializing coefficients, Up: Coefficients
Set the value of rop from op.
Set the type of rop to scalar, and sets its value as the
functions ap_scalar_set_XXX
.
Set the type of rop to interval, and sets its value as the
functions ap_interval_set_XXX
.
Combined allocation and assignement.
Next: Other operations on coefficients, Previous: Assigning coefficients, Up: Coefficients
Non-total comparison.
ap_scalar_cmp
.
ap_interval_cmp
.
Equality test.
Return true iff coeff is a zero scalar or an interval with zero bounds.
Previous: Comparing coefficients, Up: Coefficients
Negation.
Exchange the values of op1 and op2.
Return an hash code (for instance for OCaml interface).
Print op on the stream stream.
Previous: Comparing coefficients, Up: Coefficients