Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
Public Member Functions | |
int | numElements () |
int | getVariableIndex (int index) |
long | getCoefficient (int index) |
long | getOffset () |
int | numElements () |
int | getVariableIndex (int index) |
long | getCoefficient (int index) |
long | getOffset () |
Public Member Functions inherited from com.google.ortools.sat.LinearArgument | |
LinearExpr | build () |
LinearExpr | build () |
Static Public Member Functions | |
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 linear expression (sum (ai * xi) + b). It specifies methods to help parsing the expression.
Definition at line 19 of file LinearExpr.java.
|
static |
Shortcut for newBuilder().addTerm(expr, coeff).add(offset).build()
Definition at line 48 of file LinearExpr.java.
|
static |
Shortcut for newBuilder().addTerm(expr, coeff).add(offset).build()
Definition at line 48 of file LinearExpr.java.
|
static |
Shortcut for newBuilder().add(value).build()
Definition at line 38 of file LinearExpr.java.
|
static |
Shortcut for newBuilder().add(value).build()
Definition at line 38 of file LinearExpr.java.
long com.google.ortools.sat.LinearExpr.getCoefficient | ( | int | index | ) |
Returns the ith coefficient.
Implemented in com.google.ortools.sat.AffineExpression, com.google.ortools.sat.AffineExpression, com.google.ortools.sat.ConstantExpression, com.google.ortools.sat.ConstantExpression, com.google.ortools.sat.WeightedSumExpression, and com.google.ortools.sat.WeightedSumExpression.
long com.google.ortools.sat.LinearExpr.getCoefficient | ( | int | index | ) |
Returns the ith coefficient.
Implemented in com.google.ortools.sat.AffineExpression, com.google.ortools.sat.AffineExpression, com.google.ortools.sat.ConstantExpression, com.google.ortools.sat.ConstantExpression, com.google.ortools.sat.WeightedSumExpression, and com.google.ortools.sat.WeightedSumExpression.
long com.google.ortools.sat.LinearExpr.getOffset | ( | ) |
Returns the constant part of the expression.
Implemented in com.google.ortools.sat.AffineExpression, com.google.ortools.sat.AffineExpression, com.google.ortools.sat.ConstantExpression, com.google.ortools.sat.ConstantExpression, com.google.ortools.sat.WeightedSumExpression, and com.google.ortools.sat.WeightedSumExpression.
long com.google.ortools.sat.LinearExpr.getOffset | ( | ) |
Returns the constant part of the expression.
Implemented in com.google.ortools.sat.AffineExpression, com.google.ortools.sat.AffineExpression, com.google.ortools.sat.ConstantExpression, com.google.ortools.sat.ConstantExpression, com.google.ortools.sat.WeightedSumExpression, and com.google.ortools.sat.WeightedSumExpression.
int com.google.ortools.sat.LinearExpr.getVariableIndex | ( | int | index | ) |
Returns the index of the ith variable.
Implemented in com.google.ortools.sat.AffineExpression, com.google.ortools.sat.AffineExpression, com.google.ortools.sat.ConstantExpression, com.google.ortools.sat.ConstantExpression, com.google.ortools.sat.WeightedSumExpression, and com.google.ortools.sat.WeightedSumExpression.
int com.google.ortools.sat.LinearExpr.getVariableIndex | ( | int | index | ) |
Returns the index of the ith variable.
Implemented in com.google.ortools.sat.AffineExpression, com.google.ortools.sat.AffineExpression, com.google.ortools.sat.ConstantExpression, com.google.ortools.sat.ConstantExpression, com.google.ortools.sat.WeightedSumExpression, and com.google.ortools.sat.WeightedSumExpression.
|
static |
Returns a builder
Definition at line 33 of file LinearExpr.java.
|
static |
Returns a builder
Definition at line 33 of file LinearExpr.java.
int com.google.ortools.sat.LinearExpr.numElements | ( | ) |
Returns the number of terms (excluding the constant one) in this expression.
Implemented in com.google.ortools.sat.AffineExpression, com.google.ortools.sat.AffineExpression, com.google.ortools.sat.ConstantExpression, com.google.ortools.sat.ConstantExpression, com.google.ortools.sat.WeightedSumExpression, and com.google.ortools.sat.WeightedSumExpression.
int com.google.ortools.sat.LinearExpr.numElements | ( | ) |
Returns the number of terms (excluding the constant one) in this expression.
Implemented in com.google.ortools.sat.AffineExpression, com.google.ortools.sat.AffineExpression, com.google.ortools.sat.ConstantExpression, com.google.ortools.sat.ConstantExpression, com.google.ortools.sat.WeightedSumExpression, and com.google.ortools.sat.WeightedSumExpression.
|
static |
Definition at line 62 of file LinearExpr.java.
|
static |
Definition at line 62 of file LinearExpr.java.
|
static |
Shortcut for newBuilder().addSum(exprs).build()
Definition at line 53 of file LinearExpr.java.
|
static |
Shortcut for newBuilder().addSum(exprs).build()
Definition at line 53 of file LinearExpr.java.
|
static |
Shortcut for newBuilder().addTerm(expr, coeff).build()
Definition at line 43 of file LinearExpr.java.
|
static |
Shortcut for newBuilder().addTerm(expr, coeff).build()
Definition at line 43 of file LinearExpr.java.
|
static |
Shortcut for newBuilder().addWeightedSum(exprs, coeffs).build()
Definition at line 58 of file LinearExpr.java.
|
static |
Shortcut for newBuilder().addWeightedSum(exprs, coeffs).build()
Definition at line 58 of file LinearExpr.java.