org.cpsolver.coursett.constraint

## Interface GroupConstraint.AssignmentPairCheck

- All Known Subinterfaces:
    GroupConstraint.ConstraintTypeInterface
  All Known Implementing Classes:
    GroupConstraint.ConstraintType, GroupConstraint.ParametrizedConstraintType
  Enclosing class:
    GroupConstraint

      public static interface GroupConstraint.AssignmentPairCheck

  Group constraints that can be checked on pairs of classes (e.g., same room means any two classes are in the same room), only need to implement this interface. Unlike `GroupConstraint.PairCheck`, this check is also given current assignment.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isSatisfied(Assignment<Lecture,Placement> assignment, GroupConstraint gc, Placement plc1, Placement plc2)` Check whether the constraint is satisfied for the given two assignments (required / preferred case)
    `boolean` | `isViolated(Assignment<Lecture,Placement> assignment, GroupConstraint gc, Placement plc1, Placement plc2)` Check whether the constraint is satisfied for the given two assignments (prohibited / discouraged case)

- - ### Method Detail

    - #### isSatisfied

          boolean isSatisfied(Assignment<Lecture,Placement> assignment,
                              GroupConstraint gc,
                              Placement plc1,
                              Placement plc2)

      Check whether the constraint is satisfied for the given two assignments (required / preferred case)
      Parameters:
        `assignment` - current assignment
        `gc` - Calling group constraint
        `plc1` - First placement
        `plc2` - Second placement
      Returns:
        true if constraint is satisfied

    - #### isViolated

          boolean isViolated(Assignment<Lecture,Placement> assignment,
                             GroupConstraint gc,
                             Placement plc1,
                             Placement plc2)

      Check whether the constraint is satisfied for the given two assignments (prohibited / discouraged case)
      Parameters:
        `assignment` - current assignment
        `gc` - Calling group constraint
        `plc1` - First placement
        `plc2` - Second placement
      Returns:
        true if constraint is satisfied