seapodym-parallel
Fish dynamics models with parameter estimations
Loading...
Searching...
No Matches
SeapodymCohortDependencyAnalyzer.h
1#include <map>
2#include <set>
3#include <array>
4
5#ifndef SEAPODYM_COHORT_DEPENDENCY_ANALYZER
6#define SEAPODYM_COHORT_DEPENDENCY_ANALYZER
7
48
49private:
50
51 // number of (normal) age groups, excluding the A+ "plus group"
52 int numAgeGroups;
53
54 // number of time steps
55 int numTimeSteps;
56
57 // total number of cohorts (including A+ if aPlusCohort=true)
58 int numIds;
59
60 // cohort Id: starting step index
61 std::map<int, int> stepBegMap;
62
63 // cohort Id: ending step index + 1
64 std::map<int, int> stepEndMap;
65
66 // cohort Id: {(taskId, step), ...}
67 std::map<int, std::set<std::array<int, 2>>> dependencyMap;
68
69public:
70
83 SeapodymCohortDependencyAnalyzer(int numAgeGroups, int numTimeSteps, int ageMature = 0, bool aPlusCohort = false);
84
92 int getNumberOfCohorts() const;
93
101 int getNumberOfCohortSteps() const;
102
110 std::map<int, int> getStepBegMap() const;
111
119 std::map<int, int> getStepEndMap() const;
120
126 std::map<int, std::set<std::array<int, 2>>> getDependencyMap() const;
127
138 int getFirstAPlusCohortId() const;
139
140};
141
142#endif // SEAPODYM_COHORT_DEPENDENCY_ANALYZER
std::map< int, std::set< std::array< int, 2 > > > getDependencyMap() const
Definition SeapodymCohortDependencyAnalyzer.cpp:117
SeapodymCohortDependencyAnalyzer(int numAgeGroups, int numTimeSteps, int ageMature=0, bool aPlusCohort=false)
Definition SeapodymCohortDependencyAnalyzer.cpp:3
int getNumberOfCohorts() const
Definition SeapodymCohortDependencyAnalyzer.cpp:93
int getFirstAPlusCohortId() const
Definition SeapodymCohortDependencyAnalyzer.cpp:122
std::map< int, int > getStepEndMap() const
Definition SeapodymCohortDependencyAnalyzer.cpp:112
int getNumberOfCohortSteps() const
Definition SeapodymCohortDependencyAnalyzer.cpp:98
std::map< int, int > getStepBegMap() const
Definition SeapodymCohortDependencyAnalyzer.cpp:107