FIMS  v0.10.0
Loading...
Searching...
No Matches
fims_popdy::GrowthDerivedSizeProvider< Type > Class Template Reference

Size provider that converts growth outputs to population size products. More...

#include <growth_derived_size_provider.hpp>

Inheritance diagram for fims_popdy::GrowthDerivedSizeProvider< Type >:
fims_popdy::SizeDistributionProviderBase< Type >

Public Member Functions

 GrowthDerivedSizeProvider (std::shared_ptr< GrowthDerivedObservationBase< Type > > growth)
 Construct a provider linked to a Growth-derived observation object.
 
const SizeGrid * TryGetSizeGrid () const override
 Return the biological size grid used by this provider.
 
void SetPopulationSizeGrid (const SizeGrid *population_size_grid) override
 Configure the provider to use the canonical population size grid.
 
void SetPopulationDimensions (std::size_t n_years, std::size_t n_ages) override
 Configure the provider dimensions for prepared size products.
 
void PrepareSizeProducts () override
 Prepare size products for the current model state.
 
void InvalidatePreparedSizeProducts () override
 Invalidate any prepared size state held by this provider.
 
const Type & MeanLAA (std::size_t year_index, std::size_t age_index) const override
 Read prepared mean length-at-age.
 
const Type & SdLAA (std::size_t year_index, std::size_t age_index) const override
 Read prepared spread of length-at-age.
 
const Type & ProbSize (std::size_t year_index, std::size_t age_index, std::size_t size_bin_index) const override
 Read prepared age-to-size probability on the population grid.
 
void SetGrowth (std::shared_ptr< GrowthDerivedObservationBase< Type > > growth)
 Replace the Growth-derived observation object used by this provider.
 

Detailed Description

template<typename Type>
class fims_popdy::GrowthDerivedSizeProvider< Type >

Size provider that converts growth outputs to population size products.

The provider reads mean length, length standard deviation, and weight-at-age from a Growth-derived observation object, then builds probability rows on the population biological size grid.

Template Parameters
TypeNumeric or automatic-differentiation scalar type.

Constructor & Destructor Documentation

◆ GrowthDerivedSizeProvider()

template<typename Type >
fims_popdy::GrowthDerivedSizeProvider< Type >::GrowthDerivedSizeProvider ( std::shared_ptr< GrowthDerivedObservationBase< Type > >  growth)
inlineexplicit

Construct a provider linked to a Growth-derived observation object.

Parameters
growthGrowth object that supplies mean length and weight outputs.

Member Function Documentation

◆ InvalidatePreparedSizeProducts()

template<typename Type >
void fims_popdy::GrowthDerivedSizeProvider< Type >::InvalidatePreparedSizeProducts ( )
inlineoverridevirtual

Invalidate any prepared size state held by this provider.

This is called when upstream biological inputs or the canonical population size grid change and previously prepared size products should no longer be reused.

Implements fims_popdy::SizeDistributionProviderBase< Type >.

◆ MeanLAA()

template<typename Type >
const Type & fims_popdy::GrowthDerivedSizeProvider< Type >::MeanLAA ( std::size_t  year_index,
std::size_t  age_index 
) const
inlineoverridevirtual

Read prepared mean length-at-age.

Parameters
year_indexYear index.
age_indexAge index.
Returns
Read-only mean length-at-age value.

Implements fims_popdy::SizeDistributionProviderBase< Type >.

◆ PrepareSizeProducts()

template<typename Type >
void fims_popdy::GrowthDerivedSizeProvider< Type >::PrepareSizeProducts ( )
inlineoverridevirtual

Prepare size products for the current model state.

Implements fims_popdy::SizeDistributionProviderBase< Type >.

◆ ProbSize()

template<typename Type >
const Type & fims_popdy::GrowthDerivedSizeProvider< Type >::ProbSize ( std::size_t  year_index,
std::size_t  age_index,
std::size_t  size_bin_index 
) const
inlineoverridevirtual

Read prepared age-to-size probability on the population grid.

Parameters
year_indexYear index.
age_indexAge index.
size_bin_indexSize-bin index.
Returns
Read-only age-to-size probability value.

Implements fims_popdy::SizeDistributionProviderBase< Type >.

◆ SdLAA()

template<typename Type >
const Type & fims_popdy::GrowthDerivedSizeProvider< Type >::SdLAA ( std::size_t  year_index,
std::size_t  age_index 
) const
inlineoverridevirtual

Read prepared spread of length-at-age.

Parameters
year_indexYear index.
age_indexAge index.
Returns
Read-only spread of length-at-age value.

Implements fims_popdy::SizeDistributionProviderBase< Type >.

◆ SetGrowth()

template<typename Type >
void fims_popdy::GrowthDerivedSizeProvider< Type >::SetGrowth ( std::shared_ptr< GrowthDerivedObservationBase< Type > >  growth)
inline

Replace the Growth-derived observation object used by this provider.

Parameters
growthGrowth object that supplies mean length and weight outputs.

◆ SetPopulationDimensions()

template<typename Type >
void fims_popdy::GrowthDerivedSizeProvider< Type >::SetPopulationDimensions ( std::size_t  n_years,
std::size_t  n_ages 
)
inlineoverridevirtual

Configure the provider dimensions for prepared size products.

Parameters
n_yearsNumber of modeled years represented.
n_agesNumber of modeled ages represented.

Providers use these dimensions together with the canonical population size grid to size any prepared population-level size products.

Implements fims_popdy::SizeDistributionProviderBase< Type >.

◆ SetPopulationSizeGrid()

template<typename Type >
void fims_popdy::GrowthDerivedSizeProvider< Type >::SetPopulationSizeGrid ( const SizeGrid *  size_grid)
inlineoverridevirtual

Configure the provider to use the canonical population size grid.

Parameters
size_gridCanonical population-level biological size grid.

Providers should prepare any grid-based size products on this grid rather than creating an independent biological size definition.

Implements fims_popdy::SizeDistributionProviderBase< Type >.

◆ TryGetSizeGrid()

template<typename Type >
const SizeGrid * fims_popdy::GrowthDerivedSizeProvider< Type >::TryGetSizeGrid ( ) const
inlineoverridevirtual

Return the biological size grid used by this provider.

Returns
Pointer to the biological size grid, or nullptr if unavailable.

Implements fims_popdy::SizeDistributionProviderBase< Type >.


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