DotNet Reference
.Net Reference
Detailed Description
Holds a Boolean variable.
This class must be constructed from the CpModel class.
Definition at line 789 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. More... | |
LinearExpr | NotAsExpr () |
Returns the Boolean negation of that variable as a linear expression. More... | |
int | GetIndex () |
Returns the index of the variable in the underlying CpModelProto. More... | |
override string | ToString () |
string | Name () |
Returns the name of the variable given upon creation. More... | |
int | GetIndex () |
Returns the logical index of the literal. More... | |
Static Public Member Functions | |
static LinearExpr | Sum (IEnumerable< LinearExpr > exprs) |
Creates Sum(exprs) . More... | |
static LinearExpr | Sum (IEnumerable< ILiteral > literals) |
Creates Sum(literals) . More... | |
static LinearExpr | Sum (IEnumerable< BoolVar > vars) |
Creates Sum(vars) . More... | |
static LinearExpr | WeightedSum (IEnumerable< LinearExpr > exprs, IEnumerable< int > coeffs) |
Creates Sum(exprs[i] * coeffs[i]) . More... | |
static LinearExpr | WeightedSum (IEnumerable< LinearExpr > exprs, IEnumerable< long > coeffs) |
Creates Sum(exprs[i] * coeffs[i]) . More... | |
static LinearExpr | WeightedSum (IEnumerable< ILiteral > literals, IEnumerable< int > coeffs) |
Creates Sum(literals[i] * coeffs[i]) . More... | |
static LinearExpr | WeightedSum (IEnumerable< ILiteral > literals, IEnumerable< long > coeffs) |
Creates Sum(literals[i] * coeffs[i]) . More... | |
static LinearExpr | WeightedSum (IEnumerable< BoolVar > vars, IEnumerable< int > coeffs) |
Creates Sum(vars[i] * coeffs[i]) . More... | |
static LinearExpr | WeightedSum (IEnumerable< BoolVar > vars, IEnumerable< long > coeffs) |
Creates Sum(vars[i] * coeffs[i]) . More... | |
static LinearExpr | Term (LinearExpr expr, long coeff) |
Creates expr * coeff . More... | |
static LinearExpr | Term (ILiteral literal, long coeff) |
Creates literal * coeff . More... | |
static LinearExpr | Term (BoolVar var, long coeff) |
Creates var * coeff . More... | |
static LinearExpr | Affine (LinearExpr expr, long coeff, long offset) |
Creates expr * coeff + offset . More... | |
static LinearExpr | Affine (ILiteral literal, long coeff, long offset) |
Creates literal * coeff + offset . More... | |
static LinearExpr | Affine (BoolVar var, long coeff, long offset) |
Creates var * coeff + offset . More... | |
static LinearExpr | Constant (long value) |
Creates a constant expression. More... | |
static LinearExprBuilder | NewBuilder (int sizeHint=2) |
Creates a builder class for linear expression. More... | |
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) |
static LinearExpr | operator* (LinearExpr a, long v) |
static LinearExpr | operator* (long v, LinearExpr a) |
static BoundedLinearExpression | operator== (LinearExpr a, LinearExpr b) |
static BoundedLinearExpression | operator== (LinearExpr a, long v) |
static BoundedLinearExpression | operator!= (LinearExpr a, LinearExpr b) |
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, LinearExpr b) |
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, long v) |
static BoundedLinearExpression | operator<= (long v, LinearExpr a) |
static BoundedLinearExpression | operator<= (LinearExpr a, LinearExpr b) |
static BoundedLinearExpression | operator< (LinearExpr a, long v) |
static BoundedLinearExpression | operator< (long v, LinearExpr a) |
static BoundedLinearExpression | operator< (LinearExpr a, LinearExpr b) |
Protected Attributes | |
readonly int | index_ |
IntegerVariableProto | var_ |
Properties | |
int | Index [get] |
Returns the index of the variable in the underlying CpModelProto. More... | |
IntegerVariableProto | Proto [get, set] |
The underlying IntegerVariableProto. More... | |
Domain | Domain [get] |
Returns the domain of the variable. More... | |
Constructor & Destructor Documentation
◆ BoolVar() [1/2]
|
inline |
Definition at line 792 of file IntegerExpressions.cs.
◆ BoolVar() [2/2]
|
inline |
Definition at line 796 of file IntegerExpressions.cs.
Member Function Documentation
◆ Affine() [1/3]
|
inlinestaticinherited |
Creates var * coeff + offset
.
Definition at line 205 of file IntegerExpressions.cs.
◆ Affine() [2/3]
|
inlinestaticinherited |
Creates literal * coeff + offset
.
Definition at line 199 of file IntegerExpressions.cs.
◆ Affine() [3/3]
|
inlinestaticinherited |
Creates expr * coeff + offset
.
Definition at line 189 of file IntegerExpressions.cs.
◆ Constant()
|
inlinestaticinherited |
Creates a constant expression.
Definition at line 211 of file IntegerExpressions.cs.
◆ GetIndex() [1/2]
|
inherited |
Returns the logical index of the literal.
Implemented in NotBoolVar.
◆ GetIndex() [2/2]
|
inlineinherited |
Returns the index of the variable in the underlying CpModelProto.
Definition at line 734 of file IntegerExpressions.cs.
◆ Name()
|
inlineinherited |
Returns the name of the variable given upon creation.
Definition at line 772 of file IntegerExpressions.cs.
◆ NewBuilder()
|
inlinestaticinherited |
Creates a builder class for linear expression.
Definition at line 217 of file IntegerExpressions.cs.
◆ Not()
|
inline |
Returns the Boolean negation of that variable.
Implements ILiteral.
Definition at line 801 of file IntegerExpressions.cs.
◆ NotAsExpr()
|
inline |
Returns the Boolean negation of that variable as a linear expression.
Implements ILiteral.
Definition at line 807 of file IntegerExpressions.cs.
◆ operator!=() [1/2]
|
inlinestaticinherited |
Definition at line 272 of file IntegerExpressions.cs.
◆ operator!=() [2/2]
|
inlinestaticinherited |
Definition at line 282 of file IntegerExpressions.cs.
◆ operator*() [1/2]
|
inlinestaticinherited |
Definition at line 252 of file IntegerExpressions.cs.
◆ operator*() [2/2]
|
inlinestaticinherited |
Definition at line 257 of file IntegerExpressions.cs.
◆ operator+() [1/3]
|
inlinestaticinherited |
Definition at line 222 of file IntegerExpressions.cs.
◆ operator+() [2/3]
|
inlinestaticinherited |
Definition at line 227 of file IntegerExpressions.cs.
◆ operator+() [3/3]
|
inlinestaticinherited |
Definition at line 232 of file IntegerExpressions.cs.
◆ operator-() [1/4]
|
inlinestaticinherited |
Definition at line 262 of file IntegerExpressions.cs.
◆ operator-() [2/4]
|
inlinestaticinherited |
Definition at line 237 of file IntegerExpressions.cs.
◆ operator-() [3/4]
|
inlinestaticinherited |
Definition at line 242 of file IntegerExpressions.cs.
◆ operator-() [4/4]
|
inlinestaticinherited |
Definition at line 247 of file IntegerExpressions.cs.
◆ operator<() [1/3]
|
inlinestaticinherited |
Definition at line 342 of file IntegerExpressions.cs.
◆ operator<() [2/3]
|
inlinestaticinherited |
Definition at line 317 of file IntegerExpressions.cs.
◆ operator<() [3/3]
|
inlinestaticinherited |
Definition at line 322 of file IntegerExpressions.cs.
◆ operator<=() [1/3]
|
inlinestaticinherited |
Definition at line 337 of file IntegerExpressions.cs.
◆ operator<=() [2/3]
|
inlinestaticinherited |
Definition at line 307 of file IntegerExpressions.cs.
◆ operator<=() [3/3]
|
inlinestaticinherited |
Definition at line 312 of file IntegerExpressions.cs.
◆ operator==() [1/2]
|
inlinestaticinherited |
Definition at line 267 of file IntegerExpressions.cs.
◆ operator==() [2/2]
|
inlinestaticinherited |
Definition at line 277 of file IntegerExpressions.cs.
◆ operator>() [1/3]
|
inlinestaticinherited |
Definition at line 332 of file IntegerExpressions.cs.
◆ operator>() [2/3]
|
inlinestaticinherited |
Definition at line 297 of file IntegerExpressions.cs.
◆ operator>() [3/3]
|
inlinestaticinherited |
Definition at line 302 of file IntegerExpressions.cs.
◆ operator>=() [1/3]
|
inlinestaticinherited |
Definition at line 327 of file IntegerExpressions.cs.
◆ operator>=() [2/3]
|
inlinestaticinherited |
Definition at line 287 of file IntegerExpressions.cs.
◆ operator>=() [3/3]
|
inlinestaticinherited |
Definition at line 292 of file IntegerExpressions.cs.
◆ Sum() [1/3]
|
inlinestaticinherited |
Creates Sum(vars)
.
Definition at line 122 of file IntegerExpressions.cs.
◆ Sum() [2/3]
|
inlinestaticinherited |
Creates Sum(literals)
.
Definition at line 116 of file IntegerExpressions.cs.
◆ Sum() [3/3]
|
inlinestaticinherited |
Creates Sum(exprs)
.
Definition at line 110 of file IntegerExpressions.cs.
◆ Term() [1/3]
|
inlinestaticinherited |
Creates var * coeff
.
Definition at line 183 of file IntegerExpressions.cs.
◆ Term() [2/3]
|
inlinestaticinherited |
Creates literal * coeff
.
Definition at line 170 of file IntegerExpressions.cs.
◆ Term() [3/3]
|
inlinestaticinherited |
Creates expr * coeff
.
Definition at line 164 of file IntegerExpressions.cs.
◆ ToString()
|
inlineinherited |
Definition at line 766 of file IntegerExpressions.cs.
◆ WeightedSum() [1/6]
|
inlinestaticinherited |
Creates Sum(vars[i] * coeffs[i])
.
Definition at line 152 of file IntegerExpressions.cs.
◆ WeightedSum() [2/6]
|
inlinestaticinherited |
Creates Sum(vars[i] * coeffs[i])
.
Definition at line 158 of file IntegerExpressions.cs.
◆ WeightedSum() [3/6]
|
inlinestaticinherited |
Creates Sum(literals[i] * coeffs[i])
.
Definition at line 140 of file IntegerExpressions.cs.
◆ WeightedSum() [4/6]
|
inlinestaticinherited |
Creates Sum(literals[i] * coeffs[i])
.
Definition at line 146 of file IntegerExpressions.cs.
◆ WeightedSum() [5/6]
|
inlinestaticinherited |
Creates Sum(exprs[i] * coeffs[i])
.
Definition at line 128 of file IntegerExpressions.cs.
◆ WeightedSum() [6/6]
|
inlinestaticinherited |
Creates Sum(exprs[i] * coeffs[i])
.
Definition at line 134 of file IntegerExpressions.cs.
Member Data Documentation
◆ index_
|
protectedinherited |
Definition at line 777 of file IntegerExpressions.cs.
◆ var_
|
protectedinherited |
Definition at line 778 of file IntegerExpressions.cs.
Property Documentation
◆ Domain
|
getinherited |
Returns the domain of the variable.
Definition at line 759 of file IntegerExpressions.cs.
◆ Index
|
getinherited |
Returns the index of the variable in the underlying CpModelProto.
Definition at line 740 of file IntegerExpressions.cs.
◆ Proto
|
getsetinherited |
The underlying IntegerVariableProto.
Definition at line 748 of file IntegerExpressions.cs.
The documentation for this class was generated from the following file: