|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--Semester
| Field Summary | |
protected Set |
availableCourses
The set of courses that have not been successfully passed. |
protected Set |
courses
The set of Courses currently assigned to this semester. |
protected boolean |
debug
Debug flag for displaying information about the possible Course assignment for this semester. |
protected Set |
failedCourses
The set of courses that were taken in this semester that were failed. |
protected boolean |
isSpringSemester
The flag for whether this semester is in the spring. |
protected static int |
MAX_NUMBER_OF_COURSES
The maximum number of courses that can be taken in one semester. |
protected boolean |
NAIVE_DOMAIN_ORDERING
Flag for whether the naive ordering of domain variables should be used in place of the heuristic based ordering. |
protected int |
semesterNumber
The number of this semester. |
| Constructor Summary | |
Semester(int semesterNumber,
boolean isSpringSemester,
Set availableCourses)
|
|
| Method Summary | |
void |
add(Value v)
Sets this variable equal to this value. |
Iterator |
getCourses()
Returns an iterator over the Courses in the semseter. |
Iterator |
getDomainValues()
Returns a list of all the possible Values that this
variable could be assigned to. |
private Iterator |
getHeuristicBasedOrdering()
Returns a list of the Courses with the Major-required courses, followed by the remaining courses in no particular order. |
private Iterator |
getNaiveOrdering()
Returns a randomized list of all the courses that have not been successfully passed. |
boolean |
isFull(CourseFeasibilityCalculator calculator)
Returns true if the semester has been scheduled for the maximum number of courses, or if the number of available courses left to take given the current assignment is zero. |
boolean |
isSpring()
Whether this semester is in the spring. |
void |
markCourseAsFailed(Course failed)
Adds this course to the semester with the specification that this course has been failed. |
void |
remove(Value v)
Removes the value from the list of possible assignments for this variable as well as removes the possible assignment of this variable to the value. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected final boolean isSpringSemester
protected final Set courses
Courses currently assigned to this semester.
protected final Set availableCourses
protected final Set failedCourses
protected static final int MAX_NUMBER_OF_COURSES
protected final int semesterNumber
protected boolean debug
Course assignment for this semester.
protected final boolean NAIVE_DOMAIN_ORDERING
| Constructor Detail |
public Semester(int semesterNumber,
boolean isSpringSemester,
Set availableCourses)
| Method Detail |
public Iterator getCourses()
Courses in the semseter.
public boolean isSpring()
public Iterator getDomainValues()
VariableValues that this
variable could be assigned to.
getDomainValues in interface Variableprivate Iterator getNaiveOrdering()
private Iterator getHeuristicBasedOrdering()
public void add(Value v)
Variable
add in interface Variablepublic void remove(Value v)
Variable
remove in interface Variablepublic void markCourseAsFailed(Course failed)
public boolean isFull(CourseFeasibilityCalculator calculator)
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||