Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
Google.OrTools.ModelBuilder.LinearExpr Class Reference

Holds a linear expression: sum (ai * xi) + b. More...

Inheritance diagram for Google.OrTools.ModelBuilder.LinearExpr:
Google.OrTools.ModelBuilder.LinearExprBuilder Google.OrTools.ModelBuilder.Variable

Static Public Member Functions

static LinearExpr Sum (IEnumerable< LinearExpr > exprs)
 Creates Sum(exprs).
 
static LinearExpr WeightedSum (IEnumerable< LinearExpr > exprs, IEnumerable< int > coeffs)
 Creates Sum(exprs[i] * coeffs[i]).
 
static LinearExpr WeightedSum (IEnumerable< LinearExpr > exprs, IEnumerable< double > coeffs)
 Creates Sum(exprs[i] * coeffs[i]).
 
static LinearExpr Term (LinearExpr expr, double coeff)
 Creates expr * coeff.
 
static LinearExpr Affine (LinearExpr expr, double coeff, double offset)
 Creates expr * coeff + offset.
 
static LinearExpr Constant (double 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, double v)
 
static LinearExpr operator+ (double v, LinearExpr a)
 
static LinearExpr operator- (LinearExpr a, LinearExpr b)
 
static LinearExpr operator- (LinearExpr a, double v)
 
static LinearExpr operator- (double v, LinearExpr a)
 
static LinearExpr operator* (LinearExpr a, double v)
 
static LinearExpr operator* (double 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, double v)
 
static BoundedLinearExpression operator!= (LinearExpr a, double v)
 
static BoundedLinearExpression operator>= (LinearExpr a, double v)
 
static BoundedLinearExpression operator>= (double v, LinearExpr a)
 
static BoundedLinearExpression operator<= (LinearExpr a, double v)
 
static BoundedLinearExpression operator<= (double v, LinearExpr a)
 
static BoundedLinearExpression operator>= (LinearExpr a, LinearExpr b)
 
static BoundedLinearExpression operator<= (LinearExpr a, LinearExpr b)
 

Detailed Description

Holds a linear expression: sum (ai * xi) + b.

Definition at line 96 of file ModelBuilderExpr.cs.

Member Function Documentation

◆ Affine()

static LinearExpr Google.OrTools.ModelBuilder.LinearExpr.Affine ( LinearExpr expr,
double coeff,
double offset )
inlinestatic

Creates expr * coeff + offset.

Definition at line 123 of file ModelBuilderExpr.cs.

◆ Constant()

static LinearExpr Google.OrTools.ModelBuilder.LinearExpr.Constant ( double value)
inlinestatic

Creates a constant expression.

Definition at line 133 of file ModelBuilderExpr.cs.

◆ NewBuilder()

static LinearExprBuilder Google.OrTools.ModelBuilder.LinearExpr.NewBuilder ( int sizeHint = 2)
inlinestatic

Creates a builder class for linear expression.

Definition at line 139 of file ModelBuilderExpr.cs.

◆ operator!=() [1/2]

static BoundedLinearExpression Google.OrTools.ModelBuilder.LinearExpr.operator!= ( LinearExpr a,
double v )
inlinestatic

Definition at line 204 of file ModelBuilderExpr.cs.

◆ operator!=() [2/2]

static BoundedLinearExpression Google.OrTools.ModelBuilder.LinearExpr.operator!= ( LinearExpr a,
LinearExpr b )
inlinestatic

Definition at line 194 of file ModelBuilderExpr.cs.

◆ operator*() [1/2]

static LinearExpr Google.OrTools.ModelBuilder.LinearExpr.operator* ( double v,
LinearExpr a )
inlinestatic

Definition at line 179 of file ModelBuilderExpr.cs.

◆ operator*() [2/2]

static LinearExpr Google.OrTools.ModelBuilder.LinearExpr.operator* ( LinearExpr a,
double v )
inlinestatic

Definition at line 174 of file ModelBuilderExpr.cs.

◆ operator+() [1/3]

static LinearExpr Google.OrTools.ModelBuilder.LinearExpr.operator+ ( double v,
LinearExpr a )
inlinestatic

Definition at line 154 of file ModelBuilderExpr.cs.

◆ operator+() [2/3]

static LinearExpr Google.OrTools.ModelBuilder.LinearExpr.operator+ ( LinearExpr a,
double v )
inlinestatic

Definition at line 149 of file ModelBuilderExpr.cs.

◆ operator+() [3/3]

