Class KGeneralizedArcConsistencyConstraint


  • public class KGeneralizedArcConsistencyConstraint
    extends KConstraint
    This class implements a generic class for propagation of any nary constraint by forward checking/arc consistency or generalized arc consistency

    Since:
    2016.1
    See Also:
    KConstraint

    • Constructor Detail

      • KGeneralizedArcConsistencyConstraint

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

        public KGeneralizedArcConsistencyConstraint​(KIntVarArray vars,
                                                    int acAlgorithm,
                                                    java.lang.String name)
        This constructor takes threee arguments

        Parameters:
        vars - an array of variables
        acAlgorithm - GENERALIZED_ARC_CONSISTENCY (default value) for propagation by the generalized arc consistency algorithm, ARC_CONSISTENCY for propagation by the AC algorithm, FORWARD_CHECKING for propagatino by the forward checking algorithm
        name - label for pretty printing of the constraint
      • KGeneralizedArcConsistencyConstraint

        public KGeneralizedArcConsistencyConstraint​(KIntVarArray vars,
                                                    int acAlgorithm)
        This constructor takes threee arguments

        Parameters:
        vars - an array of variables
        acAlgorithm - GENERALIZED_ARC_CONSISTENCY (default value) for propagation by the generalized arc consistency algorithm, ARC_CONSISTENCY for propagation by the AC algorithm, FORWARD_CHECKING for propagatino by the forward checking algorithm
      • KGeneralizedArcConsistencyConstraint

        public KGeneralizedArcConsistencyConstraint​(KIntVarArray vars)
        This constructor takes threee arguments

        Parameters:
        vars - an array of variables

    • Method Detail

      • swigDirectorDisconnect

        protected void swigDirectorDisconnect()
      • swigReleaseOwnership

        public void swigReleaseOwnership()
      • swigTakeOwnership

        public void swigTakeOwnership()
      • testIfSatisfied

        public boolean testIfSatisfied​(com.artelys.kalis.SWIGTYPE_p_std__vectorT_int_t tuple)
        Abstract Interface for generic propagation of any binary constraint.

        Returns:
        true if and only if the constraint is satisfied when v1 == val1 & v2 == val2
      • print

        public void print​(com.artelys.kalis.SWIGTYPE_p_std__ostream fout)
        Pretty printing of the constraint
      • print

        public void print​(com.artelys.kalis.SWIGTYPE_p_void ctx,
                          com.artelys.kalis.SWIGTYPE_p_f_p_void_p_q_const__char__int pfp)
        Overrides:
        print in class KConstraint