Class IntVar

java.lang.Object
com.google.ortools.sat.IntVar
All Implemented Interfaces:
LinearArgument
Direct Known Subclasses:
BoolVar

public class IntVar extends Object implements LinearArgument
An integer variable.
  • Field Details

  • Method Details

    • getName

      public String getName()
      Returns the name of the variable given upon creation.
    • getIndex

      public int getIndex()
      Returns the index of the variable in the underlying CpModelProto.
    • getBuilder

      public IntegerVariableProto.Builder getBuilder()
      Returns the variable protobuf builder.
    • build

      public LinearExpr build()
      Description copied from interface: LinearArgument
      Builds a linear expression.
      Specified by:
      build in interface LinearArgument
    • displayBounds

      public String displayBounds()
      Returns the domain as a string without the enclosing [].
    • getDomain

      public Domain getDomain()
      Returns the domain of the variable.
    • toString

      public String toString()
      Overrides:
      toString in class Object