Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.sat.DoubleLinearExpr Class Reference

Public Member Functions

int numElements ()
 
int getVariableIndex (int index)
 
double getCoefficient (int index)
 
double getOffset ()
 
 DoubleLinearExpr (IntVar[] variables, double[] coefficients, double offset)
 
 DoubleLinearExpr (Literal[] literals, double[] coefficients, double offset)
 
 DoubleLinearExpr (IntVar var, double coefficient, double offset)
 
 DoubleLinearExpr (Literal lit, double coefficient, double offset)
 
 DoubleLinearExpr (IntVar[] vars, double offset)
 
 DoubleLinearExpr (Literal[] literals, double offset)
 
int numElements ()
 
int getVariableIndex (int index)
 
double getCoefficient (int index)
 
double getOffset ()
 
 DoubleLinearExpr (IntVar[] variables, double[] coefficients, double offset)
 
 DoubleLinearExpr (Literal[] literals, double[] coefficients, double offset)
 
 DoubleLinearExpr (IntVar var, double coefficient, double offset)
 
 DoubleLinearExpr (Literal lit, double coefficient, double offset)
 
 DoubleLinearExpr (IntVar[] vars, double offset)
 
 DoubleLinearExpr (Literal[] literals, double offset)
 

Static Public Member Functions

static DoubleLinearExpr sum (IntVar[] variables)
 
static DoubleLinearExpr sum (Literal[] literals)
 
static DoubleLinearExpr sumWithOffset (IntVar[] variables, double offset)
 
static DoubleLinearExpr sumWithOffset (Literal[] literals, double offset)
 
static DoubleLinearExpr weightedSum (IntVar[] variables, double[] coefficients)
 
static DoubleLinearExpr weightedSum (Literal[] literals, double[] coefficients)
 
static DoubleLinearExpr weightedSumWithOffset (IntVar[] variables, double[] coefficients, double offset)
 
static DoubleLinearExpr weightedSumWithOffset (Literal[] literals, double[] coefficients, double offset)
 
static DoubleLinearExpr term (IntVar variable, double coefficient)
 
static DoubleLinearExpr term (Literal lit, double coefficient)
 
static DoubleLinearExpr affine (IntVar variable, double coefficient, double offset)
 
static DoubleLinearExpr affine (Literal lit, double coefficient, double offset)
 
static DoubleLinearExpr constant (double value)
 
static DoubleLinearExpr sum (IntVar[] variables)
 
static DoubleLinearExpr sum (Literal[] literals)
 
static DoubleLinearExpr sumWithOffset (IntVar[] variables, double offset)
 
static DoubleLinearExpr sumWithOffset (Literal[] literals, double offset)
 
static DoubleLinearExpr weightedSum (IntVar[] variables, double[] coefficients)
 
static DoubleLinearExpr weightedSum (Literal[] literals, double[] coefficients)
 
static DoubleLinearExpr weightedSumWithOffset (IntVar[] variables, double[] coefficients, double offset)
 
static DoubleLinearExpr weightedSumWithOffset (Literal[] literals, double[] coefficients, double offset)
 
static DoubleLinearExpr term (IntVar variable, double coefficient)
 
static DoubleLinearExpr term (Literal lit, double coefficient)
 
static DoubleLinearExpr affine (IntVar variable, double coefficient, double offset)
 
static DoubleLinearExpr affine (Literal lit, double coefficient, double offset)
 
static DoubleLinearExpr constant (double value)
 

Detailed Description

A linear expression interface that can be parsed.

Definition at line 17 of file DoubleLinearExpr.java.

Constructor & Destructor Documentation

◆ DoubleLinearExpr() [1/12]

com.google.ortools.sat.DoubleLinearExpr.DoubleLinearExpr ( IntVar[] variables,
double[] coefficients,
double offset )

Definition at line 125 of file DoubleLinearExpr.java.

◆ DoubleLinearExpr() [2/12]

