FRED
Neighborhood Class Reference

#include <Neighborhood.h>

Inheritance diagram for Neighborhood:
Place

List of all members.

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)

Detailed Description

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.

See also:
Place

Constructor & Destructor Documentation

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

See also:
Place::setup(int loc_id, const char *lab, double lon, double lat, Place* cont, Population *pop)

Member Function Documentation

double Neighborhood::get_contacts_per_day ( int  disease) [virtual]
See also:
Place::get_contacts_per_day(int disease)

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.

int Neighborhood::get_group ( int  disease,
Person per 
) [virtual]
void Neighborhood::get_parameters ( int  diseases) [virtual]
double Neighborhood::get_transmission_prob ( int  disease,
Person i,
Person s 
) [virtual]
See also:
Place::get_transmission_prob(int disease, Person * i, Person * s)

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

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.

Parameters:
daythe simulation day
diseasean integer representation of the disease
Returns:
whether or not the neighborhood is open on the given day for the given disease

Implements Place.


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