Java Reference

Java Reference

Detailed Description

A linear expression interface that can be parsed.

Definition at line 17 of file ScalProd.java.

Public Member Functions

 ScalProd (IntVar[] variables, long[] coefficients)
 
 ScalProd (Literal[] literals, long[] coefficients)
 
 ScalProd (Literal[] literals)
 
int numElements ()
 Returns the number of elements in the interface. More...
 
IntVar getVariable (int index)
 Returns the ith variable. More...
 
long getCoefficient (int index)
 Returns the ith coefficient. More...
 
long getOffset ()
 Returns the constant part of the expression. More...
 

Static Public Member Functions

static LinearExpr sum (IntVar[] variables)
 Creates a sum expression. More...
 
static LinearExpr booleanSum (Literal[] literals)
 Creates a sum expression. More...
 
static LinearExpr scalProd (IntVar[] variables, long[] coefficients)
 Creates a scalar product. More...
 
static LinearExpr scalProd (IntVar[] variables, int[] coefficients)
 Creates a scalar product. More...
 
static LinearExpr booleanScalProd (Literal[] literals, long[] coefficients)
 Creates a scalar product. More...
 
static LinearExpr booleanScalProd (Literal[] literals, int[] coefficients)
 Creates a scalar product. More...
 
static LinearExpr term (IntVar variable, long coefficient)
 Creates a linear term (var * coefficient). More...
 

Constructor & Destructor Documentation

◆ ScalProd() [1/3]

ScalProd ( IntVar[]  variables,
long[]  coefficients 
)

Definition at line 22 of file ScalProd.java.

◆ ScalProd() [2/3]

ScalProd ( Literal[]  literals,
long[]  coefficients 
)

Definition at line 28 of file ScalProd.java.

◆ ScalProd() [3/3]

ScalProd ( Literal[]  literals)

Definition at line 48 of file ScalProd.java.

Member Function Documentation

◆ booleanScalProd() [1/2]

static LinearExpr booleanScalProd ( Literal[]  literals,
int[]  coefficients 
)
staticinherited

Creates a scalar product.

Definition at line 70 of file LinearExpr.java.

◆ booleanScalProd() [2/2]

static LinearExpr booleanScalProd ( Literal[]  literals,
long[]  coefficients 
)
staticinherited

Creates a scalar product.

Definition at line 62 of file LinearExpr.java.

◆ booleanSum()

static LinearExpr booleanSum ( Literal[]  literals)
staticinherited

Creates a sum expression.

Definition at line 36 of file LinearExpr.java.

◆ getCoefficient()

long getCoefficient ( int  index)

Returns the ith coefficient.

Implements LinearExpr.

Definition at line 81 of file ScalProd.java.

◆ getOffset()

long getOffset ( )

Returns the constant part of the expression.

Implements LinearExpr.

Definition at line 89 of file ScalProd.java.

◆ getVariable()

IntVar getVariable ( int  index)

Returns the ith variable.

Implements LinearExpr.

Definition at line 73 of file ScalProd.java.

◆ numElements()

int numElements ( )

Returns the number of elements in the interface.

Implements LinearExpr.

Definition at line 68 of file ScalProd.java.

◆ scalProd() [1/2]

static LinearExpr scalProd ( IntVar[]  variables,
int[]  coefficients 
)
staticinherited

Creates a scalar product.

Definition at line 50 of file LinearExpr.java.

◆ scalProd() [2/2]

static LinearExpr scalProd ( IntVar[]  variables,
long[]  coefficients 
)
staticinherited

Creates a scalar product.

Definition at line 42 of file LinearExpr.java.

◆ sum()

static LinearExpr sum ( IntVar[]  variables)
staticinherited

Creates a sum expression.

Definition at line 31 of file LinearExpr.java.

◆ term()

static LinearExpr term ( IntVar  variable,
long  coefficient 
)
staticinherited

Creates a linear term (var * coefficient).

Definition at line 83 of file LinearExpr.java.


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