com.google.ortools.sat.DoubleLinearExpr.DoubleLinearExpr ( Literal[] literals,
double[] coefficients,
double offset )

Definition at line 134 of file DoubleLinearExpr.java.

◆ DoubleLinearExpr() [3/12]

com.google.ortools.sat.DoubleLinearExpr.DoubleLinearExpr ( IntVar var,
double coefficient,
double offset )

Definition at line 154 of file DoubleLinearExpr.java.

◆ DoubleLinearExpr() [4/12]

com.google.ortools.sat.DoubleLinearExpr.DoubleLinearExpr ( Literal lit,
double coefficient,
double offset )

Definition at line 160 of file DoubleLinearExpr.java.

◆ DoubleLinearExpr() [5/12]

com.google.ortools.sat.DoubleLinearExpr.DoubleLinearExpr ( IntVar[] vars,
double offset )

Definition at line 172 of file DoubleLinearExpr.java.

◆ DoubleLinearExpr() [6/12]

com.google.ortools.sat.DoubleLinearExpr.DoubleLinearExpr ( Literal[] literals,
double offset )

Definition at line 184 of file DoubleLinearExpr.java.

◆ DoubleLinearExpr() [7/12]

com.google.ortools.sat.DoubleLinearExpr.DoubleLinearExpr ( IntVar[] variables,
double[] coefficients,
double offset )

Definition at line 125 of file DoubleLinearExpr.java.

◆ DoubleLinearExpr() [8/12]

com.google.ortools.sat.DoubleLinearExpr.DoubleLinearExpr ( Literal[] literals,
double[] coefficients,
double offset )

Definition at line 134 of file DoubleLinearExpr.java.

◆ DoubleLinearExpr() [9/12]

com.google.ortools.sat.DoubleLinearExpr.DoubleLinearExpr ( IntVar var,
double coefficient,
double offset )

Definition at line 154 of file DoubleLinearExpr.java.

◆ DoubleLinearExpr() [10/12]

com.google.ortools.sat.DoubleLinearExpr.DoubleLinearExpr ( Literal lit,
double coefficient,
double offset )

Definition at line 160 of file DoubleLinearExpr.java.

◆ DoubleLinearExpr() [11/12]

com.google.ortools.sat.DoubleLinearExpr.DoubleLinearExpr ( IntVar[] vars,
double offset )

Definition at line 172 of file DoubleLinearExpr.java.

◆ DoubleLinearExpr() [12/12]

com.google.ortools.sat.DoubleLinearExpr.DoubleLinearExpr ( Literal[] literals,
double offset )

Definition at line 184 of file DoubleLinearExpr.java.

Member Function Documentation

◆ affine() [1/4]

static DoubleLinearExpr com.google.ortools.sat.DoubleLinearExpr.affine ( IntVar variable,
double coefficient,
double offset )
static

Creates an affine expression (var * coefficient + offset).

Definition at line 85 of file DoubleLinearExpr.java.

◆ affine() [2/4]

static DoubleLinearExpr com.google.ortools.sat.DoubleLinearExpr.affine ( IntVar variable,
double coefficient,
double offset )
static

Creates an affine expression (var * coefficient + offset).

Definition at line 85 of file DoubleLinearExpr.java.

◆ affine() [3/4]

static DoubleLinearExpr com.google.ortools.sat.DoubleLinearExpr.affine ( Literal lit,
double coefficient,
double offset )
static

Creates an affine expression (lit * coefficient + offset).

Definition at line 90 of file DoubleLinearExpr.java.

◆ affine() [4/4]

static DoubleLinearExpr com.google.ortools.sat.DoubleLinearExpr.affine ( Literal lit,
double coefficient,
double offset )
static

Creates an affine expression (lit * coefficient + offset).

Definition at line 90 of file DoubleLinearExpr.java.

◆ constant() [1/2]

static DoubleLinearExpr com.google.ortools.sat.DoubleLinearExpr.constant ( double value)
static

