exprCopy Class Reference

#include <exprCopy.hpp>

Inheritance diagram for exprCopy:

Inheritance graph
[legend]
Collaboration diagram for exprCopy:

Collaboration graph
[legend]
List of all members.

Public Member Functions

enum nodeType Type () const
 node type
 exprCopy (expression *copy)
 Constructor.
 exprCopy (const exprCopy &e, Domain *d=NULL)
 Copy constructor.
virtual ~exprCopy ()
 Destructor -- CAUTION: this is the only destructive destructor, exprClone and exprStore do not destroy anything.
virtual expressionclone (Domain *d=NULL) const
 Cloning method.
const expressionOriginal () const
 If this is an exprClone of a exprClone of an expr???, point to the original expr??? instead of an exprClone -- improves computing efficiency.
bool isaCopy () const
 return true if this is a copy of something, i.e.
expressionCopy () const
 return copy of this expression (only makes sense in exprCopy)
expressionImage () const
 return pointer to corresponding expression (for auxiliary variables only)
int Index () const
 Get variable index in problem.
int nArgs () const
 Return number of arguments (when applicable, that is, with N-ary functions).
expression ** ArgList () const
 return arglist (when applicable, that is, with N-ary functions)
void ArgList (expression **al)
 set arglist (used in deleting nodes without deleting children)
expressionArgument () const
 return argument (when applicable, i.e., with univariate functions)
expression ** ArgPtr ()
 return pointer to argument (when applicable, i.e., with univariate functions)
virtual void print (std::ostream &out=std::cout, bool descend=false) const
 I/O.
virtual CouNumber Value () const
 value
virtual CouNumber operator() ()
 null function for evaluating the expression
CouNumber gradientNorm (const double *x)
 return l-2 norm of gradient at given point
expressiondifferentiate (int index)
 differentiation
int DepList (std::set< int > &deplist, enum dig_type type=ORIG_ONLY)
 fill in the set with all indices of variables appearing in the expression
expressionsimplify ()
 simplify expression (useful for derivatives)
int Linearity ()
 get a measure of "how linear" the expression is (see CouenneTypes.h)
bool isInteger ()
 is this expression integer?
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).
exprAuxstandardize (CouenneProblem *p, bool addAux=true)
 Create standard formulation of this expression.
void generateCuts (expression *w, const OsiSolverInterface &si, OsiCuts &cs, const CouenneCutGenerator *cg, t_chg_bounds *chg=NULL, int wind=-1, CouNumber lb=-COUENNE_INFINITY, CouNumber ub=COUENNE_INFINITY)
 generate convexification cut for constraint w = this
enum expr_type code ()
 code for comparisons
enum convexity convexity () const
 either CONVEX, CONCAVE, AFFINE, or NONCONVEX
int compare (expression &e)
 compare this with other expression
int rank ()
 used in rank-based branching variable choice
bool impliedBound (int wind, CouNumber *l, CouNumber *u, t_chg_bounds *chg)
 implied bound processing
int Multiplicity ()
 multiplicity of a variable: how many times this variable occurs in expressions throughout the problem
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.
void replace (exprVar *, exprVar *)
 replace occurrence of a variable with another variable
void fillDepSet (std::set< DepNode *, compNode > *dep, DepGraph *g)
 fill in dependence structure
void realign (const CouenneProblem *p)
 redirect variables to proper variable vector
bool isBijective () const
 indicating if function is monotonically increasing
CouNumber inverse (expression *vardep) const
 compute the inverse function
void closestFeasible (expression *varind, expression *vardep, CouNumber &left, CouNumber &right) const
 closest feasible points in function in both directions
bool isCuttable (CouenneProblem *problem, int index) const
 can this expression be further linearized or are we on its concave ("bad") side

Protected Attributes

expressioncopy_
 the expression this object is a (reference) copy of
CouNumber value_
 saved value to be used by exprStore expressions

Detailed Description

Definition at line 23 of file exprCopy.hpp.


Constructor & Destructor Documentation

exprCopy::exprCopy ( expression copy  )  [inline]

Constructor.

Definition at line 43 of file exprCopy.hpp.

Referenced by clone().

exprCopy::exprCopy ( const exprCopy e,
Domain d = NULL 
)

Copy constructor.

virtual exprCopy::~exprCopy (  )  [inline, virtual]

Destructor -- CAUTION: this is the only destructive destructor, exprClone and exprStore do not destroy anything.

Definition at line 53 of file exprCopy.hpp.

References copy_.


Member Function Documentation

enum nodeType exprCopy::Type (  )  const [inline, virtual]

node type

Reimplemented from expression.

Definition at line 36 of file exprCopy.hpp.

References copy_.

virtual expression* exprCopy::clone ( Domain d = NULL  )  const [inline, virtual]

Cloning method.

Reimplemented from expression.

Reimplemented in exprClone, and exprStore.

Definition at line 59 of file exprCopy.hpp.

