![]() |
FIMS
v0.10.0
|
Growth-derived age-to-length conversion implementation that reads prepared population age-to-size probabilities and maps them into fleet observation bins. More...
#include <derived.hpp>
Public Member Functions | |
| AgeToLengthConversionDerived (const std::shared_ptr< Fleet< Type > > &fleet_, const std::shared_ptr< GrowthDerivedObservationBase< Type > > &growth_observation_, const std::shared_ptr< SizeDistributionProviderBase< Type > > &size_provider_) | |
| Constructor. | |
| virtual | ~AgeToLengthConversionDerived () |
| Destructor. | |
| virtual bool | IsActive () const override |
| Returns whether this growth-derived age-to-length conversion is structurally active. | |
| virtual bool | PrepareForCurrentState () override |
| Ensures the linked growth products and population size-provider products are prepared for the current model state. | |
| virtual bool | BuildAgeToLengthConversionRow (size_t year, size_t age, fims::Vector< Type > &out_row) const override |
| Builds the normalized 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. | |
Public Attributes | |
| std::weak_ptr< Fleet< Type > > | fleet_ |
| std::weak_ptr< SizeDistributionProviderBase< Type > > | size_provider_ |
| std::shared_ptr< GrowthDerivedObservationBase< Type > > | growth_observation_ |
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 |
Protected Member Functions | |
| fims::Vector< Type > | BuildPopulationProbSizeRow (std::size_t year_index, std::size_t age_index) const |
| Read one prepared age-to-size row from the linked population size provider. | |
| bool | TryFinalizeMappedProbabilityRow (fims::Vector< Type > &row, std::size_t expected_size, const Type &minimum_bin_prob=static_cast< Type >(1e-12)) const |
| Normalize one mapped fleet probability row. | |
| fims::Vector< Type > | BuildMappedFleetAgeToLengthConversionRow (std::size_t year_index, std::size_t age_index) const |
| Build one fleet age-to-length conversion row by mapping a population age-to-size row onto fleet observation bins. | |
| std::shared_ptr< SizeDistributionProviderBase< Type > > | TryGetSizeProvider () const |
| Try to get the linked population size provider. | |
| const GrowthProducts< Type > * | TryGetGrowthProducts () const |
| Try to get prepared growth products from the linked growth object. | |
Additional Inherited Members | |
Static Public Attributes inherited from fims_popdy::AgeToLengthConversionBase< Type > | |
| 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. | |
Growth-derived age-to-length conversion implementation that reads prepared population age-to-size probabilities and maps them into fleet observation bins.
|
inline |
Constructor.
| fleet_ | Shared pointer to the fleet using this age-to-length conversion. |
| growth_observation_ | Shared pointer to the growth-derived observation capability. |
| size_provider_ | Shared pointer to the population size provider. |
|
inlineoverridevirtual |
Builds the normalized age-to-length conversion row for a given year and age.
| year | Year index. |
| age | Age index. |
| out_row | Output age-to-length probability row. |
Implements fims_popdy::AgeToLengthConversionBase< Type >.
|
inlineprotected |
Build one fleet age-to-length conversion row by mapping a population age-to-size row onto fleet observation bins.
| year_index | Year index. |
| age_index | Age index. |
|
inlineprotected |
Read one prepared age-to-size row from the linked population size provider.
| year_index | Year index. |
| age_index | Age index. |
|
inlineoverridevirtual |
Returns whether this growth-derived age-to-length conversion is structurally active.
Implements fims_popdy::AgeToLengthConversionBase< Type >.
|
inlineoverridevirtual |
Ensures the linked growth products and population size-provider products are prepared for the current model state.
This helper reuses already prepared growth products when available and only triggers preparation when products have not yet been prepared. It then prepares the linked population size provider so the age-to-length conversion can read population age-to-size rows for mapping into fleet observation bins.
Implements fims_popdy::AgeToLengthConversionBase< Type >.
|
inlineprotected |
Normalize one mapped fleet probability row.
| row | Fleet probability row on observation bins. |
| expected_size | Expected number of fleet bins. |
| minimum_bin_prob | Minimum probability added to each bin before normalization. |
|
inlineprotected |
Try to get prepared growth products from the linked growth object.
|
inlineprotected |
Try to get the linked population size provider.
| std::weak_ptr<Fleet<Type> > fims_popdy::AgeToLengthConversionDerived< Type >::fleet_ |
non-owning link to the fleet
| std::shared_ptr<GrowthDerivedObservationBase<Type> > fims_popdy::AgeToLengthConversionDerived< Type >::growth_observation_ |
growth-derived observation capability
| std::weak_ptr<SizeDistributionProviderBase<Type> > fims_popdy::AgeToLengthConversionDerived< Type >::size_provider_ |
non-owning link to the population size provider