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