Creates a constant expression.

Definition at line 95 of file DoubleLinearExpr.java.

◆ constant() [2/2]

static DoubleLinearExpr com.google.ortools.sat.DoubleLinearExpr.constant ( double value)
static

Creates a constant expression.

Definition at line 95 of file DoubleLinearExpr.java.

◆ getCoefficient() [1/2]

double com.google.ortools.sat.DoubleLinearExpr.getCoefficient ( int index)

Returns the ith coefficient.

Definition at line 113 of file DoubleLinearExpr.java.

◆ getCoefficient() [2/2]

double com.google.ortools.sat.DoubleLinearExpr.getCoefficient ( int index)

Returns the ith coefficient.

Definition at line 113 of file DoubleLinearExpr.java.

◆ getOffset() [1/2]

double com.google.ortools.sat.DoubleLinearExpr.getOffset ( )

Returns the constant part of the expression.

Definition at line 121 of file DoubleLinearExpr.java.

◆ getOffset() [2/2]

double com.google.ortools.sat.DoubleLinearExpr.getOffset ( )

Returns the constant part of the expression.

Definition at line 121 of file DoubleLinearExpr.java.

◆ getVariableIndex() [1/2]

int com.google.ortools.sat.DoubleLinearExpr.getVariableIndex ( int index)

Returns the ith variable.

Definition at line 105 of file DoubleLinearExpr.java.

◆ getVariableIndex() [2/2]

int com.google.ortools.sat.DoubleLinearExpr.getVariableIndex ( int index)

Returns the ith variable.

Definition at line 105 of file DoubleLinearExpr.java.

◆ numElements() [1/2]

int com.google.ortools.sat.DoubleLinearExpr.numElements ( )

Returns the number of elements in the interface.

Definition at line 100 of file DoubleLinearExpr.java.

◆ numElements() [2/2]

int com.google.ortools.sat.DoubleLinearExpr.numElements ( )

Returns the number of elements in the interface.

Definition at line 100 of file DoubleLinearExpr.java.

◆ sum() [1/4]

static DoubleLinearExpr com.google.ortools.sat.DoubleLinearExpr.sum ( IntVar[] variables)
static

Creates a sum expression.

Definition at line 23 of file DoubleLinearExpr.java.

◆ sum() [2/4]

static DoubleLinearExpr com.google.ortools.sat.DoubleLinearExpr.sum ( IntVar[] variables)
static

Creates a sum expression.

Definition at line 23 of file DoubleLinearExpr.java.

◆ sum() [3/4]

static DoubleLinearExpr com.google.ortools.sat.DoubleLinearExpr.sum ( Literal[] literals)
static

Creates a sum expression.

We need the scalar product for the negative coefficient of negated Boolean variables.

Definition at line 28 of file DoubleLinearExpr.java.

◆ sum() [4/4]

static DoubleLinearExpr com.google.ortools.sat.DoubleLinearExpr.sum ( Literal[] literals)
static

Creates a sum expression.

We need the scalar product for the negative coefficient of negated Boolean variables.

Definition at line 28 of file DoubleLinearExpr.java.

◆ sumWithOffset() [1/4]

static DoubleLinearExpr com.google.ortools.sat.DoubleLinearExpr.sumWithOffset ( IntVar[] variables,
double offset )
static

Creates a sum expression with a double offset.

Definition at line 34 of file DoubleLinearExpr.java.

◆ sumWithOffset() [2/4]

static DoubleLinearExpr com.google.ortools.sat.DoubleLinearExpr.sumWithOffset ( IntVar[] variables,
double offset )
static

Creates a sum expression with a double offset.

Definition at line 34 of file DoubleLinearExpr.java.

◆ sumWithOffset() [3/4]

static DoubleLinearExpr com.google.ortools.sat.DoubleLinearExpr.sumWithOffset ( Literal[] literals,
double offset )
static

Creates a sum expression with a double offset.

