public class LinkedSections.LinkedSectionsConstraint extends Constraint<Request,Enrollment>
iConstraintListeners, iId| Modifier | Constructor and Description |
|---|---|
protected |
LinkedSectionsConstraint(Student student,
Collection<Request> requests)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
computeConflicts(Assignment<Request,Enrollment> assignment,
Enrollment value,
Set<Enrollment> conflicts)
Compute conflicts using
LinkedSections.computeConflicts(Assignment, Enrollment, ConflictHandler) |
LinkedSections |
getLinkedSections()
Return linked section
|
Student |
getStudent()
Return student
|
boolean |
inConflict(Assignment<Request,Enrollment> assignment,
Enrollment value)
Check for conflict using
LinkedSections.inConflict(Assignment, Enrollment) |
boolean |
isConsistent(Enrollment enrollment,
Enrollment other)
Check consistency using
LinkedSections.inConflict(Enrollment, EnrollmentAssignment) |
String |
toString() |
addConstraintListener, addVariable, assigned, assignedVariables, compareTo, computeConflictsNoForwardCheck, constraintListeners, countAssignedVariables, countVariables, equals, getDescription, getId, getModel, getName, hashCode, isHard, removeConstraintListener, removeVariable, setModel, unassigned, variablesprotected LinkedSectionsConstraint(Student student, Collection<Request> requests)
student - a studentrequests - sub-set of student requests Student.getRequests() that contains offerings of this linkpublic Student getStudent()
public LinkedSections getLinkedSections()
public void computeConflicts(Assignment<Request,Enrollment> assignment, Enrollment value, Set<Enrollment> conflicts)
LinkedSections.computeConflicts(Assignment, Enrollment, ConflictHandler)computeConflicts in class Constraint<Request,Enrollment>assignment - current assignmentvalue - value to be assigned to its variableconflicts - resultant set of conflicting valuespublic boolean isConsistent(Enrollment enrollment, Enrollment other)
LinkedSections.inConflict(Enrollment, EnrollmentAssignment)isConsistent in class Constraint<Request,Enrollment>enrollment - a valueother - a valuepublic boolean inConflict(Assignment<Request,Enrollment> assignment, Enrollment value)
LinkedSections.inConflict(Assignment, Enrollment)inConflict in class Constraint<Request,Enrollment>assignment - current assignmentvalue - given value