Round robin schedule. More...
Public Member Functions | |
RRS (int t) | |
Build a feasible schedule. More... | |
void | hag (int w, IntArgs &h, IntArgs &a, IntArgs &g) |
Home, away, and game information. More... | |
~RRS (void) | |
Delete schedule. More... | |
Protected Member Functions | |
int | weeks (void) const |
Return number of weeks. More... | |
int | periods (void) const |
Return number of periods. More... | |
int | gn (int h, int a) const |
Game number for game between home team h and away team a. More... | |
Play & | play (int p, int w) |
Play for period p and week w. More... | |
Protected Attributes | |
const int | teams |
Number of teams. More... | |
Play * | plays |
Play information. More... | |
Round robin schedule.
Definition at line 62 of file sports-league.cpp.
|
inline |
Build a feasible schedule.
The games of the first week are fixed as: .
The remaining games are computed by transforming a game from the previous week in a new game
, where:
and
Definition at line 110 of file sports-league.cpp.
|
inline |
Delete schedule.
Definition at line 155 of file sports-league.cpp.
|
inlineprotected |
Return number of weeks.
Definition at line 69 of file sports-league.cpp.
|
inlineprotected |
Return number of periods.
Definition at line 73 of file sports-league.cpp.
|
inlineprotected |
Game number for game between home team h and away team a.
Definition at line 77 of file sports-league.cpp.
|
inlineprotected |
Play for period p and week w.
Definition at line 81 of file sports-league.cpp.
Home, away, and game information.
Definition at line 147 of file sports-league.cpp.
|
protected |
Number of teams.
Definition at line 65 of file sports-league.cpp.
|
protected |
Play information.
Definition at line 67 of file sports-league.cpp.