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 Detail

      • KMax

        protected KMax​(long cPtr,
                       boolean cMemoryOwn)
      • KMax

        public KMax​(java.lang.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​(java.lang.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​(java.lang.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 Detail

      • getCPtr

        protected static long getCPtr​(KMax obj)
      • getConstraintIPtr

        public com.artelys.kalis.SWIGTYPE_p_void getConstraintIPtr()