C++ Reference: class LinearExpr
Note: This documentation is automatically generated.
Method | |
---|---|
coefficients | Return type: Returns the vector of coefficients. |
constant | Return type: Returns the constant term. |
DebugString | Return type: Arguments: |
FromProto | Return type: Arguments: Constructs a linear expr from its proto representation. |
IsConstant | Return type: Returns true if the expression has no variables. |
LinearExpr | Creates an empty linear expression with value zero. |
LinearExpr | Arguments: Constructs a linear expression from a Boolean variable. It deals with logical negation correctly. |
LinearExpr | Arguments: Constructs a linear expression from an integer variable. |
LinearExpr | Arguments: Constructs a constant linear expression. |
Sum | Return type: Arguments: Constructs the sum of a list of variables. |
Sum | Return type: Arguments: Constructs the sum of a list of Boolean variables. |
Term | Return type: Arguments: Constructs var * coefficient. |
Term | Return type: Arguments: Constructs bool * coefficient. |
variables | Return type: Returns the vector of variable indices. |
WeightedSum | Return type: Arguments: Constructs the scalar product of variables and coefficients. |
WeightedSum | Return type: Arguments: Constructs the scalar product of Boolean variables and coefficients. |