FIMS  v0.11.0
Loading...
Searching...
No Matches
double_logistic.hpp
Go to the documentation of this file.
1
9#ifndef POPULATION_DYNAMICS_SELECTIVITY_DOUBLE_LOGISTIC_HPP
10#define POPULATION_DYNAMICS_SELECTIVITY_DOUBLE_LOGISTIC_HPP
11
12#include "common/fims_math.hpp"
14#include "selectivity_base.hpp"
15
16namespace fims_popdy {
17
22template <typename Type>
52
54
56
68 virtual const Type evaluate(const Type& x) {
69 return fims_math::double_logistic<Type>(
71 slope_desc[0], x);
72 }
73
88 virtual const Type evaluate(const Type& x, size_t pos) {
89 return fims_math::double_logistic<Type>(
90 inflection_point_asc.get_force_scalar(pos),
91 slope_asc.get_force_scalar(pos),
92 inflection_point_desc.get_force_scalar(pos),
93 slope_desc.get_force_scalar(pos), x);
94 }
95};
96
97} // namespace fims_popdy
98
99#endif /* POPULATION_DYNAMICS_SELECTIVITY_DOUBLE_LOGISTIC_HPP */
Definition fims_vector.hpp:27
A collection of mathematical functions used in FIMS.
Establishes the FIMS Vector class.
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
Declares the SelectivityBase class which is the base class for all selectivity functors.
DoubleLogisticSelectivity class that returns the double logistic function value from fims_math.
Definition double_logistic.hpp:23
virtual const Type evaluate(const Type &x, size_t pos)
Method of the double logistic selectivity class that implements the double logistic function from FIM...
Definition double_logistic.hpp:88
fims::Vector< Type > inflection_point_asc
The age at which the ascending limb is 0.5 for models that start at age zero and each age bin represe...
Definition double_logistic.hpp:30
fims::Vector< Type > slope_asc
How quickly selectivity rises on the ascending limb; larger values give a steeper,...
Definition double_logistic.hpp:37
fims::Vector< Type > slope_desc
How quickly selectivity falls on the descending limb; larger values give a steeper decline.
Definition double_logistic.hpp:51
fims::Vector< Type > inflection_point_desc
The age at which the descending limb is 0.5 for models that start at age zero and each age bin repres...
Definition double_logistic.hpp:44
virtual const Type evaluate(const Type &x)
Method of the double logistic selectivity class that implements the double logistic function from FIM...
Definition double_logistic.hpp:68
Base class for all selectivity functors.
Definition selectivity_base.hpp:24