static LinearExpr Google.OrTools.ModelBuilder.LinearExpr.operator+ ( LinearExpr a,
LinearExpr b )
inlinestatic

Definition at line 144 of file ModelBuilderExpr.cs.

◆ operator-() [1/4]

static LinearExpr Google.OrTools.ModelBuilder.LinearExpr.operator- ( double v,
LinearExpr a )
inlinestatic

Definition at line 169 of file ModelBuilderExpr.cs.

◆ operator-() [2/4]

static LinearExpr Google.OrTools.ModelBuilder.LinearExpr.operator- ( LinearExpr a)
inlinestatic

Definition at line 184 of file ModelBuilderExpr.cs.

◆ operator-() [3/4]

static LinearExpr Google.OrTools.ModelBuilder.LinearExpr.operator- ( LinearExpr a,
double v )
inlinestatic

Definition at line 164 of file ModelBuilderExpr.cs.

◆ operator-() [4/4]

static LinearExpr Google.OrTools.ModelBuilder.LinearExpr.operator- ( LinearExpr a,
LinearExpr b )
inlinestatic

Definition at line 159 of file ModelBuilderExpr.cs.

◆ operator<=() [1/3]

static BoundedLinearExpression Google.OrTools.ModelBuilder.LinearExpr.operator<= ( double v,
LinearExpr a )
inlinestatic

Definition at line 224 of file ModelBuilderExpr.cs.

◆ operator<=() [2/3]

static BoundedLinearExpression Google.OrTools.ModelBuilder.LinearExpr.operator<= ( LinearExpr a,
double v )
inlinestatic

Definition at line 219 of file ModelBuilderExpr.cs.

◆ operator<=() [3/3]

static BoundedLinearExpression Google.OrTools.ModelBuilder.LinearExpr.operator<= ( LinearExpr a,
LinearExpr b )
inlinestatic

Definition at line 234 of file ModelBuilderExpr.cs.

◆ operator==() [1/2]

static BoundedLinearExpression Google.OrTools.ModelBuilder.LinearExpr.operator== ( LinearExpr a,
double v )
inlinestatic

Definition at line 199 of file ModelBuilderExpr.cs.

◆ operator==() [2/2]

static BoundedLinearExpression Google.OrTools.ModelBuilder.LinearExpr.operator== ( LinearExpr a,
LinearExpr b )
inlinestatic

Definition at line 189 of file ModelBuilderExpr.cs.

◆ operator>=() [1/3]

static BoundedLinearExpression Google.OrTools.ModelBuilder.LinearExpr.operator>= ( double v,
LinearExpr a )
inlinestatic

Definition at line 214 of file ModelBuilderExpr.cs.

◆ operator>=() [2/3]

static BoundedLinearExpression Google.OrTools.ModelBuilder.LinearExpr.operator>= ( LinearExpr a,
double v )
inlinestatic

Definition at line 209 of file ModelBuilderExpr.cs.

◆ operator>=() [3/3]

static BoundedLinearExpression Google.OrTools.ModelBuilder.LinearExpr.operator>= ( LinearExpr a,
LinearExpr b )
inlinestatic

Definition at line 229 of file ModelBuilderExpr.cs.

◆ Sum()

static LinearExpr Google.OrTools.ModelBuilder.LinearExpr.Sum ( IEnumerable< LinearExpr > exprs)
inlinestatic

Creates Sum(exprs).

Definition at line 99 of file ModelBuilderExpr.cs.

◆ Term()

static LinearExpr Google.OrTools.ModelBuilder.LinearExpr.Term ( LinearExpr expr,
double coeff )
inlinestatic

Creates expr * coeff.

Definition at line 117 of file ModelBuilderExpr.cs.

◆ WeightedSum() [1/2]

static LinearExpr Google.OrTools.ModelBuilder.LinearExpr.WeightedSum ( IEnumerable< LinearExpr > exprs,
IEnumerable< double > coeffs )
inlinestatic

Creates Sum(exprs[i] * coeffs[i]).

Definition at line 111 of file ModelBuilderExpr.cs.

◆ WeightedSum() [2/2]

static LinearExpr Google.OrTools.ModelBuilder.LinearExpr.WeightedSum ( IEnumerable< LinearExpr > exprs,
IEnumerable< int > coeffs )
inlinestatic

Creates Sum(exprs[i] * coeffs[i]).

Definition at line 105 of file ModelBuilderExpr.cs.


The documentation for this class was generated from the following file: