Skip to main content

LazyRaggedAnalogStorage

LazyRaggedAnalogStorage

Lazy ragged analog storage that computes values on-demand from a view. More…

#include <RaggedAnalogStorage.hpp>

Inherits from RaggedAnalogStorageBase< LazyRaggedAnalogStorage< ViewType > >

Public Functions

Name
LazyRaggedAnalogStorage(ViewType view, size_t num_elements)
Construct lazy storage from a random-access view.
virtual ~LazyRaggedAnalogStorage() =default
size_t sizeImpl() const
TimeFrameIndex getTimeImpl(size_t idx) const
float getValueImpl(size_t idx) const
std::pair< size_t, size_t > getTimeRangeImpl(TimeFrameIndex time) const
size_t getTimeCountImpl() const
RaggedAnalogStorageType getStorageTypeImpl() const
std::span< float const > getValuesAtTimeImpl(TimeFrameIndex time) const
RaggedAnalogStorageCache tryGetCacheImpl() const
Lazy storage is never contiguous in memory.
ViewType const & getView() const
Get reference to underlying view.

Additional inherited members

Public Functions inherited from RaggedAnalogStorageBase< LazyRaggedAnalogStorage< ViewType > >

Name
size_t size() const
Get total number of float entries across all times.
bool empty() const
Check if storage is empty.
TimeFrameIndex getTime(size_t idx) const
Get the TimeFrameIndex at a flat index.
float getValue(size_t idx) const
Get the float value at a flat index.
std::pair< size_t, size_t > getTimeRange(TimeFrameIndex time) const
Get range of flat indices for a specific time.
size_t getTimeCount() const
Get number of distinct times with data.
bool hasDataAtTime(TimeFrameIndex time) const
Check if data exists at a specific time.
std::span< float const > getValuesAtTime(TimeFrameIndex time) const
Get values at a specific time as a span.
RaggedAnalogStorageType getStorageType() const
Get the storage type identifier.
bool isView() const
Check if this is a view (doesn’t own data).
bool isLazy() const
Check if this is lazy storage.
RaggedAnalogStorageCache tryGetCache() const
Try to get cached pointers for fast-path access.

Protected Functions inherited from RaggedAnalogStorageBase< LazyRaggedAnalogStorage< ViewType > >

Name
~RaggedAnalogStorageBase() =default

Detailed Description

template <typename ViewType >
class LazyRaggedAnalogStorage;

Lazy ragged analog storage that computes values on-demand from a view.

Template Parameters:

  • ViewType Type of the random-access range view

Stores a computation pipeline as a random-access view that transforms data on-demand. Enables efficient composition of transforms without materializing intermediate results.

The view must yield pairs of (TimeFrameIndex, float).

Public Functions Documentation

function LazyRaggedAnalogStorage

inline explicit LazyRaggedAnalogStorage(
    ViewType view,
    size_t num_elements
)

Construct lazy storage from a random-access view.

Parameters:

  • view Random-access range view yielding (TimeFrameIndex, float) pairs
  • num_elements Number of elements in the view

function ~LazyRaggedAnalogStorage

virtual ~LazyRaggedAnalogStorage() =default

function sizeImpl

inline size_t sizeImpl() const

function getTimeImpl

inline TimeFrameIndex getTimeImpl(
    size_t idx
) const

function getValueImpl

inline float getValueImpl(
    size_t idx
) const

function getTimeRangeImpl

inline std::pair< size_t, size_t > getTimeRangeImpl(
    TimeFrameIndex time
) const

function getTimeCountImpl

inline size_t getTimeCountImpl() const

function getStorageTypeImpl

inline RaggedAnalogStorageType getStorageTypeImpl() const

function getValuesAtTimeImpl

inline std::span< float const > getValuesAtTimeImpl(
    TimeFrameIndex time
) const

function tryGetCacheImpl

inline RaggedAnalogStorageCache tryGetCacheImpl() const

Lazy storage is never contiguous in memory.

Returns an invalid cache, forcing callers to use virtual dispatch.

function getView

inline ViewType const & getView() const

Get reference to underlying view.


Updated on 2026-11-13 at 20:25:40 +0000