org.cpsolver.coursett.constraint

## Interface GroupConstraint.PairCheck

- Enclosing class:
    GroupConstraint

      public static interface GroupConstraint.PairCheck

  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.

- - ### Method Summary

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

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

    - #### isViolated

          boolean isViolated(GroupConstraint gc,
                             Placement plc1,
                             Placement plc2)

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