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
53
54private:
55
56 // number of (normal) age groups, excluding the A+ "plus group"
57 int numAgeGroups;
58
59 // number of time steps
60 int numTimeSteps;
61
62 // total number of cohorts (including A+ if aPlusCohort=true)
63 int numIds;
64
65 // cohort Id: starting step index
66 std::map<int, int> stepBegMap;
67
68 // cohort Id: ending step index + 1
69 std::map<int, int> stepEndMap;
70
71 // cohort Id: {(taskId, step), ...}
72 std::map<int, std::set<std::array<int, 2>>> dependencyMap;
73
74public:
75
94 SeapodymCohortDependencyAnalyzer(int numAgeGroups, int numTimeSteps, int ageMature = 0, bool aPlusCohort = false, bool aPlusFeedsSpawning = true);
95
103 int getNumberOfCohorts() const;
104
112 int getNumberOfCohortSteps() const;
113
121 std::map<int, int> getStepBegMap() const;
122
130 std::map<int, int> getStepEndMap() const;
131
137 std::map<int, std::set<std::array<int, 2>>> getDependencyMap() const;
138
149 int getFirstAPlusCohortId() const;
150
151};
152
153#endif // SEAPODYM_COHORT_DEPENDENCY_ANALYZER
SeapodymCohortDependencyAnalyzer(int numAgeGroups, int numTimeSteps, int ageMature=0, bool aPlusCohort=false, bool aPlusFeedsSpawning=true)
Definition SeapodymCohortDependencyAnalyzer.cpp:3
std::map< int, std::set< std::array< int, 2 > > > getDependencyMap() const
Definition SeapodymCohortDependencyAnalyzer.cpp:123
int getNumberOfCohorts() const
Definition SeapodymCohortDependencyAnalyzer.cpp:99
int getFirstAPlusCohortId() const
Definition SeapodymCohortDependencyAnalyzer.cpp:128
std::map< int, int > getStepEndMap() const
Definition SeapodymCohortDependencyAnalyzer.cpp:118
int getNumberOfCohortSteps() const
Definition SeapodymCohortDependencyAnalyzer.cpp:104
std::map< int, int > getStepBegMap() const
Definition SeapodymCohortDependencyAnalyzer.cpp:113