Generated on Thu Mar 22 10:39:53 2012 for Gecode by doxygen 1.6.3

Gecode::LinExpr Class Reference

Linear expressions. More...

#include <minimodel.hh>

List of all members.

Public Types

enum  NodeType {
  NT_CONST, NT_VAR_INT, NT_VAR_BOOL, NT_NONLIN,
  NT_SUM_INT, NT_SUM_BOOL, NT_ADD, NT_SUB,
  NT_MUL
}
 

Type of linear expression.

More...

Public Member Functions

 LinExpr (void)
 Default constructor.
 LinExpr (int c)
 Create expression for constant c.
 LinExpr (const IntVar &x, int a=1)
 Create expression.
 LinExpr (const BoolVar &x, int a=1)
 Create expression.
 LinExpr (const IntVarArgs &x)
 Create sum expression.
 LinExpr (const IntArgs &a, const IntVarArgs &x)
 Create sum expression.
 LinExpr (const BoolVarArgs &x)
 Create sum expression.
 LinExpr (const IntArgs &a, const BoolVarArgs &x)
 Create sum expression.
 LinExpr (const LinExpr &e)
 Copy constructor.
 LinExpr (const LinExpr &e0, NodeType t, const LinExpr &e1)
 Create expression for type and subexpressions.
 LinExpr (const LinExpr &e0, NodeType t, int c)
 Create expression for type and subexpression.
 LinExpr (int a, const LinExpr &e)
 Create expression for multiplication.
 LinExpr (NonLinExpr *e)
 Create non-linear expression.
const LinExproperator= (const LinExpr &e)
 Assignment operator.
void post (Home home, IntRelType irt, IntConLevel icl) const
 Post propagator.
void post (Home home, IntRelType irt, const BoolVar &b, IntConLevel icl) const
 Post reified propagator.
IntVar post (Home home, IntConLevel icl) const
 Post propagator and return variable for value.
NonLinExprnle (void) const
 Return non-linear expression inside, or NULL if not non-linear.
 ~LinExpr (void)
 Destructor.

Detailed Description

Linear expressions.

Definition at line 131 of file minimodel.hh.


Member Enumeration Documentation

Type of linear expression.

Enumerator:
NT_CONST 

Integer constant.

NT_VAR_INT 

Linear term with integer variable.

NT_VAR_BOOL 

Linear term with Boolean variable.

NT_NONLIN 

Non-linear expression.

NT_SUM_INT 

Sum of integer variables.

NT_SUM_BOOL 

Sum of Boolean variables.

NT_ADD 

Addition of linear terms.

NT_SUB 

Subtraction of linear terms.

NT_MUL 

Multiplication by coefficient.

Definition at line 138 of file minimodel.hh.


Constructor & Destructor Documentation

Gecode::LinExpr::LinExpr ( void   ) 

Default constructor.

Definition at line 58 of file lin-expr.cpp.

Gecode::LinExpr::LinExpr ( int  c  ) 

Create expression for constant c.

Definition at line 66 of file lin-expr.cpp.

Gecode::LinExpr::LinExpr ( const IntVar x,
int  a = 1 
)

Create expression.

Definition at line 76 of file lin-expr.cpp.

Gecode::LinExpr::LinExpr ( const BoolVar x,
int  a = 1 
)

Create expression.

Definition at line 86 of file lin-expr.cpp.

Gecode::LinExpr::LinExpr ( const IntVarArgs x  )  [explicit]

Create sum expression.

Definition at line 96 of file lin-expr.cpp.

Gecode::LinExpr::LinExpr ( const IntArgs a,
const IntVarArgs x 
)

Create sum expression.

Definition at line 111 of file lin-expr.cpp.

Gecode::LinExpr::LinExpr ( const BoolVarArgs x  )  [explicit]

Create sum expression.

Definition at line 128 of file lin-expr.cpp.

Gecode::LinExpr::LinExpr ( const IntArgs a,
const BoolVarArgs x 
)

Create sum expression.

Definition at line 143 of file lin-expr.cpp.

Gecode::LinExpr::LinExpr ( const LinExpr e  )  [inline]

Copy constructor.

Definition at line 86 of file lin-expr.hpp.

Gecode::LinExpr::LinExpr ( const LinExpr e0,
NodeType  t,
const LinExpr e1 
)

Create expression for type and subexpressions.

Definition at line 160 of file lin-expr.cpp.

Gecode::LinExpr::LinExpr ( const LinExpr e0,
NodeType  t,
int  c 
)

Create expression for type and subexpression.

Definition at line 169 of file lin-expr.cpp.

Gecode::LinExpr::LinExpr ( int  a,
const LinExpr e 
)

Create expression for multiplication.

Definition at line 179 of file lin-expr.cpp.

Gecode::LinExpr::LinExpr ( NonLinExpr e  )  [explicit]

Create non-linear expression.

Definition at line 189 of file lin-expr.cpp.

Gecode::LinExpr::~LinExpr ( void   ) 

Destructor.

Definition at line 209 of file lin-expr.cpp.


Member Function Documentation

const LinExpr & Gecode::LinExpr::operator= ( const LinExpr e  ) 

Assignment operator.

Definition at line 200 of file lin-expr.cpp.

void Gecode::LinExpr::post ( Home  home,
IntRelType  irt,
IntConLevel  icl 
) const [inline]

Post propagator.

Definition at line 102 of file lin-expr.hpp.

void Gecode::LinExpr::post ( Home  home,
IntRelType  irt,
const BoolVar b,
IntConLevel  icl 
) const [inline]

Post reified propagator.

Definition at line 169 of file lin-expr.hpp.

IntVar Gecode::LinExpr::post ( Home  home,
IntConLevel  icl 
) const [inline]

Post propagator and return variable for value.

Definition at line 227 of file lin-expr.hpp.

NonLinExpr * Gecode::LinExpr::nle ( void   )  const [inline]

Return non-linear expression inside, or NULL if not non-linear.

Definition at line 291 of file lin-expr.hpp.


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