Skip to main content

StateEstimation::ElementsDataAdapter

StateEstimation::ElementsDataAdapter

Simple adapter that wraps elements() output for StateEstimation compatibility. More…

#include <DataAdapter.hpp>

Public Classes

Name
struct StoredItem
class Iterator

Public Functions

Name
template <typename RaggedTS >
ElementsDataAdapter(RaggedTS const & ts)
Construct from a RaggedTimeSeries-like object with elements() method.
Iterator begin() const
Iterator end() const
size_t size() const
bool empty() const

Detailed Description

template <typename DataType >
class StateEstimation::ElementsDataAdapter;

Simple adapter that wraps elements() output for StateEstimation compatibility.

Template Parameters:

  • DataType The actual data type (e.g., Line2D)

This adapter takes a RaggedTimeSeries and provides iteration over FlattenedItem objects, which the StateEstimation tracking system expects.

With the new SoA-based RaggedTimeSeries, elements() already provides a flat view of (TimeFrameIndex, DataEntry) pairs. This adapter simply converts those to FlattenedItem format.

Example usage:

auto data_source = ElementsDataAdapter<Line2D>(*line_data);

for (auto const& item : data_source) {
    TimeFrameIndex time = item.getTimeFrameIndex();
    Line2D const& line = item.getData();
    EntityId id = item.getEntityId();
}

Public Functions Documentation

function ElementsDataAdapter

template <typename RaggedTS >
inline explicit ElementsDataAdapter(
    RaggedTS const & ts
)

Construct from a RaggedTimeSeries-like object with elements() method.

function begin

inline Iterator begin() const

function end

inline Iterator end() const

function size

inline size_t size() const

function empty

inline bool empty() const

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