FIMS  v0.8.1
Loading...
Searching...
No Matches
logistic.hpp
Go to the documentation of this file.
1
10#ifndef POPULATION_DYNAMICS_MATURITY_LOGISTIC_HPP
11#define POPULATION_DYNAMICS_MATURITY_LOGISTIC_HPP
12
13#include "../../../common/fims_math.hpp"
14#include "../../../common/fims_vector.hpp"
15#include "maturity_base.hpp"
16
17namespace fims_popdy {
18
23template <typename Type>
24struct LogisticMaturity : public MaturityBase<Type> {
32
43 virtual const Type evaluate(const Type& x) {
44 return fims_math::logistic<Type>(inflection_point[0], slope[0], x);
45 }
46
57 virtual const Type evaluate(const Type& x, size_t pos) {
58 return fims_math::logistic<Type>(inflection_point.get_force_scalar(pos),
59 slope.get_force_scalar(pos), x);
60 }
61};
62
63} // namespace fims_popdy
64
65#endif /* POPULATION_DYNAMICS_MATURITY_LOGISTIC_HPP */
Definition fims_vector.hpp:27
Declares the MaturityBase class which is the base class for all maturity functors.
The population dynamics of FIMS.
Definition catch_at_age.hpp:41
void clear_internal()
Clears the internal objects.
Definition rcpp_interface.hpp:239
LogisticMaturity class that returns the logistic function value from fims_math.
Definition logistic.hpp:24
fims::Vector< Type > slope
Definition logistic.hpp:28
fims::Vector< Type > inflection_point
Definition logistic.hpp:26
virtual const Type evaluate(const Type &x)
Method of the logistic maturity class that implements the logistic function from FIMS math.
Definition logistic.hpp:43
virtual const Type evaluate(const Type &x, size_t pos)
Method of the logistic maturity class that implements the logistic function from FIMS math.
Definition logistic.hpp:57
Base class for all maturity functors.
Definition maturity_base.hpp:24