exprUnary Class Reference

expression class for unary functions (sin, log, etc. More...

#include <exprUnary.hpp>

Inheritance diagram for exprUnary:

Inheritance graph
[legend]
Collaboration diagram for exprUnary:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual enum nodeType Type () const
 node type
 exprUnary (expression *argument)
 Constructor.
virtual unary_function F ()
 the operator itself (e.g. sin, log...)
 ~exprUnary ()
 Destructor.
int nArgs () const
 return number of arguments
virtual expressionArgument () const
 return argument (when applicable, i.e., with univariate functions)
virtual expression ** ArgPtr ()
 return pointer to argument (when applicable, i.e., with univariate functions)
virtual void print (std::ostream &out=std::cout, bool=false) const
 print this expression to iostream
virtual enum pos printPos () const
 print position (PRE, INSIDE, POST)
virtual std::string printOp () const
 print operator
virtual CouNumber operator() ()
 compute value of unary operator
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
expressionsimplify ()
 simplification
virtual int Linearity ()
 get a measure of "how linear" the expression is (see CouenneTypes.h) for general univariate functions, return nonlinear.
virtual exprAuxstandardize (CouenneProblem *, bool addAux=true)
 reduce expression in standard form, creating additional aux variables (and constraints)
virtual enum expr_type code ()
 type of operator
virtual bool isInteger ()
 is this expression integer?
virtual int compare (exprUnary &)
 compare two unary functions
virtual int rank ()
 used in rank-based branching variable choice
virtual void fillDepSet (std::set< DepNode *, compNode > *dep, DepGraph *g)
 fill in dependence structure
virtual void replace (exprVar *, exprVar *)
 replace variable with other
virtual void realign (const CouenneProblem *p)
 empty function to redirect variables to proper variable vector

Protected Attributes

expressionargument_
 single argument taken by this expression

Detailed Description

expression class for unary functions (sin, log, etc.

)

univariate operator-type expression: requires single argument. All unary functions are derived from this base class, which has a lot of common methods that need not be re-implemented by any univariate class.

Definition at line 32 of file exprUnary.hpp.


Constructor & Destructor Documentation

exprUnary::exprUnary ( expression argument  )  [inline]

Constructor.

Definition at line 46 of file exprUnary.hpp.

exprUnary::~exprUnary (  )  [inline]

Destructor.

Definition at line 55 of file exprUnary.hpp.

References argument_.


Member Function Documentation

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

node type

Reimplemented from expression.

Definition at line 42 of file exprUnary.hpp.

References UNARY.

Referenced by exprInv::Linearity().

virtual unary_function exprUnary::F (  )  [inline, virtual]

the operator itself (e.g. sin, log...)

Reimplemented in exprAbs, exprCos, exprExp, exprInv, exprLog, exprOpp, and exprSin.

Definition at line 51 of file exprUnary.hpp.

References zero_fun().

Referenced by operator()().

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

return number of arguments

Reimplemented from expression.

Definition at line 59 of file exprUnary.hpp.

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

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

Reimplemented from expression.

Definition at line 63 of file exprUnary.hpp.

References argument_.

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

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

Reimplemented from expression.

Definition at line 67 of file exprUnary.hpp.

References argument_.

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

print this expression to iostream

Reimplemented from expression.

Reimplemented in exprInv, and exprOpp.

virtual enum pos exprUnary::printPos (  )  const [inline, virtual]

print position (PRE, INSIDE, POST)

Definition at line 74 of file exprUnary.hpp.

References PRE.

virtual std::string exprUnary::printOp (  )  const [inline, virtual]

print operator

Reimplemented in exprAbs, exprCos, exprExp, exprLog, and exprSin.

Definition at line 78 of file exprUnary.hpp.

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

compute value of unary operator

Implements expression.

Definition at line 82 of file exprUnary.hpp.

References F().

virtual int exprUnary::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 87 of file exprUnary.hpp.

References argument_.

expression* exprUnary::simplify (  )  [virtual]

simplification

Reimplemented from expression.

Reimplemented in exprOpp.

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

get a measure of "how linear" the expression is (see CouenneTypes.h) for general univariate functions, return nonlinear.

Reimplemented from expression.

Reimplemented in exprInv, and exprOpp.

Definition at line 95 of file exprUnary.hpp.

References NONLINEAR.

virtual exprAux* exprUnary::standardize ( CouenneProblem ,
bool  addAux = true 
) [virtual]

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

Reimplemented from expression.

Reimplemented in exprOpp.

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

type of operator

Reimplemented from expression.

Reimplemented in exprAbs, exprCos, exprExp, exprInv, exprLog, exprOpp, and exprSin.

Definition at line 103 of file exprUnary.hpp.

References COU_EXPRUNARY.

virtual bool exprUnary::isInteger (  )  [virtual]

is this expression integer?

Reimplemented from expression.

Reimplemented in exprAbs, and exprOpp.

Referenced by exprSin::impliedBound(), and exprCos::impliedBound().

virtual int exprUnary::compare ( exprUnary  )  [virtual]

compare two unary functions

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

used in rank-based branching variable choice

Reimplemented from expression.

Definition at line 113 of file exprUnary.hpp.

References argument_.

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

fill in dependence structure

Reimplemented from expression.

Definition at line 117 of file exprUnary.hpp.

References argument_.

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

replace variable with other

Reimplemented from expression.

virtual void exprUnary::realign ( const CouenneProblem p  )  [inline, virtual]

empty function to redirect variables to proper variable vector

Reimplemented from expression.

Definition at line 124 of file exprUnary.hpp.

References argument_.


Member Data Documentation

expression* exprUnary::argument_ [protected]

single argument taken by this expression

Definition at line 37 of file exprUnary.hpp.

Referenced by ArgPtr(), Argument(), exprSin::clone(), exprOpp::clone(), exprLog::clone(), exprInv::clone(), exprExp::clone(), exprCos::clone(), exprAbs::clone(), DepList(), fillDepSet(), exprSin::gradientNorm(), exprOpp::gradientNorm(), exprExp::gradientNorm(), exprCos::gradientNorm(), exprAbs::gradientNorm(), exprSin::impliedBound(), exprCos::impliedBound(), exprOpp::isInteger(), exprAbs::isInteger(), exprOpp::Linearity(), exprInv::Linearity(), rank(), realign(), and ~exprUnary().


The documentation for this class was generated from the following file:
Generated on Wed Oct 7 03:12:10 2009 for Couenne by  doxygen 1.4.7