org.cpsolver.coursett.constraint

## Interface GroupConstraint.AssignmentParameterPairCheck<P>

- Enclosing class:
    GroupConstraint

      public static interface GroupConstraint.AssignmentParameterPairCheck<P>

  Group constraints that can have parameters need to implement this interface instead of `GroupConstraint.AssignmentPairCheck` or `GroupConstraint.PairCheck`.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `GroupConstraint.ParametrizedConstraintType<P>` | `create(String reference, String referenceRegExp)` Create constraint type with the parameters taken from the provided reference
    `boolean` | `isSatisfied(Assignment<Lecture,Placement> assignment, P parameter, 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, P parameter, 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,
                              P parameter,
                              GroupConstraint gc,
                              Placement plc1,
                              Placement plc2)

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

    - #### isViolated

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

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

    - #### create

          GroupConstraint.ParametrizedConstraintType<P> create(String reference,
                                                               String referenceRegExp)

      Create constraint type with the parameters taken from the provided reference
      Parameters:
        `reference` - constraint reference, including parameter(s)
        `referenceRegExp` - reference regular expression defined on the constraint type
      Returns:
        constraint type with the parameter