Class PrimitiveConstraint

    • Field Detail

      • notConsistencyPruningEvents

        public java.util.Hashtable<Var,​java.lang.Integer> notConsistencyPruningEvents
        It specifies the events which must occur for notConsistency() method being executed.
    • Constructor Detail

      • PrimitiveConstraint

        public PrimitiveConstraint()
    • Method Detail

      • getNotConsistencyPruningEvent

        public int getNotConsistencyPruningEvent​(Var var)
        It retrieves the pruning event which causes reevaluation of the constraint notConsistency() function.
        Parameters:
        var - for which pruning event is retrieved
        Returns:
        the int denoting the pruning event associated with given variable.
      • impose

        public void impose​(Store store)
        Description copied from class: Constraint
        It imposes the constraint in a given store.
        Overrides:
        impose in class Constraint
        Parameters:
        store - the constraint store to which the constraint is imposed to.
      • getNestedPruningEvent

        public int getNestedPruningEvent​(Var var,
                                         boolean mode)
        It retrieves the pruning event for which any composed constraint which uses this constraint should be evaluated. This events are the ones which can change satisfied status?
        Parameters:
        var - for which pruning event is retrieved
        mode - decides if pruning event for consistency or nonconsistency is required.
        Returns:
        pruning event associated with the given variable for a given consistency mode.
      • getDefaultNestedNotConsistencyPruningEvent

        protected int getDefaultNestedNotConsistencyPruningEvent()
      • getDefaultNestedConsistencyPruningEvent

        protected int getDefaultNestedConsistencyPruningEvent()
      • getDefaultNotConsistencyPruningEvent

        protected abstract int getDefaultNotConsistencyPruningEvent()
      • notConsistency

        public abstract void notConsistency​(Store store)
        It makes pruning in such a way that constraint is notConsistent. It removes values which always belong to a solution.
        Parameters:
        store - the constraint store in which context the notConsistency technique is evaluated.
      • notSatisfied

        public abstract boolean notSatisfied()
        It checks if constraint would be always not satisfied.
        Returns:
        true if constraint must be notSatisfied, false otherwise.
      • setNotConsistencyPruningEvent

        public void setNotConsistencyPruningEvent​(Var var,
                                                  int pruningEvent)
        It allows to specify customized events required to trigger execution of notConsitency() method.
        Parameters:
        var - variable for which customized event is setup.
        pruningEvent - the type of the event being setup.
      • include

        public void include​(Store store)
        Description copied from interface: StoreAware
        It provide store for constraints that are not imposed but called from other constraints.
        Specified by:
        include in interface StoreAware
        Parameters:
        store - the constraint store in which context the constraint is executed.