FIMS  v0.9.3
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>
38
40
52 virtual const Type evaluate(const Type& x) {
53 return fims_math::double_logistic<Type>(
55 slope_desc[0], x);
56 }
57
72 virtual const Type evaluate(const Type& x, size_t pos) {
73 return fims_math::double_logistic<Type>(
74 inflection_point_asc.get_force_scalar(pos),
75 slope_asc.get_force_scalar(pos),
76 inflection_point_desc.get_force_scalar(pos),
77 slope_desc.get_force_scalar(pos), x);
78 }
79};
80
81} // namespace fims_popdy
82
83#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:41
void clear_internal()
Clears the internal objects.
Definition rcpp_interface.hpp:235
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:72
fims::Vector< Type > inflection_point_asc
Definition double_logistic.hpp:24
fims::Vector< Type > slope_asc
Definition double_logistic.hpp:27
fims::Vector< Type > slope_desc
Definition double_logistic.hpp:33
fims::Vector< Type > inflection_point_desc
Definition double_logistic.hpp:30
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:52
Base class for all selectivity functors.
Definition selectivity_base.hpp:24