# Couenne::exprPow Class Reference

Power of an expression (binary operator), with constant. More...

`#include <CouenneExprPow.hpp>`

Inheritance diagram for Couenne::exprPow:

List of all members.

## Public Member Functions
| exprPow (expression **al, int n=2, bool signpower=false)
| Constructor.
| exprPow (expression *arg0, expression *arg1, bool signpower=false)
| Constructor with only two arguments.
expression * | clone (Domain *d=NULL) const
| cloning method
virtual std::string | printOp () const
| print operator
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 expression * | differentiate (int index)
| differentiation
virtual expression * | simplify ()
| simplification
virtual int | Linearity ()
| get a measure of "how linear" the expression is
virtual bool | isInteger ()
| is this expression integer?
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)
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 * | 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
virtual 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 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
virtual bool | isSignpower () const
| return whether this expression corresponds to a signed integer power
## Private Attributes
bool | issignpower_
| do we mean a signed power function: sign(arg0) * |arg0|^arg1 (assumes that arg1 is constant)

## Detailed Description

Power of an expression (binary operator), with constant.

Definition at line 30 of file CouenneExprPow.hpp.

## Constructor & Destructor Documentation

Couenne::exprPow::exprPow | ( | expression ** | al,
|  | int | n = `2`,
|  | bool | signpower = `false` |
| ) |  |  | `[inline]`

Constructor.

Definition at line 40 of file CouenneExprPow.hpp.

Referenced by clone().

Couenne::exprPow::exprPow | ( | expression * | arg0,
|  | expression * | arg1,
|  | bool | signpower = `false` |
| ) |  |  | `[inline]`

Constructor with only two arguments.

Definition at line 44 of file CouenneExprPow.hpp.

## Member Function Documentation

expression* Couenne::exprPow::clone | ( | Domain * | d = `NULL` | ) | const`[inline, virtual]`

cloning method

Reimplemented from Couenne::expression.

Reimplemented in Couenne::exprOddPow.

Definition at line 48 of file CouenneExprPow.hpp.

References Couenne::exprOp::clonearglist(), exprPow(), issignpower_, and Couenne::exprOp::nargs_.

virtual std::string Couenne::exprPow::printOp | ( |  | ) | const`[inline, virtual]`

print operator

Reimplemented from Couenne::exprOp.

Reimplemented in Couenne::exprOddPow.

Definition at line 52 of file CouenneExprPow.hpp.

CouNumber Couenne::exprPow::operator() | ( |  | ) | `[inline, virtual]`

function for the evaluation of the expression

compute power

Implements Couenne::expression.

Reimplemented in Couenne::exprOddPow.

Definition at line 169 of file CouenneExprPow.hpp.

References Couenne::exprOp::arglist_, issignpower_, and Couenne::safe_pow().

virtual CouNumber Couenne::exprPow::gradientNorm | ( | const double * | x | ) | `[virtual]`

return l-2 norm of gradient at given point

Reimplemented from Couenne::expression.

virtual expression* Couenne::exprPow::differentiate | ( | int | index | ) | `[virtual]`

differentiation

Reimplemented from Couenne::expression.

virtual expression* Couenne::exprPow::simplify | ( |  | ) | `[virtual]`

simplification

Reimplemented from Couenne::exprOp.

virtual int Couenne::exprPow::Linearity | ( |  | ) | `[virtual]`

get a measure of "how linear" the expression is

Reimplemented from Couenne::exprOp.

virtual bool Couenne::exprPow::isInteger | ( |  | ) | `[virtual]`

is this expression integer?

Reimplemented from Couenne::exprOp.

virtual void Couenne::exprPow::getBounds | ( | expression *& | ,
|  | expression *& |  |
| ) |  |  | `[virtual]`

Get lower and upper bound of an expression (if any).

Reimplemented in Couenne::exprOddPow.

virtual void Couenne::exprPow::getBounds | ( | CouNumber & | lb,
|  | CouNumber & | ub |
| ) |  |  | `[virtual]`

Get value of lower and upper bound of an expression (if any).

Reimplemented from Couenne::expression.

Reimplemented in Couenne::exprOddPow.

virtual exprAux* Couenne::exprPow::standardize | ( | CouenneProblem * | p,
|  | bool | addAux = `true` |
| ) |  |  | `[virtual]`

reduce expression in standard form, creating additional aux variables (and constraints)

Reimplemented from Couenne::exprOp.

Reimplemented in Couenne::exprOddPow.

virtual void Couenne::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 in Couenne::exprOddPow.

virtual expression* Couenne::exprPow::getFixVar | ( |  | ) | `[inline, virtual]`

return an index to the variable's argument that is better fixed in a branching rule for solving a nonconvexity gap

Reimplemented in Couenne::exprOddPow.

Definition at line 92 of file CouenneExprPow.hpp.

References Couenne::exprOp::arglist_.

virtual enum expr_type Couenne::exprPow::code | ( |  | ) | `[inline, virtual]`

code for comparison

Reimplemented from Couenne::exprOp.

Reimplemented in Couenne::exprOddPow.

Definition at line 96 of file CouenneExprPow.hpp.

References Couenne::COU_EXPRPOW, Couenne::COU_EXPRSIGNPOW, and issignpower_.

virtual bool Couenne::exprPow::impliedBound | ( | int | ,
|  | CouNumber * | ,
|  | CouNumber * | ,
|  | t_chg_bounds * | ,
|  | enum | auxSign = `expression::AUX_EQ` |
| ) |  |  | `[virtual]`

implied bound processing

Reimplemented from Couenne::expression.

Reimplemented in Couenne::exprOddPow.

virtual CouNumber Couenne::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 in Couenne::exprOddPow.

virtual void Couenne::exprPow::closestFeasible | ( | expression * | varind,
|  | expression * | vardep,
|  | CouNumber & | left,
|  | CouNumber & | right |
| ) |  |  | const`[virtual]`

compute $y^{lv}$ and $y^{uv}$ for Violation Transfer algorithm

virtual bool Couenne::exprPow::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.

Reimplemented in Couenne::exprOddPow.

virtual bool Couenne::exprPow::isSignpower | ( |  | ) | const`[inline, virtual]`

return whether this expression corresponds to a signed integer power

Definition at line 123 of file CouenneExprPow.hpp.

References issignpower_.

## Member Data Documentation

bool Couenne::exprPow::issignpower_`[private]`

do we mean a signed power function: sign(arg0) * |arg0|^arg1 (assumes that arg1 is constant)

Definition at line 35 of file CouenneExprPow.hpp.

Referenced by clone(), code(), isSignpower(), and operator()().

The documentation for this class was generated from the following file:

- CouenneExprPow.hpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines