public class OnlineSectProof extends Object
Modifier and Type | Class and Description |
---|---|
static class |
OnlineSectProof.CatCmp
Comparison of two categories
|
static class |
OnlineSectProof.Counter
Simple integer counter
|
static class |
OnlineSectProof.Sequence
A representation of a long number of given base.
|
static class |
OnlineSectProof.StudentSequence
Extension of
OnlineSectProof.Sequence that represents an ordered
set of students as they are to be enrolled into a course (given set of
sections). |
Modifier and Type | Field and Description |
---|---|
static String[] |
sOnlineAlgs
Implemented online algorithms (heuristics)
|
Constructor and Description |
---|
OnlineSectProof() |
Modifier and Type | Method and Description |
---|---|
static int |
checkOnline(OnlineSectProof.StudentSequence sq,
boolean computeExpectations,
int alg,
boolean debug)
Section given sequence of students into the course and return the number
of students that cannot be sectioned.
|
static void |
main(String[] args)
Test given course (set of sections)
|
static double |
onlineObjective(double limit,
double used,
double expected,
int alg)
Implementation of the sectioning algorithms.
|
static boolean |
skip(boolean computeExpectations,
int alg,
boolean allTheSame)
Return true, if the given heuristics should be skipped (not evaluated).
|
public static String[] sOnlineAlgs
public OnlineSectProof()
public static boolean skip(boolean computeExpectations, int alg, boolean allTheSame)
computeExpectations
- true, if expected demand should be computed in advancealg
- online algorithm (see sOnlineAlgs
)allTheSame
- true, if all the sections are of the same sizepublic static double onlineObjective(double limit, double used, double expected, int alg)
limit
- section limitused
- number of space already usedexpected
- expected demand for the given sectionalg
- online algorithm (see sOnlineAlgs
)public static int checkOnline(OnlineSectProof.StudentSequence sq, boolean computeExpectations, int alg, boolean debug)
sq
- sequence of studendscomputeExpectations
- true, if expected demand for each section should be computed
in advance (otherwise, it is initially set to zero)alg
- online algorithm (see sOnlineAlgs
)debug
- if true, some debug messages are printed