11 #ifndef COUENNE_EXPRGROUP_H
12 #define COUENNE_EXPRGROUP_H
29 typedef std::vector <std::pair <exprVar *, CouNumber> >
lincoeff;
66 virtual void print (std::ostream & = std::cout,
77 virtual int DepList (std::set <int> &deplist,
132 for (lincoeff::iterator el =
lcoeff_.begin (); el !=
lcoeff_.end (); ++el)
133 ret += el -> second * (*(el -> first)) ();
Cut Generator for linear convexifications.
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 ~exprGroup()
Destructor – needed to clear bounds.
virtual void fillDepSet(std::set< DepNode *, compNode > *, DepGraph *)
update dependence set with index of this variable
virtual int Linearity()
get a measure of "how linear" the expression is:
class Group, with constant, linear and nonlinear terms:
virtual CouNumber gradientNorm(const double *x)
return l-2 norm of gradient at given point
virtual CouNumber operator()()
Function for the evaluation of the expression.
virtual bool isInteger()
is this expression integer?
CouNumber getc0()
return constant term
status of lower/upper bound of a variable, to be checked/modified in bound tightening ...
virtual void print(std::ostream &=std::cout, bool=false) const
Print expression to iostream.
virtual CouNumber operator()()
function for the evaluation of the expression
virtual void replace(exprVar *x, exprVar *w)
replace variable x with new (aux) w
lincoeff & lcoeff() const
return linear term coefficients
CouNumber c0_
constant term
virtual expression * simplify()
simplification
virtual int rank()
used in rank-based branching variable choice
static expression * genExprGroup(CouNumber, lincoeff &, expression **=NULL, int=0)
Generalized (static) constructor: check parameters and return a constant, a single variable...
exprGroup(CouNumber, lincoeff &, expression **=NULL, int=0)
Constructor.
virtual enum expr_type code()
code for comparisons
virtual expression * clone(Domain *d=NULL) const
Cloning method.
virtual void generateCuts(expression *, OsiCuts &, const CouenneCutGenerator *, t_chg_bounds *=NULL, int=-1, CouNumber=-COUENNE_INFINITY, CouNumber=COUENNE_INFINITY)
special version for linear constraints
lincoeff lcoeff_
coefficients and indices of the linear term
virtual void getBounds(expression *&, expression *&)
Get lower and upper bound of an expression (if any)
Class for MINLP problems with symbolic information.
std::vector< std::pair< exprVar *, CouNumber > > lincoeff
double CouNumber
main number type in Couenne
virtual int compare(exprGroup &)
only compare with people of the same kind
dig_type
type of digging when filling the dependence list
expr_type
code returned by the method expression::code()
virtual expression * differentiate(int index)
differentiation
void fint fint fint real fint real real real real real real real real * w
virtual void realign(const CouenneProblem *p)
redirect variables to proper variable vector
Define a dynamic point+bounds, with a way to save and restore previous points+bounds through a LIFO s...
void fint fint fint real fint real * x