public final class AffineExpression extends java.lang.Object implements LinearExpr
| Constructor and Description |
|---|
AffineExpression(int varIndex,
double coefficient,
double offset) |
| Modifier and Type | Method and Description |
|---|---|
LinearExpr |
build()
Builds a linear expression.
|
double |
getCoefficient(int index)
Returns the ith coefficient.
|
double |
getOffset()
Returns the constant part of the expression.
|
int |
getVariableIndex(int index)
Returns the index of the ith variable.
|
int |
numElements()
Returns the number of terms (excluding the constant one) in this expression.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaffine, constant, newBuilder, sum, term, weightedSumpublic AffineExpression(int varIndex,
double coefficient,
double offset)
public LinearExpr build()
LinearArgumentbuild in interface LinearArgumentpublic int numElements()
LinearExprnumElements in interface LinearExprpublic int getVariableIndex(int index)
LinearExprgetVariableIndex in interface LinearExprpublic double getCoefficient(int index)
LinearExprgetCoefficient in interface LinearExprpublic double getOffset()
LinearExprgetOffset in interface LinearExprCopyright © 2024. All rights reserved.