Generated on for Gecode by doxygen 1.17.0
Gecode::LinIntExpr Class Reference

Linear expressions over integer variables. More...

#include <gecode/minimodel.hh>

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

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

Detailed Description

Linear expressions over integer variables.

Definition at line 257 of file minimodel.hh.

Member Enumeration Documentation

◆ NodeType

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 268 of file minimodel.hh.

Constructor & Destructor Documentation

◆ LinIntExpr() [1/13]

Gecode::LinIntExpr::LinIntExpr ( void )

Default constructor.

◆ LinIntExpr() [2/13]

Gecode::LinIntExpr::LinIntExpr ( int c)

Create expression for constant c.

◆ LinIntExpr() [3/13]

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

Create expression.

◆ LinIntExpr() [4/13]

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

Create expression.

◆ LinIntExpr() [5/13]

Gecode::LinIntExpr::LinIntExpr ( const IntVarArgs & x)
explicit

Create sum expression.

◆ LinIntExpr() [6/13]

Gecode::LinIntExpr::LinIntExpr ( const IntArgs & a,
const IntVarArgs & x )

Create sum expression.

◆ LinIntExpr() [7/13]

Gecode::LinIntExpr::LinIntExpr ( const BoolVarArgs & x)
explicit

Create sum expression.

◆ LinIntExpr() [8/13]

Gecode::LinIntExpr::LinIntExpr ( const IntArgs & a,
const BoolVarArgs & x )

Create sum expression.

◆ LinIntExpr() [9/13]

Gecode::LinIntExpr::LinIntExpr ( const LinIntExpr & e)

Copy constructor.

◆ LinIntExpr() [10/13]

Gecode::LinIntExpr::LinIntExpr ( const LinIntExpr & e0,
NodeType t,
const LinIntExpr & e1 )

Create expression for type and subexpressions.

◆ LinIntExpr() [11/13]

Gecode::LinIntExpr::LinIntExpr ( const LinIntExpr & e0,
NodeType t,
int c )

Create expression for type and subexpression.

◆ LinIntExpr() [12/13]

Gecode::LinIntExpr::LinIntExpr ( int a,
const LinIntExpr & e )

Create expression for multiplication.

◆ LinIntExpr() [13/13]

Gecode::LinIntExpr::LinIntExpr ( NonLinIntExpr * e)
explicit

Create non-linear expression.

◆ ~LinIntExpr()

Gecode::LinIntExpr::~LinIntExpr ( void )

Destructor.

Member Function Documentation

◆ operator=()

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

Assignment operator.

◆ post() [1/3]

void Gecode::LinIntExpr::post ( Home home,
IntRelType irt,
const IntPropLevels & ipls ) const

Post propagator.

◆ post() [2/3]

void Gecode::LinIntExpr::post ( Home home,
IntRelType irt,
const BoolVar & b,
const IntPropLevels & ipls ) const

Post reified propagator.

◆ post() [3/3]

IntVar Gecode::LinIntExpr::post ( Home home,
const IntPropLevels & ipls ) const

Post propagator and return variable for value.

◆ nle()

NonLinIntExpr * Gecode::LinIntExpr::nle ( void ) const

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


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