22 using namespace Couenne;
34 if (*alist)
delete (*alist);
49 {out <<
"("; fflush (stdout);}
50 for (
int i=0; i<
nargs_; i++) {
76 if (c0 < c1)
return -1;
77 if (c0 > c1)
return 1;
84 for (
register int i =
nargs_; i--;) {
95 *ne1 = dynamic_cast <exprGroup *> (&e1);
106 *ne1 = dynamic_cast <exprQuad *> (&e1);
124 int r = (*al) ->
rank ();
125 if (r > maxrank) maxrank =
r;
146 for (
int i = 0; i <
nargs_; ++i)
149 if ((subst ->
Type () ==
VAR) ||
162 int index = x ->
Index ();
164 for (
register int i =
nargs_; i--; al++)
166 switch ((*al) ->
Type ()) {
170 if ((*al) ->
Index () == index) {
190 for (
int i =
nargs_; i--;)
216 for (
int i =
nargs_; i--;) {
237 for (
int i=0; i<
nargs_; i++)
246 for (
int i=0; i<
nargs_; i++) {
302 register int i=0,
j=0;
304 bool one_fun =
false;
323 if ((fabs (c - null_element) >
COUENNE_EPS) || !one_fun)
virtual ~exprOp()
Destructor.
virtual void print(std::ostream &out=std::cout, bool=false) const
I/O.
class Group, with constant, linear and nonlinear terms:
int shrink_arglist(CouNumber, CouNumber)
compress argument list
virtual bool isInteger()
is this expression integer?
virtual exprAux * standardize(CouenneProblem *, bool addAux=true)
generate auxiliary variable
virtual enum pos printPos() const
print position (PRE, INSIDE, POST)
virtual void realign(const CouenneProblem *p)
empty function to redirect variables to proper variable vector
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
virtual enum nodeType Type() const
Node type.
virtual int Index() const
Return index of variable (only valid for exprVar and exprAux)
Class for MINLP problems with symbolic information.
expression clone (points to another expression)
void fint fint fint real fint real real real real real real real * r
virtual enum expr_type code()
return code to classify type of expression
virtual expression * simplify()
simplification
expression ** ArgList() const
return argument list
expression ** arglist_
argument list is an array of pointers to other expressions
double CouNumber
main number type in Couenne
int nargs_
number of arguments (cardinality of arglist)
general n-ary operator-type expression: requires argument list.
virtual void getBounds(expression *&, expression *&)
Get lower and upper bound of an expression (if any)
class exprQuad, with constant, linear and quadratic terms
dig_type
type of digging when filling the dependence list
virtual std::string printOp() const
print operator
virtual void replace(exprVar *, exprVar *)
replace variable with other
void fint fint fint real fint real real real real real real real real * w
virtual int compare(exprOp &)
compare with other generic exprOp
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