Class KMax


public class KMax extends KConstraint
This class creates a vMax = max(X1,X2,...,Xn) constraint

Example :

KIntVarArray X(...);
KIntVar maxOfX(...);
// ...
problem.post(KMax("maxOfX=max(X)", maxOfX, X));


Since:
2016.1
See Also:
KConstraint

  • Constructor Details

    • KMax

      protected KMax(long cPtr, boolean cMemoryOwn)
    • KMax

      public KMax(String name, KIntVar vMax, KIntVarArray vars, boolean boundConsistency)
      Primary constructor of vMax = max(X1,X2,...,Xn)
      Parameters:
      vMax - variable to be the max of vars
      vars - variable array whose maximum is seeked
    • KMax

      public KMax(String name, KIntVar vMax, KIntVarArray vars)
      Primary constructor of vMax = max(X1,X2,...,Xn)
      Parameters:
      vMax - variable to be the max of vars
      vars - variable array whose maximum is seeked
    • KMax

      public KMax(String name, KNumVar vMax, KNumVarArray vars)
      Primary constructor of vMax = max(X1,X2,...,Xn)
      Parameters:
      vMax - variable to be the max of vars
      vars - variable array whose maximum is seeked
    • KMax

      public KMax(KMax toCopy)
      Copy Constructor
  • Method Details

    • getCPtr

      protected static long getCPtr(KMax obj)
    • finalize

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

      public void delete()
      Overrides:
      delete in class KConstraint
    • getConstraintIPtr

      public com.artelys.kalis.SWIGTYPE_p_void getConstraintIPtr()