public class DoubleLinearExpr
extends java.lang.Object
Constructor and Description |
---|
DoubleLinearExpr(IntVar[] vars,
double offset) |
DoubleLinearExpr(IntVar[] variables,
double[] coefficients,
double offset) |
DoubleLinearExpr(IntVar var,
double coefficient,
double offset) |
DoubleLinearExpr(Literal[] literals,
double offset) |
DoubleLinearExpr(Literal[] literals,
double[] coefficients,
double offset) |
DoubleLinearExpr(Literal lit,
double coefficient,
double offset) |
Modifier and Type | Method and Description |
---|---|
static DoubleLinearExpr |
affine(IntVar variable,
double coefficient,
double offset)
Creates an affine expression (var * coefficient + offset).
|
static DoubleLinearExpr |
affine(Literal lit,
double coefficient,
double offset)
Creates an affine expression (lit * coefficient + offset).
|
static DoubleLinearExpr |
constant(double value)
Creates a constant expression.
|
double |
getCoefficient(int index)
Returns the ith coefficient.
|
double |
getOffset()
Returns the constant part of the expression.
|
int |
getVariableIndex(int index)
Returns the ith variable.
|
int |
numElements()
Returns the number of elements in the interface.
|
static DoubleLinearExpr |
sum(IntVar[] variables)
Creates a sum expression.
|
static DoubleLinearExpr |
sum(Literal[] literals)
Creates a sum expression.
|
static DoubleLinearExpr |
sumWithOffset(IntVar[] variables,
double offset)
Creates a sum expression with a double offset.
|
static DoubleLinearExpr |
sumWithOffset(Literal[] literals,
double offset)
Creates a sum expression with a double offset.
|
static DoubleLinearExpr |
term(IntVar variable,
double coefficient)
Creates a linear term (var * coefficient).
|
static DoubleLinearExpr |
term(Literal lit,
double coefficient)
Creates a linear term (lit * coefficient).
|
static DoubleLinearExpr |
weightedSum(IntVar[] variables,
double[] coefficients)
Creates a scalar product.
|
static DoubleLinearExpr |
weightedSum(Literal[] literals,
double[] coefficients)
Creates a scalar product.
|
static DoubleLinearExpr |
weightedSumWithOffset(IntVar[] variables,
double[] coefficients,
double offset)
Creates a scalar product.
|
static DoubleLinearExpr |
weightedSumWithOffset(Literal[] literals,
double[] coefficients,
double offset)
Creates a scalar product with a double offset.
|
public DoubleLinearExpr(IntVar[] variables, double[] coefficients, double offset)
public DoubleLinearExpr(Literal[] literals, double[] coefficients, double offset)
public DoubleLinearExpr(IntVar var, double coefficient, double offset)
public DoubleLinearExpr(Literal lit, double coefficient, double offset)
public DoubleLinearExpr(IntVar[] vars, double offset)
public DoubleLinearExpr(Literal[] literals, double offset)
public static DoubleLinearExpr sum(IntVar[] variables)
public static DoubleLinearExpr sum(Literal[] literals)
public static DoubleLinearExpr sumWithOffset(IntVar[] variables, double offset)
public static DoubleLinearExpr sumWithOffset(Literal[] literals, double offset)
public static DoubleLinearExpr weightedSum(IntVar[] variables, double[] coefficients)
public static DoubleLinearExpr weightedSum(Literal[] literals, double[] coefficients)
public static DoubleLinearExpr weightedSumWithOffset(IntVar[] variables, double[] coefficients, double offset)
public static DoubleLinearExpr weightedSumWithOffset(Literal[] literals, double[] coefficients, double offset)
public static DoubleLinearExpr term(IntVar variable, double coefficient)
public static DoubleLinearExpr term(Literal lit, double coefficient)
public static DoubleLinearExpr affine(IntVar variable, double coefficient, double offset)
public static DoubleLinearExpr affine(Literal lit, double coefficient, double offset)
public static DoubleLinearExpr constant(double value)
public int numElements()
public int getVariableIndex(int index)
public double getCoefficient(int index)
public double getOffset()
Copyright © 2025. All rights reserved.