We need the scalar product for the negative coefficient of negated Boolean variables.

Definition at line 39 of file DoubleLinearExpr.java.

◆ sumWithOffset() [4/4]

static DoubleLinearExpr com.google.ortools.sat.DoubleLinearExpr.sumWithOffset ( Literal[] literals,
double offset )
static

Creates a sum expression with a double offset.

We need the scalar product for the negative coefficient of negated Boolean variables.

Definition at line 39 of file DoubleLinearExpr.java.

◆ term() [1/4]

static DoubleLinearExpr com.google.ortools.sat.DoubleLinearExpr.term ( IntVar variable,
double coefficient )
static

Creates a linear term (var * coefficient).

Definition at line 75 of file DoubleLinearExpr.java.

◆ term() [2/4]

static DoubleLinearExpr com.google.ortools.sat.DoubleLinearExpr.term ( IntVar variable,
double coefficient )
static

Creates a linear term (var * coefficient).

Definition at line 75 of file DoubleLinearExpr.java.

◆ term() [3/4]

static DoubleLinearExpr com.google.ortools.sat.DoubleLinearExpr.term ( Literal lit,
double coefficient )
static

Creates a linear term (lit * coefficient).

Definition at line 80 of file DoubleLinearExpr.java.

◆ term() [4/4]

static DoubleLinearExpr com.google.ortools.sat.DoubleLinearExpr.term ( Literal lit,
double coefficient )
static

Creates a linear term (lit * coefficient).

Definition at line 80 of file DoubleLinearExpr.java.

◆ weightedSum() [1/4]

static DoubleLinearExpr com.google.ortools.sat.DoubleLinearExpr.weightedSum ( IntVar[] variables,
double[] coefficients )
static

Creates a scalar product.

Definition at line 45 of file DoubleLinearExpr.java.

◆ weightedSum() [2/4]

static DoubleLinearExpr com.google.ortools.sat.DoubleLinearExpr.weightedSum ( IntVar[] variables,
double[] coefficients )
static

Creates a scalar product.

Definition at line 45 of file DoubleLinearExpr.java.

◆ weightedSum() [3/4]

static DoubleLinearExpr com.google.ortools.sat.DoubleLinearExpr.weightedSum ( Literal[] literals,
double[] coefficients )
static

Creates a scalar product.

Definition at line 50 of file DoubleLinearExpr.java.

◆ weightedSum() [4/4]

static DoubleLinearExpr com.google.ortools.sat.DoubleLinearExpr.weightedSum ( Literal[] literals,
double[] coefficients )
static

Creates a scalar product.

Definition at line 50 of file DoubleLinearExpr.java.

◆ weightedSumWithOffset() [1/4]

static DoubleLinearExpr com.google.ortools.sat.DoubleLinearExpr.weightedSumWithOffset ( IntVar[] variables,
double[] coefficients,
double offset )
static

Creates a scalar product.

Definition at line 55 of file DoubleLinearExpr.java.

◆ weightedSumWithOffset() [2/4]

static DoubleLinearExpr com.google.ortools.sat.DoubleLinearExpr.weightedSumWithOffset ( IntVar[] variables,
double[] coefficients,
double offset )
static

Creates a scalar product.

Definition at line 55 of file DoubleLinearExpr.java.

◆ weightedSumWithOffset() [3/4]

static DoubleLinearExpr com.google.ortools.sat.DoubleLinearExpr.weightedSumWithOffset ( Literal[] literals,
double[] coefficients,
double offset )
static

Creates a scalar product with a double offset.

Definition at line 65 of file DoubleLinearExpr.java.

◆ weightedSumWithOffset() [4/4]

static DoubleLinearExpr com.google.ortools.sat.DoubleLinearExpr.weightedSumWithOffset ( Literal[] literals,
double[] coefficients,
double offset )
static

Creates a scalar product with a double offset.

Definition at line 65 of file DoubleLinearExpr.java.


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