DotNet Reference
.Net Reference
IntegerExpressions.cs
Go to the documentation of this file.
268 public static long GetVarValueMap(LinearExpr e, long initial_coeff, Dictionary<IntVar, long> dict)
369 throw new ArgumentException("Cannot interpret '" + expr.ToString() + "' in an integer expression");
375 public static LinearExpr RebuildLinearExprFromLinearExpressionProto(LinearExpressionProto proto, CpModelProto model)
484 throw new ArgumentException("in SumArray(vars, coeffs), the two lists do not have the same length");
510 throw new ArgumentException("in SumArray(vars, coeffs), the two lists do not have the same length");
static BoundedLinearExpression operator<=(BoundedLinearExpression a, long v)
Definition: IntegerExpressions.cs:801
LinearExpr Right
Definition: IntegerExpressions.cs:845
BoundedLinearExpression(long lb, LinearExpr expr, long ub)
Definition: IntegerExpressions.cs:732
BoundedLinearExpression(LinearExpr left, LinearExpr right, bool equality)
Definition: IntegerExpressions.cs:741
BoundedLinearExpression(LinearExpr left, long v, bool equality)
Definition: IntegerExpressions.cs:750
static BoundedLinearExpression operator<(BoundedLinearExpression a, long v)
Definition: IntegerExpressions.cs:810
static BoundedLinearExpression operator>(BoundedLinearExpression a, long v)
Definition: IntegerExpressions.cs:828
override string ToString()
Definition: IntegerExpressions.cs:782
static BoundedLinearExpression operator>=(BoundedLinearExpression a, long v)
Definition: IntegerExpressions.cs:819
ConstantExpr(long value)
Definition: IntegerExpressions.cs:579
override string ToString()
Definition: IntegerExpressions.cs:596
override string ShortString()
Definition: IntegerExpressions.cs:591
pbc::RepeatedField< global::Google.OrTools.Sat.IntegerVariableProto > Variables
The associated Protos should be referred by their index in these fields.
Definition: CpModel.pb.cs:8718
Definition: CpSatHelper.cs:15
static Domain VariableDomain(Google.OrTools.Sat.IntegerVariableProto variable_proto)
Definition: CpSatHelper.cs:64
static LinearExpr ScalProd(this IntVar[] vars, long[] coeffs)
Definition: IntegerExpressions.cs:36
static LinearExpr Sum(this IntVar[] vars)
Definition: IntegerExpressions.cs:26
static LinearExpr ScalProd(this IntVar[] vars, int[] coeffs)
Definition: IntegerExpressions.cs:31
IntVar(CpModelProto model, int index)
Definition: IntegerExpressions.cs:617
IntVar(CpModelProto model, Domain domain, string name)
Definition: IntegerExpressions.cs:606
override string ShortString()
Definition: IntegerExpressions.cs:652
pbc::RepeatedField< long > Domain
The variable domain given as a sorted list of n disjoint intervals [min, max] and encoded as [min_0,...
Definition: CpModel.pb.cs:354
override string ToString()
Definition: CpModel.pb.cs:392
virtual string ShortString()
Definition: IntegerExpressions.cs:105
static LinearExpr operator*(LinearExpr a, long v)
Definition: IntegerExpressions.cs:156
static LinearExpr Constant(long value)
Definition: IntegerExpressions.cs:88
static LinearExpr Term(IntVar var, long coeff)
Definition: IntegerExpressions.cs:71
static LinearExpr Sum(IEnumerable< LinearExpr > exprs)
Definition: IntegerExpressions.cs:56
static BoundedLinearExpression operator<(LinearExpr a, long v)
Definition: IntegerExpressions.cs:221
static BoundedLinearExpression operator==(LinearExpr a, LinearExpr b)
Definition: IntegerExpressions.cs:171
static BoundedLinearExpression operator>(LinearExpr a, long v)
Definition: IntegerExpressions.cs:201
static LinearExpr Affine(IntVar var, long coeff, long offset)
Definition: IntegerExpressions.cs:76
static BoundedLinearExpression operator>=(LinearExpr a, long v)
Definition: IntegerExpressions.cs:191
static BoundedLinearExpression operator<=(LinearExpr a, long v)
Definition: IntegerExpressions.cs:211
static LinearExpr Prod(LinearExpr e, long v)
Definition: IntegerExpressions.cs:251
static LinearExpr ScalProd(IEnumerable< IntVar > vars, IEnumerable< long > coeffs)
Definition: IntegerExpressions.cs:66
static LinearExpr ScalProd(IEnumerable< IntVar > vars, IEnumerable< int > coeffs)
Definition: IntegerExpressions.cs:61
static LinearExpr operator+(LinearExpr a, LinearExpr b)
Definition: IntegerExpressions.cs:110
static BoundedLinearExpression operator<(LinearExpr a, LinearExpr b)
Definition: IntegerExpressions.cs:246
static BoundedLinearExpression operator>(LinearExpr a, LinearExpr b)
Definition: IntegerExpressions.cs:236
static BoundedLinearExpression operator<(long v, LinearExpr a)
Definition: IntegerExpressions.cs:226
static long GetVarValueMap(LinearExpr e, long initial_coeff, Dictionary< IntVar, long > dict)
Definition: IntegerExpressions.cs:268
static BoundedLinearExpression operator>(long v, LinearExpr a)
Definition: IntegerExpressions.cs:206
static LinearExpr Sum(IEnumerable< IntVar > vars)
Definition: IntegerExpressions.cs:51
static LinearExpr RebuildLinearExprFromLinearExpressionProto(LinearExpressionProto proto, CpModelProto model)
Definition: IntegerExpressions.cs:375
static BoundedLinearExpression operator!=(LinearExpr a, LinearExpr b)
Definition: IntegerExpressions.cs:176
static LinearExpr operator-(LinearExpr a, LinearExpr b)
Definition: IntegerExpressions.cs:133
Some constraints supports linear expression instead of just using a reference to a variable.
Definition: CpModel.pb.cs:699
pbc::RepeatedField< int > Vars
Definition: CpModel.pb.cs:748
pbc::RepeatedField< long > Coeffs
Definition: CpModel.pb.cs:759
NotBooleanVariable(IntVar boolvar)
Definition: IntegerExpressions.cs:693
override int GetIndex()
Definition: IntegerExpressions.cs:698
override string ShortString()
Definition: IntegerExpressions.cs:713
ProductCst(LinearExpr e, long v)
Definition: IntegerExpressions.cs:407
SumArray(LinearExpr a, long b)
Definition: IntegerExpressions.cs:441
SumArray(IEnumerable< IntVar > vars, IEnumerable< long > coeffs)
Definition: IntegerExpressions.cs:470
void AddExpr(LinearExpr expr)
Definition: IntegerExpressions.cs:522
SumArray(IEnumerable< IntVar > vars)
Definition: IntegerExpressions.cs:454
List< LinearExpr > Expressions
Definition: IntegerExpressions.cs:531
SumArray(IEnumerable< IntVar > vars, IEnumerable< int > coeffs)
Definition: IntegerExpressions.cs:496
SumArray(IntVar[] vars, long[] coeffs)
Definition: IntegerExpressions.cs:460
override string ShortString()
Definition: IntegerExpressions.cs:547
SumArray(LinearExpr a, LinearExpr b)
Definition: IntegerExpressions.cs:433
SumArray(IEnumerable< LinearExpr > exprs)
Definition: IntegerExpressions.cs:448
Definition: util/Domain.cs:17
long[] FlattenedIntervals()
Definition: util/Domain.cs:84
int GetIndex()
ILiteral Not()
Definition: CpModel.pb.cs:12
Definition: util/Domain.cs:11
Definition: IntArrayHelper.cs:15
Definition: IntArrayHelper.cs:15