11 #ifndef COUENNE_EXPRUNARY_HPP
12 #define COUENNE_EXPRUNARY_HPP
72 virtual void print (std::ostream &out = std::cout,
bool =
false)
const;
84 {
return (
F ()) ((*argument_) ());}
virtual void print(std::ostream &out=std::cout, bool=false) const
print this expression to iostream
virtual enum expr_type code()
type of operator
pos
position where the operator should be printed when printing the expression
virtual bool isInteger()
is this expression integer?
expression * simplify()
simplification
virtual int compare(exprUnary &)
compare two unary functions
exprUnary(expression *argument)
Constructor.
virtual exprAux * standardize(CouenneProblem *, bool addAux=true)
reduce expression in standard form, creating additional aux variables (and constraints) ...
expression * argument_
single argument taken by this expression
virtual unary_function F()
the operator itself (e.g. sin, log...)
virtual int Linearity()
get a measure of "how linear" the expression is (see CouenneTypes.h) for general univariate functions...
virtual void realign(const CouenneProblem *p)
empty function to redirect variables to proper variable vector
expression class for unary functions (sin, log, etc.)
virtual void fillDepSet(std::set< DepNode *, compNode > *dep, DepGraph *g)
fill in dependence structure
virtual CouNumber operator()()
compute value of unary operator
virtual ~exprUnary()
Destructor.
virtual void replace(exprVar *, exprVar *)
replace variable with other
CouNumber(* unary_function)(CouNumber)
unary function, used in all exprUnary
virtual enum pos printPos() const
print position (PRE, INSIDE, POST)
Class for MINLP problems with symbolic information.
virtual std::string printOp() const
print operator
virtual expression * Argument() const
return argument
double CouNumber
main number type in Couenne
virtual expression ** ArgPtr()
return pointer to argument
nodeType
type of a node in an expression tree
dig_type
type of digging when filling the dependence list
expr_type
code returned by the method expression::code()
void fint fint fint real fint real real real real real real * g
CouNumber zero_fun(CouNumber x)
zero function (used by default by exprUnary)
virtual enum nodeType Type() const
node type
int nArgs() const
return number of arguments
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 int rank()
used in rank-based branching variable choice
void fint fint fint real fint real * x