-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInteractionTracker.h
More file actions
39 lines (24 loc) · 808 Bytes
/
InteractionTracker.h
File metadata and controls
39 lines (24 loc) · 808 Bytes
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
/*
* interactionTracker.h
*
* Created on: 19 Jun 2014
* Author: rusty
*/
#ifndef INTERACTIONTRACKER_H_
#define INTERACTIONTRACKER_H_
#include <vector>
using namespace std;
class InteractionTracker{
private:
vector <vector<vector<double> > >interactionTimeseries; // this uses the Interaction Matrix metric for interaction strength
public:
~InteractionTracker(){}
InteractionTracker(){}
InteractionTracker(int timestepCount, int unitCount){
interactionTimeseries.resize(timestepCount,vector<vector <double> >(unitCount,vector<double>(unitCount,0))); // stores ALL interactions (including intra-specific)
}
void storeInteraction(int t, int i, int j, double interaction){
interactionTimeseries.at(t).at(i).at(j) = interaction;
}
};
#endif /* INTERACTIONTRACKER_H_ */