public static class OnlineSectProof.StudentSequence extends OnlineSectProof.Sequence
OnlineSectProof.Sequence
that represents an ordered
set of students as they are to be enrolled into a course (given set of
sections).Constructor and Description |
---|
StudentSequence(int[] columns)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
allow(int x,
int col)
Check whether it is possible to allow student of given type into the
given section.
|
boolean |
check()
Check that the underlying sequence is a valid sequence of students.
|
int |
limit(int col)
Limit of a column (section of a course).
|
int |
maxCnt(int x)
Maximum number of student of the given type that can be enrolled into
the provided sections (i.e., sum of limits of sections that are
allowed fot the student of the given type, see
allow(int, int) ). |
int |
nrAllow(int x)
Number of sections into which a student of a given type can be
enrolled (see
allow(int, int)
). |
int |
nrColumns() |
public StudentSequence(int[] columns)
columns
- limits of sections of a course (e.g., new int[] {5, 10}
for two sections, first of the size 5, second of the size
of 10)public int nrColumns()
public int limit(int col)
col
- columnpublic boolean check()
public boolean allow(int x, int col)
x
- typecol
- sectionpublic int nrAllow(int x)
allow(int, int)
).x
- typepublic int maxCnt(int x)
allow(int, int)
).x
- type