FIMS  v0.10.0
Loading...
Searching...
No Matches
fims_popdy::AgeToLengthConversionBase< Type > Struct Template Referenceabstract

Base interface for age-length key implementations. More...

#include <base.hpp>

Inheritance diagram for fims_popdy::AgeToLengthConversionBase< Type >:
fims_model_object::FIMSObject< Type > fims_model_object::FIMSMemoryTracker fims_popdy::AgeToLengthConversionDerived< Type > fims_popdy::AgeToLengthConversionFixed< Type >

Public Member Functions

virtual bool IsActive () const =0
 Returns whether this age-to-length conversion is active and valid for use.
 
virtual bool PrepareForCurrentState ()=0
 Prepare this age-to-length conversion for the current model state.
 
virtual bool BuildAgeToLengthConversionRow (size_t year, size_t age, fims::Vector< Type > &out_row) const =0
 Builds the age-to-length conversion row for a given year and age.
 
- 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 Member Functions inherited from fims_model_object::FIMSMemoryTracker
void register_self (const uint32_t id)
 Registers a FIMSObject instance with the memory tracker.
 

Static Public Attributes

static uint32_t id_g
 
- Static Public Attributes inherited from fims_model_object::FIMSMemoryTracker
static int total_active_objects = 0
 Total number of active FIMSObject instances currently in memory.
 

Additional Inherited Members

- 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
 

Detailed Description

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

Base interface for age-length key implementations.

Template Parameters
TypeNumeric type used by the model.

Member Function Documentation

◆ BuildAgeToLengthConversionRow()

template<typename Type >
virtual bool fims_popdy::AgeToLengthConversionBase< Type >::BuildAgeToLengthConversionRow ( size_t  year,
size_t  age,
fims::Vector< Type > &  out_row 
) const
pure virtual

Builds the age-to-length conversion row for a given year and age.

Parameters
yearYear index.
ageAge index.
out_rowOutput age-to-length probability row.
Returns
True if the age-to-length conversion row was built successfully.

Implemented in fims_popdy::AgeToLengthConversionDerived< Type >, and fims_popdy::AgeToLengthConversionFixed< Type >.

◆ IsActive()

template<typename Type >
virtual bool fims_popdy::AgeToLengthConversionBase< Type >::IsActive ( ) const
pure virtual

Returns whether this age-to-length conversion is active and valid for use.

Returns
True if the age-to-length conversion can be used to build rows.

Implemented in fims_popdy::AgeToLengthConversionDerived< Type >, and fims_popdy::AgeToLengthConversionFixed< Type >.

◆ PrepareForCurrentState()

template<typename Type >
virtual bool fims_popdy::AgeToLengthConversionBase< Type >::PrepareForCurrentState ( )
pure virtual

Prepare this age-to-length conversion for the current model state.

Returns
True if the age-to-length conversion is ready to build rows for the current state.

Implemented in fims_popdy::AgeToLengthConversionDerived< Type >, and fims_popdy::AgeToLengthConversionFixed< Type >.

Member Data Documentation

◆ id_g

Initial value:
=
0

reference id for age-to-length conversion object

global counter for age-to-length conversion ids


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