Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
Public Member Functions | |
WeightedSumExpression (int[] variablesIndices, long[] coefficients, long offset) | |
LinearExpr | build () |
int | numElements () |
int | getVariableIndex (int index) |
long | getCoefficient (int index) |
long | getOffset () |
WeightedSumExpression (int[] variablesIndices, long[] coefficients, long offset) | |
LinearExpr | build () |
int | numElements () |
int | getVariableIndex (int index) |
long | getCoefficient (int index) |
long | getOffset () |
Public Member Functions inherited from com.google.ortools.sat.LinearExpr | |
Public Member Functions inherited from com.google.ortools.sat.LinearArgument |
Additional Inherited Members | |
Static Public Member Functions inherited from com.google.ortools.sat.LinearExpr | |
static LinearExprBuilder | newBuilder () |
static LinearExpr | constant (long value) |
static LinearExpr | term (LinearArgument expr, long coeff) |
static LinearExpr | affine (LinearArgument expr, long coeff, long offset) |
static LinearExpr | sum (LinearArgument[] exprs) |
static LinearExpr | weightedSum (LinearArgument[] exprs, long[] coeffs) |
static LinearExpr | rebuildFromLinearExpressionProto (LinearExpressionProto proto) |
static LinearExprBuilder | newBuilder () |
static LinearExpr | constant (long value) |
static LinearExpr | term (LinearArgument expr, long coeff) |
static LinearExpr | affine (LinearArgument expr, long coeff, long offset) |
static LinearExpr | sum (LinearArgument[] exprs) |
static LinearExpr | weightedSum (LinearArgument[] exprs, long[] coeffs) |
static LinearExpr | rebuildFromLinearExpressionProto (LinearExpressionProto proto) |
A specialized linear expression: sum(ai * xi) + b.
Definition at line 17 of file WeightedSumExpression.java.
com.google.ortools.sat.WeightedSumExpression.WeightedSumExpression | ( | int[] | variablesIndices, |
long[] | coefficients, | ||
long | offset ) |
Definition at line 22 of file WeightedSumExpression.java.
com.google.ortools.sat.WeightedSumExpression.WeightedSumExpression | ( | int[] | variablesIndices, |
long[] | coefficients, | ||
long | offset ) |
Definition at line 22 of file WeightedSumExpression.java.
LinearExpr com.google.ortools.sat.WeightedSumExpression.build | ( | ) |
Builds a linear expression.
Implements com.google.ortools.sat.LinearArgument.
Definition at line 29 of file WeightedSumExpression.java.
LinearExpr com.google.ortools.sat.WeightedSumExpression.build | ( | ) |
Builds a linear expression.
Implements com.google.ortools.sat.LinearArgument.
Definition at line 29 of file WeightedSumExpression.java.
long com.google.ortools.sat.WeightedSumExpression.getCoefficient | ( | int | index | ) |
Returns the ith coefficient.
Implements com.google.ortools.sat.LinearExpr.
Definition at line 47 of file WeightedSumExpression.java.
long com.google.ortools.sat.WeightedSumExpression.getCoefficient | ( | int | index | ) |
Returns the ith coefficient.
Implements com.google.ortools.sat.LinearExpr.
Definition at line 47 of file WeightedSumExpression.java.
long com.google.ortools.sat.WeightedSumExpression.getOffset | ( | ) |
Returns the constant part of the expression.
Implements com.google.ortools.sat.LinearExpr.
Definition at line 55 of file WeightedSumExpression.java.
long com.google.ortools.sat.WeightedSumExpression.getOffset | ( | ) |
Returns the constant part of the expression.
Implements com.google.ortools.sat.LinearExpr.
Definition at line 55 of file WeightedSumExpression.java.
int com.google.ortools.sat.WeightedSumExpression.getVariableIndex | ( | int | index | ) |
Returns the index of the ith variable.
Implements com.google.ortools.sat.LinearExpr.
Definition at line 39 of file WeightedSumExpression.java.
int com.google.ortools.sat.WeightedSumExpression.getVariableIndex | ( | int | index | ) |
Returns the index of the ith variable.
Implements com.google.ortools.sat.LinearExpr.
Definition at line 39 of file WeightedSumExpression.java.
int com.google.ortools.sat.WeightedSumExpression.numElements | ( | ) |
Returns the number of terms (excluding the constant one) in this expression.
Implements com.google.ortools.sat.LinearExpr.
Definition at line 34 of file WeightedSumExpression.java.
int com.google.ortools.sat.WeightedSumExpression.numElements | ( | ) |
Returns the number of terms (excluding the constant one) in this expression.
Implements com.google.ortools.sat.LinearExpr.
Definition at line 34 of file WeightedSumExpression.java.