exprVar Class Reference

variable-type operator More...

#include <exprVar.hpp>

Inheritance diagram for exprVar:

Inheritance graph
[legend]
Collaboration diagram for exprVar:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual enum nodeType Type () const
 Node type.
 exprVar (int varIndex, Domain *d=NULL)
 Constructor.
virtual ~exprVar ()
 destructor
 exprVar (const exprVar &e, Domain *d=NULL)
 Copy constructor.
virtual exprVarclone (Domain *d=NULL) const
 Cloning method.
int Index () const
 Get variable index in problem.
virtual expressionLb ()
 Get lower bound expression.
virtual expressionUb ()
 Get upper bound expression.
virtual CouNumberlb ()
 Get/set lower bound value.
virtual CouNumberub ()
 Get/set upper bound value.
virtual void print (std::ostream &out=std::cout, bool=false) const
 print
virtual CouNumber operator() ()
 return the value of the variable
virtual CouNumber gradientNorm (const double *x)
 return l-2 norm of gradient at given point
virtual expressiondifferentiate (int index)
 differentiation
virtual 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
virtual void crossBounds ()
 set bounds depending on both branching rules and propagated bounds.
virtual expressionsimplify ()
 simplify
virtual int Linearity ()
 get a measure of "how linear" the expression is (see CouenneTypes.h)
virtual bool isDefinedInteger ()
 is this expression defined as an integer?
virtual bool isInteger ()
 is this variable integer?
virtual void getBounds (expression *&, expression *&)
 Get expressions of 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 void generateCuts (OsiCuts &, const CouenneCutGenerator *, t_chg_bounds *=NULL, int=-1, CouNumber=-COUENNE_INFINITY, CouNumber=COUENNE_INFINITY)
 generate cuts for expression associated with this auxiliary
