Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
A builder class for linear expressions. More...
Public Member Functions | |
LinearExprBuilder (int sizeHint=2) | |
LinearExprBuilder | Add (LinearExpr expr) |
Adds expr to the builder. | |
LinearExprBuilder | Add (double constant) |
Adds constant to the builder. | |
LinearExprBuilder | AddTerm (LinearExpr expr, double coefficient) |
Adds expr * coefficient to the builder. | |
LinearExprBuilder | AddSum (IEnumerable< LinearExpr > exprs) |
Adds sum(exprs) to the builder. | |
LinearExprBuilder | AddWeightedSum (IEnumerable< LinearExpr > exprs, IEnumerable< double > coefficients) |
Adds sum(exprs[i] * coeffs[i]) to the builder. | |
LinearExprBuilder | AddWeightedSum (IEnumerable< LinearExpr > exprs, IEnumerable< long > coefficients) |
Adds sum(exprs[i] * coeffs[i]) to the builder. | |
LinearExprBuilder | AddWeightedSum (IEnumerable< LinearExpr > exprs, IEnumerable< int > coefficients) |
Adds sum(exprs[i] * coeffs[i]) to the builder. | |
override string | ToString () |
Properties | |
double | Offset [get] |
List< Term > | Terms [get] |
Additional Inherited Members | |
Static Public Member Functions inherited from Google.OrTools.ModelBuilder.LinearExpr | |
static LinearExpr | Sum (IEnumerable< LinearExpr > exprs) |
Creates Sum(exprs) . | |
static LinearExpr | WeightedSum (IEnumerable< LinearExpr > exprs, IEnumerable< int > coeffs) |
Creates Sum(exprs[i] * coeffs[i]) . | |
static LinearExpr | WeightedSum (IEnumerable< LinearExpr > exprs, IEnumerable< double > coeffs) |
Creates Sum(exprs[i] * coeffs[i]) . | |
static LinearExpr | Term (LinearExpr expr, double coeff) |
Creates expr * coeff . | |
static LinearExpr | Affine (LinearExpr expr, double coeff, double offset) |
Creates expr * coeff + offset . | |
static LinearExpr | Constant (double value) |
Creates a constant expression. | |
static LinearExprBuilder | NewBuilder (int sizeHint=2) |
Creates a builder class for linear expression. | |
static LinearExpr | operator+ (LinearExpr a, LinearExpr b) |
static LinearExpr | operator+ (LinearExpr a, double v) |
static LinearExpr | operator+ (double v, LinearExpr a) |
static LinearExpr | operator- (LinearExpr a, LinearExpr b) |
static LinearExpr | operator- (LinearExpr a, double v) |
static LinearExpr | operator- (double v, LinearExpr a) |
static LinearExpr | operator* (LinearExpr a, double v) |
static LinearExpr | operator* (double v, LinearExpr a) |
static LinearExpr | operator- (LinearExpr a) |
static BoundedLinearExpression | operator== (LinearExpr a, LinearExpr b) |
static BoundedLinearExpression | operator!= (LinearExpr a, LinearExpr b) |
static BoundedLinearExpression | operator== (LinearExpr a, double v) |
static BoundedLinearExpression | operator!= (LinearExpr a, double v) |
static BoundedLinearExpression | operator>= (LinearExpr a, double v) |
static BoundedLinearExpression | operator>= (double v, LinearExpr a) |
static BoundedLinearExpression | operator<= (LinearExpr a, double v) |
static BoundedLinearExpression | operator<= (double v, LinearExpr a) |
static BoundedLinearExpression | operator>= (LinearExpr a, LinearExpr b) |
static BoundedLinearExpression | operator<= (LinearExpr a, LinearExpr b) |
Static Package Functions inherited from Google.OrTools.ModelBuilder.LinearExpr |
A builder class for linear expressions.
Definition at line 310 of file ModelBuilderExpr.cs.
|
inline |
Definition at line 312 of file ModelBuilderExpr.cs.
|
inline |
Adds constant
to the builder.
Definition at line 325 of file ModelBuilderExpr.cs.
|
inline |
Adds expr
to the builder.
Definition at line 319 of file ModelBuilderExpr.cs.
|
inline |
Adds sum(exprs)
to the builder.
Definition at line 339 of file ModelBuilderExpr.cs.
|
inline |
Adds expr * coefficient
to the builder.
Definition at line 332 of file ModelBuilderExpr.cs.
|
inline |
Adds sum(exprs[i] * coeffs[i])
to the builder.
Definition at line 350 of file ModelBuilderExpr.cs.
|
inline |
Adds sum(exprs[i] * coeffs[i])
to the builder.
Definition at line 372 of file ModelBuilderExpr.cs.
|
inline |
Adds sum(exprs[i] * coeffs[i])
to the builder.
Definition at line 361 of file ModelBuilderExpr.cs.
|
inline |
Definition at line 381 of file ModelBuilderExpr.cs.
|
get |
Definition at line 457 of file ModelBuilderExpr.cs.
|
get |
Definition at line 464 of file ModelBuilderExpr.cs.