12 #ifndef COUENNE_EXPRPOW_HPP
13 #define COUENNE_EXPRPOW_HPP
109 const OsiBranchingInformation *
info,
134 CouNumber exponent,
bool signpower =
false) {
138 lexponent = exponent,
148 if ((rndexp % 2) || signpower)
149 retval = (- pow (- lbase, lexponent));
150 else retval = pow (- lbase, lexponent);
160 if ((fabs (lexponent - intk) <
COUENNE_EPS) && (intk % 2 || signpower))
166 retval = (pow (lbase, lexponent));
Cut Generator for linear convexifications.
virtual bool isInteger()
is this expression integer?
virtual CouNumber operator()()
function for the evaluation of the expression
virtual CouNumber gradientNorm(const double *x)
return l-2 norm of gradient at given point
virtual enum pos printPos() const
print operator positioning
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 impliedBound(int, CouNumber *, CouNumber *, t_chg_bounds *, enum auxSign=expression::AUX_EQ)
implied bound processing
void fint fint fint real fint real real real real real real real real real fint real fint fint fint real fint fint fint fint * info
pos
position where the operator should be printed when printing the expression
OsiObject for auxiliary variables $w=f(x)$.
CouNumber powNewton(CouNumber xc, CouNumber yc, unary_function f, unary_function fp, unary_function fpp)
find proper tangent point to add deepest tangent cut
status of lower/upper bound of a variable, to be checked/modified in bound tightening ...
virtual exprAux * standardize(CouenneProblem *p, bool addAux=true)
reduce expression in standard form, creating additional aux variables (and constraints) ...
Power of an expression (binary operator), with constant.
expression * clone(Domain *d=NULL) const
cloning method
void addPowEnvelope(const CouenneCutGenerator *, OsiCuts &, int, int, CouNumber, CouNumber, CouNumber, CouNumber, CouNumber, int, bool=false)
add upper/lower envelope to power in convex/concave areas
virtual int Linearity()
get a measure of "how linear" the expression is
virtual enum expr_type code()
code for comparison
exprPow(expression **al, int n=2, bool signpower=false)
Constructor.
virtual bool isCuttable(CouenneProblem *problem, int index) const
can this expression be further linearized or are we on its concave ("bad") side
auxSign
"sign" of the constraint defining an auxiliary.
virtual void getBounds(expression *&, expression *&)
Get lower and upper bound of an expression (if any)
CouNumber(* unary_function)(CouNumber)
unary function, used in all exprUnary
expression ** clonearglist(Domain *d=NULL) const
clone argument list (for use with clone method)
Class for MINLP problems with symbolic information.
bool issignpower_
do we mean a signed power function: sign(arg0) * |arg0|^arg1 (assumes that arg1 is constant) ...
virtual bool isSignpower() const
return whether this expression corresponds to a signed integer power
expression ** arglist_
argument list is an array of pointers to other expressions
double CouNumber
main number type in Couenne
int nargs_
number of arguments (cardinality of arglist)
general n-ary operator-type expression: requires argument list.
virtual void closestFeasible(expression *varind, expression *vardep, CouNumber &left, CouNumber &right) const
compute $y^{lv}$ and $y^{uv}$ for Violation Transfer algorithm
virtual std::string printOp() const
print operator
expr_type
code returned by the method expression::code()
virtual 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 expression * simplify()
simplification
CouNumber safe_pow(CouNumber base, CouNumber exponent, bool signpower=false)
compute power and check for integer-and-odd inverse exponent
void fint fint fint real fint real real real real real real real real * w
virtual expression * differentiate(int index)
differentiation
Define a dynamic point+bounds, with a way to save and restore previous points+bounds through a LIFO s...
void fint fint fint real fint real * x
virtual expression * getFixVar()
return an index to the variable's argument that is better fixed in a branching rule for solving a non...
exprPow(expression *arg0, expression *arg1, bool signpower=false)
Constructor with only two arguments.