References exprCopy().

const expression* exprCopy::Original (  )  const [inline, virtual]

If this is an exprClone of a exprClone of an expr???, point to the original expr??? instead of an exprClone -- improves computing efficiency.

Reimplemented from expression.

Definition at line 65 of file exprCopy.hpp.

References copy_.

Referenced by print().

bool exprCopy::isaCopy (  )  const [inline, virtual]

return true if this is a copy of something, i.e.

if it is an exprCopy or derivates

Reimplemented from expression.

Definition at line 70 of file exprCopy.hpp.

Referenced by Copy().

expression* exprCopy::Copy (  )  const [inline, virtual]

return copy of this expression (only makes sense in exprCopy)

Reimplemented from expression.

Definition at line 74 of file exprCopy.hpp.

References copy_, and isaCopy().

expression* exprCopy::Image (  )  const [inline, virtual]

return pointer to corresponding expression (for auxiliary variables only)

Reimplemented from expression.

Definition at line 78 of file exprCopy.hpp.

References copy_.

int exprCopy::Index (  )  const [inline, virtual]

Get variable index in problem.

Reimplemented from expression.

Definition at line 82 of file exprCopy.hpp.

References copy_.

int exprCopy::nArgs (  )  const [inline, virtual]

Return number of arguments (when applicable, that is, with N-ary functions).

Reimplemented from expression.

Definition at line 86 of file exprCopy.hpp.

References copy_.

expression** exprCopy::ArgList (  )  const [inline, virtual]

return arglist (when applicable, that is, with N-ary functions)

Reimplemented from expression.

Definition at line 90 of file exprCopy.hpp.

References copy_.

Referenced by ArgList().

void exprCopy::ArgList ( expression **  al  )  [inline, virtual]

set arglist (used in deleting nodes without deleting children)

Reimplemented from expression.

Definition at line 94 of file exprCopy.hpp.

References ArgList(), and copy_.

expression* exprCopy::Argument (  )  const [inline, virtual]

return argument (when applicable, i.e., with univariate functions)

Reimplemented from expression.

Definition at line 98 of file exprCopy.hpp.

References copy_.

expression** exprCopy::ArgPtr (  )  [inline, virtual]

return pointer to argument (when applicable, i.e., with univariate functions)

Reimplemented from expression.

Definition at line 102 of file exprCopy.hpp.

References copy_.

virtual void exprCopy::print ( std::ostream &  out = std::cout,
bool  descend = false 
) const [inline, virtual]

I/O.

Reimplemented from expression.

Definition at line 106 of file exprCopy.hpp.

References copy_, and Original().

virtual CouNumber exprCopy::Value (  )  const [inline, virtual]

value

Reimplemented from expression.

Reimplemented in exprClone.

Definition at line 112 of file exprCopy.hpp.

References value_.

Referenced by exprStore::operator()().

virtual CouNumber exprCopy::operator() (  )  [inline, virtual]

null function for evaluating the expression

Implements expression.

Reimplemented in exprClone, and exprStore.

Definition at line 116 of file exprCopy.hpp.

References copy_, and value_.

CouNumber exprCopy::gradientNorm ( const double *  x  )  [inline, virtual]

return l-2 norm of gradient at given point

Reimplemented from expression.

Definition at line 122 of file exprCopy.hpp.

References copy_.

expression* exprCopy::differentiate ( int  index  )  [inline, virtual]

differentiation

Reimplemented from expression.

Definition at line 126 of file exprCopy.hpp.

References copy_.

int exprCopy::DepList ( std::set< int > &  deplist,
enum dig_type  type = ORIG_ONLY 
) [inline, virtual]

fill in the set with all indices of variables appearing in the expression

Reimplemented from expression.

Definition at line 131 of file exprCopy.hpp.

References copy_.

expression* exprCopy::simplify (  )  [inline, virtual]

simplify expression (useful for derivatives)

Reimplemented from expression.

Definition at line 136 of file exprCopy.hpp.

References copy_.

int exprCopy::Linearity (  )  [inline, virtual]

get a measure of "how linear" the expression is (see CouenneTypes.h)

Reimplemented from expression.

Definition at line 140 of file exprCopy.hpp.

References copy_.

bool exprCopy::isInteger (  )  [inline, virtual]

is this expression integer?

Reimplemented from expression.

Definition at line 143 of file exprCopy.hpp.

References copy_.

void exprCopy::getBounds ( expression *&  lower,
expression *&  upper 
) [inline, virtual]

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

Reimplemented from expression.

Definition at line 147 of file exprCopy.hpp.

References copy_.

Referenced by getBounds().

void exprCopy::getBounds ( CouNumber lower,
CouNumber upper 
) [inline, virtual]

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

Reimplemented from expression.

Definition at line 151 of file exprCopy.hpp.

References copy_, and getBounds().

exprAux* exprCopy::standardize ( CouenneProblem p,
bool  addAux = true 
) [inline, virtual]

