#include <exprPow.hpp>
Inheritance diagram for exprPow:
Public Member Functions | |
exprPow (expression **al, int n=2) | |
Constructor. | |
exprPow (expression *arg0, expression *arg1) | |
Constructor with only two arguments. | |
expression * | clone (Domain *d=NULL) const |
cloning method | |
std::string | printOp () const |
print operator | |
CouNumber | operator() () |
function for the evaluation of the expression | |
CouNumber | gradientNorm (const double *x) |
return l-2 norm of gradient at given point | |
expression * | differentiate (int index) |
differentiation | |
expression * | simplify () |
simplification | |
int | Linearity () |
get a measure of "how linear" the expression is | |
bool | isInteger () |
is this expression integer? | |
void | getBounds (expression *&, expression *&) |
Get lower and upper bound of an expression (if any). | |
void | getBounds (CouNumber &lb, CouNumber &ub) |
Get value of lower and upper bound of an expression (if any). | |
exprAux * | standardize (CouenneProblem *p, bool addAux=true) |
reduce expression in standard form, creating additional aux variables (and constraints) | |
void | generateCuts (expression *w, OsiCuts &cs, const CouenneCutGenerator *cg, t_chg_bounds *=NULL, int=-1, CouNumber=-COUENNE_INFINITY, CouNumber=COUENNE_INFINITY) |
generate equality between *this and *w | |
expression * | getFixVar () |
return an index to the variable's argument that is better fixed in a branching rule for solving a nonconvexity gap | |
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 | |
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 26 of file exprPow.hpp.
exprPow::exprPow | ( | expression ** | al, | |
int | n = 2 | |||
) | [inline] |
Constructor.
Definition at line 31 of file exprPow.hpp.
Referenced by clone(), differentiate(), and getBounds().
exprPow::exprPow | ( | expression * | arg0, | |
expression * | arg1 | |||
) | [inline] |
expression* exprPow::clone | ( | Domain * | d = NULL |
) | const [inline, virtual] |
cloning method
Reimplemented from expression.
Definition at line 39 of file exprPow.hpp.
References exprOp::clonearglist(), exprPow(), and exprOp::nargs_.
std::string exprPow::printOp | ( | ) | const [inline, virtual] |
CouNumber exprPow::operator() | ( | ) | [inline, virtual] |
function for the evaluation of the expression
Implements expression.
Definition at line 157 of file exprPow.hpp.
References exprOp::arglist_, and safe_pow().
CouNumber exprPow::gradientNorm | ( | const double * | x | ) | [virtual] |
return l-2 norm of gradient at given point
Reimplemented from expression.
Definition at line 292 of file exprPow.cpp.
References exprOp::arglist_, expression::Index(), safe_pow(), and expression::Value().
expression * exprPow::differentiate | ( | int | index | ) | [virtual] |
differentiation
Reimplemented from expression.
Definition at line 83 of file exprPow.cpp.
References alp, exprOp::arglist_, expression::dependsOn(), and exprPow().
expression * exprPow::simplify | ( | ) | [virtual] |
simplification
Reimplemented from exprOp.
Definition at line 28 of file exprPow.cpp.
References exprOp::arglist_, CONST, COUENNE_EPS_SIMPL, exprOp::simplify(), exprOp::Type(), and expression::Value().
int exprPow::Linearity | ( | ) | [virtual] |
get a measure of "how linear" the expression is
ZERO = 0: a zero CONSTANT = 1: a constant LINEAR = 2: linear QUADRATIC = 3: quadratic NONLINER = 4: nonlinear non-quadratic
Reimplemented from exprOp.
Definition at line 130 of file exprPow.cpp.
References exprOp::arglist_, CONST, CONSTANT, COUENNE_EPS, COUENNE_round, LINEAR, NONLINEAR, QUADRATIC, exprOp::Type(), and expression::Value().
bool exprPow::isInteger | ( | ) | [virtual] |
is this expression integer?
Reimplemented from exprOp.
Definition at line 176 of file exprPow.cpp.
References exprOp::arglist_, COUENNE_EPS, and getBounds().
Referenced by impliedBound(), and isCuttable().
void exprPow::getBounds | ( | expression *& | , | |
expression *& | ||||
) | [virtual] |
Get lower and upper bound of an expression (if any).
Reimplemented from expression.
Definition at line 27 of file conv-exprPow-getBounds.cpp.
References exprOp::arglist_, CONST, COUENNE_EPS, COUENNE_INFINITY, COUENNE_round, exprPow(), exprOp::Type(), and expression::Value().
Referenced by generateCuts(), getBounds(), and isInteger().
Get value of lower and upper bound of an expression (if any).
Reimplemented from expression.
Definition at line 181 of file conv-exprPow-getBounds.cpp.
References exprOp::arglist_, COUENNE_EPS, COUENNE_INFINITY, COUENNE_round, getBounds(), k, and safe_pow().
exprAux * exprPow::standardize | ( | CouenneProblem * | p, | |
bool | addAux = true | |||
) | [virtual] |
reduce expression in standard form, creating additional aux variables (and constraints)
Reimplemented from exprOp.
Definition at line 34 of file conv-exprPow.cpp.
References exprOp::arglist_, CONST, COUENNE_EPS, log(), M_E, exprOp::standardize(), exprOp::Type(), and expression::Value().
void exprPow::generateCuts | ( | expression * | w, | |
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 101 of file conv-exprPow.cpp.
References addPowEnvelope(), exprOp::arglist_, COU_MAX_COEFF, COUENNE_EPS, COUENNE_INFINITY, COUENNE_round, getBounds(), expression::Index(), k, t_chg_bounds::lower(), safe_pow(), t_chg_bounds::UNCHANGED, t_chg_bounds::upper(), expression::Value(), w, and x.
expression* exprPow::getFixVar | ( | ) | [inline] |
return an index to the variable's argument that is better fixed in a branching rule for solving a nonconvexity gap
Definition at line 83 of file exprPow.hpp.
References exprOp::arglist_.
virtual enum expr_type exprPow::code | ( | ) | [inline, virtual] |
code for comparison
Reimplemented from exprOp.
Definition at line 87 of file exprPow.hpp.
References COU_EXPRPOW.
bool exprPow::impliedBound | ( | int | , | |
CouNumber * | , | |||
CouNumber * | , | |||
t_chg_bounds * | ||||
) | [virtual] |
implied bound processing
Reimplemented from expression.
Definition at line 23 of file impliedBounds-exprPow.cpp.
References exprOp::arglist_, t_chg_bounds::CHANGED, CONST, COUENNE_EPS, COUENNE_INFINITY, COUENNE_round, expression::Index(), invPowImplBounds(), isInteger(), k, safe_pow(), t_chg_bounds::setLower(), t_chg_bounds::setUpper(), exprOp::Type(), updateBound(), and expression::Value().
CouNumber exprPow::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 33 of file branchExprPow.cpp.
References exprOp::arglist_, CONST, COUENNE_EPS, COUENNE_INFINITY, COUENNE_round, expression::Index(), k, CouenneObject::MID_INTERVAL, negPowSelectBranch(), powNewton(), projectSeg(), safe_pow(), TWO_LEFT, TWO_RAND, TWO_RIGHT, exprOp::Type(), and expression::Value().
void exprPow::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 219 of file exprPow.cpp.
References exprOp::arglist_, COUENNE_EPS, COUENNE_round, k, safe_pow(), expression::Value(), and x.
bool exprPow::isCuttable | ( | CouenneProblem * | problem, | |
int | index | |||
) | const [virtual] |
can this expression be further linearized or are we on its concave ("bad") side
Reimplemented from expression.
Definition at line 302 of file exprPow.cpp.
References exprOp::arglist_, COUENNE_round, expression::Index(), isInteger(), safe_pow(), expression::Value(), and x.