Java Reference
Java Reference
LinearExpr.java
Go to the documentation of this file.
Exception thrown when parallel arrays have mismatched lengths.
Definition: CpModel.java:50
A linear expression interface that can be parsed.
Definition: ScalProd.java:17
A linear expression interface that can be parsed.
Definition: SumOfVariables.java:17
A linear expression interface that can be parsed.
Definition: LinearExpr.java:17
static LinearExpr booleanSum(Literal[] literals)
Creates a sum expression.
Definition: LinearExpr.java:36
long getCoefficient(int index)
Returns the ith coefficient.
int numElements()
Returns the number of elements in the interface.
long getOffset()
Returns the constant part of the expression.
static LinearExpr booleanScalProd(Literal[] literals, int[] coefficients)
Creates a scalar product.
Definition: LinearExpr.java:70
static LinearExpr booleanScalProd(Literal[] literals, long[] coefficients)
Creates a scalar product.
Definition: LinearExpr.java:62
static LinearExpr term(IntVar variable, long coefficient)
Creates a linear term (var * coefficient).
Definition: LinearExpr.java:83
static LinearExpr scalProd(IntVar[] variables, int[] coefficients)
Creates a scalar product.
Definition: LinearExpr.java:50
static LinearExpr scalProd(IntVar[] variables, long[] coefficients)
Creates a scalar product.
Definition: LinearExpr.java:42
Interface to describe a boolean variable or its negation.
Definition: Literal.java:17