Skip to main content

LazyViewStorage

LazyViewStorage

Lazy view-based analog data storage. More…

#include <LazyAnalogDataStorage.hpp>

Inherits from AnalogDataStorageBase< LazyViewStorage< ViewType > >

Public Functions

Name
LazyViewStorage(ViewType view, std::size_t num_samples)
Construct lazy storage from a random-access view.
~LazyViewStorage() =default
float getValueAtImpl(std::size_t index) const
std::size_t sizeImpl() const
std::span< float const > getSpanImpl() const
std::span< float const > getSpanRangeImpl(std::size_t , std::size_t ) const
bool isContiguousImpl() const
AnalogStorageType getStorageTypeImpl() const
AnalogDataStorageCache tryGetCacheImpl() const
ViewType const & getView() const
Get reference to underlying view (for advanced use).

Additional inherited members

Public Functions inherited from AnalogDataStorageBase< LazyViewStorage< ViewType > >

Name
std::size_t size() const
Get the number of samples in storage.
bool empty() const
Check if storage is empty.
float getValueAt(std::size_t index) const
Get the value at a specific index.
std::span< float const > getSpan() const
Get a span over all data (if contiguous).
std::span< float const > getSpanRange(std::size_t start, std::size_t end) const
Get a span over a sub-range of data (if contiguous).
bool isContiguous() const
Check if data is stored contiguously in memory.
AnalogStorageType getStorageType() const
Get the storage type identifier.
bool isView() const
Check if this storage is a view (non-owning).
bool isLazy() const
Check if this storage is lazy-evaluated.
AnalogDataStorageCache tryGetCache() const
Try to get a cache for fast-path contiguous access.

Protected Functions inherited from AnalogDataStorageBase< LazyViewStorage< ViewType > >

Name
~AnalogDataStorageBase() =default

Detailed Description

template <typename ViewType >
class LazyViewStorage;

Lazy view-based analog data storage.

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. Works with any random-access range that yields values compatible with [AnalogTimeSeries::TimeValuePoint](/api_generated/Classes/structAnalogTimeSeries_1_1TimeValuePoint.md) or ([TimeFrameIndex](/api_generated/Classes/structTimeFrameIndex.md), float) pairs (the value accessor is inferred).

Public Functions Documentation

function LazyViewStorage

inline explicit LazyViewStorage(
    ViewType view,
    std::size_t num_samples
)

Construct lazy storage from a random-access view.

Parameters:

  • view Random-access range view (must support operator[]).
  • num_samples Number of samples (must match view size).

Exceptions:

  • std::invalid_argument if view is not random-access.

function ~LazyViewStorage

~LazyViewStorage() =default

function getValueAtImpl

inline float getValueAtImpl(
    std::size_t index
) const

function sizeImpl

inline std::size_t sizeImpl() const

function getSpanImpl

inline std::span< float const > getSpanImpl() const

function getSpanRangeImpl

inline std::span< float const > getSpanRangeImpl(
    std::size_t ,
    std::size_t 
) const

function isContiguousImpl

inline bool isContiguousImpl() const

function getStorageTypeImpl

inline AnalogStorageType getStorageTypeImpl() const

function tryGetCacheImpl

inline AnalogDataStorageCache tryGetCacheImpl() const

function getView

inline ViewType const & getView() const

Get reference to underlying view (for advanced use).


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