24 #ifndef __NLPI_PUB_EXPR_H__ 25 #define __NLPI_PUB_EXPR_H__ 53 #define SCIPexprcurvAdd(curv1, curv2) ((SCIP_EXPRCURV) ((curv1) & (curv2))) 274 #define SCIPexprGetOperator(expr) (expr)->op 275 #define SCIPexprGetNChildren(expr) (expr)->nchildren 276 #define SCIPexprGetChildren(expr) (expr)->children 277 #define SCIPexprGetOpIndex(expr) (expr)->data.intval 278 #define SCIPexprGetOpReal(expr) (expr)->data.dbl 279 #define SCIPexprGetOpData(expr) (expr)->data.data 280 #define SCIPexprGetRealPowerExponent(expr) (expr)->data.dbl 281 #define SCIPexprGetIntPowerExponent(expr) (expr)->data.intval 282 #define SCIPexprGetSignPowerExponent(expr) (expr)->data.dbl 283 #define SCIPexprGetLinearCoefs(expr) ((SCIP_Real*)(expr)->data.data) 284 #define SCIPexprGetLinearConstant(expr) (((SCIP_Real*)(expr)->data.data)[(expr)->nchildren]) 285 #define SCIPexprGetQuadElements(expr) ((SCIP_EXPRDATA_QUADRATIC*)(expr)->data.data)->quadelems 286 #define SCIPexprGetQuadConstant(expr) ((SCIP_EXPRDATA_QUADRATIC*)(expr)->data.data)->constant 287 #define SCIPexprGetQuadLinearCoefs(expr) ((SCIP_EXPRDATA_QUADRATIC*)(expr)->data.data)->lincoefs 288 #define SCIPexprGetNQuadElements(expr) ((SCIP_EXPRDATA_QUADRATIC*)(expr)->data.data)->nquadelems 289 #define SCIPexprGetMonomials(expr) ((SCIP_EXPRDATA_POLYNOMIAL*)(expr)->data.data)->monomials 290 #define SCIPexprGetNMonomials(expr) ((SCIP_EXPRDATA_POLYNOMIAL*)(expr)->data.data)->nmonomials 291 #define SCIPexprGetPolynomialConstant(expr) ((SCIP_EXPRDATA_POLYNOMIAL*)(expr)->data.data)->constant 292 #define SCIPexprGetMonomialCoef(monomial) (monomial)->coef 293 #define SCIPexprGetMonomialNFactors(monomial) (monomial)->nfactors 294 #define SCIPexprGetMonomialChildIndices(monomial) (monomial)->childidxs 295 #define SCIPexprGetMonomialExponents(monomial) (monomial)->exponents 296 #define SCIPexprGetUserData(expr) ((SCIP_EXPRDATA_USER*)(expr)->data.data)->userdata 297 #define SCIPexprHasUserEstimator(expr) (((SCIP_EXPRDATA_USER*)expr->data.data)->estimate != NULL) 298 #define SCIPexprGetUserEvalCapability(expr) (((SCIP_EXPRDATA_USER*)expr->data.data)->evalcapability) 632 int maxexpansionexponent,
758 const char** paramnames,
769 const char* lastchar,
872 const char** paramnames
881 #define SCIPexprtreeGetRoot(tree) (tree)->root 882 #define SCIPexprtreeGetNVars(tree) (tree)->nvars 883 #define SCIPexprtreeGetNParams(tree) (tree)->nparams 884 #define SCIPexprtreeGetParamVals(tree) (tree)->params 885 #define SCIPexprtreeSetParamVal(tree, paramidx, paramval) do { (tree)->params[(paramidx)] = paramval; } while (FALSE) 886 #define SCIPexprtreeGetInterpreterData(tree) (tree)->interpreterdata 887 #define SCIPexprtreeSetInterpreterData(tree, newinterpreterdata) do { (tree)->interpreterdata = newinterpreterdata; } while (FALSE) 888 #define SCIPexprtreeFreeInterpreterData(tree) ((tree)->interpreterdata != NULL ? SCIPexprintFreeData(&(tree)->interpreterdata) : SCIP_OKAY) 889 #define SCIPexprtreeHasParam(tree) SCIPexprHasParam((tree)->root) 890 #define SCIPexprtreeGetMaxDegree(tree, maxdegree) SCIPexprGetMaxDegree((tree)->root, maxdegree) 891 #define SCIPexprtreeEval(tree, varvals, val) SCIPexprEval((tree)->root, varvals, (tree)->params, val) 892 #define SCIPexprtreeEvalInt(tree, infinity, varvals, val) SCIPexprEvalInt((tree)->root, infinity, varvals, (tree)->params, val) 893 #define SCIPexprtreePrint(tree, messagehdlr, file, varnames, paramnames) SCIPexprPrint((tree)->root, messagehdlr, file, varnames, paramnames, (tree)->params) 945 int maxexpansionexponent,
1216 #define SCIPexprgraphCaptureNode(node) do { ++(node)->nuses; } while( FALSE ) 1217 #define SCIPexprgraphIsNodeEnabled(node) (node)->enabled 1218 #define SCIPexprgraphGetNodeNChildren(node) (node)->nchildren 1219 #define SCIPexprgraphGetNodeChildren(node) (node)->children 1220 #define SCIPexprgraphGetNodeNParents(node) (node)->nparents 1221 #define SCIPexprgraphGetNodeParents(node) (node)->parents 1222 #define SCIPexprgraphGetNodeDepth(node) (node)->depth 1223 #define SCIPexprgraphGetNodePosition(node) (node)->pos 1224 #define SCIPexprgraphGetNodeOperator(node) (node)->op 1225 #define SCIPexprgraphGetNodeOperatorIndex(node) (node)->data.intval 1226 #define SCIPexprgraphGetNodeOperatorReal(node) (node)->data.dbl 1227 #define SCIPexprgraphGetNodeVar(exprgraph, node) (exprgraph)->vars[(node)->data.intval] 1228 #define SCIPexprgraphGetNodeRealPowerExponent(node) (node)->data.dbl 1229 #define SCIPexprgraphGetNodeIntPowerExponent(node) (node)->data.intval 1230 #define SCIPexprgraphGetNodeSignPowerExponent(node) (node)->data.dbl 1231 #define SCIPexprgraphGetNodeLinearCoefs(node) ((SCIP_Real*)(node)->data.data) 1232 #define SCIPexprgraphGetNodeLinearConstant(node) (((SCIP_Real*)(node)->data.data)[(node)->nchildren]) 1233 #define SCIPexprgraphGetNodeQuadraticConstant(node) ((SCIP_EXPRDATA_QUADRATIC*)(node)->data.data)->constant 1234 #define SCIPexprgraphGetNodeQuadraticLinearCoefs(node) ((SCIP_EXPRDATA_QUADRATIC*)(node)->data.data)->lincoefs 1235 #define SCIPexprgraphGetNodeQuadraticQuadElements(node) ((SCIP_EXPRDATA_QUADRATIC*)(node)->data.data)->quadelems 1236 #define SCIPexprgraphGetNodeQuadraticNQuadElements(node) ((SCIP_EXPRDATA_QUADRATIC*)(node)->data.data)->nquadelems 1237 #define SCIPexprgraphGetNodePolynomialMonomials(node) ((SCIP_EXPRDATA_POLYNOMIAL*)(node)->data.data)->monomials 1238 #define SCIPexprgraphGetNodePolynomialNMonomials(node) ((SCIP_EXPRDATA_POLYNOMIAL*)(node)->data.data)->nmonomials 1239 #define SCIPexprgraphGetNodePolynomialConstant(node) ((SCIP_EXPRDATA_POLYNOMIAL*)(node)->data.data)->constant 1240 #define SCIPexprgraphGetNodeUserData(node) ((SCIP_EXPRDATA_USER*)(node)->data.data)->userdata 1241 #define SCIPexprgraphHasNodeUserEstimator(node) (((SCIP_EXPRDATA_USER*)node->data.data)->estimate != NULL) 1242 #define SCIPexprgraphGetNodeBounds(node) (node)->bounds 1243 #define SCIPexprgraphGetNodeVal(node) (node)->value 1244 #define SCIPexprgraphGetNodeCurvature(node) (node)->curv 1533 #define SCIPexprgraphGetDepth(exprgraph) (exprgraph)->depth 1534 #define SCIPexprgraphGetNNodes(exprgraph) (exprgraph)->nnodes 1535 #define SCIPexprgraphGetNodes(exprgraph) (exprgraph)->nodes 1536 #define SCIPexprgraphGetNVars(exprgraph) (exprgraph)->nvars 1537 #define SCIPexprgraphGetVars(exprgraph) (exprgraph)->vars 1538 #define SCIPexprgraphGetVarNodes(exprgraph) (exprgraph)->varnodes 1539 #define SCIPexprgraphSetVarNodeValue(varnode, newvalue) do { (varnode)->value = newvalue; } while (FALSE) 1540 #define SCIPexprgraphSetVarsBounds(exprgraph, newvarbounds) BMScopyMemoryArray((exprgraph)->varbounds, newvarbounds, (exprgraph)->nvars) 1541 #define SCIPexprgraphSetVarBounds(exprgraph, var, newvarbounds) do { (exprgraph)->varbounds[(int)(size_t)SCIPhashmapGetImage((exprgraph)->varidxs, var)] = newvarbounds; } while (FALSE) 1542 #define SCIPexprgraphSetVarNodeBounds(exprgraph, varnode, newvarbounds) do { (exprgraph)->varbounds[(varnode)->data.intval] = newvarbounds; } while (FALSE) 1543 #define SCIPexprgraphSetVarNodeLb(exprgraph, varnode, lb) do { (exprgraph)->varbounds[(varnode)->data.intval].inf = lb; } while (FALSE) 1544 #define SCIPexprgraphSetVarNodeUb(exprgraph, varnode, ub) do { (exprgraph)->varbounds[(varnode)->data.intval].sup = ub; } while (FALSE) 1545 #define SCIPexprgraphGetVarsBounds(exprgraph) (exprgraph)->varbounds 1699 int maxexpansionexponent,
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_EXPRCURV SCIPexprcurvNegate(SCIP_EXPRCURV curvature)
int SCIPexprgraphGetNodeIntPowerExponent(SCIP_EXPRGRAPHNODE *node)
void ** SCIPexprgraphGetVars(SCIP_EXPRGRAPH *exprgraph)
SCIP_RETCODE SCIPexprMultiplyPolynomialByPolynomial(BMS_BLKMEM *blkmem, SCIP_EXPR *expr, SCIP_EXPR *factor, int *childmap)
void SCIPexprgraphDisableNode(SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *node)
SCIP_RETCODE SCIPexprgraphAddConst(SCIP_EXPRGRAPH *exprgraph, SCIP_Real constant, SCIP_EXPRGRAPHNODE **constnode)
SCIP_RETCODE SCIPexprgraphGetNodePolynomialMonomialCurvature(SCIP_EXPRGRAPHNODE *node, int monomialidx, SCIP_Real infinity, SCIP_EXPRCURV *curv)
static SCIP_RETCODE eval(SCIP_EXPR *expr, const vector< Type > &x, SCIP_Real *param, Type &val)
void SCIPexprtreeGetVarsUsage(SCIP_EXPRTREE *tree, int *varsusage)
void SCIPquadelemSqueeze(SCIP_QUADELEM *quadelems, int nquadelems, int *nquadelemsnew)
SCIP_RETCODE SCIPexprtreeEval(SCIP_EXPRTREE *tree, SCIP_Real *varvals, SCIP_Real *val)
int SCIPexprgraphGetNodeNParents(SCIP_EXPRGRAPHNODE *node)
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)
SCIP_QUADELEM * SCIPexprgraphGetNodeQuadraticQuadElements(SCIP_EXPRGRAPHNODE *node)
int SCIPexprGetNChildren(SCIP_EXPR *expr)
void SCIPexprtreeSetInterpreterData(SCIP_EXPRTREE *tree, SCIP_EXPRINTDATA *interpreterdata)
void SCIPexprFreeMonomial(BMS_BLKMEM *blkmem, SCIP_EXPRDATA_MONOMIAL **monomial)
SCIP_QUADELEM * SCIPexprGetQuadElements(SCIP_EXPR *expr)
struct SCIP_UserExprData SCIP_USEREXPRDATA
SCIP_EXPRINTCAPABILITY SCIPexprGetUserEvalCapability(SCIP_EXPR *expr)
int SCIPexprgraphGetNodePolynomialNMonomials(SCIP_EXPRGRAPHNODE *node)
SCIP_Real SCIPexprGetMonomialCoef(SCIP_EXPRDATA_MONOMIAL *monomial)
void SCIPexprtreePrint(SCIP_EXPRTREE *tree, SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char **varnames, const char **paramnames)
#define SCIP_DECL_USEREXPREVAL(x)
#define SCIP_DECL_USEREXPRPRINT(x)
void SCIPexprMergeMonomialFactors(SCIP_EXPRDATA_MONOMIAL *monomial, SCIP_Real eps)
SCIP_Real SCIPexprgraphGetNodeLinearConstant(SCIP_EXPRGRAPHNODE *node)
void SCIPexprgraphSetVarsBounds(SCIP_EXPRGRAPH *exprgraph, SCIP_INTERVAL *varbounds)
type definitions for expression interpreter
SCIP_RETCODE SCIPexprgraphNodeSplitOffLinear(SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE **node, int linvarssize, int *nlinvars, void **linvars, SCIP_Real *lincoefs, SCIP_Real *constant)
void SCIPexprChgMonomialCoef(SCIP_EXPRDATA_MONOMIAL *monomial, SCIP_Real newcoef)
SCIP_RETCODE SCIPexprgraphGetSumTrees(SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *node, int exprtreessize, int *nexprtrees, SCIP_EXPRTREE **exprtrees, SCIP_Real *exprtreecoefs)
void SCIPexprPrint(SCIP_EXPR *expr, SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char **varnames, const char **paramnames, SCIP_Real *paramvals)
SCIP_RETCODE SCIPexprgraphCreateNodeQuadratic(BMS_BLKMEM *blkmem, SCIP_EXPRGRAPHNODE **node, int nchildren, SCIP_Real *lincoefs, int nquadelems, SCIP_QUADELEM *quadelems, SCIP_Real constant)
int SCIPexprgraphGetSumTreesNSummands(SCIP_EXPRGRAPHNODE *node)
SCIP_Bool SCIPexprAreMonomialsEqual(SCIP_EXPRDATA_MONOMIAL *monomial1, SCIP_EXPRDATA_MONOMIAL *monomial2, SCIP_Real eps)
data definitions for expressions and expression trees
int SCIPexprgraphGetNodeQuadraticNQuadElements(SCIP_EXPRGRAPHNODE *node)
SCIP_Real * SCIPexprGetMonomialExponents(SCIP_EXPRDATA_MONOMIAL *monomial)
void SCIPexprReindexVars(SCIP_EXPR *expr, int *newindices)
int SCIPexprtreeGetNVars(SCIP_EXPRTREE *tree)
SCIP_RETCODE SCIPexprgraphFree(SCIP_EXPRGRAPH **exprgraph)
void SCIPexprgraphSetVarNodeUb(SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *varnode, SCIP_Real ub)
SCIP_RETCODE SCIPexprSubstituteVars(BMS_BLKMEM *blkmem, SCIP_EXPR *expr, SCIP_EXPR **substexprs)
SCIP_RETCODE SCIPexprgraphCreateNodePolynomial(BMS_BLKMEM *blkmem, SCIP_EXPRGRAPHNODE **node, int nmonomials, SCIP_EXPRDATA_MONOMIAL **monomials, SCIP_Real constant, SCIP_Bool copymonomials)
SCIP_RETCODE SCIPexprgraphUpdateNodeBoundsCurvature(SCIP_EXPRGRAPHNODE *node, SCIP_Real infinity, SCIP_Real minstrength, SCIP_Bool clearreverseprop)
SCIP_EXPRGRAPHNODE ** SCIPexprgraphGetVarNodes(SCIP_EXPRGRAPH *exprgraph)
void SCIPexprgraphFreeNode(BMS_BLKMEM *blkmem, SCIP_EXPRGRAPHNODE **node)
SCIP_RETCODE SCIPexprgraphGetSeparableTrees(SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *node, int exprtreessize, int *nexprtrees, SCIP_EXPRTREE **exprtrees, SCIP_Real *exprtreecoefs)
enum SCIP_Retcode SCIP_RETCODE
SCIP_RETCODE SCIPexprEvalIntShallow(SCIP_EXPR *expr, SCIP_Real infinity, SCIP_INTERVAL *argvals, SCIP_INTERVAL *varvals, SCIP_Real *param, SCIP_INTERVAL *val)
SCIP_RETCODE SCIPexprAddMonomialFactors(BMS_BLKMEM *blkmem, SCIP_EXPRDATA_MONOMIAL *monomial, int nfactors, int *childidxs, SCIP_Real *exponents)
SCIP_Real SCIPexprGetSignPowerExponent(SCIP_EXPR *expr)
void * SCIPexprgraphGetNodeVar(SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *node)
SCIP_RETCODE SCIPexprCopyDeep(BMS_BLKMEM *blkmem, SCIP_EXPR **targetexpr, SCIP_EXPR *sourceexpr)
#define SCIP_DECL_USEREXPRINTEVAL(x)
SCIP_EXPRCURV SCIPexprgraphGetNodeCurvature(SCIP_EXPRGRAPHNODE *node)
void * SCIPexprGetOpData(SCIP_EXPR *expr)
SCIP_RETCODE SCIPexprgraphNodePolynomialAddMonomials(BMS_BLKMEM *blkmem, SCIP_EXPRGRAPHNODE *node, int nmonomials, SCIP_EXPRDATA_MONOMIAL **monomials, SCIP_Bool copymonomials)
SCIP_Bool SCIPexprHasParam(SCIP_EXPR *expr)
SCIP_EXPRINTDATA * SCIPexprtreeGetInterpreterData(SCIP_EXPRTREE *tree)
int SCIPexprGetNMonomials(SCIP_EXPR *expr)
SCIP_RETCODE SCIPexprgraphAddExprtreeSum(SCIP_EXPRGRAPH *exprgraph, int nexprtrees, SCIP_EXPRTREE **exprtrees, SCIP_Real *coefs, SCIP_EXPRGRAPHNODE **rootnode, SCIP_Bool *rootnodeisnew)
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_Bool SCIPexprgraphAreAllNodeChildrenVars(SCIP_EXPRGRAPHNODE *node)
void SCIPexprgraphSetVarNodeBounds(SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *varnode, SCIP_INTERVAL varbounds)
unsigned int SCIP_EXPRINTCAPABILITY
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)
int SCIPexprgraphGetNodeDepth(SCIP_EXPRGRAPHNODE *node)
int SCIPexprGetNQuadElements(SCIP_EXPR *expr)
SCIP_INTERVAL * SCIPexprgraphGetVarsBounds(SCIP_EXPRGRAPH *exprgraph)
SCIP_EXPR ** SCIPexprGetChildren(SCIP_EXPR *expr)
SCIP_RETCODE SCIPexprtreeGetMaxDegree(SCIP_EXPRTREE *tree, int *maxdegree)
SCIP_EXPRCURV SCIPexprcurvMonomial(int nfactors, SCIP_Real *exponents, int *factoridxs, SCIP_EXPRCURV *factorcurv, SCIP_INTERVAL *factorbounds)
SCIP_EXPRCURV SCIPexprcurvMultiply(SCIP_Real factor, SCIP_EXPRCURV curvature)
SCIP_Bool SCIPexprgraphHasNodeNonlinearAncestor(SCIP_EXPRGRAPHNODE *node)
void SCIPexprSortQuadElems(SCIP_EXPR *expr)
SCIP_EXPRGRAPHNODE ** SCIPexprgraphGetNodeParents(SCIP_EXPRGRAPHNODE *node)
SCIP_RETCODE SCIPexprEvalInt(SCIP_EXPR *expr, SCIP_Real infinity, SCIP_INTERVAL *varvals, SCIP_Real *param, SCIP_INTERVAL *val)
#define SCIP_DECL_EXPRGRAPHVARADDED(x)
SCIP_RETCODE SCIPexprEval(SCIP_EXPR *expr, SCIP_Real *varvals, SCIP_Real *param, SCIP_Real *val)
void SCIPexprSortMonomialFactors(SCIP_EXPRDATA_MONOMIAL *monomial)
int * SCIPexprGetMonomialChildIndices(SCIP_EXPRDATA_MONOMIAL *monomial)
SCIP_RETCODE SCIPexprtreeFree(SCIP_EXPRTREE **tree)
SCIP_RETCODE SCIPexprgraphPrintDot(SCIP_EXPRGRAPH *exprgraph, SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char **varnames)
SCIP_Real SCIPexprGetQuadConstant(SCIP_EXPR *expr)
SCIP_Bool SCIPexprAreEqual(SCIP_EXPR *expr1, SCIP_EXPR *expr2, SCIP_Real eps)
enum SCIP_ExprOp SCIP_EXPROP
int SCIPexpropGetNChildren(SCIP_EXPROP op)
interval arithmetics for provable bounds
SCIP_EXPR * SCIPexprtreeGetRoot(SCIP_EXPRTREE *tree)
SCIP_RETCODE SCIPexprPolynomialPower(BMS_BLKMEM *blkmem, SCIP_EXPR *expr, int exponent)
SCIP_RETCODE SCIPexprParse(BMS_BLKMEM *blkmem, SCIP_MESSAGEHDLR *messagehdlr, SCIP_EXPR **expr, const char *str, const char *lastchar, int *nvars, int *varnames)
SCIP_RETCODE SCIPexprAddToLinear(BMS_BLKMEM *blkmem, SCIP_EXPR *expr, int nchildren, SCIP_Real *coefs, SCIP_EXPR **children, SCIP_Real constant)
SCIP_RETCODE SCIPexprtreeFreeInterpreterData(SCIP_EXPRTREE *tree)
SCIP_RETCODE SCIPexprgraphEval(SCIP_EXPRGRAPH *exprgraph, SCIP_Real *varvals)
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_DECL_USEREXPRPRINT((*print)))
SCIP_RETCODE SCIPexprgraphMoveNodeParents(SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE **srcnode, SCIP_EXPRGRAPHNODE *targetnode)
void SCIPexprMergeMonomials(BMS_BLKMEM *blkmem, SCIP_EXPR *expr, SCIP_Real eps, SCIP_Bool mergefactors)
SCIP_Real SCIPexprgraphGetNodeRealPowerExponent(SCIP_EXPRGRAPHNODE *node)
int SCIPexprgraphGetNodePosition(SCIP_EXPRGRAPHNODE *node)
SCIP_RETCODE SCIPexprtreeEvalInt(SCIP_EXPRTREE *tree, SCIP_Real infinity, SCIP_INTERVAL *varvals, SCIP_INTERVAL *val)
SCIP_RETCODE SCIPexprgraphCreateNodeLinear(BMS_BLKMEM *blkmem, SCIP_EXPRGRAPHNODE **node, int ncoefs, SCIP_Real *coefs, SCIP_Real constant)
SCIP_EXPROP SCIPexprgraphGetNodeOperator(SCIP_EXPRGRAPHNODE *node)
SCIP_RETCODE SCIPexprgraphAddNode(SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *node, int mindepth, int nchildren, SCIP_EXPRGRAPHNODE **children)
SCIP_RETCODE SCIPexprEvalUser(SCIP_EXPR *expr, SCIP_Real *argvals, SCIP_Real *val, SCIP_Real *gradient, SCIP_Real *hessian)
SCIP_EXPRDATA_MONOMIAL ** SCIPexprGetMonomials(SCIP_EXPR *expr)
void SCIPexprgraphEnableNode(SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *node)
void SCIPexprMultiplyPolynomialByConstant(BMS_BLKMEM *blkmem, SCIP_EXPR *expr, SCIP_Real factor)
SCIP_RETCODE SCIPexprgraphCheckCurvature(SCIP_EXPRGRAPH *exprgraph, SCIP_Real infinity, SCIP_Bool clearreverseprop)
SCIP_RETCODE SCIPexprEvalShallow(SCIP_EXPR *expr, SCIP_Real *argvals, SCIP_Real *varvals, SCIP_Real *param, SCIP_Real *val)
#define SCIP_DECL_USEREXPRCURV(x)
const char * SCIPexpropGetName(SCIP_EXPROP op)
void SCIPexprChgPolynomialConstant(SCIP_EXPR *expr, SCIP_Real constant)
SCIP_RETCODE SCIPexprGetMaxDegree(SCIP_EXPR *expr, int *maxdegree)
SCIP_Real SCIPexprGetOpReal(SCIP_EXPR *expr)
SCIP_Bool SCIPexprtreeHasParam(SCIP_EXPRTREE *tree)
void SCIPexprFreeShallow(BMS_BLKMEM *blkmem, SCIP_EXPR **expr)
SCIP_RETCODE SCIPexprEvalIntUser(SCIP_EXPR *expr, SCIP_Real infinity, SCIP_INTERVAL *argvals, SCIP_INTERVAL *val, SCIP_INTERVAL *gradient, SCIP_INTERVAL *hessian)
int SCIPexprgraphGetNVars(SCIP_EXPRGRAPH *exprgraph)
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_DECL_USEREXPRPRINT((*print)))
#define SCIP_DECL_USEREXPRESTIMATE(x)
#define SCIP_DECL_USEREXPRPROP(x)
SCIP_Real SCIPexprGetRealPowerExponent(SCIP_EXPR *expr)
SCIP_EXPRCURV SCIPexprcurvPower(SCIP_INTERVAL basebounds, SCIP_EXPRCURV basecurv, SCIP_Real exponent)
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)
int SCIPexprGetMonomialNFactors(SCIP_EXPRDATA_MONOMIAL *monomial)
SCIP_Bool SCIPquadelemSortedFind(SCIP_QUADELEM *quadelems, int idx1, int idx2, int nquadelems, int *pos)
void SCIPexprFreeDeep(BMS_BLKMEM *blkmem, SCIP_EXPR **expr)
SCIP_EXPRCURV SCIPexprcurvAdd(SCIP_EXPRCURV curv1, SCIP_EXPRCURV curv2)
int SCIPexprGetOpIndex(SCIP_EXPR *expr)
int SCIPexprgraphGetNodeOperatorIndex(SCIP_EXPRGRAPHNODE *node)
SCIP_RETCODE SCIPexprMultiplyMonomialByMonomial(BMS_BLKMEM *blkmem, SCIP_EXPRDATA_MONOMIAL *monomial, SCIP_EXPRDATA_MONOMIAL *factor, int *childmap)
SCIP_RETCODE SCIPexprtreeSubstituteVars(SCIP_EXPRTREE *tree, SCIP_EXPR **substexprs)
void SCIPexprgraphTightenNodeBounds(SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *node, SCIP_INTERVAL nodebounds, SCIP_Real minstrength, SCIP_Real infinity, SCIP_Bool *cutoff)
SCIP_Real SCIPexprGetPolynomialConstant(SCIP_EXPR *expr)
SCIP_USEREXPRDATA * SCIPexprGetUserData(SCIP_EXPR *expr)
SCIP_Bool SCIPexprHasUserEstimator(SCIP_EXPR *expr)
void SCIPexprgraphSetVarBounds(SCIP_EXPRGRAPH *exprgraph, void *var, SCIP_INTERVAL varbounds)
SCIP_Real * SCIPexprtreeGetParamVals(SCIP_EXPRTREE *tree)
int * SCIPexprgraphGetNNodes(SCIP_EXPRGRAPH *exprgraph)
SCIP_RETCODE SCIPexprgraphReleaseNode(SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE **node)
SCIP_Real SCIPexprgraphGetNodeSignPowerExponent(SCIP_EXPRGRAPHNODE *node)
SCIP_RETCODE SCIPexprgraphSimplify(SCIP_EXPRGRAPH *exprgraph, SCIP_MESSAGEHDLR *messagehdlr, SCIP_Real eps, int maxexpansionexponent, SCIP_Bool *havechange, SCIP_Bool *domainerror)
SCIP_RETCODE SCIPexprMultiplyPolynomialByMonomial(BMS_BLKMEM *blkmem, SCIP_EXPR *expr, SCIP_EXPRDATA_MONOMIAL *factor, int *childmap)
SCIP_RETCODE SCIPexprgraphGetTree(SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *rootnode, SCIP_EXPRTREE **exprtree)
void SCIPexprgraphSetVarNodeValue(SCIP_EXPRGRAPHNODE *varnode, SCIP_Real value)
SCIP_RETCODE SCIPexprtreeCheckCurvature(SCIP_EXPRTREE *tree, SCIP_Real infinity, SCIP_INTERVAL *varbounds, SCIP_EXPRCURV *curv, SCIP_INTERVAL *bounds)
SCIP_RETCODE SCIPexprtreeCopy(BMS_BLKMEM *blkmem, SCIP_EXPRTREE **targettree, SCIP_EXPRTREE *sourcetree)
const char * SCIPexprcurvGetName(SCIP_EXPRCURV curv)
int SCIPexprgraphGetNodeNChildren(SCIP_EXPRGRAPHNODE *node)
SCIP_Real * SCIPexprgraphGetNodeLinearCoefs(SCIP_EXPRGRAPHNODE *node)
#define SCIP_DECL_EXPRGRAPHVARREMOVE(x)
SCIP_RETCODE SCIPexprCreate(BMS_BLKMEM *blkmem, SCIP_EXPR **expr, SCIP_EXPROP op,...)
SCIP_RETCODE SCIPexprgraphPropagateVarBounds(SCIP_EXPRGRAPH *exprgraph, SCIP_Real infinity, SCIP_Bool clearreverseprop, SCIP_Bool *domainerror)
enum SCIP_ExprCurv SCIP_EXPRCURV
SCIP_Bool SCIPexprgraphHasNodeSibling(SCIP_EXPRGRAPHNODE *node)
SCIP_Bool SCIPexprgraphHasNodeUserEstimator(SCIP_EXPRGRAPHNODE *node)
void SCIPexprgraphSetVarNodeLb(SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *varnode, SCIP_Real lb)
SCIP_RETCODE SCIPexprAddMonomials(BMS_BLKMEM *blkmem, SCIP_EXPR *expr, int nmonomials, SCIP_EXPRDATA_MONOMIAL **monomials, SCIP_Bool copymonomials)
SCIP_USEREXPRDATA * SCIPexprgraphGetNodeUserData(SCIP_EXPRGRAPHNODE *node)
int SCIPexprtreeGetNParams(SCIP_EXPRTREE *tree)
SCIP_Bool SCIPexprgraphFindVarNode(SCIP_EXPRGRAPH *exprgraph, void *var, SCIP_EXPRGRAPHNODE **varnode)
int SCIPexprgraphGetDepth(SCIP_EXPRGRAPH *exprgraph)
SCIP_RETCODE SCIPexprtreeSimplify(SCIP_EXPRTREE *tree, SCIP_MESSAGEHDLR *messagehdlr, SCIP_Real eps, int maxexpansionexponent, int *nlinvars, int *linidxs, SCIP_Real *lincoefs)
SCIP_Real SCIPexprgraphGetNodeOperatorReal(SCIP_EXPRGRAPHNODE *node)
SCIP_Real SCIPexprgraphGetNodePolynomialConstant(SCIP_EXPRGRAPHNODE *node)
void SCIPexprgraphCaptureNode(SCIP_EXPRGRAPHNODE *node)
SCIP_Bool SCIPexprgraphFindConstNode(SCIP_EXPRGRAPH *exprgraph, SCIP_Real constant, SCIP_EXPRGRAPHNODE **constnode)
SCIP_RETCODE SCIPexprMulConstant(BMS_BLKMEM *blkmem, SCIP_EXPR **expr, SCIP_EXPR *term, SCIP_Real factor)
type definitions for expressions and expression trees
void SCIPexprgraphPrintNode(SCIP_EXPRGRAPHNODE *node, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
public methods for message output
void SCIPquadelemSort(SCIP_QUADELEM *quadelems, int nquadelems)
SCIP_RETCODE SCIPexprgraphCreateNode(BMS_BLKMEM *blkmem, SCIP_EXPRGRAPHNODE **node, SCIP_EXPROP op,...)
void SCIPexprReindexParams(SCIP_EXPR *expr, int *newindices)
SCIP_EXPROP SCIPexprGetOperator(SCIP_EXPR *expr)
#define SCIP_DECL_USEREXPRCOPYDATA(x)
int SCIPexprGetIntPowerExponent(SCIP_EXPR *expr)
SCIP_RETCODE SCIPexprgraphReplaceVarByLinearSum(SCIP_EXPRGRAPH *exprgraph, void *var, int ncoefs, SCIP_Real *coefs, void **vars, SCIP_Real constant)
void SCIPexprGetVarsUsage(SCIP_EXPR *expr, int *varsusage)
void SCIPexprgraphPropagateNodeBounds(SCIP_EXPRGRAPH *exprgraph, SCIP_Real infinity, SCIP_Real minstrength, SCIP_Bool *cutoff)
SCIP_Real SCIPexprGetLinearConstant(SCIP_EXPR *expr)
SCIP_EXPRGRAPHNODE *** SCIPexprgraphGetNodes(SCIP_EXPRGRAPH *exprgraph)
SCIP_RETCODE SCIPexprtreeCreate(BMS_BLKMEM *blkmem, SCIP_EXPRTREE **tree, SCIP_EXPR *root, int nvars, int nparams, SCIP_Real *params)
void SCIPexprMonomialPower(SCIP_EXPRDATA_MONOMIAL *monomial, int exponent)
SCIP_EXPRDATA_MONOMIAL ** SCIPexprgraphGetNodePolynomialMonomials(SCIP_EXPRGRAPHNODE *node)
SCIP_EXPRGRAPHNODE ** SCIPexprgraphGetNodeChildren(SCIP_EXPRGRAPHNODE *node)
void SCIPexprtreeSetParamVal(SCIP_EXPRTREE *tree, int paramidx, SCIP_Real paramval)
SCIP_RETCODE SCIPexprCreateMonomial(BMS_BLKMEM *blkmem, SCIP_EXPRDATA_MONOMIAL **monomial, SCIP_Real coef, int nfactors, int *childidxs, SCIP_Real *exponents)
SCIP_Real * SCIPexprGetLinearCoefs(SCIP_EXPR *expr)
SCIP_Bool SCIPexprFindMonomialFactor(SCIP_EXPRDATA_MONOMIAL *monomial, int childidx, int *pos)
SCIP_Real * SCIPexprgraphGetNodeQuadraticLinearCoefs(SCIP_EXPRGRAPHNODE *node)
SCIP_RETCODE SCIPexprtreeAddExpr(SCIP_EXPRTREE *tree, SCIP_EXPR *expr, SCIP_Bool copyexpr)
SCIP_Real SCIPexprgraphGetNodeQuadraticConstant(SCIP_EXPRGRAPHNODE *node)
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
SCIP_RETCODE SCIPexprCheckCurvature(SCIP_EXPR *expr, SCIP_Real infinity, SCIP_INTERVAL *varbounds, SCIP_Real *param, SCIP_EXPRCURV *curv, SCIP_INTERVAL *bounds)
void SCIPexprgraphGetSubtreeVarsUsage(SCIP_EXPRGRAPH *exprgraph, SCIP_EXPRGRAPHNODE *node, int *varsusage)
struct SCIP_ExprIntData SCIP_EXPRINTDATA
SCIP_RETCODE SCIPexprCreateLinear(BMS_BLKMEM *blkmem, SCIP_EXPR **expr, int nchildren, SCIP_EXPR **children, SCIP_Real *coefs, SCIP_Real constant)
SCIP_Real SCIPexprgraphGetNodeVal(SCIP_EXPRGRAPHNODE *node)
#define SCIP_DECL_USEREXPRFREEDATA(x)
SCIP_RETCODE SCIPexprtreeSetParams(SCIP_EXPRTREE *tree, int nparams, SCIP_Real *paramvals)
SCIP_RETCODE SCIPexprgraphAddVars(SCIP_EXPRGRAPH *exprgraph, int nvars, void **vars, SCIP_EXPRGRAPHNODE **varnodes)
SCIP_Bool SCIPexprgraphIsNodeEnabled(SCIP_EXPRGRAPHNODE *node)
void SCIPexprSortMonomials(SCIP_EXPR *expr)
SCIP_Real * SCIPexprGetQuadLinearCoefs(SCIP_EXPR *expr)
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)
#define SCIP_DECL_EXPRGRAPHVARCHGIDX(x)
SCIP_INTERVAL SCIPexprgraphGetNodeBounds(SCIP_EXPRGRAPHNODE *node)
memory allocation routines