Generated on Mon Aug 25 11:35:48 2008 for Gecode by doxygen 1.5.6

RRS Class Reference

List of all members.


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.
Playplay (int p, int w)
 Play for period p and week w.

Protected Attributes

const int teams
 Number of teams.
Playplays
 Play information.

Constructor & Destructor Documentation

RRS::RRS ( int  t  )  [inline]

Build a feasible schedule.

The games of the first week are fixed as: $ \langle 1,2 \rangle \cup \{\langle p + 2, t - p + 1\rangle | p \geq 1\}$.
The remaining games are computed by transforming a game $ \langle h, a, g \rangle $ from the previous week in a new game $ \langle h', a'\rangle $, where:
$ h' = \left\{ \begin{tabular}{l c l} 1 & & if $h = 1$ \\ 2 & & if $h = t$ \\ $h + 1$ & & otherwise \end{tabular}\right. $ and $ a' = \left\{ \begin{tabular}{l c l} 2 & & if $h = t$ \\ a + 1 & & otherwise \end{tabular}\right. $

Definition at line 105 of file sports-league.cc.

RRS::~RRS ( void   )  [inline]

Delete schedule.

Definition at line 158 of file sports-league.cc.


Member Function Documentation

int RRS::weeks ( void   )  const [inline, protected]

Return number of weeks.

Definition at line 64 of file sports-league.cc.

int RRS::periods ( void   )  const [inline, protected]

Return number of periods.

Definition at line 68 of file sports-league.cc.

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]

Play for period p and week w.

Definition at line 76 of file sports-league.cc.

void RRS::hag ( int  w,
IntArgs h,
IntArgs a,
IntArgs g 
) [inline]

Home, away, and game information.

Definition at line 150 of file sports-league.cc.


Member Data Documentation

const int RRS::teams [protected]

Number of teams.

Definition at line 60 of file sports-league.cc.

Play* RRS::plays [protected]

Play information.

Definition at line 62 of file sports-league.cc.


The documentation for this class was generated from the following file: