FIMS  v0.11.0
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"
15#include "maturity_base.hpp"
16
17namespace fims_popdy {
18
23template <typename Type>
24struct LogisticMaturity : public MaturityBase<Type> {
36
38
49 virtual const Type evaluate(const Type& x) {
50 return fims_math::logistic<Type>(inflection_point[0], slope[0], x);
51 }
52
63 virtual const Type evaluate(const Type& x, size_t pos) {
64 return fims_math::logistic<Type>(inflection_point.get_force_scalar(pos),
65 slope.get_force_scalar(pos), x);
66 }
67};
68
69} // namespace fims_popdy
70
71#endif /* POPULATION_DYNAMICS_MATURITY_LOGISTIC_HPP */
Definition fims_vector.hpp:27
A collection of mathematical functions used in FIMS.
Establishes the FIMS Vector class.
Declares the MaturityBase class which is the base class for all maturity functors.
The population dynamics of FIMS.
Definition catch_at_age.hpp:45
std::shared_ptr< AgeToLengthConversionBase< Type > > BuildAgeToLengthConversionFleet(const std::shared_ptr< Population< Type > > &population, const std::shared_ptr< Fleet< Type > > &fleet)
Build the active age-to-length conversion for a fleet from the current population and fleet state.
Definition runtime.hpp:44
LogisticMaturity class that returns the logistic function value from fims_math.
Definition logistic.hpp:24
fims::Vector< Type > slope
How quickly the proportion mature changes with age around the inflection point, per year of age....
Definition logistic.hpp:35
fims::Vector< Type > inflection_point
The age at which 50% of fish are mature for models that start at age zero and each age bin represents...
Definition logistic.hpp:29
virtual const Type evaluate(const Type &x)
Method of the logistic maturity class that implements the logistic function from FIMS math.
Definition logistic.hpp:49
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:63
Base class for all maturity functors.
Definition maturity_base.hpp:24