net.sf.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
 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


Copyright © 2014 UniTime LLC. All Rights Reserved.