![]() |
FIMS
v0.10.0
|
Cached population-level size outputs on a biological size grid. More...
#include <size_products.hpp>
Public Member Functions | |
| SizeProducts () | |
| Default constructor. | |
| SizeProducts (std::size_t years, std::size_t ages, std::size_t size_bins) | |
| Construct and size the size-product container. | |
| void | Resize (std::size_t years, std::size_t ages, std::size_t size_bins) |
| Resize all cached product arrays. | |
| void | ResizeProbSizeOnly (std::size_t years, std::size_t ages, std::size_t size_bins) |
| Resize only the cached age-to-size probability array. | |
| std::size_t | AgeYearIndex (std::size_t year_index, std::size_t age_index) const |
| Return the flattened index for year-age products. | |
| std::size_t | AgeYearSizeIndex (std::size_t year_index, std::size_t age_index, std::size_t size_bin_index) const |
| Return the flattened index for year-age-size-bin probabilities. | |
| Type & | MeanLAA (std::size_t year_index, std::size_t age_index) |
| Access mean length-at-age. | |
| Type & | SdLAA (std::size_t year_index, std::size_t age_index) |
| Access spread of length-at-age. | |
| Type & | ProbSize (std::size_t year_index, std::size_t age_index, std::size_t size_bin_index) |
| Access age-to-size probability. | |
| const Type & | MeanLAA (std::size_t year_index, std::size_t age_index) const |
| Read mean length-at-age. | |
| const Type & | SdLAA (std::size_t year_index, std::size_t age_index) const |
| Read 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 |
| Read age-to-size probability. | |
Public Attributes | |
| std::size_t | n_years = 0 |
| std::size_t | n_ages = 0 |
| std::size_t | n_size_bins |
| fims::Vector< Type > | mean_LAA |
| fims::Vector< Type > | sd_LAA |
| fims::Vector< Type > | prob_size |
Cached population-level size outputs on a biological size grid.
This container can be used by a size provider to store prepared size-related outputs for a pooled population, including mean length-at-age, spread-at-age, and age-to-size probabilities on the internal biological size grid.
| Type | Numeric type used for cached values. |
|
inline |
Construct and size the size-product container.
| years | Number of modeled years. |
| ages | Number of modeled ages. |
| size_bins | Number of biological size bins. |
|
inline |
Return the flattened index for year-age products.
| year_index | Year index. |
| age_index | Age index. |
|
inline |
Return the flattened index for year-age-size-bin probabilities.
| year_index | Year index. |
| age_index | Age index. |
| size_bin_index | Size-bin index. |
|
inline |
Access mean length-at-age.
| year_index | Year index. |
| age_index | Age index. |
|
inline |
Read mean length-at-age.
| year_index | Year index. |
| age_index | Age index. |
|
inline |
Access age-to-size probability.
| year_index | Year index. |
| age_index | Age index. |
| size_bin_index | Size-bin index. |
|
inline |
Read age-to-size probability.
| year_index | Year index. |
| age_index | Age index. |
| size_bin_index | Size-bin index. |
|
inline |
Resize all cached product arrays.
| years | Number of modeled years. |
| ages | Number of modeled ages. |
| size_bins | Number of biological size bins. |
|
inline |
Resize only the cached age-to-size probability array.
| years | Number of modeled years. |
| ages | Number of modeled ages. |
| size_bins | Number of biological size bins. |
This is used by providers that read MeanLAA and SdLAA from upstream growth products and only own ProbSize locally.
|
inline |
Access spread of length-at-age.
| year_index | Year index. |
| age_index | Age index. |
|
inline |
Read spread of length-at-age.
| year_index | Year index. |
| age_index | Age index. |
| fims::Vector<Type> fims_popdy::SizeProducts< Type >::mean_LAA |
mean length-at-age on the natural scale
| std::size_t fims_popdy::SizeProducts< Type >::n_ages = 0 |
number of modeled ages represented
| std::size_t fims_popdy::SizeProducts< Type >::n_size_bins |
number of biological size bins represented
| std::size_t fims_popdy::SizeProducts< Type >::n_years = 0 |
number of modeled years represented
| fims::Vector<Type> fims_popdy::SizeProducts< Type >::prob_size |
age-to-size probabilities on the biological size grid
| fims::Vector<Type> fims_popdy::SizeProducts< Type >::sd_LAA |
spread of length-at-age on the natural scale