Class DecomposedConstraint<T extends Constraint>

    • Field Detail

      • queueIndex

        public int queueIndex
        It specifies the queue (index), which is used to record that constraint needs to be re-evaluated.

        Priorytet 0 - O(c), constant execution time, e.g. primitive constraints Priorytet 1 - O(n), linear execution time, e.g. Sum, SumWeight Priorytet 2 - O(n^2) quadratic execution time, e.g. Cumulative Diff2 Priorytet 3 - polynomial execution time Priorytet 4 - execution time can be exponential in worst case, SumWeightDom

    • Constructor Detail

      • DecomposedConstraint

        public DecomposedConstraint()
    • Method Detail

      • imposeDecomposition

        public abstract void imposeDecomposition​(Store store)
        It imposes the constraint in a given store.
        Parameters:
        store - the constraint store to which the constraint is imposed to.
      • imposeDecomposition

        public void imposeDecomposition​(Store store,
                                        int queueIndex)
        It imposes the constraint and adjusts the queue index.
        Parameters:
        store - the constraint store to which the constraint is imposed to.
        queueIndex - the index of the queue in the store it is assigned to.
      • decompose

        public abstract java.util.List<T> decompose​(Store store)
        It returns an array list of constraint which are used to decompose this constraint. It actually creates a decomposition (possibly also creating variables), but it does not impose the constraint.
        Parameters:
        store - the constraint store in which context the decomposition takes place.
        Returns:
        an array list of constraints used to decompose this constraint.
      • auxiliaryVariables

        public java.util.List<Var> auxiliaryVariables()
        Returns:
        null if no auxiliary variables were created, otherwise a list with variables.
      • checkInputForNullness

        public void checkInputForNullness​(java.lang.String[] a,
                                          java.lang.Object[]... parameters)
      • checkInputForNullness

        public void checkInputForNullness​(java.lang.String a,
                                          java.lang.Object[] parameters)
      • checkInputForDuplication

        public void checkInputForDuplication​(java.lang.String a,
                                             java.lang.Object[] parameters)
      • checkInputForDuplicationSkipSingletons

        public void checkInputForDuplicationSkipSingletons​(java.lang.String a,
                                                           Var[] parameters)
      • getDubletonsSkipSingletons

        public static java.util.Set<Var> getDubletonsSkipSingletons​(Var[] parameters)
      • checkInputForNullness

        public void checkInputForNullness​(java.lang.String a,
                                          int[] parameters)
      • checkInput

        public <T> void checkInput​(T[] list,
                                   java.util.function.Predicate<T> condition,
                                   java.lang.String conditionDescription)
      • checkInput

        public void checkInput​(int[] list,
                               java.util.function.Predicate<java.lang.Integer> condition,
                               java.lang.String conditionDescription)