Class DoubleLinearExpr


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

      • 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 Detail

      • 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.