#include <CouenneExprConst.hpp>
Inheritance diagram for Couenne::exprConst:
Public Member Functions | |
enum nodeType | Type () const |
node type | |
CouNumber | Value () const |
value of expression | |
exprConst (CouNumber value) | |
Constructor. | |
exprConst (const exprConst &e, Domain *d=NULL) | |
Copy constructor. | |
virtual expression * | clone (Domain *d=NULL) const |
Cloning method. | |
void | print (std::ostream &out=std::cout, bool=false) const |
I/O. | |
CouNumber | operator() () |
return constant's value | |
expression * | differentiate (int) |
differentiation | |
int | dependsOn (int *ind, int n, enum dig_type type=STOP_AT_AUX) |
dependence on variable set | |
int | Linearity () |
get a measure of "how linear" the expression is (see CouenneTypes.h) | |
void | getBounds (expression *&lower, expression *&upper) |
Get lower and upper bound of an expression (if any). | |
void | getBounds (CouNumber &lower, CouNumber &upper) |
Get value of lower and upper bound of an expression (if any). | |
void | generateCuts (expression *, OsiCuts &, const CouenneCutGenerator *, t_chg_bounds *=NULL, int=-1, CouNumber=-COUENNE_INFINITY, CouNumber=COUENNE_INFINITY) |
generate convexification cut for constraint w = this | |
virtual enum expr_type | code () |
code for comparisons | |
virtual bool | isInteger () |
is this expression integer? | |
virtual int | rank () |
used in rank-based branching variable choice | |
Private Attributes | |
CouNumber | value_ |
the value of this constant |
Definition at line 23 of file CouenneExprConst.hpp.
Couenne::exprConst::exprConst | ( | CouNumber | value | ) | [inline] |
Constructor.
Definition at line 41 of file CouenneExprConst.hpp.
Referenced by clone(), differentiate(), and getBounds().
enum nodeType Couenne::exprConst::Type | ( | ) | const [inline, virtual] |
node type
Reimplemented from Couenne::expression.
Definition at line 33 of file CouenneExprConst.hpp.
References Couenne::CONST.
CouNumber Couenne::exprConst::Value | ( | ) | const [inline, virtual] |
value of expression
Reimplemented from Couenne::expression.
Definition at line 37 of file CouenneExprConst.hpp.
References value_.
virtual expression* Couenne::exprConst::clone | ( | Domain * | d = NULL |
) | const [inline, virtual] |
Cloning method.
Reimplemented from Couenne::expression.
Definition at line 49 of file CouenneExprConst.hpp.
References exprConst(), and value_.
void Couenne::exprConst::print | ( | std::ostream & | out = std::cout , |
|
bool | = false | |||
) | const [inline, virtual] |
I/O.
Reimplemented from Couenne::expression.
Definition at line 53 of file CouenneExprConst.hpp.
References value_.
CouNumber Couenne::exprConst::operator() | ( | ) | [inline, virtual] |
return constant's value
Implements Couenne::expression.
Definition at line 58 of file CouenneExprConst.hpp.
References value_.
expression* Couenne::exprConst::differentiate | ( | int | ) | [inline, virtual] |
differentiation
Reimplemented from Couenne::expression.
Definition at line 62 of file CouenneExprConst.hpp.
References exprConst().
int Couenne::exprConst::dependsOn | ( | int * | ind, | |
int | n, | |||
enum dig_type | type = STOP_AT_AUX | |||
) | [inline, virtual] |
dependence on variable set
Reimplemented from Couenne::expression.
Definition at line 66 of file CouenneExprConst.hpp.
int Couenne::exprConst::Linearity | ( | ) | [inline, virtual] |
get a measure of "how linear" the expression is (see CouenneTypes.h)
Reimplemented from Couenne::expression.
Definition at line 70 of file CouenneExprConst.hpp.
References Couenne::CONSTANT, COUENNE_EPS, value_, and Couenne::ZERO.
void Couenne::exprConst::getBounds | ( | expression *& | lower, | |
expression *& | upper | |||
) | [inline, virtual] |
Get lower and upper bound of an expression (if any).
Reimplemented from Couenne::expression.
Definition at line 74 of file CouenneExprConst.hpp.
References exprConst(), and value_.
Get value of lower and upper bound of an expression (if any).
Reimplemented from Couenne::expression.
Definition at line 80 of file CouenneExprConst.hpp.
References value_.
void Couenne::exprConst::generateCuts | ( | expression * | , | |
OsiCuts & | , | |||
const CouenneCutGenerator * | , | |||
t_chg_bounds * | = NULL , |
|||
int | = -1 , |
|||
CouNumber | = -COUENNE_INFINITY , |
|||
CouNumber | = COUENNE_INFINITY | |||
) | [virtual] |
virtual enum expr_type Couenne::exprConst::code | ( | ) | [inline, virtual] |
code for comparisons
Reimplemented from Couenne::expression.
Definition at line 91 of file CouenneExprConst.hpp.
References Couenne::COU_EXPRCONST.
virtual bool Couenne::exprConst::isInteger | ( | ) | [inline, virtual] |
is this expression integer?
Reimplemented from Couenne::expression.
Definition at line 95 of file CouenneExprConst.hpp.
References Couenne::isInteger(), and value_.
virtual int Couenne::exprConst::rank | ( | ) | [inline, virtual] |
used in rank-based branching variable choice
Reimplemented from Couenne::expression.
Definition at line 99 of file CouenneExprConst.hpp.
CouNumber Couenne::exprConst::value_ [private] |
the value of this constant
Definition at line 28 of file CouenneExprConst.hpp.
Referenced by clone(), exprConst(), getBounds(), isInteger(), Linearity(), operator()(), print(), and Value().