Class KGeneralizedArcConsistencyConstraint

java.lang.Object
com.artelys.kalis.KConstraint
com.artelys.kalis.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 Details

    • KGeneralizedArcConsistencyConstraint

      protected KGeneralizedArcConsistencyConstraint(long cPtr, boolean cMemoryOwn)
    • KGeneralizedArcConsistencyConstraint

      public KGeneralizedArcConsistencyConstraint(KIntVarArray vars, int acAlgorithm, 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

    • KGeneralizedArcConsistencyConstraint

      public KGeneralizedArcConsistencyConstraint(KGeneralizedArcConsistencyConstraint toCopy)
      Copy Constructor
  • Method Details

    • getCPtr

      protected static long getCPtr(KGeneralizedArcConsistencyConstraint obj)
    • finalize

      protected void finalize()
      Overrides:
      finalize in class KConstraint
    • delete

      public void delete()
      Overrides:
      delete in class KConstraint
    • swigDirectorDisconnect

      protected void swigDirectorDisconnect()
    • swigReleaseOwnership

      public void swigReleaseOwnership()
    • swigTakeOwnership

      public void swigTakeOwnership()
    • getInstance

      public KConstraint getInstance(long pb)
      Overrides:
      getInstance in class KConstraint
    • 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()
      Overrides:
      print in class KConstraint
    • 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