LazyDigitalEventStorage
LazyDigitalEventStorage
Lazy digital event storage that computes events on-demand from a view. More…
#include <LazyDigitalEventStorage.hpp>
Inherits from DigitalEventStorageBase< LazyDigitalEventStorage< ViewType > >
Public Functions
| Name | |
|---|---|
| LazyDigitalEventStorage(ViewType view, size_t num_elements) Construct lazy storage from a random-access view. |
|
| virtual | ~LazyDigitalEventStorage() =default |
| size_t | sizeImpl() const |
| TimeFrameIndex | getEventImpl(size_t idx) const |
| EntityId | getEntityIdImpl(size_t idx) const |
| std::optional< size_t > | findByTimeImpl(TimeFrameIndex time) const |
| std::optional< size_t > | findByEntityIdImpl(EntityId id) const |
| std::pair< size_t, size_t > | getTimeRangeImpl(TimeFrameIndex start, TimeFrameIndex end) const |
| DigitalEventTimeDomain | getTimeDomainImpl() const |
| DigitalEventStorageType | getStorageTypeImpl() const |
| DigitalEventStorageCache | 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 DigitalEventStorageBase< LazyDigitalEventStorage< ViewType > >
| Name | |
|---|---|
| size_t | size() const Get total number of events. |
| bool | empty() const Check if storage is empty. |
| TimeFrameIndex | getEvent(size_t idx) const Get the event time at a flat index. |
| EntityId | getEntityId(size_t idx) const Get the EntityId at a flat index. |
| std::optional< size_t > | findByTime(TimeFrameIndex time) const Find the index of an event by its exact time. |
| std::optional< size_t > | findByEntityId(EntityId id) const Find the index of an event by its EntityId. |
| bool | hasEventAtTime(TimeFrameIndex time) const Check if an event exists at a specific time. |
| std::pair< size_t, size_t > | getTimeRange(TimeFrameIndex start, TimeFrameIndex end) const Get range of indices for events in [start, end] inclusive. |
| DigitalEventTimeDomain | getTimeDomain() const Get the time coordinate domain for this storage. |
| bool | isRelative() const Check if events are stored as relative ClockTicks. |
| ClockTicks | getRelativeEvent(size_t idx) const Get the relative event time at a flat index. |
| std::optional< size_t > | findByRelativeTime(ClockTicks time) const Find the index of an event by its exact relative time. |
| std::pair< size_t, size_t > | getRelativeTimeRange(ClockTicks start, ClockTicks end) const Get range of indices for events in [start, end] inclusive (relative time). |
| DigitalEventStorageType | 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. |
| bool | isRelativeOwning() const Check if this is relative owning storage. |
| DigitalEventStorageCache | tryGetCache() const Try to get cached pointers for fast-path access. |
Protected Functions inherited from DigitalEventStorageBase< LazyDigitalEventStorage< ViewType > >
| Name | |
|---|---|
| ~DigitalEventStorageBase() =default |
Detailed Description
template <typename ViewType >
class LazyDigitalEventStorage;Lazy digital event storage that computes events 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 objects with .event_time and .entity_id members (or first/second for pair-like types).
Public Functions Documentation
function LazyDigitalEventStorage
inline explicit LazyDigitalEventStorage(
ViewType view,
size_t num_elements
)Construct lazy storage from a random-access view.
Parameters:
- view Random-access range view yielding event-like objects.
- num_elements Number of elements in the view.
function ~LazyDigitalEventStorage
virtual ~LazyDigitalEventStorage() =defaultfunction sizeImpl
inline size_t sizeImpl() constfunction getEventImpl
inline TimeFrameIndex getEventImpl(
size_t idx
) constfunction getEntityIdImpl
inline EntityId getEntityIdImpl(
size_t idx
) constfunction findByTimeImpl
inline std::optional< size_t > findByTimeImpl(
TimeFrameIndex time
) constfunction findByEntityIdImpl
inline std::optional< size_t > findByEntityIdImpl(
EntityId id
) constfunction getTimeRangeImpl
inline std::pair< size_t, size_t > getTimeRangeImpl(
TimeFrameIndex start,
TimeFrameIndex end
) constfunction getTimeDomainImpl
inline DigitalEventTimeDomain getTimeDomainImpl() constfunction getStorageTypeImpl
inline DigitalEventStorageType getStorageTypeImpl() constfunction tryGetCacheImpl
inline DigitalEventStorageCache tryGetCacheImpl() constLazy storage is never contiguous in memory.
Returns an invalid cache, forcing callers to use polymorphic access.
function getView
inline ViewType const & getView() constGet reference to underlying view.
Updated on 2026-11-13 at 20:25:40 +0000