Package com.google.ortools.sat
Class DoubleLinearExpr
java.lang.Object
com.google.ortools.sat.DoubleLinearExpr
A linear expression interface that can be parsed.
-
Constructor Summary
ConstructorsConstructorDescriptionDoubleLinearExpr(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
Modifier and TypeMethodDescriptiondoublegetCoefficient(int index) Returns the ith coefficient.doubleReturns the constant part of the expression.intgetVariableIndex(int index) Returns the ith variable.intReturns the number of elements in the interface.
-
Constructor Details
-
DoubleLinearExpr
-
DoubleLinearExpr
-
DoubleLinearExpr
-
DoubleLinearExpr
-
DoubleLinearExpr
-
DoubleLinearExpr
-
-
Method Details
-
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.
-