|
public methods for expressions, expression trees, expression graphs, and related stuff
- Author
- Stefan Vigerske
-
Thorsten Gellermann
Definition in file pub_expr.h.
#include "scip/def.h"
#include "scip/pub_message.h"
#include "scip/intervalarith.h"
#include "blockmemshell/memory.h"
#include "nlpi/type_expr.h"
#include "nlpi/type_exprinterpret.h"
Go to the source code of this file.
|
|
SCIP_EXPRCURV | SCIPexprcurvAdd (SCIP_EXPRCURV curv1, SCIP_EXPRCURV curv2) |
|
SCIP_EXPRCURV | SCIPexprcurvNegate (SCIP_EXPRCURV curvature) |
|
SCIP_EXPRCURV | SCIPexprcurvMultiply (SCIP_Real factor, SCIP_EXPRCURV curvature) |
|
SCIP_EXPRCURV | SCIPexprcurvPower (SCIP_INTERVAL basebounds, SCIP_EXPRCURV basecurv, SCIP_Real exponent) |
|
SCIP_EXPRCURV | SCIPexprcurvMonomial (int nfactors, SCIP_Real *exponents, int *factoridxs, SCIP_EXPRCURV *factorcurv, SCIP_INTERVAL *factorbounds) |
|
const char * | SCIPexprcurvGetName (SCIP_EXPRCURV curv) |
|
|
const char * | SCIPexpropGetName (SCIP_EXPROP op) |
|
int | SCIPexpropGetNChildren (SCIP_EXPROP op) |
|
|
SCIP_EXPROP | SCIPexprGetOperator (SCIP_EXPR *expr) |
|
int | SCIPexprGetNChildren (SCIP_EXPR *expr) |
|
SCIP_EXPR ** | SCIPexprGetChildren (SCIP_EXPR *expr) |
|
int | SCIPexprGetOpIndex (SCIP_EXPR *expr) |
|
SCIP_Real | SCIPexprGetOpReal (SCIP_EXPR *expr) |
|
void * | SCIPexprGetOpData (SCIP_EXPR *expr) |
|
SCIP_Real | SCIPexprGetRealPowerExponent (SCIP_EXPR *expr) |
|
int | SCIPexprGetIntPowerExponent (SCIP_EXPR *expr) |
|
SCIP_Real | SCIPexprGetSignPowerExponent (SCIP_EXPR *expr) |
|
SCIP_Real * | SCIPexprGetLinearCoefs (SCIP_EXPR *expr) |
|
SCIP_Real | SCIPexprGetLinearConstant (SCIP_EXPR *expr) |
|
SCIP_QUADELEM * | SCIPexprGetQuadElements (SCIP_EXPR *expr) |
|
SCIP_Real | SCIPexprGetQuadConstant (SCIP_EXPR *expr) |
|
SCIP_Real * | SCIPexprGetQuadLinearCoefs (SCIP_EXPR *expr) |
|
int | SCIPexprGetNQuadElements (SCIP_EXPR *expr) |
|
SCIP_EXPRDATA_MONOMIAL ** | SCIPexprGetMonomials (SCIP_EXPR *expr) |
|
int | SCIPexprGetNMonomials (SCIP_EXPR *expr) |
|
SCIP_Real | SCIPexprGetPolynomialConstant (SCIP_EXPR *expr) |
|
SCIP_Real | SCIPexprGetMonomialCoef (SCIP_EXPRDATA_MONOMIAL *monomial) |
|
int | SCIPexprGetMonomialNFactors (SCIP_EXPRDATA_MONOMIAL *monomial) |
|
int * | SCIPexprGetMonomialChildIndices (SCIP_EXPRDATA_MONOMIAL *monomial) |
|
SCIP_Real * | SCIPexprGetMonomialExponents (SCIP_EXPRDATA_MONOMIAL *monomial) |
|
SCIP_USEREXPRDATA * | SCIPexprGetUserData (SCIP_EXPR *expr) |
|
SCIP_Bool | SCIPexprHasUserEstimator (SCIP_EXPR *expr) |
|
SCIP_EXPRINTCAPABILITY | SCIPexprGetUserEvalCapability (SCIP_EXPR *expr) |
|
SCIP_RETCODE | SCIPexprCreate (BMS_BLKMEM *blkmem, SCIP_EXPR **expr, SCIP_EXPROP op,...) |
|
SCIP_RETCODE | SCIPexprCopyDeep (BMS_BLKMEM *blkmem, SCIP_EXPR **targetexpr, SCIP_EXPR *sourceexpr) |
|
void | SCIPexprFreeDeep (BMS_BLKMEM *blkmem, SCIP_EXPR **expr) |
|
void | SCIPexprFreeShallow (BMS_BLKMEM *blkmem, SCIP_EXPR **expr) |
|
SCIP_RETCODE | SCIPexprAdd (BMS_BLKMEM *blkmem, SCIP_EXPR **expr, SCIP_Real coef1, SCIP_EXPR *term1, SCIP_Real coef2, SCIP_EXPR *term2, SCIP_Real constant) |
|
SCIP_RETCODE | SCIPexprMulConstant (BMS_BLKMEM *blkmem, SCIP_EXPR **expr, SCIP_EXPR *term, SCIP_Real factor) |
|
SCIP_RETCODE | SCIPexprCreateLinear (BMS_BLKMEM *blkmem, SCIP_EXPR **expr, int nchildren, SCIP_EXPR **children, SCIP_Real *coefs, SCIP_Real constant) |
|
SCIP_RETCODE | SCIPexprAddToLinear (BMS_BLKMEM *blkmem, SCIP_EXPR *expr, int nchildren, SCIP_Real *coefs, SCIP_EXPR **children, SCIP_Real constant) |
|
SCIP_RETCODE | SCIPexprCreateQuadratic (BMS_BLKMEM *blkmem, SCIP_EXPR **expr, int nchildren, SCIP_EXPR **children, SCIP_Real constant, SCIP_Real *lincoefs, int nquadelems, SCIP_QUADELEM *quadelems) |
|
void | SCIPexprSortQuadElems (SCIP_EXPR *expr) |
|
SCIP_RETCODE | SCIPexprCreatePolynomial (BMS_BLKMEM *blkmem, SCIP_EXPR **expr, int nchildren, SCIP_EXPR **children, int nmonomials, SCIP_EXPRDATA_MONOMIAL **monomials, SCIP_Real constant, SCIP_Bool copymonomials) |
|
SCIP_RETCODE | SCIPexprAddMonomials (BMS_BLKMEM *blkmem, SCIP_EXPR *expr, int nmonomials, SCIP_EXPRDATA_MONOMIAL **monomials, SCIP_Bool copymonomials) |
|
void | SCIPexprChgPolynomialConstant (SCIP_EXPR *expr, SCIP_Real constant) |
|
void | SCIPexprMultiplyPolynomialByConstant (BMS_BLKMEM *blkmem, SCIP_EXPR *expr, SCIP_Real factor) |
|
SCIP_RETCODE | SCIPexprMultiplyPolynomialByMonomial (BMS_BLKMEM *blkmem, SCIP_EXPR *expr, SCIP_EXPRDATA_MONOMIAL *factor, int *childmap) |
|
SCIP_RETCODE | SCIPexprMultiplyPolynomialByPolynomial (BMS_BLKMEM *blkmem, SCIP_EXPR *expr, SCIP_EXPR *factor, int *childmap) |
|
SCIP_RETCODE | SCIPexprPolynomialPower (BMS_BLKMEM *blkmem, SCIP_EXPR *expr, int exponent) |
|
void | SCIPexprMergeMonomials (BMS_BLKMEM *blkmem, SCIP_EXPR *expr, SCIP_Real eps, SCIP_Bool mergefactors) |
|
SCIP_RETCODE | SCIPexprCreateMonomial (BMS_BLKMEM *blkmem, SCIP_EXPRDATA_MONOMIAL **monomial, SCIP_Real coef, int nfactors, int *childidxs, SCIP_Real *exponents) |
|
void | SCIPexprFreeMonomial (BMS_BLKMEM *blkmem, SCIP_EXPRDATA_MONOMIAL **monomial) |
|
void | SCIPexprSortMonomialFactors (SCIP_EXPRDATA_MONOMIAL *monomial) |
|
SCIP_Bool | SCIPexprFindMonomialFactor (SCIP_EXPRDATA_MONOMIAL *monomial, int childidx, int *pos) |
|
SCIP_Bool | SCIPexprAreMonomialsEqual (SCIP_EXPRDATA_MONOMIAL *monomial1, SCIP_EXPRDATA_MONOMIAL *monomial2, SCIP_Real eps) |
|
SCIP_RETCODE | SCIPexprAddMonomialFactors (BMS_BLKMEM *blkmem, SCIP_EXPRDATA_MONOMIAL *monomial, int nfactors, int *childidxs, SCIP_Real *exponents) |
|
void | SCIPexprChgMonomialCoef (SCIP_EXPRDATA_MONOMIAL *monomial, SCIP_Real newcoef) |
|
SCIP_RETCODE | SCIPexprMultiplyMonomialByMonomial (BMS_BLKMEM *blkmem, SCIP_EXPRDATA_MONOMIAL *monomial, SCIP_EXPRDATA_MONOMIAL *factor, int *childmap) |
|
void | SCIPexprMonomialPower (SCIP_EXPRDATA_MONOMIAL *monomial, int exponent) |
|
void | SCIPexprMergeMonomialFactors (SCIP_EXPRDATA_MONOMIAL *monomial, SCIP_Real eps) |
|
void | SCIPexprSortMonomials (SCIP_EXPR *expr) |
|
SCIP_RETCODE | SCIPexprCreateUser (BMS_BLKMEM *blkmem, SCIP_EXPR **expr, int nchildren, SCIP_EXPR **children, SCIP_USEREXPRDATA *data, SCIP_EXPRINTCAPABILITY evalcapability, SCIP_DECL_USEREXPREVAL((*eval)), SCIP_DECL_USEREXPRINTEVAL((*inteval)), SCIP_DECL_USEREXPRCURV((*curv)), SCIP_DECL_USEREXPRPROP((*prop)), SCIP_DECL_USEREXPRESTIMATE((*estimate)), SCIP_DECL_USEREXPRCOPYDATA((*copydata)), SCIP_DECL_USEREXPRFREEDATA((*freedata))) |
|
SCIP_Bool | SCIPexprHasParam (SCIP_EXPR *expr) |
|
SCIP_RETCODE | SCIPexprGetMaxDegree (SCIP_EXPR *expr, int *maxdegree) |
|
void | SCIPexprGetVarsUsage (SCIP_EXPR *expr, int *varsusage) |
|
SCIP_Bool | SCIPexprAreEqual (SCIP_EXPR *expr1, SCIP_EXPR *expr2, SCIP_Real eps) |
|
SCIP_RETCODE | SCIPexprSimplify (BMS_BLKMEM *blkmem, SCIP_MESSAGEHDLR *messagehdlr, SCIP_EXPR *expr, SCIP_Real eps, int maxexpansionexponent, int nvars, int *nlinvars, int *linidxs, SCIP_Real *lincoefs) |
|
SCIP_RETCODE | SCIPexprEvalShallow (SCIP_EXPR *expr, SCIP_Real *argvals, SCIP_Real *varvals, SCIP_Real *param, SCIP_Real *val) |
|
SCIP_RETCODE | SCIPexprEval (SCIP_EXPR *expr, SCIP_Real *varvals, SCIP_Real *param, SCIP_Real *val) |
|
SCIP_RETCODE | SCIPexprEvalIntShallow (SCIP_EXPR *expr, SCIP_Real infinity, SCIP_INTERVAL *argvals, SCIP_INTERVAL *varvals, SCIP_Real *param, SCIP_INTERVAL *val) |
|
SCIP_RETCODE | SCIPexprEvalInt (SCIP_EXPR *expr, SCIP_Real infinity, SCIP_INTERVAL *varvals, SCIP_Real *param, SCIP_INTERVAL *val) |
|
SCIP_RETCODE | SCIPexprEvalUser (SCIP_EXPR *expr, SCIP_Real *argvals, SCIP_Real *val, SCIP_Real *gradient, SCIP_Real *hessian) |
|
SCIP_RETCODE | SCIPexprEvalIntUser (SCIP_EXPR *expr, SCIP_Real infinity, SCIP_INTERVAL *argvals, SCIP_INTERVAL *val, SCIP_INTERVAL *gradient, SCIP_INTERVAL *hessian) |
|
SCIP_RETCODE | SCIPexprCheckCurvature (SCIP_EXPR *expr, SCIP_Real infinity, SCIP_INTERVAL *varbounds, SCIP_Real *param, SCIP_EXPRCURV *curv, SCIP_INTERVAL *bounds) |
|
SCIP_RETCODE | SCIPexprEstimateUser (SCIP_EXPR *expr, SCIP_Real infinity, SCIP_Real *argvals, SCIP_INTERVAL *argbounds, SCIP_Bool overestimate, SCIP_Real *coeffs, SCIP_Real *constant, SCIP_Bool *success) |
|
SCIP_RETCODE | SCIPexprSubstituteVars (BMS_BLKMEM *blkmem, SCIP_EXPR *expr, SCIP_EXPR **substexprs) |
|
void | SCIPexprReindexVars (SCIP_EXPR *expr, int *newindices) |
|
void | SCIPexprReindexParams (SCIP_EXPR *expr, int *newindices) |
|
void | SCIPexprPrint (SCIP_EXPR *expr, SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char **varnames, const char **paramnames, SCIP_Real *paramvals) |
|
SCIP_RETCODE | SCIPexprParse (BMS_BLKMEM *blkmem, SCIP_MESSAGEHDLR *messagehdlr, SCIP_EXPR **expr, const char *str, const char *lastchar, int *nvars, int *varnames) |
|
|
SCIP_EXPR * | SCIPexprtreeGetRoot (SCIP_EXPRTREE *tree) |
|
int | SCIPexprtreeGetNVars (SCIP_EXPRTREE *tree) |
|
int | SCIPexprtreeGetNParams (SCIP_EXPRTREE *tree) |
|
SCIP_Real * | SCIPexprtreeGetParamVals (SCIP_EXPRTREE *tree) |
|
void | SCIPexprtreeSetParamVal (SCIP_EXPRTREE *tree, int paramidx, SCIP_Real paramval) |
|
SCIP_EXPRINTDATA * | SCIPexprtreeGetInterpreterData (SCIP_EXPRTREE *tree) |
|
void | SCIPexprtreeSetInterpreterData (SCIP_EXPRTREE *tree, SCIP_EXPRINTDATA *interpreterdata) |
|
SCIP_RETCODE | SCIPexprtreeFreeInterpreterData (SCIP_EXPRTREE *tree) |
|
SCIP_Bool | SCIPexprtreeHasParam (SCIP_EXPRTREE *tree) |
|
SCIP_RETCODE | SCIPexprtreeGetMaxDegree (SCIP_EXPRTREE *tree, int *maxdegree) |
|
SCIP_RETCODE | SCIPexprtreeEval (SCIP_EXPRTREE *tree, SCIP_Real *varvals, SCIP_Real *val) |
|
SCIP_RETCODE | SCIPexprtreeEvalInt (SCIP_EXPRTREE *tree, SCIP_Real infinity, SCIP_INTERVAL *varvals, SCIP_INTERVAL *val) |
|
void | SCIPexprtreePrint (SCIP_EXPRTREE *tree, SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char **varnames, const char **paramnames) |
|
SCIP_RETCODE | SCIPexprtreeCreate (BMS_BLKMEM *blkmem, SCIP_EXPRTREE **tree, SCIP_EXPR *root, int nvars, int nparams, SCIP_Real *params) |
|
SCIP_RETCODE | SCIPexprtreeCopy (BMS_BLKMEM *blkmem, SCIP_EXPRTREE **targettree, SCIP_EXPRTREE *sourcetree) |
|
SCIP_RETCODE | SCIPexprtreeFree (SCIP_EXPRTREE **tree) |
|
SCIP_RETCODE | SCIPexprtreeSetParams (SCIP_EXPRTREE *tree, int nparams, SCIP_Real *paramvals) |
|
void | SCIPexprtreeGetVarsUsage (SCIP_EXPRTREE *tree, int *varsusage) |
|
SCIP_RETCODE | SCIPexprtreeSimplify (SCIP_EXPRTREE *tree, SCIP_MESSAGEHDLR *messagehdlr, SCIP_Real eps, int maxexpansionexponent, int *nlinvars, int *linidxs, SCIP_Real *lincoefs) |
|
SCIP_RETCODE | SCIPexprtreeAddExpr (SCIP_EXPRTREE *tree, SCIP_EXPR *expr, SCIP_Bool copyexpr) |
|
SCIP_RETCODE | SCIPexprtreeCheckCurvature (SCIP_EXPRTREE *tree, SCIP_Real infinity, SCIP_INTERVAL *varbounds, SCIP_EXPRCURV *curv, SCIP_INTERVAL *bounds) |
|
SCIP_RETCODE | SCIPexprtreeSubstituteVars (SCIP_EXPRTREE *tree, SCIP_EXPR **substexprs) |
|
|
void | SCIPquadelemSort (SCIP_QUADELEM *quadelems, int nquadelems) |
|
SCIP_Bool | SCIPquadelemSortedFind (SCIP_QUADELEM *quadelems, int idx1, int idx2, int nquadelems, int *pos) |
|
void | SCIPquadelemSqueeze (SCIP_QUADELEM *quadelems, int nquadelems, int *nquadelemsnew) |
|
|
void | SCIPexprgraphCaptureNode (SCIP_EXPRGRAPHNODE *node) |
|
SCIP_Bool | SCIPexprgraphIsNodeEnabled (SCIP_EXPRGRAPHNODE *node) |
|
int | SCIPexprgraphGetNodeNChildren (SCIP_EXPRGRAPHNODE *node) |
|
SCIP_EXPRGRAPHNODE ** | SCIPexprgraphGetNodeChildren (SCIP_EXPRGRAPHNODE *node) |
|
int | SCIPexprgraphGetNodeNParents (SCIP_EXPRGRAPHNODE *node) |
|
SCIP_EXPRGRAPHNODE ** | SCIPexprgraphGetNodeParents (SCIP_EXPRGRAPHNODE *node) |
|
int | SCIPexprgraphGetNodeDepth (SCIP_EXPRGRAPHNODE *node) |
|
int | SCIPexprgraphGetNodePosition (SCIP_EXPRGRAPHNODE *node) |
|
SCIP_EXPROP | SCIPexprgraphGetNodeOperator (SCIP_EXPRGRAPHNODE *node) |
|
int | SCIPexprgraphGetNodeOperatorIndex (SCIP_EXPRGRAPHNODE *node) |
|
SCIP_Real | SCIPexprgraphGetNodeOperatorReal (SCIP_EXPRGRAPHNODE *node) |
|
void * | SCIPexprgraphGetNodeVar (SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *node) |
|
SCIP_Real | SCIPexprgraphGetNodeRealPowerExponent (SCIP_EXPRGRAPHNODE *node) |
|
int | SCIPexprgraphGetNodeIntPowerExponent (SCIP_EXPRGRAPHNODE *node) |
|
SCIP_Real | SCIPexprgraphGetNodeSignPowerExponent (SCIP_EXPRGRAPHNODE *node) |
|
SCIP_Real * | SCIPexprgraphGetNodeLinearCoefs (SCIP_EXPRGRAPHNODE *node) |
|
SCIP_Real | SCIPexprgraphGetNodeLinearConstant (SCIP_EXPRGRAPHNODE *node) |
|
SCIP_Real | SCIPexprgraphGetNodeQuadraticConstant (SCIP_EXPRGRAPHNODE *node) |
|
SCIP_Real * | SCIPexprgraphGetNodeQuadraticLinearCoefs (SCIP_EXPRGRAPHNODE *node) |
|
SCIP_QUADELEM * | SCIPexprgraphGetNodeQuadraticQuadElements (SCIP_EXPRGRAPHNODE *node) |
|
int | SCIPexprgraphGetNodeQuadraticNQuadElements (SCIP_EXPRGRAPHNODE *node) |
|
SCIP_EXPRDATA_MONOMIAL ** | SCIPexprgraphGetNodePolynomialMonomials (SCIP_EXPRGRAPHNODE *node) |
|
int | SCIPexprgraphGetNodePolynomialNMonomials (SCIP_EXPRGRAPHNODE *node) |
|
SCIP_Real | SCIPexprgraphGetNodePolynomialConstant (SCIP_EXPRGRAPHNODE *node) |
|
SCIP_RETCODE | SCIPexprgraphGetNodePolynomialMonomialCurvature (SCIP_EXPRGRAPHNODE *node, int monomialidx, SCIP_Real infinity, SCIP_EXPRCURV *curv) |
|
SCIP_USEREXPRDATA * | SCIPexprgraphGetNodeUserData (SCIP_EXPRGRAPHNODE *node) |
|
SCIP_Bool | SCIPexprgraphHasNodeUserEstimator (SCIP_EXPRGRAPHNODE *node) |
|
SCIP_INTERVAL | SCIPexprgraphGetNodeBounds (SCIP_EXPRGRAPHNODE *node) |
|
SCIP_Real | SCIPexprgraphGetNodeVal (SCIP_EXPRGRAPHNODE *node) |
|
SCIP_EXPRCURV | SCIPexprgraphGetNodeCurvature (SCIP_EXPRGRAPHNODE *node) |
|
SCIP_RETCODE | SCIPexprgraphCreateNode (BMS_BLKMEM *blkmem, SCIP_EXPRGRAPHNODE **node, SCIP_EXPROP op,...) |
|
SCIP_RETCODE | SCIPexprgraphCreateNodeLinear (BMS_BLKMEM *blkmem, SCIP_EXPRGRAPHNODE **node, int ncoefs, SCIP_Real *coefs, SCIP_Real constant) |
|
SCIP_RETCODE | SCIPexprgraphCreateNodeQuadratic (BMS_BLKMEM *blkmem, SCIP_EXPRGRAPHNODE **node, int nchildren, SCIP_Real *lincoefs, int nquadelems, SCIP_QUADELEM *quadelems, SCIP_Real constant) |
|
SCIP_RETCODE | SCIPexprgraphCreateNodePolynomial (BMS_BLKMEM *blkmem, SCIP_EXPRGRAPHNODE **node, int nmonomials, SCIP_EXPRDATA_MONOMIAL **monomials, SCIP_Real constant, SCIP_Bool copymonomials) |
|
SCIP_RETCODE | SCIPexprgraphNodePolynomialAddMonomials (BMS_BLKMEM *blkmem, SCIP_EXPRGRAPHNODE *node, int nmonomials, SCIP_EXPRDATA_MONOMIAL **monomials, SCIP_Bool copymonomials) |
|
SCIP_RETCODE | SCIPexprgraphCreateNodeUser (BMS_BLKMEM *blkmem, SCIP_EXPRGRAPHNODE **node, SCIP_USEREXPRDATA *data, SCIP_EXPRINTCAPABILITY evalcapability, SCIP_DECL_USEREXPREVAL((*eval)), SCIP_DECL_USEREXPRINTEVAL((*inteval)), SCIP_DECL_USEREXPRCURV((*curv)), SCIP_DECL_USEREXPRPROP((*prop)), SCIP_DECL_USEREXPRESTIMATE((*estimate)), SCIP_DECL_USEREXPRCOPYDATA((*copydata)), SCIP_DECL_USEREXPRFREEDATA((*freedata))) |
|
SCIP_RETCODE | SCIPexprgraphNodeSplitOffLinear (SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE **node, int linvarssize, int *nlinvars, void **linvars, SCIP_Real *lincoefs, SCIP_Real *constant) |
|
SCIP_RETCODE | SCIPexprgraphMoveNodeParents (SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE **srcnode, SCIP_EXPRGRAPHNODE *targetnode) |
|
SCIP_RETCODE | SCIPexprgraphReleaseNode (SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE **node) |
|
void | SCIPexprgraphFreeNode (BMS_BLKMEM *blkmem, SCIP_EXPRGRAPHNODE **node) |
|
void | SCIPexprgraphEnableNode (SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *node) |
|
void | SCIPexprgraphDisableNode (SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *node) |
|
SCIP_Bool | SCIPexprgraphHasNodeSibling (SCIP_EXPRGRAPHNODE *node) |
|
SCIP_Bool | SCIPexprgraphAreAllNodeChildrenVars (SCIP_EXPRGRAPHNODE *node) |
|
SCIP_Bool | SCIPexprgraphHasNodeNonlinearAncestor (SCIP_EXPRGRAPHNODE *node) |
|
void | SCIPexprgraphPrintNode (SCIP_EXPRGRAPHNODE *node, SCIP_MESSAGEHDLR *messagehdlr, FILE *file) |
|
void | SCIPexprgraphTightenNodeBounds (SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *node, SCIP_INTERVAL nodebounds, SCIP_Real minstrength, SCIP_Real infinity, SCIP_Bool *cutoff) |
|
SCIP_RETCODE | SCIPexprgraphUpdateNodeBoundsCurvature (SCIP_EXPRGRAPHNODE *node, SCIP_Real infinity, SCIP_Real minstrength, SCIP_Bool clearreverseprop) |
|
|
int | SCIPexprgraphGetDepth (SCIP_EXPRGRAPH *exprgraph) |
|
int * | SCIPexprgraphGetNNodes (SCIP_EXPRGRAPH *exprgraph) |
|
SCIP_EXPRGRAPHNODE *** | SCIPexprgraphGetNodes (SCIP_EXPRGRAPH *exprgraph) |
|
int | SCIPexprgraphGetNVars (SCIP_EXPRGRAPH *exprgraph) |
|
void ** | SCIPexprgraphGetVars (SCIP_EXPRGRAPH *exprgraph) |
|
SCIP_EXPRGRAPHNODE ** | SCIPexprgraphGetVarNodes (SCIP_EXPRGRAPH *exprgraph) |
|
void | SCIPexprgraphSetVarNodeValue (SCIP_EXPRGRAPHNODE *varnode, SCIP_Real value) |
|
void | SCIPexprgraphSetVarsBounds (SCIP_EXPRGRAPH *exprgraph, SCIP_INTERVAL *varbounds) |
|
void | SCIPexprgraphSetVarBounds (SCIP_EXPRGRAPH *exprgraph, void *var, SCIP_INTERVAL varbounds) |
|
void | SCIPexprgraphSetVarNodeBounds (SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *varnode, SCIP_INTERVAL varbounds) |
|
void | SCIPexprgraphSetVarNodeLb (SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *varnode, SCIP_Real lb) |
|
void | SCIPexprgraphSetVarNodeUb (SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *varnode, SCIP_Real ub) |
|
SCIP_INTERVAL * | SCIPexprgraphGetVarsBounds (SCIP_EXPRGRAPH *exprgraph) |
|
SCIP_RETCODE | SCIPexprgraphCreate (BMS_BLKMEM *blkmem, SCIP_EXPRGRAPH **exprgraph, int varssizeinit, int depthinit, SCIP_DECL_EXPRGRAPHVARADDED((*exprgraphvaradded)), SCIP_DECL_EXPRGRAPHVARREMOVE((*exprgraphvarremove)), SCIP_DECL_EXPRGRAPHVARCHGIDX((*exprgraphvarchgidx)), void *userdata) |
|
SCIP_RETCODE | SCIPexprgraphFree (SCIP_EXPRGRAPH **exprgraph) |
|
SCIP_RETCODE | SCIPexprgraphAddNode (SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *node, int mindepth, int nchildren, SCIP_EXPRGRAPHNODE **children) |
|
SCIP_RETCODE | SCIPexprgraphAddVars (SCIP_EXPRGRAPH *exprgraph, int nvars, void **vars, SCIP_EXPRGRAPHNODE **varnodes) |
|
SCIP_RETCODE | SCIPexprgraphAddConst (SCIP_EXPRGRAPH *exprgraph, SCIP_Real constant, SCIP_EXPRGRAPHNODE **constnode) |
|
SCIP_RETCODE | SCIPexprgraphAddExprtreeSum (SCIP_EXPRGRAPH *exprgraph, int nexprtrees, SCIP_EXPRTREE **exprtrees, SCIP_Real *coefs, SCIP_EXPRGRAPHNODE **rootnode, SCIP_Bool *rootnodeisnew) |
|
SCIP_RETCODE | SCIPexprgraphReplaceVarByLinearSum (SCIP_EXPRGRAPH *exprgraph, void *var, int ncoefs, SCIP_Real *coefs, void **vars, SCIP_Real constant) |
|
SCIP_Bool | SCIPexprgraphFindVarNode (SCIP_EXPRGRAPH *exprgraph, void *var, SCIP_EXPRGRAPHNODE **varnode) |
|
SCIP_Bool | SCIPexprgraphFindConstNode (SCIP_EXPRGRAPH *exprgraph, SCIP_Real constant, SCIP_EXPRGRAPHNODE **constnode) |
|
SCIP_RETCODE | SCIPexprgraphPrintDot (SCIP_EXPRGRAPH *exprgraph, SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char **varnames) |
|
SCIP_RETCODE | SCIPexprgraphEval (SCIP_EXPRGRAPH *exprgraph, SCIP_Real *varvals) |
|
SCIP_RETCODE | SCIPexprgraphPropagateVarBounds (SCIP_EXPRGRAPH *exprgraph, SCIP_Real infinity, SCIP_Bool clearreverseprop, SCIP_Bool *domainerror) |
|
void | SCIPexprgraphPropagateNodeBounds (SCIP_EXPRGRAPH *exprgraph, SCIP_Real infinity, SCIP_Real minstrength, SCIP_Bool *cutoff) |
|
SCIP_RETCODE | SCIPexprgraphCheckCurvature (SCIP_EXPRGRAPH *exprgraph, SCIP_Real infinity, SCIP_Bool clearreverseprop) |
|
SCIP_RETCODE | SCIPexprgraphSimplify (SCIP_EXPRGRAPH *exprgraph, SCIP_MESSAGEHDLR *messagehdlr, SCIP_Real eps, int maxexpansionexponent, SCIP_Bool *havechange, SCIP_Bool *domainerror) |
|
SCIP_RETCODE | SCIPexprgraphGetTree (SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *rootnode, SCIP_EXPRTREE **exprtree) |
|
SCIP_RETCODE | SCIPexprgraphGetSeparableTrees (SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *node, int exprtreessize, int *nexprtrees, SCIP_EXPRTREE **exprtrees, SCIP_Real *exprtreecoefs) |
|
void | SCIPexprgraphGetSubtreeVarsUsage (SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *node, int *varsusage) |
|
int | SCIPexprgraphGetSumTreesNSummands (SCIP_EXPRGRAPHNODE *node) |
|
SCIP_RETCODE | SCIPexprgraphGetSumTrees (SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *node, int exprtreessize, int *nexprtrees, SCIP_EXPRTREE **exprtrees, SCIP_Real *exprtreecoefs) |
|
gives curvature for a sum of two functions with given curvature
- Parameters
-
curv1 | curvature of first summand |
curv2 | curvature of second summand |
gives the curvature for the negation of a function with given curvature
- Parameters
-
curvature | curvature of function |
gives curvature for a functions with given curvature multiplied by a constant factor
- Parameters
-
factor | constant factor |
curvature | curvature of other factor |
gives curvature for base^exponent for given bounds and curvature of base-function and constant exponent
- Parameters
-
basebounds | bounds on base function |
basecurv | curvature of base function |
exponent | exponent |
gives curvature for a monomial with given curvatures and bounds for each factor
- Parameters
-
nfactors | number of factors in monomial |
exponents | exponents in monomial, or NULL if all 1.0 |
factoridxs | indices of factors, or NULL if identity mapping |
factorcurv | curvature of each factor |
factorbounds | bounds of each factor |
gives name as string for a curvature
- Parameters
-
gives the name of an operand
- Parameters
-
gives the number of children of a simple operand
- Returns
- -1 for invalid operands and -2 for complex operands (those where the number of children depends on the expression)
- Parameters
-
gives operator of expression
- Parameters
-
gives number of children of an expression
- Parameters
-
gives pointer to array with children of an expression
- Parameters
-
gives index belonging to a SCIP_EXPR_VARIDX or SCIP_EXPR_PARAM operand
- Parameters
-
gives real belonging to a SCIP_EXPR_CONST operand
- Parameters
-
gives void* belonging to a complex operand
- Parameters
-
gives exponent belonging to a SCIP_EXPR_REALPOWER expression
- Parameters
-
int SCIPexprGetIntPowerExponent |
( |
SCIP_EXPR * |
expr | ) |
|
gives exponent belonging to a SCIP_EXPR_INTPOWER expression
- Parameters
-
gives exponent belonging to a SCIP_EXPR_SIGNPOWER expression
- Parameters
-
gives linear coefficients belonging to a SCIP_EXPR_LINEAR expression
- Parameters
-
gives constant belonging to a SCIP_EXPR_LINEAR expression
- Parameters
-
gives quadratic elements belonging to a SCIP_EXPR_QUADRATIC expression
- Parameters
-
gives constant belonging to a SCIP_EXPR_QUADRATIC expression
- Parameters
-
gives linear coefficients belonging to a SCIP_EXPR_QUADRATIC expression can be NULL if all coefficients are 0.0
- Parameters
-
int SCIPexprGetNQuadElements |
( |
SCIP_EXPR * |
expr | ) |
|
gives number of quadratic elements belonging to a SCIP_EXPR_QUADRATIC expression
- Parameters
-
gives the monomials belonging to a SCIP_EXPR_POLYNOMIAL expression
- Parameters
-
int SCIPexprGetNMonomials |
( |
SCIP_EXPR * |
expr | ) |
|
gives the number of monomials belonging to a SCIP_EXPR_POLYNOMIAL expression
- Parameters
-
gives the constant belonging to a SCIP_EXPR_POLYNOMIAL expression
- Parameters
-
gets coefficient of a monomial
- Parameters
-
gets number of factors of a monomial
- Parameters
-
gets indices of children corresponding to factors of a monomial
- Parameters
-
gets exponents in factors of a monomial
- Parameters
-
gets user data of a user expression
indicates whether a user expression has the estimator callback defined
gives the evaluation capability of a user expression
creates a simple expression
- Parameters
-
blkmem | block memory data structure |
expr | pointer to buffer for expression address |
op | operand of expression |
copies an expression including its children
- Parameters
-
blkmem | block memory data structure |
targetexpr | buffer to store pointer to copied expression |
sourceexpr | expression to copy |
Referenced by SCIPexprintCompile().
void SCIPexprFreeDeep |
( |
BMS_BLKMEM * |
blkmem, |
|
|
SCIP_EXPR ** |
expr |
|
) |
| |
void SCIPexprFreeShallow |
( |
BMS_BLKMEM * |
blkmem, |
|
|
SCIP_EXPR ** |
expr |
|
) |
| |
frees an expression but not its children
- Parameters
-
blkmem | block memory data structure |
expr | pointer to expression to free |
creates an expression from the addition of two given expression, with coefficients, and a constant
the given expressions may be modified or freed, otherwise it will be used a child expression favors creation and maintaining of SCIP_EXPR_LINEAR over SCIP_EXPR_PLUS or SCIP_EXPR_SUM
- Parameters
-
blkmem | block memory data structure |
expr | pointer to store pointer to created expression |
coef1 | coefficient of first term |
term1 | expression of first term, or NULL |
coef2 | coefficient of second term |
term2 | expression of second term, or NULL |
constant | constant term to add |
creates an expression from the multiplication of an expression with a constant
the given expressions may be modified or freed, otherwise it will be used a child expression favors creation of SCIP_EXPR_LINEAR over SCIP_EXPR_MUP or SCIP_EXPR_PROD
- Parameters
-
blkmem | block memory data structure |
expr | buffer to store pointer to created expression |
term | term to multiply by factor |
factor | factor |
creates a SCIP_EXPR_LINEAR expression that is (affine) linear in its children: constant + sum_i coef_i child_i
- Parameters
-
blkmem | block memory data structure |
expr | pointer to buffer for expression address |
nchildren | number of children |
children | children of expression |
coefs | coefficients of children |
constant | constant part |
adds new terms to a linear expression
- Parameters
-
blkmem | block memory |
expr | linear expression |
nchildren | number of children to add |
coefs | coefficients of additional children |
children | additional children expressions |
constant | constant to add |
creates a SCIP_EXPR_QUADRATIC expression: constant + sum_i coef_i child_i + sum_i coef_i child1_i child2_i
- Parameters
-
blkmem | block memory data structure |
expr | pointer to buffer for expression address |
nchildren | number of children |
children | children of expression |
constant | constant |
lincoefs | linear coefficients of children, or NULL if all 0.0 |
nquadelems | number of quadratic elements |
quadelems | quadratic elements specifying coefficients and child indices |
void SCIPexprSortQuadElems |
( |
SCIP_EXPR * |
expr | ) |
|
ensures that quadratic elements of a quadratic expression are sorted
- Parameters
-
creates a SCIP_EXPR_POLYNOMIAL expression from an array of monomials: constant + sum_i monomial_i
- Parameters
-
blkmem | block memory data structure |
expr | pointer to buffer for expression address |
nchildren | number of children |
children | children of expression |
nmonomials | number of monomials |
monomials | monomials |
constant | constant part |
copymonomials | should monomials by copied or ownership be assumed? |
adds an array of monomials to a SCIP_EXPR_POLYNOMIAL expression
- Parameters
-
blkmem | block memory of expression |
expr | expression |
nmonomials | number of monomials to add |
monomials | the monomials to add |
copymonomials | should monomials by copied or ownership be assumed? |
changes the constant in a SCIP_EXPR_POLYNOMIAL expression
- Parameters
-
expr | expression |
constant | new value for constant |
void SCIPexprMultiplyPolynomialByConstant |
( |
BMS_BLKMEM * |
blkmem, |
|
|
SCIP_EXPR * |
expr, |
|
|
SCIP_Real |
factor |
|
) |
| |
multiplies each summand of a polynomial by a given constant
- Parameters
-
blkmem | block memory |
expr | polynomial expression |
factor | constant factor |
multiplies each summand of a polynomial by a given monomial
- Parameters
-
blkmem | block memory |
expr | polynomial expression |
factor | monomial factor |
childmap | map children in factor to children in expr, or NULL for 1:1 |
multiplies this polynomial by a polynomial factor needs to be different from expr
- Parameters
-
blkmem | block memory |
expr | polynomial expression |
factor | polynomial factor |
childmap | map children in factor to children in expr, or NULL for 1:1 |
takes a power of the polynomial exponent need to be an integer polynomial need to be a monomial, if exponent is negative
- Parameters
-
blkmem | block memory |
expr | polynomial expression |
exponent | exponent of power operation |
merges monomials in a polynomial expression that differ only in coefficient into a single monomial eliminates monomials with coefficient between -eps and eps
- Parameters
-
blkmem | block memory |
expr | polynomial expression |
eps | threshold under which numbers are treat as zero |
mergefactors | whether to merge factors in monomials too |
creates a monomial
- Parameters
-
blkmem | block memory |
monomial | buffer where to store pointer to new monomial |
coef | coefficient of monomial |
nfactors | number of factors in monomial |
childidxs | indices of children corresponding to factors, or NULL if identity |
exponents | exponent in each factor, or NULL if all 1.0 |
frees a monomial
- Parameters
-
blkmem | block memory |
monomial | pointer to monomial that should be freed |
ensures that factors in a monomial are sorted
- Parameters
-
finds a factor corresponding to a given child index in a monomial note that if the factors have not been merged, the position of some factor corresponding to a given child is given returns TRUE if a factor is found, FALSE if not
- Parameters
-
monomial | monomial |
childidx | index of the child which factor to search for |
pos | buffer to store position of factor |
checks if two monomials are equal
- Parameters
-
monomial1 | first monomial |
monomial2 | second monomial |
eps | threshold under which numbers are treated as 0.0 |
adds factors to a monomial
- Parameters
-
blkmem | block memory |
monomial | monomial |
nfactors | number of factors to add |
childidxs | indices of children corresponding to factors |
exponents | exponent in each factor |
changes coefficient of monomial
- Parameters
-
monomial | monomial |
newcoef | new coefficient |
multiplies a monomial with a monomial
- Parameters
-
blkmem | block memory |
monomial | monomial |
factor | factor monomial |
childmap | map to apply to children in factor, or NULL for 1:1 |
replaces the monomial by a power of the monomial allows only integers as exponent
- Parameters
-
monomial | monomial |
exponent | integer exponent of power operation |
merges factors that correspond to the same child by adding exponents eliminates factors with exponent between -eps and eps
- Parameters
-
monomial | monomial |
eps | threshold under which numbers are treated as 0.0 |
void SCIPexprSortMonomials |
( |
SCIP_EXPR * |
expr | ) |
|
ensures that monomials of a polynomial are sorted
- Parameters
-
expr | polynomial expression |
SCIP_RETCODE SCIPexprCreateUser |
( |
BMS_BLKMEM * |
blkmem, |
|
|
SCIP_EXPR ** |
expr, |
|
|
int |
nchildren, |
|
|
SCIP_EXPR ** |
children, |
|
|
SCIP_USEREXPRDATA * |
data, |
|
|
SCIP_EXPRINTCAPABILITY |
evalcapability, |
|
|
SCIP_DECL_USEREXPREVAL((*eval)) |
, |
|
|
SCIP_DECL_USEREXPRINTEVAL((*inteval)) |
, |
|
|
SCIP_DECL_USEREXPRCURV((*curv)) |
, |
|
|
SCIP_DECL_USEREXPRPROP((*prop)) |
, |
|
|
SCIP_DECL_USEREXPRESTIMATE((*estimate)) |
, |
|
|
SCIP_DECL_USEREXPRCOPYDATA((*copydata)) |
, |
|
|
SCIP_DECL_USEREXPRFREEDATA((*freedata)) |
|
|
) |
| |
creates a user expression
- Parameters
-
blkmem | block memory data structure |
expr | pointer to buffer for expression address |
nchildren | number of children |
children | children of expression |
data | user data for expression, expression assumes ownership |
evalcapability | capability of evaluation functions (partially redundant, currently) |
indicates whether the expression contains a SCIP_EXPR_PARAM
- Parameters
-
gets maximal degree of expression, or SCIP_EXPR_DEGREEINFINITY if not a polynomial
- Parameters
-
expr | expression |
maxdegree | buffer to store maximal degree |
void SCIPexprGetVarsUsage |
( |
SCIP_EXPR * |
expr, |
|
|
int * |
varsusage |
|
) |
| |
counts usage of variables in expression
- Parameters
-
expr | expression to update |
varsusage | array with counters of variable usage |
compares whether two expressions are the same inconclusive, i.e., may give FALSE even if expressions are equivalent (x*y != y*x)
- Parameters
-
expr1 | first expression |
expr2 | second expression |
eps | threshold under which numbers are assumed to be zero |
aims at simplifying an expression and splitting of a linear expression if linear variables are split off, expression interpreter data, if stored in the tree, is freed
- Parameters
-
blkmem | block memory data structure |
messagehdlr | message handler |
expr | expression |
eps | threshold, under which positive values are treat as 0 |
maxexpansionexponent | maximal exponent for which we still expand non-monomial polynomials |
nvars | number of variables in expression |
nlinvars | buffer to store number of linear variables in linear part, or NULL if linear part should not be separated |
linidxs | array to store indices of variables in expression tree which belong to linear part, or NULL |
lincoefs | array to store coefficients of linear part, or NULL |
evaluates an expression w.r.t. given values for children expressions
- Parameters
-
expr | expression |
argvals | values for children, can be NULL if the expression has no children |
varvals | values for variables, can be NULL if the expression operand is not a variable |
param | values for parameters, can be NULL if the expression operand is not a parameter |
val | buffer to store value |
evaluates an expression w.r.t. a point
- Parameters
-
expr | expression |
varvals | values for variables, can be NULL if the expression is constant |
param | values for parameters, can be NULL if the expression is not parameterized |
val | buffer to store value |
evaluates an expression w.r.t. given interval values for children expressions
- Parameters
-
expr | expression |
infinity | value to use for infinity |
argvals | interval values for children, can be NULL if the expression has no children |
varvals | interval values for variables, can be NULL if the expression is constant |
param | values for parameters, can be NULL if the expression is not parameterized |
val | buffer to store value |
evaluates an expression w.r.t. an interval
- Parameters
-
expr | expression |
infinity | value to use for infinity |
varvals | interval values for variables, can be NULL if the expression is constant |
param | values for parameters, can be NULL if the expression is not parameterized |
val | buffer to store value |
evaluates a user expression w.r.t. given values for children expressions
- Parameters
-
expr | expression |
argvals | values for children |
val | buffer to store function value |
gradient | buffer to store gradient values, or NULL if not requested |
hessian | buffer to store values of full Hessian, or NULL if not requested |
Referenced by exprEvalUser().
SCIP_RETCODE SCIPexprEvalIntUser |
( |
SCIP_EXPR * |
expr, |
|
|
SCIP_Real |
infinity, |
|
|
SCIP_INTERVAL * |
argvals, |
|
|
SCIP_INTERVAL * |
val, |
|
|
SCIP_INTERVAL * |
gradient, |
|
|
SCIP_INTERVAL * |
hessian |
|
) |
| |
evaluates a user expression w.r.t. an interval
- Parameters
-
expr | expression |
infinity | value to use for infinity |
argvals | values for children |
val | buffer to store value |
gradient | buffer to store gradient values, or NULL if not requested |
hessian | buffer to store values of full Hessian, or NULL if not requested |
Referenced by exprEvalUser().
tries to determine the curvature type of an expression w.r.t. given variable domains
- Parameters
-
expr | expression to check |
infinity | value to use for infinity |
varbounds | domains of variables |
param | values for parameters, can be NULL if the expression is not parameterized |
curv | buffer to store curvature of expression |
bounds | buffer to store bounds on expression |
under-/overestimates a user expression w.r.t. to given values and bounds for children expressions
- Parameters
-
expr | expression |
infinity | value to use for infinity |
argvals | values for children |
argbounds | bounds for children |
overestimate | whether to overestimate the expression |
coeffs | buffer to store the linear coefficients for each child expression that gives a valid under-/overestimator |
constant | buffer to store the constant value of the linear under-/overestimator |
success | buffer to store whether an estimator was successfully computed |
substitutes variables (SCIP_EXPR_VARIDX) by expressions Note that only the children of the given expr are checked! A variable with index i is replaced by a copy of substexprs[i], if that latter is not NULL if substexprs[i] == NULL, then the variable expression i is not touched
- Parameters
-
blkmem | block memory data structure |
expr | expression, which of the children may be replaced |
substexprs | array of substitute expressions; single entries can be NULL |
void SCIPexprReindexVars |
( |
SCIP_EXPR * |
expr, |
|
|
int * |
newindices |
|
) |
| |
updates variable indices in expression tree
- Parameters
-
expr | expression to update |
newindices | new indices of variables |
void SCIPexprReindexParams |
( |
SCIP_EXPR * |
expr, |
|
|
int * |
newindices |
|
) |
| |
updates parameter indices in expression tree
- Parameters
-
expr | expression to update |
newindices | new indices of variables |
prints an expression
- Parameters
-
expr | expression |
messagehdlr | message handler |
file | file for printing, or NULL for stdout |
varnames | names of variables, or NULL for default names |
paramnames | names of parameters, or NULL for default names |
paramvals | values of parameters, or NULL for not printing |
parses an expression from a string
- Parameters
-
blkmem | block memory data structure |
messagehdlr | message handler |
expr | buffer to store pointer to created expression |
str | pointer to the string to be parsed |
lastchar | pointer to the last char of str that should be parsed |
nvars | buffer to store number of variables |
varnames | buffer to store variable names, prefixed by index (as int) |
returns number of parameters in expression tree
- Parameters
-
sets value of a single parameter in expression tree
- Parameters
-
tree | expression tree |
paramidx | index of parameter |
paramval | new value of parameter |
sets data of expression tree interpreter
- Parameters
-
tree | expression tree |
interpreterdata | expression interpreter data |
Referenced by SCIPexprintCompile().
frees data of expression tree interpreter, if any
- Parameters
-
indicates whether there are parameterized constants (SCIP_EXPR_PARAM) in expression tree
- Parameters
-
Gives maximal degree of expression in expression tree. If constant expression, gives 0, if linear expression, gives 1, if polynomial expression, gives its maximal degree, otherwise (nonpolynomial nonconstant expressions) gives at least SCIP_EXPR_DEGREEINFINITY.
- Parameters
-
tree | expression tree |
maxdegree | buffer to store maximal degree |
evaluates an expression tree w.r.t. a point
- Parameters
-
tree | expression tree |
varvals | values for variables |
val | buffer to store expression tree value |
Referenced by SCIPexprintEval().
evaluates an expression tree w.r.t. an interval
- Parameters
-
tree | expression tree |
infinity | value for infinity |
varvals | intervals for variables |
val | buffer to store expression tree value |
Referenced by SCIPexprintEvalInt().
prints an expression tree
- Parameters
-
tree | expression tree |
messagehdlr | message handler |
file | file for printing, or NULL for stdout |
varnames | names of variables, or NULL for default names |
paramnames | names of parameters, or NULL for default names |
creates an expression tree
- Parameters
-
blkmem | block memory data structure |
tree | buffer to store address of created expression tree |
root | pointer to root expression, not copied deep !, can be NULL |
nvars | number of variables in variable mapping |
nparams | number of parameters in expression |
params | values for parameters, or NULL (if NULL but nparams > 0, then params is initialized with zeros) |
copies an expression tree
- Parameters
-
blkmem | block memory that should be used in new expression tree |
targettree | buffer to store address of copied expression tree |
sourcetree | expression tree to copy |
frees an expression tree
- Parameters
-
tree | pointer to expression tree that is freed |
sets number and values of all parameters in expression tree
- Parameters
-
tree | expression tree |
nparams | number of parameters |
paramvals | values of parameters, can be NULL if nparams == 0 |
void SCIPexprtreeGetVarsUsage |
( |
SCIP_EXPRTREE * |
tree, |
|
|
int * |
varsusage |
|
) |
| |
gives the number of usages for each variable in the expression tree
- Parameters
-
tree | expression tree |
varsusage | array where to store for each variable how often it is used in the tree |
aims at simplifying an expression and splitting of a linear expression if linear variables are split off, expression interpreter data, if stored in the tree, is freed
- Parameters
-
tree | expression tree |
messagehdlr | message handler |
eps | threshold, under which positive values are treat as 0 |
maxexpansionexponent | maximal exponent for which we still expand non-monomial polynomials |
nlinvars | buffer to store number of linear variables in linear part, or NULL if linear part should not be separated |
linidxs | array to store indices of variables in expression tree which belong to linear part, or NULL |
lincoefs | array to store coefficients of linear part, or NULL |
adds an expression to the root expression of the tree the root is replaced with an SCIP_EXPR_PLUS expression which has the previous root and the given expression as children
- Parameters
-
tree | expression tree |
expr | expression to add to tree |
copyexpr | whether expression should be copied |
tries to determine the curvature type of an expression tree w.r.t. given variable domains
- Parameters
-
tree | expression tree |
infinity | value for infinity |
varbounds | domains of variables |
curv | buffer to store curvature of expression |
bounds | buffer to store bounds on expression, or NULL if not needed |
substitutes variables (SCIP_EXPR_VARIDX) in an expression tree by expressions A variable with index i is replaced by a copy of substexprs[i], if that latter is not NULL if substexprs[i] == NULL, then the variable expression i is not touched
- Parameters
-
tree | expression tree |
substexprs | array of substitute expressions; single entries can be NULL |
void SCIPquadelemSort |
( |
SCIP_QUADELEM * |
quadelems, |
|
|
int |
nquadelems |
|
) |
| |
sorts an array of quadratic elements The elements are sorted such that the first index is increasing and such that among elements with the same first index, the second index is increasing. For elements with same first and second index, the order is not defined.
- Parameters
-
quadelems | array of quadratic elements |
nquadelems | number of quadratic elements |
Finds an index pair in a sorted array of quadratic elements. If (idx1,idx2) is found in quadelems, then returns TRUE and stores position of quadratic element in *pos. If (idx1,idx2) is not found in quadelems, then returns FALSE and stores position where a quadratic element with these indices would be inserted in *pos. Assumes that idx1 <= idx2.
- Parameters
-
quadelems | array of quadratic elements |
idx1 | index of first variable in element to search for |
idx2 | index of second variable in element to search for |
nquadelems | number of quadratic elements in array |
pos | buffer to store position of found quadratic element, or position where it would be inserted |
void SCIPquadelemSqueeze |
( |
SCIP_QUADELEM * |
quadelems, |
|
|
int |
nquadelems, |
|
|
int * |
nquadelemsnew |
|
) |
| |
Adds quadratic elements with same index and removes elements with coefficient 0.0. Assumes that elements have been sorted before.
- Parameters
-
quadelems | array of quadratic elements |
nquadelems | number of quadratic elements |
nquadelemsnew | pointer to store new (reduced) number of quadratic elements |
captures node, i.e., increases number of uses
- Parameters
-
node | expression graph node to capture |
returns whether a node is currently enabled
- Parameters
-
node | expression graph node to enable |
gets number of children of a node in an expression graph
- Parameters
-
node | expression graph node |
gets children of a node in an expression graph
- Parameters
-
node | expression graph node |
gets number of parents of a node in an expression graph
- Parameters
-
node | expression graph node |
gets parents of a node in an expression graph
- Parameters
-
node | expression graph node |
gets depth of node in expression graph
- Parameters
-
node | expression graph node |
gets position of node in expression graph at its depth level
- Parameters
-
node | expression graph node |
gets operator of a node in an expression graph
- Parameters
-
node | expression graph node |
gives index belonging to a SCIP_EXPR_VARIDX or SCIP_EXPR_PARAM operand
- Parameters
-
node | expression graph node |
gives real belonging to a SCIP_EXPR_CONST operand
- Parameters
-
node | expression graph node |
gives variable belonging to a SCIP_EXPR_VARIDX expression
- Parameters
-
exprgraph | expression graph |
node | expression graph node |
gives exponent belonging to a SCIP_EXPR_REALPOWER expression
- Parameters
-
node | expression graph node |
gives exponent belonging to a SCIP_EXPR_INTPOWER expression
- Parameters
-
node | expression graph node |
gives exponent belonging to a SCIP_EXPR_SIGNPOWER expression
- Parameters
-
node | expression graph node |
gives linear coefficients belonging to a SCIP_EXPR_LINEAR expression
- Parameters
-
node | expression graph node |
gives constant belonging to a SCIP_EXPR_LINEAR expression
- Parameters
-
node | expression graph node |
gives constant belonging to a SCIP_EXPR_QUADRATIC expression
- Parameters
-
node | expression graph node |
gives linear coefficients belonging to a SCIP_EXPR_QUADRATIC expression, or NULL if all coefficients are 0.0
- Parameters
-
node | expression graph node |
gives quadratic elements belonging to a SCIP_EXPR_QUADRATIC expression
- Parameters
-
node | expression graph node |
gives number of quadratic elements belonging to a SCIP_EXPR_QUADRATIC expression
- Parameters
-
node | expression graph node |
gives the monomials belonging to a SCIP_EXPR_POLYNOMIAL expression
- Parameters
-
node | expression graph node |
gives the number of monomials belonging to a SCIP_EXPR_POLYNOMIAL expression
- Parameters
-
node | expression graph node |
gives the constant belonging to a SCIP_EXPR_POLYNOMIAL expression
- Parameters
-
node | expression graph node |
gives the curvature of a single monomial belonging to a SCIP_EXPR_POLYNOMIAL expression
- Parameters
-
node | expression graph node |
monomialidx | index of monomial |
infinity | value for infinity in interval arithmetics |
curv | buffer to store monomial curvature |
gives the user data belonging to a SCIP_EXPR_USER expression
indicates whether a user expression has the estimator callback defined
gets bounds of a node in an expression graph
- Parameters
-
node | expression graph node |
gets value of expression associated to node from last evaluation call
- Parameters
-
node | expression graph node |
gets curvature of expression associated to node from last curvature check call
- Parameters
-
node | expression graph node |
creates an expression graph node
- Parameters
-
blkmem | block memory |
node | buffer to store expression graph node |
op | operator type of expression |
creates an expression graph node for a linear expression
- Parameters
-
blkmem | block memory |
node | buffer to store expression graph node |
ncoefs | number of coefficients |
coefs | coefficients of linear expression |
constant | constant of linear expression |
creates an expression graph node for a quadratic expression
- Parameters
-
blkmem | block memory |
node | buffer to store expression graph node |
nchildren | number of children |
lincoefs | linear coefficients for children, or NULL |
nquadelems | number of quadratic elements |
quadelems | quadratic elements, or NULL if nquadelems == 0 |
constant | constant |
creates an expression graph node for a polynomial expression
- Parameters
-
blkmem | block memory |
node | buffer to store expression graph node |
nmonomials | number of monomials |
monomials | monomials |
constant | constant of polynomial |
copymonomials | whether to copy monomials or to assume ownership |
adds monomials to an expression graph node that is a polynomial expression
- Parameters
-
blkmem | block memory |
node | store expression graph node with polynomial operator |
nmonomials | number of monomials |
monomials | monomials |
copymonomials | whether to copy monomials or to assume ownership |
SCIP_RETCODE SCIPexprgraphCreateNodeUser |
( |
BMS_BLKMEM * |
blkmem, |
|
|
SCIP_EXPRGRAPHNODE ** |
node, |
|
|
SCIP_USEREXPRDATA * |
data, |
|
|
SCIP_EXPRINTCAPABILITY |
evalcapability, |
|
|
SCIP_DECL_USEREXPREVAL((*eval)) |
, |
|
|
SCIP_DECL_USEREXPRINTEVAL((*inteval)) |
, |
|
|
SCIP_DECL_USEREXPRCURV((*curv)) |
, |
|
|
SCIP_DECL_USEREXPRPROP((*prop)) |
, |
|
|
SCIP_DECL_USEREXPRESTIMATE((*estimate)) |
, |
|
|
SCIP_DECL_USEREXPRCOPYDATA((*copydata)) |
, |
|
|
SCIP_DECL_USEREXPRFREEDATA((*freedata)) |
|
|
) |
| |
creates an expression graph node for a user expression
- Parameters
-
blkmem | block memory |
node | buffer to store expression graph node |
data | user data for expression, node assumes ownership |
evalcapability | evaluation capability |
given a node of an expression graph, splitup a linear part which variables are not used somewhere else in the same expression E.g., if the expression is 1 + x + y + y^2, one gets 1 + x and the node remains at y + y^2. If the node is a linear expression, it may be freed. If it is not linear, the node may change, i.e., the remaining nonlinear part may be stored in a new node. It is assumed that the user had captured the node. It is assumed that the expression graph has been simplified before.
- Parameters
-
exprgraph | expression graph |
node | expression graph node where to splitup linear part |
linvarssize | length of linvars and lincoefs arrays |
nlinvars | buffer to store length of linear term that have been splitup |
linvars | buffer to store variables of linear part |
lincoefs | buffer to store coefficients of linear part |
constant | buffer to store constant part |
moves parents from a one node to another node in other words, replaces the child srcnode by targetnode in all parents of srcnode srcnode may be freed, if not captured it is assumes that targetnode represents the same expression as srcnode
- Parameters
-
exprgraph | expression graph |
srcnode | node which parents to move |
targetnode | node where to move parents to |
releases node, i.e., decreases number of uses node is freed if no parents and no other uses children are recursively released if they have no other parents nodes that are removed are also freed if node correspond to a variable, then the variable is removed from the expression graph similar for constants
- Parameters
-
exprgraph | expression graph |
node | expression graph node to release |
frees a node of an expression graph
- Parameters
-
blkmem | block memory |
node | pointer to expression graph node that should be freed |
enables a node and recursively all its children in an expression graph
- Parameters
-
exprgraph | expression graph |
node | expression graph node to enable |
disables a node and recursively all children which have no enabled parents in an expression graph
- Parameters
-
exprgraph | expression graph |
node | expression graph node to enable |
returns whether the node has siblings in the expression graph
- Parameters
-
node | expression graph node |
returns whether all children of an expression graph node are variable nodes gives TRUE for nodes without children
- Parameters
-
node | expression graph node |
returns whether the node has an ancestor which has a nonlinear expression operand
- Parameters
-
node | expression graph node |
prints an expression graph node
- Parameters
-
node | expression graph node |
messagehdlr | message handler |
file | file to print to, or NULL for stdout |
tightens the bounds in a node of the graph preparation for reverse propagation sets bound status to SCIP_EXPRBOUNDSTATUS_TIGHTENEDBYPARENTRECENT if tightening is strong enough and not cutoff
- Parameters
-
exprgraph | expression graph |
node | node in expression graph with no parents |
nodebounds | new bounds for node |
minstrength | minimal required relative bound strengthening in a node to trigger a propagation into children nodes (set to negative value if propagation should always be triggered) |
infinity | value for infinity in interval arithmetics |
cutoff | buffer to store whether a node's bounds were propagated to an empty interval |
ensures that bounds and curvature information in a node is uptodate assumes that bounds and curvature in children are uptodate
- Parameters
-
node | expression graph node |
infinity | value for infinity in interval arithmetics |
minstrength | minimal required relative bound strengthening to trigger a bound recalculation in parent nodes |
clearreverseprop | whether to reset bound tightenings from reverse propagation |
get current maximal depth of expression graph
- Parameters
-
exprgraph | expression graph |
gets array with number of nodes at each depth of expression graph
- Parameters
-
exprgraph | expression graph |
gets nodes of expression graph, one array per depth
- Parameters
-
exprgraph | expression graph |
gets number of variables in expression graph
- Parameters
-
exprgraph | pointer to expression graph that should be freed |
gets array of variables in expression graph
- Parameters
-
exprgraph | pointer to expression graph that should be freed |
gets array of expression graph nodes corresponding to variables
- Parameters
-
exprgraph | pointer to expression graph that should be freed |
sets value for a single variable given as expression graph node
- Parameters
-
varnode | expression graph node corresponding to variable |
value | new value for variable |
void SCIPexprgraphSetVarsBounds |
( |
SCIP_EXPRGRAPH * |
exprgraph, |
|
|
SCIP_INTERVAL * |
varbounds |
|
) |
| |
sets bounds for variables
- Parameters
-
exprgraph | expression graph |
varbounds | new bounds for variables |
void SCIPexprgraphSetVarBounds |
( |
SCIP_EXPRGRAPH * |
exprgraph, |
|
|
void * |
var, |
|
|
SCIP_INTERVAL |
varbounds |
|
) |
| |
sets bounds for a single variable
- Parameters
-
exprgraph | expression graph |
var | variable |
varbounds | new bounds of variable |
sets bounds for a single variable given as expression graph node
- Parameters
-
exprgraph | expression graph |
varnode | expression graph node corresponding to variable |
varbounds | new bounds of variable |
sets lower bound for a single variable given as expression graph node
- Parameters
-
exprgraph | expression graph |
varnode | expression graph node corresponding to variable |
lb | new lower bound for variable |
sets upper bound for a single variable given as expression graph node
- Parameters
-
exprgraph | expression graph |
varnode | expression graph node corresponding to variable |
ub | new upper bound for variable |
SCIP_INTERVAL* SCIPexprgraphGetVarsBounds |
( |
SCIP_EXPRGRAPH * |
exprgraph | ) |
|
gets bounds that are stored for all variables
- Parameters
-
exprgraph | expression graph |
creates an empty expression graph
- Parameters
-
blkmem | block memory |
exprgraph | buffer to store pointer to expression graph |
varssizeinit | minimal initial size for variables array, or -1 to choose automatically |
depthinit | minimal initial depth of expression graph, or -1 to choose automatically |
userdata | callback method to invoke when a variable changes its index in the expression graph, or NULL if not needed user data to pass to callback functions |
frees an expression graph
- Parameters
-
exprgraph | pointer to expression graph that should be freed |
adds an expression graph node to an expression graph expression graph assumes ownership of node children are notified about new parent depth will be chosen to be the maximum of mindepth and the depth of all children plus one
- Parameters
-
exprgraph | expression graph |
node | expression graph node to add |
mindepth | minimal depth in expression graph where to add node, e.g., 0 or smaller to choose automatically |
nchildren | number of children |
children | children nodes, or NULL if no children |
adds variables to an expression graph, if not existing yet also already existing nodes are enabled
- Parameters
-
exprgraph | expression graph |
nvars | number of variables to add |
vars | variables to add |
varnodes | array to store nodes corresponding to variables, or NULL if not of interest |
adds a constant to an expression graph, if not existing yet also already existing nodes are enabled
- Parameters
-
exprgraph | expression graph |
constant | constant to add |
constnode | buffer to store pointer to expression graph node corresponding to constant |
adds sum of expression trees into expression graph node will also be captured
- Parameters
-
exprgraph | expression graph |
nexprtrees | number of expression trees to add |
exprtrees | expression trees that should be added |
coefs | coefficients of expression trees, or NULL if all 1.0 |
rootnode | buffer to store expression graph node corresponding to root of expression tree |
rootnodeisnew | buffer to indicate whether the node in *rootnode has been newly created for this expression tree (otherwise, expression tree was already in graph) |
replaces variable in expression graph by a linear sum of variables variables will be added if not in the graph yet
- Parameters
-
exprgraph | expression graph |
var | variable to replace |
ncoefs | number of coefficients in linear term |
coefs | coefficients in linear term, or NULL if ncoefs == 0 |
vars | variables in linear term |
constant | constant offset |
finds expression graph node corresponding to a variable
- Parameters
-
exprgraph | expression graph |
var | variable to search for |
varnode | buffer to store node corresponding to variable, if found, or NULL if not found |
finds expression graph node corresponding to a constant
- Parameters
-
exprgraph | expression graph |
constant | constant to search for |
constnode | buffer to store node corresponding to constant, if found, or NULL if not found |
prints an expression graph in dot format
- Parameters
-
exprgraph | expression graph |
messagehdlr | message handler |
file | file to print to, or NULL for stdout |
varnames | variable names, or NULL for generic names |
evaluates nodes of expression graph for given values of variables
- Parameters
-
exprgraph | expression graph |
varvals | values for variables |
propagates bound changes in variables forward through the expression graph
- Parameters
-
exprgraph | expression graph |
infinity | value for infinity in interval arithmetics |
clearreverseprop | whether to reset bound tightenings from reverse propagation |
domainerror | buffer to store whether a node with empty bounds has been found, propagation is interrupted in this case |
propagates bound changes in nodes backward through the graph new bounds are not stored in varbounds, but only in nodes corresponding to variables NOTE: it is assumed that SCIPexprgraphPropagateVarBounds was called before if variable bounds were relaxed
- Parameters
-
exprgraph | expression graph |
infinity | value for infinity in interval arithmetics |
minstrength | minimal required relative bound strengthening in a node to trigger a propagation into children nodes |
cutoff | buffer to store whether a node's bounds were propagated to an empty interval |
updates curvature information in expression graph nodes w.r.t. currently stored variable bounds implies update of bounds in expression graph
- Parameters
-
exprgraph | expression graph |
infinity | value for infinity in interval arithmetics |
clearreverseprop | whether to reset bound tightenings from reverse propagation |
aims at simplifying an expression graph a domain error can occur when variables were fixed to values for which a parent expression is not defined (e.g., 0^(-1) or log(-1))
- Parameters
-
exprgraph | expression graph |
messagehdlr | message handler |
eps | threshold, under which positive values are treat as 0 |
maxexpansionexponent | maximal exponent for which we still expand non-monomial polynomials |
havechange | buffer to indicate whether the graph has been modified |
domainerror | buffer to indicate whether a domain error has been encountered, i.e., some expressions turned into NaN |
creates an expression tree from a given node in an expression graph
- Parameters
-
exprgraph | expression graph |
rootnode | expression graph node that should represent root of expression tree |
exprtree | buffer to store pointer to created expression tree |
creates a sum of expression trees with pairwise disjoint variables from a given node in an expression graph Giving SCIPexprgraphGetNodeNChildren() for exprtreesize is always sufficient.
- Parameters
-
exprgraph | expression graph |
node | expression graph node which represents expression to get |
exprtreessize | length of exprtrees and exprtreecoefs arrays, need to be at least one |
nexprtrees | buffer to store number of expression trees |
exprtrees | array where to store expression trees |
exprtreecoefs | array where to store coefficients of expression trees |
returns how often expression graph variables are used in a subtree of the expression graph
- Parameters
-
exprgraph | expression graph |
node | root node of expression graph subtree |
varsusage | array where to count usage of variables, length must be at least the number of variables in the graph |
gives the number of summands which the expression of an expression graph node consists of
- Parameters
-
node | expression graph node |
creates a sum of expression trees, possibly sharing variables, from a given node in an expression graph
- Parameters
-
exprgraph | expression graph |
node | expression graph node which represents expression to get |
exprtreessize | length of exprtrees and exptreecoefs arrays, should be at least SCIPexprgraphGetSumTreesNSummands() |
nexprtrees | buffer to store number of expression trees |
exprtrees | array where to store expression trees |
exprtreecoefs | array where to store coefficients of expression trees |
|