Generated on Mon Aug 25 15:13:24 2008 for Gecode/J by doxygen 1.5.4

org.gecode.Expr Class Reference
[Direct modelling]

List of all members.


Detailed Description

This class is used to construct linear expressions from IntVar's and BExpr's, possibly with constant factors in front, as well as constants.

Two expressions, Expr e1, e2 can be related using methods such as Gecode.post(JavaSpace, Expr, IntRelType, Expr).

Definition at line 51 of file Expr.java.


Public Member Functions

 Expr ()
 Construct an empty expression.
 Expr (Expr e)
 Construct a copy of expression e.
 Expr (int c, IntVar v)
 Construct an expression representing c*v.
 Expr (IntVar v)
 Construct an expression representing 1*v.
 Expr (int d)
 Construct an expression representing d.
 Expr (int c, BExpr b)
 Construct an expression representing c*b.
 Expr (BExpr b)
 Construct an expression representing 1*b.
Expr plus (int c, IntVar v)
 Add the term +c*v to this, and return this.
Expr minus (int c, IntVar v)
 Add the term -c*v to this, and return this.
Expr plus (int c)
 Add the term +c to this, and return this.
Expr minus (int c)
 Add the term -c to this, and return this.
Expr plus (Expr e)
 Add the expression e to this, and return this.
Expr minus (Expr e)
 Add the expression -e to this, and return this.
Expr plus (int c, BoolVar b)
 Add the term +c*b to this, and return this.
Expr minus (int c, BoolVar b)
 Add the term -c*b to this, and return this.
Expr plus (int c, BExpr b)
 Add the term +c*b to this, and return this.
Expr minus (int c, BExpr b)
 Add the term -c*b to this, and return this.
Expr plus (IntVar v)
 Add the term +1*v to this, and return this.
Expr minus (IntVar v)
 Add the term -1*v to this, and return this.
Expr plus (BoolVar b)
 Add the term +1*b to this, and return this.
Expr minus (BoolVar b)
 Add the term -1*b to this, and return this.
Expr plus (BExpr b)
 Add the term +1*b to this, and return this.
Expr minus (BExpr b)
 Add the term -1*b to this, and return this.
Expr p (int c, IntVar v)
 Add the term +c*v to this, and return this.
Expr m (int c, IntVar v)
 Add the term -c*v to this, and return this.
Expr p (IntVar v)
 Add the term +1*v to this, and return this.
Expr m (IntVar v)
 Add the term -1*v to this, and return this.
Expr p (int c)
 Add the term +c to this, and return this.
Expr m (int c)
 Add the term -c to this, and return this.
Expr p (Expr e)
 Add the expression e to this, and return this.
Expr m (Expr e)
 Add the expression -e to this, and return this.
Expr p (int c, BoolVar b)
 Add the term +c*b to this, and return this.
Expr m (int c, BoolVar b)
 Add the term -c*b to this, and return this.
Expr p (BoolVar b)
 Add the term +1*b to this, and return this.
Expr m (BoolVar b)
 Add the term -1*b to this, and return this.
Expr p (int c, BExpr b)
 Add the term +c*b to this, and return this.
Expr m (int c, BExpr b)
 Add the term -c*b to this, and return this.
Expr p (BExpr b)
 Add the term +1*b to this, and return this.
Expr m (BExpr b)
 Add the term -1*b to this, and return this.
String toString ()

Package Functions

void clear_bexpr (JavaSpace home)

Package Attributes

int d
ArrayList< Integer > cs
ArrayList< IntVarvs
ArrayList< Integer > cbs
ArrayList< BExprvbs

Constructor & Destructor Documentation

org.gecode.Expr.Expr (  ) 

Construct an empty expression.

Definition at line 60 of file Expr.java.

org.gecode.Expr.Expr ( Expr  e  ) 

Construct a copy of expression e.

Definition at line 70 of file Expr.java.

org.gecode.Expr.Expr ( int  c,
IntVar  v 
)

Construct an expression representing c*v.

Definition at line 80 of file Expr.java.

org.gecode.Expr.Expr ( IntVar  v  ) 

Construct an expression representing 1*v.

Definition at line 90 of file Expr.java.

org.gecode.Expr.Expr ( int  d  ) 

Construct an expression representing d.

Definition at line 100 of file Expr.java.

org.gecode.Expr.Expr ( int  c,
BExpr  b 
)

Construct an expression representing c*b.

Definition at line 110 of file Expr.java.

org.gecode.Expr.Expr ( BExpr  b  ) 

Construct an expression representing 1*b.

Definition at line 120 of file Expr.java.


Member Function Documentation

Expr org.gecode.Expr.plus ( int  c,
IntVar  v 
)

Add the term +c*v to this, and return this.

Definition at line 130 of file Expr.java.

Expr org.gecode.Expr.minus ( int  c,
IntVar  v 
)

Add the term -c*v to this, and return this.

Definition at line 138 of file Expr.java.

Expr org.gecode.Expr.plus ( int  c  ) 

Add the term +c to this, and return this.

Definition at line 146 of file Expr.java.

Expr org.gecode.Expr.minus ( int  c  ) 

Add the term -c to this, and return this.

