Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.modelbuilder.AffineExpression Class Reference
Inheritance diagram for com.google.ortools.modelbuilder.AffineExpression:
com.google.ortools.modelbuilder.LinearExpr com.google.ortools.modelbuilder.LinearExpr com.google.ortools.modelbuilder.LinearArgument com.google.ortools.modelbuilder.LinearArgument com.google.ortools.modelbuilder.LinearArgument com.google.ortools.modelbuilder.LinearArgument

Public Member Functions

 AffineExpression (int varIndex, double coefficient, double offset)
 
LinearExpr build ()
 LinearArgument interface.
 
int numElements ()
 LinearExpr interface.
 
int getVariableIndex (int index)
 
double getCoefficient (int index)
 
double getOffset ()
 
 AffineExpression (int varIndex, double coefficient, double offset)
 
LinearExpr build ()
 LinearArgument interface.
 
int numElements ()
 LinearExpr interface.
 
int getVariableIndex (int index)
 
double getCoefficient (int index)
 
double getOffset ()
 
- Public Member Functions inherited from com.google.ortools.modelbuilder.LinearExpr
- Public Member Functions inherited from com.google.ortools.modelbuilder.LinearArgument

Additional Inherited Members

- Static Public Member Functions inherited from com.google.ortools.modelbuilder.LinearExpr
static LinearExprBuilder newBuilder ()
 
static LinearExpr constant (double value)
 
static LinearExpr term (LinearArgument expr, double coeff)
 
static LinearExpr affine (LinearArgument expr, double coeff, double offset)
 
static LinearExpr sum (LinearArgument[] exprs)
 
static LinearExpr weightedSum (LinearArgument[] exprs, double[] coeffs)
 
static LinearExprBuilder newBuilder ()
 
static LinearExpr constant (double value)
 
static LinearExpr term (LinearArgument expr, double coeff)
 
static LinearExpr affine (LinearArgument expr, double coeff, double offset)
 
static LinearExpr sum (LinearArgument[] exprs)
 
static LinearExpr weightedSum (LinearArgument[] exprs, double[] coeffs)
 

Detailed Description

A specialized linear expression: a * x + b

Definition at line 17 of file AffineExpression.java.

Constructor & Destructor Documentation

◆ AffineExpression() [1/2]

com.google.ortools.modelbuilder.AffineExpression.AffineExpression ( int varIndex,
double coefficient,
double offset )

Definition at line 22 of file AffineExpression.java.

◆ AffineExpression() [2/2]

com.google.ortools.modelbuilder.AffineExpression.AffineExpression ( int varIndex,
double coefficient,
double offset )

Definition at line 22 of file AffineExpression.java.

Member Function Documentation

◆ build() [1/2]

LinearExpr com.google.ortools.modelbuilder.AffineExpression.build ( )

LinearArgument interface.

Implements com.google.ortools.modelbuilder.LinearArgument.

Definition at line 30 of file AffineExpression.java.

◆ build() [2/2]

LinearExpr com.google.ortools.modelbuilder.AffineExpression.build ( )

LinearArgument interface.

Implements com.google.ortools.modelbuilder.LinearArgument.

Definition at line 30 of file AffineExpression.java.

◆ getCoefficient() [1/2]

double com.google.ortools.modelbuilder.AffineExpression.getCoefficient ( int index)

Returns the ith coefficient.

Implements com.google.ortools.modelbuilder.LinearExpr.

Definition at line 49 of file AffineExpression.java.

◆ getCoefficient() [2/2]

double com.google.ortools.modelbuilder.AffineExpression.getCoefficient ( int index)

Returns the ith coefficient.

Implements com.google.ortools.modelbuilder.LinearExpr.

Definition at line 49 of file AffineExpression.java.

◆ getOffset() [1/2]

double com.google.ortools.modelbuilder.AffineExpression.getOffset ( )

Returns the constant part of the expression.

Implements com.google.ortools.modelbuilder.LinearExpr.

Definition at line 57 of file AffineExpression.java.

◆ getOffset() [2/2]

double com.google.ortools.modelbuilder.AffineExpression.getOffset ( )

Returns the constant part of the expression.

Implements com.google.ortools.modelbuilder.LinearExpr.

Definition at line 57 of file AffineExpression.java.

◆ getVariableIndex() [1/2]

int com.google.ortools.modelbuilder.AffineExpression.getVariableIndex ( int index)

Returns the index of the ith variable.

Implements com.google.ortools.modelbuilder.LinearExpr.

Definition at line 41 of file AffineExpression.java.

◆ getVariableIndex() [2/2]

int com.google.ortools.modelbuilder.AffineExpression.getVariableIndex ( int index)

Returns the index of the ith variable.

Implements com.google.ortools.modelbuilder.LinearExpr.

Definition at line 41 of file AffineExpression.java.

◆ numElements() [1/2]

int com.google.ortools.modelbuilder.AffineExpression.numElements ( )

LinearExpr interface.

Implements com.google.ortools.modelbuilder.LinearExpr.

Definition at line 36 of file AffineExpression.java.

◆ numElements() [2/2]

int com.google.ortools.modelbuilder.AffineExpression.numElements ( )

LinearExpr interface.

Implements com.google.ortools.modelbuilder.LinearExpr.

Definition at line 36 of file AffineExpression.java.


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