Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
Public Member Functions | |
int | numElements () |
int | getVariableIndex (int index) |
double | getCoefficient (int index) |
double | getOffset () |
int | numElements () |
int | getVariableIndex (int index) |
double | getCoefficient (int index) |
double | getOffset () |
Public Member Functions inherited from com.google.ortools.modelbuilder.LinearArgument | |
LinearExpr | build () |
LinearExpr | build () |
Static Public Member Functions | |
static LinearExprBuilder | newBuilder () |
static LinearExpr | constant (double value) |
static LinearExpr | term (LinearArgument expr, double coeff) |
static LinearExpr | affine (LinearArgument expr, double coeff, double offset) |
static LinearExpr | sum (LinearArgument[] exprs) |
static LinearExpr | weightedSum (LinearArgument[] exprs, double[] coeffs) |
static LinearExprBuilder | newBuilder () |
static LinearExpr | constant (double value) |
static LinearExpr | term (LinearArgument expr, double coeff) |
static LinearExpr | affine (LinearArgument expr, double coeff, double offset) |
static LinearExpr | sum (LinearArgument[] exprs) |
static LinearExpr | weightedSum (LinearArgument[] exprs, double[] coeffs) |
A linear expression (sum (ai * xi) + b). It specifies methods to help parsing the expression.
Definition at line 17 of file LinearExpr.java.
|
static |
Shortcut for newBuilder().addTerm(expr, coeff).add(offset).build()
Definition at line 46 of file LinearExpr.java.
|
static |
Shortcut for newBuilder().addTerm(expr, coeff).add(offset).build()
Definition at line 46 of file LinearExpr.java.
|
static |
Shortcut for newBuilder().add(value).build()
Definition at line 36 of file LinearExpr.java.
|
static |
Shortcut for newBuilder().add(value).build()
Definition at line 36 of file LinearExpr.java.
double com.google.ortools.modelbuilder.LinearExpr.getCoefficient | ( | int | index | ) |
Returns the ith coefficient.
Implemented in com.google.ortools.modelbuilder.AffineExpression, com.google.ortools.modelbuilder.AffineExpression, com.google.ortools.modelbuilder.ConstantExpression, com.google.ortools.modelbuilder.ConstantExpression, com.google.ortools.modelbuilder.WeightedSumExpression, and com.google.ortools.modelbuilder.WeightedSumExpression.
double com.google.ortools.modelbuilder.LinearExpr.getCoefficient | ( | int | index | ) |
Returns the ith coefficient.
Implemented in com.google.ortools.modelbuilder.AffineExpression, com.google.ortools.modelbuilder.AffineExpression, com.google.ortools.modelbuilder.ConstantExpression, com.google.ortools.modelbuilder.ConstantExpression, com.google.ortools.modelbuilder.WeightedSumExpression, and com.google.ortools.modelbuilder.WeightedSumExpression.
double com.google.ortools.modelbuilder.LinearExpr.getOffset | ( | ) |
Returns the constant part of the expression.
Implemented in com.google.ortools.modelbuilder.AffineExpression, com.google.ortools.modelbuilder.AffineExpression, com.google.ortools.modelbuilder.ConstantExpression, com.google.ortools.modelbuilder.ConstantExpression, com.google.ortools.modelbuilder.WeightedSumExpression, and com.google.ortools.modelbuilder.WeightedSumExpression.
double com.google.ortools.modelbuilder.LinearExpr.getOffset | ( | ) |
Returns the constant part of the expression.
Implemented in com.google.ortools.modelbuilder.AffineExpression, com.google.ortools.modelbuilder.AffineExpression, com.google.ortools.modelbuilder.ConstantExpression, com.google.ortools.modelbuilder.ConstantExpression, com.google.ortools.modelbuilder.WeightedSumExpression, and com.google.ortools.modelbuilder.WeightedSumExpression.
int com.google.ortools.modelbuilder.LinearExpr.getVariableIndex | ( | int | index | ) |
Returns the index of the ith variable.
Implemented in com.google.ortools.modelbuilder.AffineExpression, com.google.ortools.modelbuilder.AffineExpression, com.google.ortools.modelbuilder.ConstantExpression, com.google.ortools.modelbuilder.ConstantExpression, com.google.ortools.modelbuilder.WeightedSumExpression, and com.google.ortools.modelbuilder.WeightedSumExpression.
int com.google.ortools.modelbuilder.LinearExpr.getVariableIndex | ( | int | index | ) |
Returns the index of the ith variable.
Implemented in com.google.ortools.modelbuilder.AffineExpression, com.google.ortools.modelbuilder.AffineExpression, com.google.ortools.modelbuilder.ConstantExpression, com.google.ortools.modelbuilder.ConstantExpression, com.google.ortools.modelbuilder.WeightedSumExpression, and com.google.ortools.modelbuilder.WeightedSumExpression.
|
static |
Returns a builder
Definition at line 31 of file LinearExpr.java.
|
static |
Returns a builder
Definition at line 31 of file LinearExpr.java.
int com.google.ortools.modelbuilder.LinearExpr.numElements | ( | ) |
Returns the number of terms (excluding the constant one) in this expression.
Implemented in com.google.ortools.modelbuilder.AffineExpression, com.google.ortools.modelbuilder.AffineExpression, com.google.ortools.modelbuilder.ConstantExpression, com.google.ortools.modelbuilder.ConstantExpression, com.google.ortools.modelbuilder.WeightedSumExpression, and com.google.ortools.modelbuilder.WeightedSumExpression.
int com.google.ortools.modelbuilder.LinearExpr.numElements | ( | ) |
Returns the number of terms (excluding the constant one) in this expression.
Implemented in com.google.ortools.modelbuilder.AffineExpression, com.google.ortools.modelbuilder.AffineExpression, com.google.ortools.modelbuilder.ConstantExpression, com.google.ortools.modelbuilder.ConstantExpression, com.google.ortools.modelbuilder.WeightedSumExpression, and com.google.ortools.modelbuilder.WeightedSumExpression.
|
static |
Shortcut for newBuilder().addSum(exprs).build()
Definition at line 51 of file LinearExpr.java.
|
static |
Shortcut for newBuilder().addSum(exprs).build()
Definition at line 51 of file LinearExpr.java.
|
static |
Shortcut for newBuilder().addTerm(expr, coeff).build()
Definition at line 41 of file LinearExpr.java.
|
static |
Shortcut for newBuilder().addTerm(expr, coeff).build()
Definition at line 41 of file LinearExpr.java.
|
static |
Shortcut for newBuilder().addWeightedSum(exprs, coeffs).build()
Definition at line 56 of file LinearExpr.java.
|
static |
Shortcut for newBuilder().addWeightedSum(exprs, coeffs).build()
Definition at line 56 of file LinearExpr.java.