FIMS  v0.8.1
Loading...
Searching...
No Matches
fims_popdy::LogisticSelectivity< Type > Struct Template Reference

LogisticSelectivity class that returns the logistic function value from fims_math. More...

#include <logistic.hpp>

Inheritance diagram for fims_popdy::LogisticSelectivity< Type >:
fims_popdy::SelectivityBase< Type > fims_model_object::FIMSObject< Type >

Public Member Functions

virtual const Type evaluate (const Type &x)
 Method of the logistic selectivity class that implements the logistic function from FIMS math.
 
virtual const Type evaluate (const Type &x, size_t pos)
 Method of the logistic selectivity class that implements the logistic function from FIMS math.
 
- Public Member Functions inherited from fims_popdy::SelectivityBase< Type >
 SelectivityBase ()
 Constructor.
 
- Public Member Functions inherited from fims_model_object::FIMSObject< Type >
uint32_t GetId () const
 Getter that returns the unique id for parameters in the model.
 
bool CheckDimensions (size_t actual, size_t expected)
 Check the dimensions of an object.
 

Public Attributes

fims::Vector< Typeinflection_point
 
fims::Vector< Typeslope
 
- Public Attributes inherited from fims_model_object::FIMSObject< Type >
uint32_t id
 
std::vector< Type * > parameters
 
std::vector< Type * > random_effects_parameters
 
std::vector< Type * > fixed_effects_parameters
 

Additional Inherited Members

- Static Public Attributes inherited from fims_popdy::SelectivityBase< Type >
static uint32_t id_g = 0
 

Detailed Description

template<typename Type>
struct fims_popdy::LogisticSelectivity< Type >

LogisticSelectivity class that returns the logistic function value from fims_math.

The logistic selectivity function can produce either an ascending or descending curve based on the sign of the slope parameter. A positive slope creates an ascending logistic curve (selectivity increases from 0 to 1 with increasing x), while a negative slope creates a descending logistic curve (selectivity decreases from 1 to 0 with increasing x).

Member Function Documentation

◆ evaluate() [1/2]

template<typename Type >
virtual const Type fims_popdy::LogisticSelectivity< Type >::evaluate ( const Type x)
inlinevirtual

Method of the logistic selectivity class that implements the logistic function from FIMS math.

\[ \frac{1.0}{ 1.0 + exp(-1.0 * slope (x - inflection\_point))} \]

The selectivity curve can be either ascending or descending depending on the sign of the slope parameter:

  • Positive slope: ascending curve (selectivity increases from 0 to 1)
  • Negative slope: descending curve (selectivity decreases from 1 to 0)
Parameters
xThe independent variable in the logistic function (e.g., age or size in selectivity).

Implements fims_popdy::SelectivityBase< Type >.

◆ evaluate() [2/2]

template<typename Type >
virtual const Type fims_popdy::LogisticSelectivity< Type >::evaluate ( const Type x,
size_t  pos 
)
inlinevirtual

Method of the logistic selectivity class that implements the logistic function from FIMS math.

\[ \frac{1.0}{ 1.0 + exp(-1.0 * slope (x - inflection\_point))} \]

The selectivity curve can be either ascending or descending depending on the sign of the slope parameter:

  • Positive slope: ascending curve (selectivity increases from 0 to 1)
  • Negative slope: descending curve (selectivity decreases from 1 to 0)
Parameters
xThe independent variable in the logistic function (e.g., age or size in selectivity).
posPosition index, e.g., which year. If the index is out of bounds then it returns the first element, which would be the case when you do not have time-varying selectivity.

Implements fims_popdy::SelectivityBase< Type >.

Member Data Documentation

◆ inflection_point

50% quantile of the value of the quantity of interest (x); e.g. age at which 50% of the fish are selected

◆ slope

scalar multiplier of difference between quantity of interest value (x) and inflection_point. Positive values create an ascending curve (0 to 1), negative values create a descending curve (1 to 0).


The documentation for this struct was generated from the following file: