APRONXX
0.9.12
|
Temporary expression nodes used when constructing a texpr1. More...
#include <apxx_texpr1.hh>
Inherits apron::use_malloc.
Public Member Functions | |
Constructors | |
builder (const builder &x) | |
Makes a shallow copy, copying only the root node. Sub-expressions are aliased, not copied. More... | |
builder (const const_iterator &x) | |
Makes a shallow copy, copying only the root node. Sub-expressions are aliased, not copied. More... | |
builder (const texpr1 &x) | |
Makes a shallow copy, copying only the root node. Sub-expressions are aliased, not copied. More... | |
builder (const environment &e, const texpr0::builder &b) | |
Converts from a level 0 builder and associates an environment. More... | |
builder (const environment &e, const texpr0::const_iterator &b) | |
Converts from a level 0 expression (shallow copy) and associates an environment. More... | |
builder (const environment &e, const texpr0 &b) | |
Converts from a level 0 expression (shallow copy) and associates an environment. More... | |
builder (const environment &e, const coeff &x) | |
Makes a constant leaf from a scalar or interval coefficient (copied). More... | |
builder (const environment &e, const scalar &x) | |
Makes a constant scalar leaf from a scalar (copied). More... | |
builder (const environment &e, const mpq_class &x) | |
Makes a constant scalar leaf from a MPQ (copied). More... | |
builder (const environment &e, mpfr_t x) | |
Makes a constant scalar leaf from a MPFR (copied). More... | |
builder (const environment &e, int x) | |
Makes a constant scalar MPQ leaf from an integer. More... | |
builder (const environment &e, long x) | |
Makes a constant scalar MPQ leaf from an integer. More... | |
builder (const environment &e, double x) | |
Makes a constant scalar double leaf from a double. More... | |
builder (const environment &e, const frac &x) | |
Makes a constant scalar MPQ leaf from a fraction with integer coefficients. More... | |
builder (const environment &e, const interval &x) | |
Makes a constant interval leaf from an interval (copied). More... | |
builder (const environment &e, const scalar &inf, const scalar &sup) | |
Makes a constant interval leaf from two scalar bounds (copied). More... | |
builder (const environment &e, const mpq_class &inf, const mpq_class &sup) | |
Makes a constant interval leaf from two MPQ bounds (copied). More... | |
builder (const environment &e, mpfr_t inf, mpfr_t sup) | |
Makes a constant interval leaf from two MPFR bounds (copied). More... | |
builder (const environment &e, int inf, int sup) | |
Makes a constant interval leaf from two integer bounds (converted to MPQ). More... | |
builder (const environment &e, long inf, long sup) | |
Makes a constant interval leaf from two integer bounds (converted to MPQ). More... | |
builder (const environment &e, double inf, double sup) | |
Makes a constant interval leaf from two double bounds. More... | |
builder (const environment &e, const frac &inf, const frac &sup) | |
Makes a constant interval leaf from two fraction bounds (converted to MPQ). More... | |
builder (const environment &e, top t) | |
Makes a constant interval leaf equal to ]-oo;+oo[. More... | |
builder (const environment &e, const var &v) | |
Makes a variable name dimension leaf. More... | |
builder (ap_texpr_op_t op, const builder &argA, ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir) | |
Makes a unary expression node. More... | |
builder (ap_texpr_op_t op, const builder &argA, const builder &argB, ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir) | |
Makes a binary expression node. More... | |
Destructor | |
~builder () | |
Frees the memory occupied by the node, not its sub-expressions. More... | |
Tests | |
bool | is_zero () const |
Whether the expression is a single coefficient node with 0 value. More... | |
C API compatibility | |
ap_texpr1_t * | get_ap_texpr1_t () |
Returns a pointer to the internal APRON object stored in *this. More... | |
const ap_texpr1_t * | get_ap_texpr1_t () const |
Returns a pointer to the internal APRON object stored in *this. More... | |
![]() | |
void * | operator new (size_t sz) |
void * | operator new[] (size_t sz) |
void | operator delete (void *p) |
void | operator delete[] (void *p) |
Protected Member Functions | |
builder & | operator= (const builder &x) |
Not to be used. (Temporaries are not to be re-assigned). More... | |
void | init_from (ap_texpr1_t *x) |
Internal use only: makes a shallow copy, copying only the root node and referencing the environment. More... | |
void | init_from (ap_environment_t *e, ap_texpr0_t *x) |
Internal use only: makes a shallow copy, copying only the root node and referencing the environment. More... | |
builder (ap_texpr1_t *x) | |
Internal use only: makes a shallow copy, copying only the root node and referencing the environment. More... | |
Protected Attributes | |
ap_texpr1_t | l |
Friends | |
'Intelligent' constructors | |
builder | unary (ap_texpr_op_t op, const builder &a, ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir) |
Makes a unary expression node. More... | |
builder | binary (ap_texpr_op_t op, const builder &a, const builder &b, ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir) |
Makes a binary expression node. More... | |
builder | add (const builder &a, const builder &b, ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir) |
Makes an AP_TEXPR_ADD expression node. More... | |
builder | sub (const builder &a, const builder &b, ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir) |
Makes an AP_TEXPR_SUB expression node. More... | |
builder | mul (const builder &a, const builder &b, ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir) |
Makes an AP_TEXPR_MUL expression node. More... | |
builder | div (const builder &a, const builder &b, ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir) |
Makes an AP_TEXPR_DIV expression node. More... | |
builder | mod (const builder &a, const builder &b, ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir) |
Makes an AP_TEXPR_MOD expression node. More... | |
builder | pow (const builder &a, const builder &b, ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir) |
Makes an AP_TEXPR_POW expression node. More... | |
builder | neg (const builder &a, ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir) |
Makes an AP_TEXPR_NEG expression node. More... | |
builder | cast (const builder &a, ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir) |
Makes an AP_TEXPR_CAST expression node. More... | |
builder | floor (const builder &a) |
Makes an AP_TEXPR_CAST expression node to AP_RTYPE_INT type rounded towards AP_RDIR_DOWN . More... | |
builder | ceil (const builder &a) |
Makes an AP_TEXPR_CAST expression node to AP_RTYPE_INT type rounded towards AP_RDIR_UP . More... | |
builder | trunc (const builder &a) |
Makes an AP_TEXPR_CAST expression node to AP_RTYPE_INT type rounded towards AP_RDIR_ZERO . More... | |
builder | sqrt (const builder &a, ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir) |
Makes an AP_TEXPR_SQRT expression node. More... | |
builder | operator+ (const builder &a) |
Makes a copy of the node. More... | |
builder | operator- (const builder &a) |
Makes a AP_TEXPR_NEG expression node using AP_RTYPE_REAL type (no rounding). More... | |
builder | operator+ (const builder &a, const builder &b) |
Makes a AP_TEXPR_ADD expression node using AP_RTYPE_REAL type (no rounding). More... | |
builder | operator- (const builder &a, const builder &b) |
Makes a AP_TEXPR_SUB expression node using AP_RTYPE_REAL type (no rounding). More... | |
builder | operator * (const builder &a, const builder &b) |
Makes a AP_TEXPR_MUL expression node using AP_RTYPE_REAL type (no rounding). More... | |
builder | operator/ (const builder &a, const builder &b) |
Makes a AP_TEXPR_DIV expression node using AP_RTYPE_REAL type (no rounding). More... | |
builder | operator% (const builder &a, const builder &b) |
Makes a AP_TEXPR_MOD expression node using AP_RTYPE_REAL type (no rounding). More... | |
builder | operator^ (const builder &a, const builder &b) |
Makes a AP_TEXPR_POW expression node using AP_RTYPE_REAL type (no rounding). More... | |
Temporary expression nodes used when constructing a texpr1.
A temporary expression is composed of a level 0 node with an associated environment.
You should not create variables of type build, nor define functions that return or take builder objects as arguments.
|
inlineprotected |
Internal use only: makes a shallow copy, copying only the root node and referencing the environment.
|
inline |
Makes a shallow copy, copying only the root node. Sub-expressions are aliased, not copied.
|
inline |
Makes a shallow copy, copying only the root node. Sub-expressions are aliased, not copied.
|
inline |
Makes a shallow copy, copying only the root node. Sub-expressions are aliased, not copied.
|
inline |
Converts from a level 0 builder and associates an environment.
|
inline |
Converts from a level 0 expression (shallow copy) and associates an environment.
|
inline |
Converts from a level 0 expression (shallow copy) and associates an environment.
|
inline |
Makes a constant leaf from a scalar or interval coefficient (copied).
|
inline |
Makes a constant scalar leaf from a scalar (copied).
|
inline |
Makes a constant scalar leaf from a MPQ (copied).
|
inline |
Makes a constant scalar leaf from a MPFR (copied).
|
inline |
Makes a constant scalar MPQ leaf from an integer.
|
inline |
Makes a constant scalar MPQ leaf from an integer.
|
inline |
Makes a constant scalar double leaf from a double.
|
inline |
Makes a constant scalar MPQ leaf from a fraction with integer coefficients.
|
inline |
Makes a constant interval leaf from an interval (copied).
|
inline |
Makes a constant interval leaf from two scalar bounds (copied).
|
inline |
Makes a constant interval leaf from two MPQ bounds (copied).
|
inline |
Makes a constant interval leaf from two MPFR bounds (copied).
|
inline |
Makes a constant interval leaf from two integer bounds (converted to MPQ).
|
inline |
Makes a constant interval leaf from two integer bounds (converted to MPQ).
|
inline |
Makes a constant interval leaf from two double bounds.
|
inline |
Makes a constant interval leaf from two fraction bounds (converted to MPQ).
|
inline |
Makes a constant interval leaf equal to ]-oo;+oo[.
|
inline |
Makes a variable name dimension leaf.
|
inline |
Makes a unary expression node.
|
inline |
Makes a binary expression node.
|
inline |
Frees the memory occupied by the node, not its sub-expressions.
|
inline |
Returns a pointer to the internal APRON object stored in *this.
|
inline |
Returns a pointer to the internal APRON object stored in *this.
|
inlineprotected |
Internal use only: makes a shallow copy, copying only the root node and referencing the environment.
|
inlineprotected |
Internal use only: makes a shallow copy, copying only the root node and referencing the environment.
|
inline |
Whether the expression is a single coefficient node with 0 value.
Not to be used. (Temporaries are not to be re-assigned).
|
friend |
Makes an AP_TEXPR_ADD
expression node.
|
friend |
Makes a binary expression node.
Creates only one node. The argument expressions is aliased, not copied.
op
should be a binary operator: addition (AP_TEXPR_ADD
), subtraction (AP_TEXPR_SUB
), multiplication (AP_TEXPR_MUL
), division (AP_TEXPR_DIV
), or modulo (AP_TEXPR_MOD
, AP_TEXPR_POW
). argA
should point to the left argument expression. argB
should point to the right argument expression. rtype
is the destination type (for rounding): reals (AP_RTYPE_REAL
, means no rounding), perfect integers (AP_RTYPE_INT
), 32-bit single precision (AP_RTYPE_SINGLE
), 64-bit double precision (AP_RTYPE_DOUBLE
), 80-bit extended precision (AP_RTYPE_EXTENDED
). rdir
is the rounding direction: to nearest (AP_RDIR_NEAREST
), truncation (AP_RDIR_ZERO
), towards +oo (AP_RDIR_UP
), towards -oo (AP_RDIR_DOWN
), or non-deterministic (AP_RDIR_RND
). std::invalid_argument | if op is not a binary operator. |
|
friend |
Makes an AP_TEXPR_CAST
expression node.
Makes an AP_TEXPR_CAST
expression node to AP_RTYPE_INT
type rounded towards AP_RDIR_UP
.
|
friend |
Makes an AP_TEXPR_DIV
expression node.
Makes an AP_TEXPR_CAST
expression node to AP_RTYPE_INT
type rounded towards AP_RDIR_DOWN
.
|
friend |
Makes an AP_TEXPR_MOD
expression node.
|
friend |
Makes an AP_TEXPR_MUL
expression node.
|
friend |
Makes an AP_TEXPR_NEG
expression node.
Makes a AP_TEXPR_MUL
expression node using AP_RTYPE_REAL
type (no rounding).
Makes a AP_TEXPR_MOD
expression node using AP_RTYPE_REAL
type (no rounding).
Makes a AP_TEXPR_ADD
expression node using AP_RTYPE_REAL
type (no rounding).
Makes a AP_TEXPR_NEG
expression node using AP_RTYPE_REAL
type (no rounding).
Makes a AP_TEXPR_SUB
expression node using AP_RTYPE_REAL
type (no rounding).
Makes a AP_TEXPR_DIV
expression node using AP_RTYPE_REAL
type (no rounding).
Makes a AP_TEXPR_POW
expression node using AP_RTYPE_REAL
type (no rounding).
|
friend |
Makes an AP_TEXPR_POW
expression node.
|
friend |
Makes an AP_TEXPR_SQRT
expression node.
|
friend |
Makes an AP_TEXPR_SUB
expression node.
Makes an AP_TEXPR_CAST
expression node to AP_RTYPE_INT
type rounded towards AP_RDIR_ZERO
.
|
friend |
Makes a unary expression node.
Creates only one node. The argument expression is aliased, not copied.
op
should be a unary operator: negation (AP_TEXPR_NEG
), typecast (AP_TEXPR_CAST
), or square root (AP_TEXPR_SQRT
). argA
should point to the argument expression. rtype
is the destination type (for rounding): reals (AP_RTYPE_REAL
, means no rounding), perfect integers (AP_RTYPE_INT
), 32-bit single precision (AP_RTYPE_SINGLE
), 64-bit double precision (AP_RTYPE_DOUBLE
), 80-bit extended precision (AP_RTYPE_EXTENDED
), or 128-bit quadruple precision (AP_RTYPE_QUAD
). rdir
is the rounding direction: to nearest (AP_RDIR_NEAREST
), truncation (AP_RDIR_ZERO
), towards +oo (AP_RDIR_UP
), towards -oo (AP_RDIR_DOWN
), or non-deterministic (AP_RDIR_RND
). std::invalid_argument | if op is not a unary operator. |
|
protected |