C++ Reference: class LinearExpr
This documentation is automatically generated.
Method |
AddConstant | Return type: LinearExpr& Arguments: int64_t value Adds a constant value to the linear expression.
|
AddTerm | Return type: void Arguments: IntVar var, int64_t coeff Adds a term (var * coeff) to the linear expression.
|
AddVar | Return type: void Arguments: IntVar var Adds a single integer variable to the linear expression.
|
BooleanScalProd | Return type: static LinearExpr Arguments: absl::Span<const BoolVar> vars,
absl::Span<const int64_t> coeffs Constructs the scalar product of Booleans and coefficients.
|
BooleanSum | Return type: static LinearExpr Arguments: absl::Span<const BoolVar> vars Constructs the sum of a list of Booleans.
|
coefficients | Return type: const std::vector<int64_t>& Returns the vector of coefficients.
|
constant | Return type: int64_t Returns the constant term.
|
LinearExpr | |
LinearExpr | Arguments: BoolVar var |
LinearExpr | Arguments: IntVar var Constructs a linear expression from an integer variable.
|
LinearExpr | Arguments: int64_t constant Constructs a constant linear expression.
|
ScalProd | Return type: static LinearExpr Arguments: absl::Span<const IntVar> vars,
absl::Span<const int64_t> coeffs Constructs the scalar product of variables and coefficients.
|
Sum | Return type: static LinearExpr Arguments: absl::Span<const IntVar> vars Constructs the sum of a list of variables.
|
Term | Return type: static LinearExpr Arguments: IntVar var, int64_t coefficient Construncts var * coefficient.
|
variables | Return type: const std::vector<IntVar>& Returns the vector of variables.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2021-07-30 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]