Package com.google.ortools.sat
Class DoubleLinearExpr
- java.lang.Object
-
- com.google.ortools.sat.DoubleLinearExpr
-
public class DoubleLinearExpr extends java.lang.ObjectA linear expression interface that can be parsed.
-
-
Constructor Summary
Constructors Constructor Description DoubleLinearExpr(IntVar[] vars, double offset)DoubleLinearExpr(IntVar[] variables, double[] coefficients, double offset)DoubleLinearExpr(IntVar var, double coefficient, double offset)DoubleLinearExpr(Literal[] literals, double offset)DoubleLinearExpr(Literal[] literals, double[] coefficients, double offset)DoubleLinearExpr(Literal lit, double coefficient, double offset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetCoefficient(int index)Returns the ith coefficient.doublegetOffset()Returns the constant part of the expression.intgetVariableIndex(int index)Returns the ith variable.intnumElements()Returns the number of elements in the interface.
-
-
-
Constructor Detail
-
DoubleLinearExpr
public DoubleLinearExpr(IntVar[] variables, double[] coefficients, double offset)
-
DoubleLinearExpr
public DoubleLinearExpr(Literal[] literals, double[] coefficients, double offset)
-
DoubleLinearExpr
public DoubleLinearExpr(IntVar var, double coefficient, double offset)
-
DoubleLinearExpr
public DoubleLinearExpr(Literal lit, double coefficient, double offset)
-
DoubleLinearExpr
public DoubleLinearExpr(IntVar[] vars, double offset)
-
DoubleLinearExpr
public DoubleLinearExpr(Literal[] literals, double offset)
-
-
Method Detail
-
numElements
public int numElements()
Returns the number of elements in the interface.
-
getVariableIndex
public int getVariableIndex(int index)
Returns the ith variable.
-
getCoefficient
public double getCoefficient(int index)
Returns the ith coefficient.
-
getOffset
public double getOffset()
Returns the constant part of the expression.
-
-