Class ValidityChecker

  • All Implemented Interfaces:
    Direct Known Subclasses:

    public class ValidityChecker
    extends Object
    implements IntComparator
    A simple class that provides a method to check if a given tuple is valid i.e. if it is ok regarding the current domain of the variables
    • Field Detail

      • vars

        protected IntVar[] vars
      • sortedidx

        public int[] sortedidx
      • arity

        protected int arity
    • Constructor Detail

      • ValidityChecker

        public ValidityChecker​(int ari,
                               IntVar[] vars)
    • Method Detail

      • getPosition

        public final int getPosition​(int idx)
      • sortvars

        public void sortvars()
        Sort the variable to speedup the check
      • isValid

        public boolean isValid​(int[] tuple)
      • compare

        public int compare​(int i1,
                           int i2)
        Description copied from interface: IntComparator
        comparator for primitive integers
        Specified by:
        compare in interface IntComparator