FIMS  v0.8.1
Loading...
Searching...
No Matches
ewaa.hpp
Go to the documentation of this file.
1
9#ifndef POPULATION_DYNAMICS_GROWTH_EWAA_HPP
10#define POPULATION_DYNAMICS_GROWTH_EWAA_HPP
11
12// #include "../../../interface/interface.hpp"
13#include <map>
14
15#include "growth_base.hpp"
16
17namespace fims_popdy {
18
22template <typename Type>
23struct EWAAGrowth : public GrowthBase<Type> {
24 // add submodule class members here
25 // these include parameters of the submodule
26 // a map looks up values based on a reference key
27 // in this case, our key is age (first double), and
28 // the value is the weight at that age (second double)
29 std::map<int, std::map<double, double>> ewaa;
31 typedef typename std::map<double, double>::iterator
34 EWAAGrowth() : GrowthBase<Type>() {}
35
36 virtual ~EWAAGrowth() {}
37
44 virtual const Type evaluate(int year, const double& a) {
45 return this->ewaa[year][a];
46 }
47};
48} // namespace fims_popdy
49#endif /* POPULATION_DYNAMICS_GROWTH_EWAA_HPP */
Declares the GrowthBase class which is the base class for all growth functors.
The population dynamics of FIMS.
Definition catch_at_age.hpp:41
void clear_internal()
Clears the internal objects.
Definition rcpp_interface.hpp:239
EWAAGrowth class that returns the EWAA function value.
Definition ewaa.hpp:23
std::map< int, std::map< double, double > > ewaa
Definition ewaa.hpp:29
std::map< double, double >::iterator weight_iterator
Definition ewaa.hpp:32
virtual const Type evaluate(int year, const double &a)
Returns the weight at age a (in kg) from the input vector.
Definition ewaa.hpp:44
Base class for all growth functors.
Definition growth_base.hpp:24