Currently Axis produces underflow and overflow bins unconditionally which then propagates to MultiAxis and Grid. For 1D this is not really a problem, one just needs to be careful with the indexing. The underflow bin is bin = 0 and the overflow bin is bin = # bins. While some functions that receive a bin will handle underflow and overflow bins gracefully, others only document that bin needs to be inside the covered range and produce funny output.
In case of AxisBoundaryType::Bound and AxisBoundaryType::Closed, underflow and overflow bins do not exist but will still be indexed as mentioned above.
For MultiAxis this might become a burden as with increasing dimension more and more bins will be underflow and overflow bins. For Grid we allocate a dense storage. In case these bins don't end up used it could be quite wasteful in terms of total memory used and memory bandwidth and cache locality.
Just to provide one example: a multi axis with {1, 2, 3} regular bin vector and a total of 6 regular bins ends up having 60 bins the including underflow and overflow ones.
Currently
Axisproduces underflow and overflow bins unconditionally which then propagates toMultiAxisandGrid. For 1D this is not really a problem, one just needs to be careful with the indexing. The underflow bin isbin = 0and the overflow bin isbin = # bins. While some functions that receive abinwill handle underflow and overflow bins gracefully, others only document thatbinneeds to be inside the covered range and produce funny output.In case of
AxisBoundaryType::BoundandAxisBoundaryType::Closed, underflow and overflow bins do not exist but will still be indexed as mentioned above.For
MultiAxisthis might become a burden as with increasing dimension more and more bins will be underflow and overflow bins. ForGridwe allocate a dense storage. In case these bins don't end up used it could be quite wasteful in terms of total memory used and memory bandwidth and cache locality.Just to provide one example: a multi axis with
{1, 2, 3}regular bin vector and a total of 6 regular bins ends up having 60 bins the including underflow and overflow ones.