#include <CouenneExprInv.hpp>
Inheritance diagram for Couenne::exprInv:
Public Member Functions | |
exprInv (expression *al) | |
Constructors, destructor. | |
expression * | clone (Domain *d=NULL) const |
cloning method | |
unary_function | F () |
the operator's function | |
virtual void | print (std::ostream &out=std::cout, bool=false) const |
output "1/argument" | |
CouNumber | gradientNorm (const double *x) |
return l-2 norm of gradient at given point | |
expression * | differentiate (int index) |
differentiation | |
virtual int | Linearity () |
get a measure of "how linear" the expression is (see CouenneTypes.h) | |
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). | |
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 | |
virtual enum expr_type | code () |
code for comparisons | |
bool | impliedBound (int, CouNumber *, CouNumber *, t_chg_bounds *, enum auxSign=expression::AUX_EQ) |
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 bool | isBijective () const |
return true if bijective | |
virtual CouNumber | inverse (expression *vardep) const |
return inverse of y=f(x)=1/x, i.e., x=1/y | |
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 35 of file CouenneExprInv.hpp.
Couenne::exprInv::exprInv | ( | expression * | al | ) | [inline] |
Constructors, destructor.
Definition at line 40 of file CouenneExprInv.hpp.
Referenced by clone(), and getBounds().
expression* Couenne::exprInv::clone | ( | Domain * | d = NULL |
) | const [inline, virtual] |
cloning method
Reimplemented from Couenne::expression.
Definition at line 44 of file CouenneExprInv.hpp.
References Couenne::exprUnary::argument_, and exprInv().
unary_function Couenne::exprInv::F | ( | ) | [inline, virtual] |
the operator's function
Reimplemented from Couenne::exprUnary.
Definition at line 48 of file CouenneExprInv.hpp.
References Couenne::inv().
void exprInv::print | ( | std::ostream & | out = std::cout , |
|
bool | = false | |||
) | const [virtual] |
output "1/argument"
Reimplemented from Couenne::exprUnary.
Definition at line 36 of file exprInv.cpp.
References Couenne::exprUnary::argument_.
CouNumber exprInv::gradientNorm | ( | const double * | x | ) | [virtual] |
return l-2 norm of gradient at given point
Reimplemented from Couenne::expression.
Definition at line 111 of file exprInv.cpp.
References Couenne::exprUnary::argument_, and Couenne::expression::Index().
expression * exprInv::differentiate | ( | int | index | ) | [virtual] |
differentiation
Reimplemented from Couenne::expression.
Definition at line 27 of file exprInv.cpp.
References Couenne::exprUnary::argument_.
virtual int Couenne::exprInv::Linearity | ( | ) | [inline, virtual] |
get a measure of "how linear" the expression is (see CouenneTypes.h)
Reimplemented from Couenne::exprUnary.
Definition at line 60 of file CouenneExprInv.hpp.
References Couenne::exprUnary::argument_, Couenne::CONST, Couenne::CONSTANT, Couenne::NONLINEAR, and Couenne::exprUnary::Type().
void exprInv::getBounds | ( | expression *& | , | |
expression *& | ||||
) | [virtual] |
Get lower and upper bound of an expression (if any).
Reimplemented from Couenne::expression.
Definition at line 33 of file conv-exprInv.cpp.
References Couenne::exprUnary::argument_, COUENNE_INFINITY, and exprInv().
Referenced by generateCuts(), and getBounds().
Get value of lower and upper bound of an expression (if any).
Reimplemented from Couenne::expression.
Definition at line 55 of file conv-exprInv.cpp.
References Couenne::exprUnary::argument_, COUENNE_INFINITY, and getBounds().
void exprInv::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 Couenne::expression.
Definition at line 75 of file conv-exprInv.cpp.
References Couenne::exprUnary::argument_, Couenne::expression::AUX_GEQ, Couenne::expression::AUX_LEQ, COU_MAX_COEFF, COUENNE_EPS, COUENNE_INFINITY, createCut(), getBounds(), Couenne::expression::Index(), Couenne::inv(), Couenne::inv_dblprime(), MIN_DENOMINATOR, ns, Couenne::oppInvSqr(), Couenne::powNewton(), and Couenne::t_chg_bounds::UNCHANGED.
virtual enum expr_type Couenne::exprInv::code | ( | ) | [inline, virtual] |
code for comparisons
Reimplemented from Couenne::exprUnary.
Definition at line 79 of file CouenneExprInv.hpp.
References Couenne::COU_EXPRINV.
bool exprInv::impliedBound | ( | int | , | |
CouNumber * | , | |||
CouNumber * | , | |||
t_chg_bounds * | , | |||
enum | auxSign = expression::AUX_EQ | |||
) |
implied bound processing
Definition at line 79 of file exprInv.cpp.
References Couenne::exprUnary::argument_, Couenne::t_chg_bounds::CHANGED, COUENNE_EPS, Couenne::expression::Index(), invPowImplBounds(), Couenne::exprUnary::isInteger(), Couenne::t_chg_bounds::setLower(), and Couenne::t_chg_bounds::setUpper().
CouNumber exprInv::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 Couenne::expression.
Definition at line 229 of file branchExprInv.cpp.
References Couenne::exprUnary::argument_, Couenne::expression::Index(), and negPowSelectBranch().
virtual bool Couenne::exprInv::isBijective | ( | ) | const [inline, virtual] |
return true if bijective
Reimplemented from Couenne::expression.
Definition at line 95 of file CouenneExprInv.hpp.
virtual CouNumber Couenne::exprInv::inverse | ( | expression * | vardep | ) | const [inline, virtual] |
return inverse of y=f(x)=1/x, i.e., x=1/y
Reimplemented from Couenne::expression.
Definition at line 98 of file CouenneExprInv.hpp.
bool exprInv::isCuttable | ( | CouenneProblem * | problem, | |
int | index | |||
) | const [virtual] |
can this expression be further linearized or are we on its concave ("bad") side
Reimplemented from Couenne::expression.
Definition at line 124 of file exprInv.cpp.
References Couenne::exprUnary::argument_, Couenne::expression::Index(), and x.