Create standard formulation of this expression.

Reimplemented from expression.

Definition at line 156 of file exprCopy.hpp.

References copy_.

void exprCopy::generateCuts ( expression w,
const OsiSolverInterface &  si,
OsiCuts &  cs,
const CouenneCutGenerator cg,
t_chg_bounds chg = NULL,
int  wind = -1,
CouNumber  lb = -COUENNE_INFINITY,
CouNumber  ub = COUENNE_INFINITY 
) [inline, virtual]

generate convexification cut for constraint w = this

Reimplemented from expression.

Definition at line 160 of file exprCopy.hpp.

References copy_.

enum expr_type exprCopy::code (  )  [inline, virtual]

code for comparisons

Reimplemented from expression.

Definition at line 169 of file exprCopy.hpp.

References copy_.

enum convexity exprCopy::convexity (  )  const [inline, virtual]

either CONVEX, CONCAVE, AFFINE, or NONCONVEX

Reimplemented from expression.

Definition at line 173 of file exprCopy.hpp.

References copy_.

int exprCopy::compare ( expression e  )  [inline, virtual]

compare this with other expression

Reimplemented from expression.

Definition at line 177 of file exprCopy.hpp.

References copy_.

int exprCopy::rank (  )  [inline, virtual]

used in rank-based branching variable choice

Reimplemented from expression.

Definition at line 181 of file exprCopy.hpp.

References copy_.

bool exprCopy::impliedBound ( int  wind,
CouNumber l,
CouNumber u,
t_chg_bounds chg 
) [inline, virtual]

implied bound processing

Reimplemented from expression.

Definition at line 185 of file exprCopy.hpp.

References copy_.

int exprCopy::Multiplicity (  )  [inline, virtual]

multiplicity of a variable: how many times this variable occurs in expressions throughout the problem

Reimplemented from expression.

Definition at line 190 of file exprCopy.hpp.

References copy_.

CouNumber exprCopy::selectBranch ( const CouenneObject obj,
const OsiBranchingInformation *  info,
expression *&  var,
double *&  brpts,
double *&  brDist,
int &  way 
) [inline, virtual]

Set up branching object by evaluating many branching points for each expression's arguments.

Return estimated improvement in objective function

Reimplemented from expression.

Definition at line 195 of file exprCopy.hpp.

References copy_.

void exprCopy::replace ( exprVar ,
exprVar  
) [virtual]

replace occurrence of a variable with another variable

Reimplemented from expression.

void exprCopy::fillDepSet ( std::set< DepNode *, compNode > *  dep,
DepGraph g 
) [inline, virtual]

fill in dependence structure

Reimplemented from expression.

Definition at line 209 of file exprCopy.hpp.

References copy_.

void exprCopy::realign ( const CouenneProblem p  )  [virtual]

redirect variables to proper variable vector

Reimplemented from expression.

bool exprCopy::isBijective (  )  const [inline, virtual]

indicating if function is monotonically increasing

Reimplemented from expression.

Definition at line 217 of file exprCopy.hpp.

References copy_.

CouNumber exprCopy::inverse ( expression vardep  )  const [inline, virtual]

compute the inverse function

Reimplemented from expression.

Definition at line 221 of file exprCopy.hpp.

References copy_.

void exprCopy::closestFeasible ( expression varind,
expression vardep,
CouNumber left,
CouNumber right 
) const [inline, virtual]

closest feasible points in function in both directions

Reimplemented from expression.

Definition at line 225 of file exprCopy.hpp.

References copy_.

bool exprCopy::isCuttable ( CouenneProblem problem,
int  index 
) const [inline, virtual]

can this expression be further linearized or are we on its concave ("bad") side

Reimplemented from expression.

Definition at line 231 of file exprCopy.hpp.

References copy_.


Member Data Documentation

expression* exprCopy::copy_ [protected]

the expression this object is a (reference) copy of

Definition at line 28 of file exprCopy.hpp.

Referenced by ArgList(), ArgPtr(), Argument(), closestFeasible(), code(), compare(), convexity(), Copy(), DepList(), differentiate(), fillDepSet(), generateCuts(), getBounds(), gradientNorm(), Image(), impliedBound(), Index(), inverse(), isBijective(), isCuttable(), isInteger(), Linearity(), Multiplicity(), nArgs(), exprStore::operator()(), operator()(), exprClone::operator()(), Original(), print(), rank(), selectBranch(), simplify(), standardize(), Type(), exprClone::Value(), exprClone::~exprClone(), ~exprCopy(), and exprStore::~exprStore().

CouNumber exprCopy::value_ [protected]

saved value to be used by exprStore expressions

Reimplemented in exprStore.

Definition at line 31 of file exprCopy.hpp.

Referenced by operator()(), and Value().


The documentation for this class was generated from the following file:
Generated on Wed May 19 03:09:03 2010 for Couenne by  doxygen 1.4.7