Class DoubleLinearExpr

java.lang.Object
com.google.ortools.sat.DoubleLinearExpr

public class DoubleLinearExpr extends Object
A linear expression interface that can be parsed.
  • Constructor Details

    • DoubleLinearExpr

      public DoubleLinearExpr(IntVar[] variables, double[] coefficients, double offset)
    • DoubleLinearExpr

      public DoubleLinearExpr(Literal[] literals, double[] coefficients, double offset)
    • DoubleLinearExpr

      public DoubleLinearExpr(IntVar var, double coefficient, double offset)
    • DoubleLinearExpr

      public DoubleLinearExpr(Literal lit, double coefficient, double offset)
    • DoubleLinearExpr

      public DoubleLinearExpr(IntVar[] vars, double offset)
    • DoubleLinearExpr

      public DoubleLinearExpr(Literal[] literals, double offset)
  • Method Details

    • numElements

      public int numElements()
      Returns the number of elements in the interface.
    • getVariableIndex

      public int getVariableIndex(int index)
      Returns the ith variable.
    • getCoefficient

      public double getCoefficient(int index)
      Returns the ith coefficient.
    • getOffset

      public double getOffset()
      Returns the constant part of the expression.