![]() |
FIMS
v0.10.0
|
Helper for constructing internally consistent population size grids. More...
#include <size_grid_builder.hpp>
Static Public Member Functions | |
| static SizeGrid | BuildFromEdges (const fims::Vector< double > &edges) |
| Build a size grid from an explicit vector of bin edges. | |
| static SizeGrid | BuildRegularGrid (double lower_edge, double upper_edge, double bin_width) |
| Build a regular size grid from lower edge, upper edge, and bin width. | |
| static fims::Vector< double > | BuildObservationEdgesFromCenters (const fims::Vector< double > ¢ers) |
| Build one fleet observation-bin edge vector from stored bin centers. | |
| static SizeGrid | BuildDefaultFromFleetEdges (const fims::Vector< fims::Vector< double > > &fleet_edges) |
| Build the default population biological size grid from resolved fleet observation-bin edges. | |
Helper for constructing internally consistent population size grids.
This builder centralizes grid creation so bin edges, centers, and dimensions are created once in a consistent way.
|
inlinestatic |
Build the default population biological size grid from resolved fleet observation-bin edges.
The default rule uses the minimum fleet lower edge and maximum fleet upper edge across the supplied fleet edge vectors to define the supported range. It then builds fixed-width regular biological bins with built-in width 1.0 in the same size units used by the user-supplied data until that regular-bin sequence covers the supported range. The built-in width is one size-data unit, but the resulting biological-bin edges are anchored to the minimum resolved fleet lower edge and therefore are not required to fall on integer-valued boundaries. Finally, it appends one additional terminal bin above the last regular bin so the final biological bin can serve as the plus-group representation.
| fleet_edges | Resolved fleet observation-bin edge vectors. |
|
inlinestatic |
Build a size grid from an explicit vector of bin edges.
| edges | Biological size-bin edges on the natural scale. |
|
inlinestatic |
Build one fleet observation-bin edge vector from stored bin centers.
For multiple centers, edges are inferred from adjacent midpoints. A single center is not enough information to infer observation-bin geometry consistently, so this helper requires at least 2 strictly increasing centers.
| centers | Fleet observation-bin centers. |
|
inlinestatic |
Build a regular size grid from lower edge, upper edge, and bin width.
| lower_edge | Lower edge of the first biological size bin. |
| upper_edge | Upper edge of the final biological size bin. |
| bin_width | Width of each biological size bin. |