#include <exprMul.hpp>
Inheritance diagram for exprMul:
Public Member Functions | |
exprMul (expression **, int) | |
Constructor. | |
exprMul (expression *, expression *) | |
Constructor with two arguments. | |
expression * | clone (Domain *d=NULL) const |
Cloning method. | |
std::string | printOp () const |
Print operator. | |
CouNumber | operator() () |
Method to evaluate the expression. | |
CouNumber | gradientNorm (const double *x) |
return l-2 norm of gradient at given point | |
expression * | differentiate (int index) |
differentiation | |
expression * | simplify () |
simplification | |
virtual int | Linearity () |
get a measure of "how linear" the expression is: | |
virtual void | getBounds (expression *&, expression *&) |
Get lower and upper bound of an expression (if any). | |
virtual void | getBounds (CouNumber &lb, CouNumber &ub) |
Get value of lower and upper bound of an expression (if any). | |
virtual exprAux * | standardize (CouenneProblem *p, bool addAux=true) |
reduce expression in standard form, creating additional aux variables (and constraints) | |
void | generateCuts (expression *w, const OsiSolverInterface &si, OsiCuts &cs, const CouenneCutGenerator *cg, t_chg_bounds *=NULL, int=-1, CouNumber=-COUENNE_INFINITY, CouNumber=COUENNE_INFINITY) |
generate equality between *this and *w | |
virtual enum expr_type | code () |
code for comparison | |
bool | impliedBound (int, CouNumber *, CouNumber *, t_chg_bounds *) |
implied bound processing | |
virtual CouNumber | selectBranch (const CouenneObject *obj, const OsiBranchingInformation *info, expression *&var, double *&brpts, double *&brDist, int &way) |
set up branching object by evaluating many branching points for each expression's arguments | |
virtual void | closestFeasible (expression *varind, expression *vardep, CouNumber &left, CouNumber &right) const |
compute $y^{lv}$ and $y^{uv}$ for Violation Transfer algorithm | |
Protected Member Functions | |
int | impliedBoundMul (CouNumber wl, CouNumber wu, std::vector< CouNumber > &xl, std::vector< CouNumber > &xu, std::vector< std::pair< int, CouNumber > > &nl, std::vector< std::pair< int, CouNumber > > &nu) |
inferring bounds on factors of a product | |
CouNumber | balancedMul (const OsiBranchingInformation *info, int index, int wind) |
balanced strategy for branching point selection in products | |
virtual bool | isCuttable (CouenneProblem *problem, int index) const |
can this expression be further linearized or are we on its concave ("bad") side |
Definition at line 21 of file exprMul.hpp.
exprMul::exprMul | ( | expression ** | , | |
int | ||||
) |
Constructor.
Definition at line 23 of file exprMul.cpp.
References exprOp::arglist_, compareExpr(), and exprOp::nargs_.
Referenced by clone(), differentiate(), getBounds(), and standardize().
exprMul::exprMul | ( | expression * | , | |
expression * | ||||
) |
Constructor with two arguments.
Definition at line 31 of file exprMul.cpp.
References exprOp::arglist_, and compareExpr().
expression* exprMul::clone | ( | Domain * | d = NULL |
) | const [inline, virtual] |
Cloning method.
Reimplemented from expression.
Definition at line 32 of file exprMul.hpp.
References exprOp::clonearglist(), exprMul(), and exprOp::nargs_.
std::string exprMul::printOp | ( | ) | const [inline, virtual] |
CouNumber exprMul::operator() | ( | ) | [inline, virtual] |
Method to evaluate the expression.
Implements expression.
Definition at line 114 of file exprMul.hpp.
References exprOp::arglist_, n, and exprOp::nargs_.
CouNumber exprMul::gradientNorm | ( | const double * | x | ) | [virtual] |
return l-2 norm of gradient at given point
Reimplemented from expression.
Definition at line 195 of file exprMul.cpp.
References exprOp::arglist_, expression::Index(), and expression::Value().
expression * exprMul::differentiate | ( | int | index | ) | [virtual] |
differentiation
Reimplemented from expression.
Definition at line 104 of file exprMul.cpp.
References exprOp::arglist_, expression::dependsOn(), exprMul(), and exprOp::nargs_.
expression * exprMul::simplify | ( | ) | [virtual] |
simplification
Reimplemented from exprOp.
Definition at line 46 of file exprMul.cpp.
References exprOp::arglist_, c, CONST, COUENNE_EPS_SIMPL, exprOp::nargs_, exprOp::shrink_arglist(), exprOp::simplify(), exprOp::Type(), and expression::Value().
int exprMul::Linearity | ( | ) | [virtual] |
get a measure of "how linear" the expression is:
Reimplemented from exprOp.
Definition at line 141 of file exprMul.cpp.
References exprOp::arglist_, LINEAR, exprOp::nargs_, NONLINEAR, QUADRATIC, and ZERO.
void exprMul::getBounds | ( | expression *& | , | |
expression *& | ||||
) | [virtual] |
Get lower and upper bound of an expression (if any).
Reimplemented from expression.
Definition at line 89 of file conv-exprMul.cpp.
References exprOp::arglist_, c, CONST, exprMul(), exprOp::Type(), and expression::Value().
Referenced by generateCuts(), getBounds(), and standardize().
Get value of lower and upper bound of an expression (if any).
Reimplemented from expression.
Definition at line 149 of file conv-exprMul.cpp.
References exprOp::arglist_, getBounds(), and safeProd().
exprAux * exprMul::standardize | ( | CouenneProblem * | p, | |
bool | addAux = true | |||
) | [virtual] |
reduce expression in standard form, creating additional aux variables (and constraints)
Reimplemented from exprOp.
Definition at line 33 of file conv-exprMul.cpp.
References areSameVariables(), exprOp::arglist_, exprMul(), getBounds(), exprOp::isInteger(), exprOp::nargs_, and exprOp::standardize().
void exprMul::generateCuts | ( | expression * | w, | |
const OsiSolverInterface & | si, | |||
OsiCuts & | cs, | |||
const CouenneCutGenerator * | cg, | |||
t_chg_bounds * | = NULL , |
|||
int | = -1 , |
|||
CouNumber | = -COUENNE_INFINITY , |
|||
CouNumber | = COUENNE_INFINITY | |||
) | [virtual] |
generate equality between *this and *w
Reimplemented from expression.
Definition at line 18 of file conv-exprMul-genCuts.cpp.
References exprOp::arglist_, CONST, COUENNE_EPS, getBounds(), expression::Index(), exprOp::Type(), unifiedProdCuts(), expression::Value(), and w.
virtual enum expr_type exprMul::code | ( | ) | [inline, virtual] |
code for comparison
Reimplemented from exprOp.
Definition at line 72 of file exprMul.hpp.
References COU_EXPRMUL.
bool exprMul::impliedBound | ( | int | , | |
CouNumber * | , | |||
CouNumber * | , | |||
t_chg_bounds * | ||||
) | [virtual] |
implied bound processing
Reimplemented from expression.
Definition at line 18 of file impliedBounds-exprMul.cpp.
References exprOp::arglist_, c, t_chg_bounds::CHANGED, CONST, COUENNE_EPS, COUENNE_INFINITY, expression::Index(), exprOp::isInteger(), t_chg_bounds::setLower(), t_chg_bounds::setUpper(), exprOp::Type(), updateBound(), and expression::Value().
CouNumber exprMul::selectBranch | ( | const CouenneObject * | obj, | |
const OsiBranchingInformation * | info, | |||
expression *& | var, | |||
double *& | brpts, | |||
double *& | brDist, | |||
int & | way | |||
) | [virtual] |
set up branching object by evaluating many branching points for each expression's arguments
Reimplemented from expression.
Definition at line 22 of file branchExprMul.cpp.
References exprOp::arglist_, CouenneObject::BALANCED, balancedMul(), computeMulBrDist(), COUENNE_EPS, COUENNE_INFINITY, expression::Index(), CouenneObject::MID_INTERVAL, CouenneObject::MIN_AREA, projectSeg(), THRES_ZERO_SYMM, TWO_LEFT, and TWO_RIGHT.
void exprMul::closestFeasible | ( | expression * | varind, | |
expression * | vardep, | |||
CouNumber & | left, | |||
CouNumber & | right | |||
) | const [virtual] |
compute $y^{lv}$ and $y^{uv}$ for Violation Transfer algorithm
Reimplemented from expression.
Definition at line 167 of file exprMul.cpp.
References exprOp::arglist_, c, expression::Index(), and x.
int exprMul::impliedBoundMul | ( | CouNumber | wl, | |
CouNumber | wu, | |||
std::vector< CouNumber > & | xl, | |||
std::vector< CouNumber > & | xu, | |||
std::vector< std::pair< int, CouNumber > > & | nl, | |||
std::vector< std::pair< int, CouNumber > > & | nu | |||
) | [protected] |
inferring bounds on factors of a product
Definition at line 16 of file impliedBounds-mul.cpp.
References COUENNE_INFINITY, and nu.
CouNumber exprMul::balancedMul | ( | const OsiBranchingInformation * | info, | |
int | index, | |||
int | wind | |||
) | [protected] |
balanced strategy for branching point selection in products
Definition at line 164 of file branchExprMul.cpp.
References exprOp::arglist_, expression::Index(), m, and minMaxDelta().
Referenced by selectBranch().
virtual bool exprMul::isCuttable | ( | CouenneProblem * | problem, | |
int | index | |||
) | const [inline, protected, virtual] |
can this expression be further linearized or are we on its concave ("bad") side
Reimplemented from expression.
Definition at line 108 of file exprMul.hpp.