![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
Holds a Boolean variable. More...
Holds a Boolean variable.
This class must be constructed from the CpModel class.
Definition at line 803 of file IntegerExpressions.cs.
Public Member Functions | |
| BoolVar (CpModelProto model, String name) | |
| BoolVar (CpModelProto model, int index) | |
| ILiteral | Not () |
| Returns the Boolean negation of that variable. | |
| LinearExpr | AsExpr () |
| Returns the literal as a linear expression. | |
| LinearExpr | NotAsExpr () |
| Returns the Boolean negation of that variable as a linear expression. | |
| Public Member Functions inherited from Google.OrTools.Sat.IntVar | |
| IntVar (CpModelProto model, Domain domain, string name) | |
| IntVar (CpModelProto model, long lb, long ub, string name) | |
| IntVar (CpModelProto model, int index) | |
| int | GetIndex () |
| override string | ToString () |
| string | Name () |
| Public Member Functions inherited from Google.OrTools.Sat.ILiteral | |
| int | GetIndex () |
| Returns the logical index of the literal. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from Google.OrTools.Sat.LinearExpr | |
| static LinearExpr | Sum (IEnumerable< LinearExpr > exprs) |
Creates Sum(exprs). | |
| static LinearExpr | Sum (IEnumerable< ILiteral > literals) |
Creates Sum(literals). | |
| static LinearExpr | Sum (IEnumerable< BoolVar > vars) |
Creates Sum(vars). | |
| static LinearExpr | WeightedSum (IEnumerable< LinearExpr > exprs, IEnumerable< int > coeffs) |
Creates Sum(exprs[i] * coeffs[i]). | |
| static LinearExpr | WeightedSum (IEnumerable< LinearExpr > exprs, IEnumerable< long > coeffs) |
Creates Sum(exprs[i] * coeffs[i]). | |
| static LinearExpr | WeightedSum (IEnumerable< ILiteral > literals, IEnumerable< int > coeffs) |
Creates Sum(literals[i] * coeffs[i]). | |
| static LinearExpr | WeightedSum (IEnumerable< ILiteral > literals, IEnumerable< long > coeffs) |
Creates Sum(literals[i] * coeffs[i]). | |
| static LinearExpr | WeightedSum (IEnumerable< BoolVar > vars, IEnumerable< int > coeffs) |
Creates Sum(vars[i] * coeffs[i]). | |
| static LinearExpr | WeightedSum (IEnumerable< BoolVar > vars, IEnumerable< long > coeffs) |
Creates Sum(vars[i] * coeffs[i]). | |
| static LinearExpr | Term (LinearExpr expr, long coeff) |
Creates expr * coeff. | |
| static LinearExpr | Term (ILiteral literal, long coeff) |
Creates literal * coeff. | |
| static LinearExpr | Term (BoolVar var, long coeff) |
Creates var * coeff. | |
| static LinearExpr | Affine (LinearExpr expr, long coeff, long offset) |
Creates expr * coeff + offset. | |
| static LinearExpr | Affine (ILiteral literal, long coeff, long offset) |
Creates literal * coeff + offset. | |
| static LinearExpr | Affine (BoolVar var, long coeff, long offset) |
Creates var * coeff + offset. | |
| static LinearExpr | Constant (long 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, long v) |
| static LinearExpr | operator+ (long v, LinearExpr a) |
| static LinearExpr | operator- (LinearExpr a, LinearExpr b) |
| static LinearExpr | operator- (LinearExpr a, long v) |
| static LinearExpr | operator- (long v, LinearExpr a) |
| static LinearExpr | operator* (LinearExpr a, long v) |
| static LinearExpr | operator* (long 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, long v) |
| static BoundedLinearExpression | operator!= (LinearExpr a, long v) |
| static BoundedLinearExpression | operator>= (LinearExpr a, long v) |
| static BoundedLinearExpression | operator>= (long v, LinearExpr a) |
| static BoundedLinearExpression | operator> (LinearExpr a, long v) |
| static BoundedLinearExpression | operator> (long v, LinearExpr a) |
| static BoundedLinearExpression | operator<= (LinearExpr a, long v) |
| static BoundedLinearExpression | operator<= (long v, LinearExpr a) |
| static BoundedLinearExpression | operator< (LinearExpr a, long v) |
| static BoundedLinearExpression | operator< (long v, LinearExpr a) |
| static BoundedLinearExpression | operator>= (LinearExpr a, LinearExpr b) |
| static BoundedLinearExpression | operator> (LinearExpr a, LinearExpr b) |
| static BoundedLinearExpression | operator<= (LinearExpr a, LinearExpr b) |
| static BoundedLinearExpression | operator< (LinearExpr a, LinearExpr b) |
| Protected Attributes inherited from Google.OrTools.Sat.IntVar | |
| readonly int | index_ |
| IntegerVariableProto | var_ |
| Properties inherited from Google.OrTools.Sat.IntVar | |
| int | Index [get] |
| IntegerVariableProto | Proto [get, set] |
| Domain | Domain [get] |
|
inline |
Definition at line 806 of file IntegerExpressions.cs.
|
inline |
Definition at line 810 of file IntegerExpressions.cs.
|
inline |
Returns the literal as a linear expression.
Implements Google.OrTools.Sat.ILiteral.
Definition at line 821 of file IntegerExpressions.cs.
|
inline |
Returns the Boolean negation of that variable.
Implements Google.OrTools.Sat.ILiteral.
Definition at line 815 of file IntegerExpressions.cs.
|
inline |
Returns the Boolean negation of that variable as a linear expression.
Implements Google.OrTools.Sat.ILiteral.
Definition at line 827 of file IntegerExpressions.cs.