virtual void generateCuts (expression *w, OsiCuts &cs, const CouenneCutGenerator *cg, 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 comparison
virtual bool impliedBound (int, CouNumber *, CouNumber *, t_chg_bounds *)
 implied bound processing
virtual int rank ()
 rank of an original variable is always one
virtual void fillDepSet (std::set< DepNode *, compNode > *, DepGraph *)
 update dependence set with index of this variable
virtual bool isFixed ()
 is this variable fixed?
virtual void linkDomain (Domain *d)
 link this variable to a domain
virtual Domaindomain ()
 return pointer to variable domain
virtual void decreaseMult ()
virtual void zeroMult ()
 Disable variable (empty for compatibility with exprAux).
virtual void setInteger (bool value)
 Set this variable as integer (empty for compatibility with exprAux).
virtual enum convexity convexity () const
 either CONVEX, CONCAVE, AFFINE, or NONCONVEX
virtual CouenneObjectproperObject (CouenneCutGenerator *c, CouenneProblem *p, Bonmin::BabSetupBase *base, JnlstPtr jnlst_)
 return proper object to handle expression associated with this variable (NULL if this is not an auxiliary)

Protected Attributes

int varIndex_
 The index of the variable.
Domaindomain_
 Pointer to a descriptor of the current point/bounds.

Detailed Description

variable-type operator

All variables of the expression must be objects of this class or of the derived exprAux class

Definition at line 35 of file exprVar.hpp.


Constructor & Destructor Documentation

exprVar::exprVar ( int  varIndex,
Domain d = NULL 
) [inline]

Constructor.

Definition at line 49 of file exprVar.hpp.

Referenced by clone().

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

destructor

Definition at line 54 of file exprVar.hpp.

exprVar::exprVar ( const exprVar e,
Domain d = NULL 
) [inline]

Copy constructor.

Definition at line 57 of file exprVar.hpp.


Member Function Documentation

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

Node type.

Reimplemented from expression.

Reimplemented in exprAux, exprLowerBound, and exprUpperBound.

Definition at line 45 of file exprVar.hpp.

References VAR.

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

Cloning method.

Reimplemented from expression.

Reimplemented in exprAux, exprLowerBound, exprUpperBound, and exprIVar.

Definition at line 62 of file exprVar.hpp.

References exprVar().

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

Get variable index in problem.

Reimplemented from expression.

Definition at line 66 of file exprVar.hpp.

References varIndex_.

virtual expression* exprVar::Lb (  )  [virtual]

Get lower bound expression.

Reimplemented in exprAux.

virtual expression* exprVar::Ub (  )  [virtual]

Get upper bound expression.

Reimplemented in exprAux.

virtual CouNumber& exprVar::lb (  )  [inline, virtual]

Get/set lower bound value.

Definition at line 74 of file exprVar.hpp.

References domain_, and varIndex_.

Referenced by isFixed(), isInteger(), exprAux::isInteger(), and exprLowerBound::operator()().

virtual CouNumber& exprVar::ub (  )  [inline, virtual]

Get/set upper bound value.

Definition at line 75 of file exprVar.hpp.

References domain_, and varIndex_.

Referenced by isFixed(), isInteger(), exprAux::isInteger(), and exprUpperBound::operator()().

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

print

Reimplemented from expression.

Reimplemented in exprAux, exprLowerBound, exprUpperBound, and exprIVar.

Definition at line 78 of file exprVar.hpp.

References varIndex_.

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

return the value of the variable

Implements expression.

Reimplemented in exprAux, exprLowerBound, and exprUpperBound.

Definition at line 83 of file exprVar.hpp.

References domain_, and varIndex_.

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

return l-2 norm of gradient at given point

Reimplemented from expression.

Definition at line 87 of file exprVar.hpp.

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

differentiation

Reimplemented from expression.

Reimplemented in exprAux, exprLowerBound, and exprUpperBound.

Definition at line 91 of file exprVar.hpp.

References varIndex_.

virtual int exprVar::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.

Reimplemented in exprAux.

Definition at line 96 of file exprVar.hpp.

References varIndex_.

virtual void exprVar::crossBounds (  )  [inline, virtual]

set bounds depending on both branching rules and propagated bounds.

To be used after standardization

Reimplemented in exprAux.

Definition at line 108 of file exprVar.hpp.

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

simplify

Reimplemented from expression.

Reimplemented in exprAux.

Definition at line 111 of file exprVar.hpp.

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

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

Reimplemented from expression.

Reimplemented in exprAux, exprLowerBound, and exprUpperBound.

Definition at line 115 of file exprVar.hpp.

References LINEAR.

virtual bool exprVar::isDefinedInteger (  )  [inline, virtual]

is this expression defined as an integer?

Reimplemented from expression.

Reimplemented in exprAux, and exprIVar.

Definition at line 119 of file exprVar.hpp.

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

is this variable integer?

Reimplemented from expression.

Reimplemented in exprAux, and exprIVar.

Definition at line 123 of file exprVar.hpp.

References COUENNE_EPS, domain_, lb(), ub(), and varIndex_.

virtual void exprVar::getBounds ( expression *&  ,
expression *&   
) [virtual]

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

Reimplemented from expression.

virtual void exprVar::getBounds ( CouNumber lb,
CouNumber ub 
) [virtual]

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

Reimplemented from expression.

virtual void exprVar::generateCuts ( OsiCuts &  ,
const CouenneCutGenerator ,
t_chg_bounds = NULL,
int  = -1,
CouNumber  = -COUENNE_INFINITY,
CouNumber  = COUENNE_INFINITY 
) [inline, virtual]

generate cuts for expression associated with this auxiliary

Reimplemented in exprAux.

Definition at line 141 of file exprVar.hpp.

virtual void exprVar::generateCuts ( expression w,
OsiCuts &  cs,
const CouenneCutGenerator cg,
t_chg_bounds = NULL,
int  = -1,
CouNumber  = -COUENNE_INFINITY,
CouNumber  = COUENNE_INFINITY 
) [virtual]

generate convexification cut for constraint w = this

Reimplemented from expression.

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

code for comparison

Reimplemented from expression.

Reimplemented in exprLowerBound, and exprUpperBound.

Definition at line 156 of file exprVar.hpp.

References COU_EXPRVAR.

virtual bool exprVar::impliedBound ( int  ,
CouNumber ,
CouNumber ,
t_chg_bounds  
) [virtual]

implied bound processing

Reimplemented from expression.

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

rank of an original variable is always one

Reimplemented from expression.

Reimplemented in exprAux.

Definition at line 163 of file exprVar.hpp.

virtual void exprVar::fillDepSet ( std::set< DepNode *, compNode > *  ,
DepGraph  
) [virtual]

update dependence set with index of this variable

Reimplemented from expression.

virtual bool exprVar::isFixed (  )  [inline, virtual]

is this variable fixed?

Definition at line 170 of file exprVar.hpp.

References COUENNE_EPS, lb(), and ub().

virtual void exprVar::linkDomain ( Domain d  )  [inline, virtual]

link this variable to a domain

Reimplemented from expression.

Reimplemented in exprAux.

Definition at line 174 of file exprVar.hpp.

References domain_.

virtual Domain* exprVar::domain (  )  [inline, virtual]

return pointer to variable domain

Definition at line 178 of file exprVar.hpp.

References domain_.

virtual void exprVar::decreaseMult (  )  [inline, virtual]

Reimplemented in exprAux.

Definition at line 182 of file exprVar.hpp.

virtual void exprVar::zeroMult (  )  [inline, virtual]

Disable variable (empty for compatibility with exprAux).

Reimplemented in exprAux.

Definition at line 185 of file exprVar.hpp.

virtual void exprVar::setInteger ( bool  value  )  [inline, virtual]

Set this variable as integer (empty for compatibility with exprAux).

Reimplemented in exprAux.

Definition at line 188 of file exprVar.hpp.

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

either CONVEX, CONCAVE, AFFINE, or NONCONVEX

Reimplemented from expression.

Definition at line 191 of file exprVar.hpp.

References AFFINE.

virtual CouenneObject* exprVar::properObject ( CouenneCutGenerator c,
CouenneProblem p,
Bonmin::BabSetupBase *  base,
JnlstPtr  jnlst_ 
) [virtual]

return proper object to handle expression associated with this variable (NULL if this is not an auxiliary)

Reimplemented in exprAux.


Member Data Documentation

int exprVar::varIndex_ [protected]

The index of the variable.

Definition at line 39 of file exprVar.hpp.

Referenced by DepList(), differentiate(), Index(), isInteger(), lb(), operator()(), exprUpperBound::operator()(), exprLowerBound::operator()(), exprAux::operator()(), print(), exprIVar::print(), exprUpperBound::print(), exprLowerBound::print(), and ub().

Domain* exprVar::domain_ [protected]

Pointer to a descriptor of the current point/bounds.

Definition at line 40 of file exprVar.hpp.

Referenced by domain(), isInteger(), lb(), linkDomain(), exprAux::linkDomain(), operator()(), exprUpperBound::operator()(), exprLowerBound::operator()(), exprAux::operator()(), and ub().


The documentation for this class was generated from the following file:
Generated on Sun Feb 14 03:05:15 2010 for Couenne by  doxygen 1.4.7