Definition at line 153 of file Expr.java.

Expr org.gecode.Expr.plus ( Expr  e  ) 

Add the expression e to this, and return this.

Definition at line 160 of file Expr.java.

Expr org.gecode.Expr.minus ( Expr  e  ) 

Add the expression -e to this, and return this.

Definition at line 171 of file Expr.java.

Expr org.gecode.Expr.plus ( int  c,
BoolVar  b 
)

Add the term +c*b to this, and return this.

Definition at line 184 of file Expr.java.

Expr org.gecode.Expr.minus ( int  c,
BoolVar  b 
)

Add the term -c*b to this, and return this.

Definition at line 192 of file Expr.java.

Expr org.gecode.Expr.plus ( int  c,
BExpr  b 
)

Add the term +c*b to this, and return this.

Definition at line 200 of file Expr.java.

Expr org.gecode.Expr.minus ( int  c,
BExpr  b 
)

Add the term -c*b to this, and return this.

Definition at line 208 of file Expr.java.

Expr org.gecode.Expr.plus ( IntVar  v  ) 

Add the term +1*v to this, and return this.

Definition at line 220 of file Expr.java.

Expr org.gecode.Expr.minus ( IntVar  v  ) 

Add the term -1*v to this, and return this.

Definition at line 226 of file Expr.java.

Expr org.gecode.Expr.plus ( BoolVar  b  ) 

Add the term +1*b to this, and return this.

Definition at line 232 of file Expr.java.

Expr org.gecode.Expr.minus ( BoolVar  b  ) 

Add the term -1*b to this, and return this.

Definition at line 238 of file Expr.java.

Expr org.gecode.Expr.plus ( BExpr  b  ) 

Add the term +1*b to this, and return this.

Definition at line 245 of file Expr.java.

Expr org.gecode.Expr.minus ( BExpr  b  ) 

Add the term -1*b to this, and return this.

Definition at line 251 of file Expr.java.

Expr org.gecode.Expr.p ( int  c,
IntVar  v 
)

Add the term +c*v to this, and return this.

Definition at line 258 of file Expr.java.

Expr org.gecode.Expr.m ( int  c,
IntVar  v 
)

Add the term -c*v to this, and return this.

Definition at line 264 of file Expr.java.

Expr org.gecode.Expr.p ( IntVar  v  ) 

Add the term +1*v to this, and return this.

Definition at line 270 of file Expr.java.

Expr org.gecode.Expr.m ( IntVar  v  ) 

Add the term -1*v to this, and return this.

Definition at line 276 of file Expr.java.

Expr org.gecode.Expr.p ( int  c  ) 

Add the term +c to this, and return this.

Definition at line 282 of file Expr.java.

Expr org.gecode.Expr.m ( int  c  ) 

Add the term -c to this, and return this.

Definition at line 288 of file Expr.java.

Expr org.gecode.Expr.p ( Expr  e  ) 

Add the expression e to this, and return this.

Definition at line 294 of file Expr.java.

Expr org.gecode.Expr.m ( Expr  e  ) 

Add the expression -e to this, and return this.

Definition at line 300 of file Expr.java.

Expr org.gecode.Expr.p ( int  c,
BoolVar  b 
)

Add the term +c*b to this, and return this.

Definition at line 307 of file Expr.java.

Expr org.gecode.Expr.m ( int  c,
BoolVar  b 
)

Add the term -c*b to this, and return this.

Definition at line 313 of file Expr.java.

Expr org.gecode.Expr.p ( BoolVar  b  ) 

Add the term +1*b to this, and return this.

Definition at line 319 of file Expr.java.

Expr org.gecode.Expr.m ( BoolVar  b  ) 

Add the term -1*b to this, and return this.

Definition at line 325 of file Expr.java.

Expr org.gecode.Expr.p ( int  c,
BExpr  b 
)

Add the term +c*b to this, and return this.

Definition at line 331 of file Expr.java.

Expr org.gecode.Expr.m ( int  c,
BExpr  b 
)

Add the term -c*b to this, and return this.

Definition at line 337 of file Expr.java.

Expr org.gecode.Expr.p ( BExpr  b  ) 

Add the term +1*b to this, and return this.

Definition at line 343 of file Expr.java.

Expr org.gecode.Expr.m ( BExpr  b  ) 

Add the term -1*b to this, and return this.

Definition at line 349 of file Expr.java.

String org.gecode.Expr.toString (  ) 

Definition at line 356 of file Expr.java.

void org.gecode.Expr.clear_bexpr ( JavaSpace  home  )  [package]

Definition at line 374 of file Expr.java.


Member Data Documentation

int org.gecode.Expr.d [package]

Definition at line 52 of file Expr.java.

ArrayList<Integer> org.gecode.Expr.cs [package]

Definition at line 53 of file Expr.java.

ArrayList<IntVar> org.gecode.Expr.vs [package]

Definition at line 54 of file Expr.java.

ArrayList<Integer> org.gecode.Expr.cbs [package]

Definition at line 55 of file Expr.java.

ArrayList<BExpr> org.gecode.Expr.vbs [package]

Definition at line 56 of file Expr.java.


The documentation for this class was generated from the following file: