RRS Class Reference
Detailed Description
Round robin schedule.Definition at line 57 of file sports-league.cc.
Public Member Functions | |
RRS (int t) | |
Build a feasible schedule. | |
void | hag (int w, IntArgs &h, IntArgs &a, IntArgs &g) |
Home, away, and game information. | |
~RRS (void) | |
Delete schedule. | |
Protected Member Functions | |
int | weeks (void) const |
Return number of weeks. | |
int | periods (void) const |
Return number of periods. | |
int | gn (int h, int a) const |
Game number for game between home team h and away team a. | |
Play & | play (int p, int w) |
Play for period p and week w. | |
Protected Attributes | |
const int | teams |
Number of teams. | |
Play * | plays |
Play information. |
Constructor & Destructor Documentation
RRS::RRS | ( | int | t | ) | [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 105 of file sports-league.cc.
RRS::~RRS | ( | void | ) | [inline] |
Member Function Documentation
int RRS::weeks | ( | void | ) | const [inline, protected] |
int RRS::periods | ( | void | ) | const [inline, protected] |
int RRS::gn | ( | int | h, | |
int | a | |||
) | const [inline, protected] |
Game number for game between home team h and away team a.
Definition at line 72 of file sports-league.cc.
Play& RRS::play | ( | int | p, | |
int | w | |||
) | [inline, protected] |
Member Data Documentation
const int RRS::teams [protected] |
Play* RRS::plays [protected] |
The documentation for this class was generated from the following file:
- examples/sports-league.cc (Revision: 6033)