-
Notifications
You must be signed in to change notification settings - Fork 0
/
regiondata.h
51 lines (39 loc) · 1.4 KB
/
regiondata.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//CONTAGION - CSCE2110.201 - Group 10
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include "agent.h"
#ifndef REGIONDATA_H
#define REGIONDATA_H
using namespace std;
class regionData{ //stores id, population data as well as vector of agents (of population size)
public:
regionData();
regionData(int id, int pop, int vax);
void setID(int id);
int getID();
void setPop(int pop);
int getPop();
void giveVax();
int getVax();
void addAdjacent(int adjArea); //reads in data for adjacencies
void printAdjacent(); //prints adjacency list
int getAdjacentSize();
int getAdjacents(int i);
void createAgents(); //creates an object for each person in an area
int countAgents(); //counts total number of agents in an area
int countType(char type);//counts total number of a specified type of agents in an area
void changeState(int num, char type1, char type2); //changes health state of num of agents from type1 to type2
void resetAgents(); //resets all agents to S after each simulation
int countNewInf(); //counts newly infected agents for total infected (analysis)
int countRecoveries(int time); //counts number of infected that have been infected for infPeriod
void updateTime(); //adds a day to infected for infPeriod
private:
int areaID;
int areaPop;
int vaxRec; //number of vaccines recieved from distribution.
vector<agent*> agents;
vector<int> adjacent;
};
#endif