Class KNumVar

java.lang.Object
com.artelys.kalis.KNumVar
Direct Known Subclasses:
KFloatVar, KIntVar

public class KNumVar extends Object
Superclass of decision variables
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Variable types
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    Default constructor
    protected
    KNumVar​(long cPtr, boolean cMemoryOwn)
     
     
    KNumVar​(KNumVar toCopy)
    Copy constructor
     
    KNumVar​(KProblem problem)
    main constructor
     
    KNumVar​(KProblem problem, com.artelys.kalis.SWIGTYPE_p_KNumVar_I numVar)
    Constructor with KProblem and KNumVar_I
     
    KNumVar​(com.artelys.kalis.SWIGTYPE_p_KNumVar_I numVar)
    Constructor with KNumVar_I
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Return the type of this variable


    boolean
    canBeInstantiatedTo​(double value)
    Return true if this variable can be instantiated to 'value'
    void
     
    protected void
     
    Return a copy of this object
    protected static long
    getCPtr​(KNumVar obj)
     
    int
    returns the number of constraints where this variable appears
    double
    returns lower bound of this variable
    com.artelys.kalis.SWIGTYPE_p_KNumVar_I
     
    boolean
    returns true if the variable has been assigned a value, false otherwhise
     
     
    com.artelys.kalis.SWIGTYPE_p_KNumVar_I
     
    returns the KProblem associated with this variable
    double
    returns upper bound of this variable
    double
    get target value
    double
    returns current instantiation of the variable (when the variable is not instantiated the returned value is undefined)
    void
    instantiate​(double value)
    Instantiate the variable to value
    boolean
    Return true iff this variable is hidden
    void
     
    void
    print​(com.artelys.kalis.SWIGTYPE_p_std__ostream fout)
    Pretty printing
    void
    print​(com.artelys.kalis.SWIGTYPE_p_void ctx, com.artelys.kalis.SWIGTYPE_p_f_p_void_p_q_const__char__int pfp)
    Pretty printing
    void
    setHidden​(boolean hidden)
    Hidden variable Y/N
    void
    setInf​(double value)
    set the lower bound to value
    void
    setName​(String name)
    Set the name of the variable
    void
    setNumVar_I_ptr​(com.artelys.kalis.SWIGTYPE_p_KNumVar_I numVar)
     
    void
    setSup​(double value)
    set the upper bound to value
    void
    setTarget​(double value)
    set the target value
    void
    useShaving​(boolean use)
    activate shaving Y/N

    Methods inherited from class java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • swigCMemOwn

      protected transient boolean swigCMemOwn
  • Constructor Details

    • KNumVar

      protected KNumVar(long cPtr, boolean cMemoryOwn)
    • KNumVar

      public KNumVar()
      Default constructor
    • KNumVar

      public KNumVar(KProblem problem)
      main constructor
    • KNumVar

      public KNumVar(KProblem problem, com.artelys.kalis.SWIGTYPE_p_KNumVar_I numVar)
      Constructor with KProblem and KNumVar_I
    • KNumVar

      public KNumVar(com.artelys.kalis.SWIGTYPE_p_KNumVar_I numVar)
      Constructor with KNumVar_I
    • KNumVar

      public KNumVar(KNumVar toCopy)
      Copy constructor
  • Method Details

    • getCPtr

      protected static long getCPtr(KNumVar obj)
    • finalize

      protected void finalize()
      Overrides:
      finalize in class Object
    • delete

      public void delete()
    • instantiate

      public void instantiate(double value)
      Instantiate the variable to value
    • getProblem

      public KProblem getProblem()
      returns the KProblem associated with this variable
    • getKProblem

      public KProblem getKProblem()
    • getName

      public String getName()
    • setName

      public void setName(String name)
      Set the name of the variable
    • getInf

      public double getInf()
      returns lower bound of this variable
    • getSup

      public double getSup()
      returns upper bound of this variable
    • getValue

      public double getValue()
      returns current instantiation of the variable (when the variable is not instantiated the returned value is undefined)
    • getIsInstantiated

      public boolean getIsInstantiated()
      returns true if the variable has been assigned a value, false otherwhise
    • getDegree

      public int getDegree()
      returns the number of constraints where this variable appears
    • getTarget

      public double getTarget()
      get target value
    • setInf

      public void setInf(double value)
      set the lower bound to value
    • setSup

      public void setSup(double value)
      set the upper bound to value
    • setTarget

      public void setTarget(double value)
      set the target value
    • canBeInstantiatedTo

      public boolean canBeInstantiatedTo(double value)
      Return true if this variable can be instantiated to 'value'
    • useShaving

      public void useShaving(boolean use)
      activate shaving Y/N
    • setHidden

      public void setHidden(boolean hidden)
      Hidden variable Y/N
    • isHidden

      public boolean isHidden()
      Return true iff this variable is hidden
    • getNumVar_I_ptr

      public com.artelys.kalis.SWIGTYPE_p_KNumVar_I getNumVar_I_ptr()
    • getInternalObject

      public com.artelys.kalis.SWIGTYPE_p_KNumVar_I getInternalObject()
    • setNumVar_I_ptr

      public void setNumVar_I_ptr(com.artelys.kalis.SWIGTYPE_p_KNumVar_I numVar)
    • getCopyPtr

      public KNumVar getCopyPtr()
      Return a copy of this object
    • print

      public void print(com.artelys.kalis.SWIGTYPE_p_std__ostream fout)
      Pretty printing
    • print

      public void print()
    • print

      public void print(com.artelys.kalis.SWIGTYPE_p_void ctx, com.artelys.kalis.SWIGTYPE_p_f_p_void_p_q_const__char__int pfp)
      Pretty printing
    • _instanceof

      public int _instanceof()
      Return the type of this variable