FRED
School Class Reference
Inheritance diagram for School:
Place

List of all members.

Public Member Functions

 School (int, const char *, double, double, Place *, Population *pop)
void prepare ()
void get_parameters (int diseases)
int get_group (int disease, Person *per)
double get_transmission_prob (int disease, Person *i, Person *s)
bool should_be_open (int day, int disease)
double get_contacts_per_day (int disease)
void enroll (Person *per)
void unenroll (Person *per)
int children_in_grade (int age)
int classrooms_for_age (int age)
void print (int disease)
void setup_classrooms ()
Placeassign_classroom (Person *per)

Member Function Documentation

void School::enroll ( Person per) [virtual]

Add a person to the place. This method increments the number of people in the place.

Parameters:
pera pointer to a Person object that may be added to the place

Reimplemented from Place.

double School::get_contacts_per_day ( int  disease_id) [virtual]

Get the contacts for a given diease.

Parameters:
disease_idan integer representation of the disease
Returns:
the contacts per day for the given diease

Implements Place.

int School::get_group ( int  disease_id,
Person per 
) [virtual]

Get the age group for a person given a particular disease_id.

Parameters:
disease_idan integer representation of the disease
pera pointer to a Person object
Returns:
the age group for the given person for the given diease

Implements Place.

void School::get_parameters ( int  disease_id) [virtual]

Sets the static variables for the class from the parameter file for a given number of disease_ids.

Parameters:
disease_idan integer representation of the disease

Implements Place.

double School::get_transmission_prob ( int  disease_id,
Person i,
Person s 
) [virtual]

Get the transmission probability for a given diease between two Person objects.

Parameters:
disease_idan integer representation of the disease
ia pointer to a Person object
sa pointer to a Person object
Returns:
the probability that there will be a transmission of disease_id from i to s

Implements Place.

void School::prepare ( ) [virtual]

Get this place ready

Reimplemented from Place.

void School::print ( int  disease_id) [virtual]

Display the information for a given disease.

Parameters:
diseasean integer representation of the disease

Reimplemented from Place.

bool School::should_be_open ( int  day,
int  disease_id 
) [virtual]

Determine if the place should be open. It is dependent on the disease_id and simulation day.

Parameters:
daythe simulation day
disease_idan integer representation of the disease
Returns:
true if the place should be open; false if not

Implements Place.

void School::unenroll ( Person per) [virtual]

Remove a person from the place. This method decrements the number of people in the place.

Parameters:
pera pointer to a Person object that may be removed to the place

Reimplemented from Place.


The documentation for this class was generated from the following files:
 All Classes Functions