|
type definitions for expressions and expression trees
- Author
- Stefan Vigerske
-
Thorsten Gellermann
Definition in file type_expr.h.
Go to the source code of this file.
|
#define | SCIP_EXPR_DEGREEINFINITY 65535 |
|
#define | SCIP_DECL_EXPREVAL(x) SCIP_RETCODE x (SCIP_EXPROPDATA opdata, int nargs, SCIP_Real* argvals, SCIP_Real* varvals, SCIP_Real* paramvals, SCIP_Real* result) |
|
#define | SCIP_DECL_EXPRINTEVAL(x) SCIP_RETCODE x (SCIP_Real infinity, SCIP_EXPROPDATA opdata, int nargs, SCIP_INTERVAL* argvals, SCIP_INTERVAL* varvals, SCIP_Real* paramvals, SCIP_INTERVAL* result) |
|
#define | SCIP_DECL_EXPRCURV(x) SCIP_RETCODE x (SCIP_Real infinity, SCIP_EXPROPDATA opdata, int nargs, SCIP_INTERVAL* argbounds, SCIP_EXPRCURV* argcurv, SCIP_EXPRCURV* result) |
|
#define | SCIP_DECL_EXPRCOPYDATA(x) SCIP_RETCODE x (BMS_BLKMEM* blkmem, int nchildren, SCIP_EXPROPDATA opdatasource, SCIP_EXPROPDATA* opdatatarget) |
|
#define | SCIP_DECL_EXPRFREEDATA(x) void x (BMS_BLKMEM* blkmem, int nchildren, SCIP_EXPROPDATA opdata) |
|
#define | SCIP_DECL_EXPRGRAPHVARADDED(x) SCIP_RETCODE x (SCIP_EXPRGRAPH* exprgraph, void* userdata, void* var, SCIP_EXPRGRAPHNODE* varnode) |
|
#define | SCIP_DECL_EXPRGRAPHVARREMOVE(x) SCIP_RETCODE x (SCIP_EXPRGRAPH* exprgraph, void* userdata, void* var, SCIP_EXPRGRAPHNODE* varnode) |
|
#define | SCIP_DECL_EXPRGRAPHVARCHGIDX(x) SCIP_RETCODE x (SCIP_EXPRGRAPH* exprgraph, void* userdata, void* var, SCIP_EXPRGRAPHNODE* varnode, int oldidx, int newidx) |
|
#define | SCIP_EXPRBOUNDSTATUS_VALID 0x0 |
|
#define | SCIP_EXPRBOUNDSTATUS_CHILDTIGHTENED 0x1 |
|
#define | SCIP_EXPRBOUNDSTATUS_CHILDRELAXED 0x2 |
|
#define | SCIP_EXPRBOUNDSTATUS_TIGHTENEDBYPARENT 0x4 |
|
#define | SCIP_EXPRBOUNDSTATUS_TIGHTENEDBYPARENTRECENT (0x8 | SCIP_EXPRBOUNDSTATUS_TIGHTENEDBYPARENT) |
|
#define | SCIP_EXPRBOUNDSTATUS_TIGHTENEDBYPARENTFORCE (0x10 | SCIP_EXPRBOUNDSTATUS_TIGHTENEDBYPARENTRECENT) |
|
|
enum | SCIP_ExprOp {
SCIP_EXPR_VARIDX = 1,
SCIP_EXPR_CONST = 2,
SCIP_EXPR_PARAM = 3,
SCIP_EXPR_PLUS = 8,
SCIP_EXPR_MINUS = 9,
SCIP_EXPR_MUL = 10,
SCIP_EXPR_DIV = 11,
SCIP_EXPR_SQUARE = 12,
SCIP_EXPR_SQRT = 13,
SCIP_EXPR_REALPOWER = 14,
SCIP_EXPR_INTPOWER = 15,
SCIP_EXPR_SIGNPOWER = 16,
SCIP_EXPR_EXP = 17,
SCIP_EXPR_LOG = 18,
SCIP_EXPR_SIN = 19,
SCIP_EXPR_COS = 20,
SCIP_EXPR_TAN = 21,
SCIP_EXPR_MIN = 24,
SCIP_EXPR_MAX = 25,
SCIP_EXPR_ABS = 26,
SCIP_EXPR_SIGN = 27,
SCIP_EXPR_SUM = 64,
SCIP_EXPR_PRODUCT = 65,
SCIP_EXPR_LINEAR = 66,
SCIP_EXPR_QUADRATIC = 67,
SCIP_EXPR_POLYNOMIAL = 68,
SCIP_EXPR_LAST = 69
} |
|
enum | SCIP_ExprCurv {
SCIP_EXPRCURV_UNKNOWN = 0,
SCIP_EXPRCURV_CONVEX = 1,
SCIP_EXPRCURV_CONCAVE = 2,
SCIP_EXPRCURV_LINEAR = SCIP_EXPRCURV_CONVEX | SCIP_EXPRCURV_CONCAVE
} |
|
#define SCIP_EXPR_DEGREEINFINITY 65535 |
value that stands for an infinite degree of an expression (see SCIPexprGetMaxDegree)
Definition at line 111 of file type_expr.h.
signature of an expression (pointwise) evaluation function The function should return nan, inf, or -inf in result if the function is undefined for the given arguments.
- opdata operand data
- nargs number of arguments
- argvals values of arguments
- varvals values for variables
- paramvals values for parameters
- result buffer where to store result of evaluation
Definition at line 123 of file type_expr.h.
signature of an expression (interval) evaluation function The function should return an empty interval if the function is undefined for the given arguments.
- infinity value for infinity
- opdata operand data
- nargs number of arguments
- argvals interval values of arguments
- varvals interval values for variables
- paramvals values for parameters
- result buffer where to store result of evaluation
Definition at line 136 of file type_expr.h.
signature of a simple expression curvature check function
- infinity value for infinity
- opdata operand data
- nargs number of arguments
- argbounds bounds on value of arguments
- argcurv curvature of arguments
- paramvals values for parameters
- result buffer where to store result of curvature check
Definition at line 148 of file type_expr.h.
signature of a expression data copy function
- blkmem block memory
- nchildren number of children in expression
- opdatasource source expression data
- opdatatarget pointer to target expression data
Definition at line 157 of file type_expr.h.
#define SCIP_DECL_EXPRFREEDATA |
( |
|
x | ) |
void x (BMS_BLKMEM* blkmem, int nchildren, SCIP_EXPROPDATA opdata) |
signature of a expression data free function
- blkmem block memory
- nchildren number of children in expression
- opdata expression data to free
Definition at line 165 of file type_expr.h.
callback method of expression graph invoked when a new variable has been added to the graph
input:
- exprgraph expression graph
- userdata a pointer to user data
- var variable that has been added to expression graph
- varnode new expression graph node for a variable
Definition at line 178 of file type_expr.h.
callback method of expression graph invoked when a variable is to be removed from the graph
input:
- exprgraph expression graph
- userdata a pointer to user data
- var variable that will be removed from the expression graph
- varnode expression graph node corresponding to variable
Definition at line 188 of file type_expr.h.
callback method of expression graph invoked when a variable changes its index
input:
- exprgraph expression graph
- userdata a pointer to user data
- var variable which will change its index
- varnode expression graph node corresponding to variable
- oldidx current index of variable
- newidx new index the variable will have
Definition at line 200 of file type_expr.h.
#define SCIP_EXPRBOUNDSTATUS_VALID 0x0 |
bounds are valid, i.e., conform with bounds of children
Definition at line 206 of file type_expr.h.
#define SCIP_EXPRBOUNDSTATUS_CHILDTIGHTENED 0x1 |
a child bounds were tightened since last calculation
Definition at line 207 of file type_expr.h.
#define SCIP_EXPRBOUNDSTATUS_CHILDRELAXED 0x2 |
bounds are not valid and need to be recomputed, because the bounds in a child were relaxed
Definition at line 208 of file type_expr.h.
#define SCIP_EXPRBOUNDSTATUS_TIGHTENEDBYPARENT 0x4 |
bounds have been tightened by reverse propagation in a parent, they are valid as long as there has been no relaxation of bounds somewhere in the graph
Definition at line 209 of file type_expr.h.
#define SCIP_EXPRBOUNDSTATUS_TIGHTENEDBYPARENTRECENT (0x8 | SCIP_EXPRBOUNDSTATUS_TIGHTENEDBYPARENT) |
bounds have recently been tightened by reverse propagation in a parent, this tightening has not been propagated further down yet
Definition at line 210 of file type_expr.h.
#define SCIP_EXPRBOUNDSTATUS_TIGHTENEDBYPARENTFORCE (0x10 | SCIP_EXPRBOUNDSTATUS_TIGHTENEDBYPARENTRECENT) |
bounds may have recently been tightened by reverse propagation in a parent, in any case we want to propagate bounds further down
Definition at line 211 of file type_expr.h.
expression operand data
Definition at line 89 of file type_expr.h.
element of a quadratic term
Definition at line 105 of file type_expr.h.
the data of a quadratic expression (SCIP_EXPR_QUADRATIC)
Definition at line 106 of file type_expr.h.
a monomial as part of the data in a polynomial expression
Definition at line 108 of file type_expr.h.
the data of a polynomial expression (SCIP_EXPR_POLYNOMIAL)
Definition at line 109 of file type_expr.h.
node in an expression graph
Definition at line 167 of file type_expr.h.
bitflags that indicate the status of bounds stored in a node of an expression graph
Definition at line 213 of file type_expr.h.
Operators of expressions.
Enumerator |
---|
SCIP_EXPR_VARIDX |
variable given by index (stored in data.idx)
|
SCIP_EXPR_CONST |
constant (value stored in data.dbl)
|
SCIP_EXPR_PARAM |
parameter = a constant that can be modified (should not be simplified away)
|
SCIP_EXPR_PLUS |
addition (2 operands)
|
SCIP_EXPR_MINUS |
substraction (2 operands)
|
SCIP_EXPR_MUL |
multiplication (2 operands)
|
SCIP_EXPR_DIV |
division (2 operands)
|
SCIP_EXPR_SQUARE |
square (1 operand)
|
SCIP_EXPR_SQRT |
square root (1 operand)
|
SCIP_EXPR_REALPOWER |
power with real exponent (1 operand!, assumed to be nonnegative, exponent is stored in expression data)
|
SCIP_EXPR_INTPOWER |
power with integer exponent (1 operand!, exponent stored in expression data)
|
SCIP_EXPR_SIGNPOWER |
signed power (sign(x)|x|^a, 1 operand!, exponent is stored in expression data)
|
SCIP_EXPR_EXP |
exponential (e^x, 1 operand)
|
SCIP_EXPR_LOG |
natural logarithm (ln(x), 1 operand)
|
SCIP_EXPR_SIN |
sinus (1 operand)
|
SCIP_EXPR_COS |
cosinus (1 operand)
|
SCIP_EXPR_TAN |
tangent (1 operand)
|
SCIP_EXPR_MIN |
gaussian error function (1 operand) imaginary part of gaussian error function (1 operand) minimum (2 operands)
|
SCIP_EXPR_MAX |
maximum (2 operands)
|
SCIP_EXPR_ABS |
absolute value (1 operand)
|
SCIP_EXPR_SIGN |
sign of value (1 operand)
|
SCIP_EXPR_SUM |
summation sum_{i=1}^n op_i (n operands)
|
SCIP_EXPR_PRODUCT |
product prod_{i=1}^n op_i (n operands)
|
SCIP_EXPR_LINEAR |
linear term sum_{i=1}^n a_i op_i (n operands)
|
SCIP_EXPR_QUADRATIC |
quadratic term sum_{i,j=1}^n a_{i,j} op_i op_j (n operands)
|
SCIP_EXPR_POLYNOMIAL |
polynomial term sum_{I} a_{I}ops^I (I a multiindex, n operands)
|
SCIP_EXPR_LAST |
no expression, used for counting reasons
|
Definition at line 34 of file type_expr.h.
Curvature types
Enumerator |
---|
SCIP_EXPRCURV_UNKNOWN |
unknown curvature (or indefinite)
|
SCIP_EXPRCURV_CONVEX |
convex
|
SCIP_EXPRCURV_CONCAVE |
concave
|
SCIP_EXPRCURV_LINEAR |
linear = convex and concave
|
Definition at line 80 of file type_expr.h.
|