FRED
|
#include <Neighborhood.h>
Public Member Functions | |
Neighborhood () | |
Neighborhood (int loc, const char *lab, double lon, double lat, Place *container, Population *pop) | |
void | get_parameters (int diseases) |
int | get_group (int disease, Person *per) |
double | get_transmission_prob (int disease, Person *i, Person *s) |
double | get_contacts_per_day (int disease) |
bool | should_be_open (int day, int disease) |
Static Public Member Functions | |
static double | get_weekend_contact_rate (int disease) |
This class represents a neighborhood location in the FRED application. It inherits from Place
. The class contains static variables that will be filled with values from the parameter file.
Neighborhood::Neighborhood | ( | ) | [inline] |
Default constructor
Neighborhood::Neighborhood | ( | int | loc, |
const char * | lab, | ||
double | lon, | ||
double | lat, | ||
Place * | container, | ||
Population * | pop | ||
) |
Convenience constructor that sets most of the values by calling Place::setup
double Neighborhood::get_contacts_per_day | ( | int | disease | ) | [virtual] |
This method returns the value from the static array Neighborhood::Neighborhood_contacts_per_day
that corresponds to a particular disease.
The static array Neighborhood_contacts_per_day
will be filled with values from the parameter file for the key neighborhood_contacts[]
.
Implements Place.
void Neighborhood::get_parameters | ( | int | diseases | ) | [virtual] |
This method is called by the constructor Neighborhood(int loc, const char *lab, double lon, double lat, Place *container, Population* pop)
Implements Place.
This method returns the value from the static array Neighborhood::Neighborhood_contact_prob
that corresponds to a particular age-related value for each person.
The static array Neighborhood_contact_prob
will be filled with values from the parameter file for the key neighborhood_prob[]
.
Implements Place.
static double Neighborhood::get_weekend_contact_rate | ( | int | disease | ) | [inline, static] |
Returns the rate by which to increase neighborhood contacts on weekends
bool Neighborhood::should_be_open | ( | int | day, |
int | disease | ||
) | [inline, virtual] |
Determine if the neighborhood should be open. It is dependent on the disease and simulation day.
day | the simulation day |
disease | an integer representation of the disease |
Implements Place.