Package com.google.ortools.sat
Class ScalProd
java.lang.Object
com.google.ortools.sat.ScalProd
- All Implemented Interfaces:
LinearExpr
public final class ScalProd extends java.lang.Object implements LinearExpr
A linear expression interface that can be parsed.
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description longgetCoefficient(int index)Returns the ith coefficient.longgetOffset()Returns the constant part of the expression.IntVargetVariable(int index)Returns the ith variable.intnumElements()Returns the number of elements in the interface.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ScalProd
-
ScalProd
-
ScalProd
-
-
Method Details
-
numElements
public int numElements()Description copied from interface:LinearExprReturns the number of elements in the interface.- Specified by:
numElementsin interfaceLinearExpr
-
getVariable
Description copied from interface:LinearExprReturns the ith variable.- Specified by:
getVariablein interfaceLinearExpr
-
getCoefficient
public long getCoefficient(int index)Description copied from interface:LinearExprReturns the ith coefficient.- Specified by:
getCoefficientin interfaceLinearExpr
-
getOffset
public long getOffset()Description copied from interface:LinearExprReturns the constant part of the expression.- Specified by:
getOffsetin interfaceLinearExpr
-