IColumnComputer
IColumnComputer
Templated interface for computing column values in a batch operation. More…
#include <IColumnComputer.h>
Inherited by AnalogSliceGathererComputer< T >, EventInIntervalComputer< T >, IntervalOverlapComputer< T >, IntervalPropertyComputer< T >, MultiComputerOutputView< T >
Public Functions
| Name | |
|---|---|
| virtual | ~IColumnComputer() =default |
| IColumnComputer(IColumnComputer const & ) =delete | |
| IColumnComputer & | operator=(IColumnComputer const & ) =delete |
| IColumnComputer(IColumnComputer && ) =delete | |
| IColumnComputer & | operator=(IColumnComputer && ) =delete |
| virtual std::pair< std::vector< T >, ColumnEntityIds > | compute(ExecutionPlan const & plan) const =0 The core batch computation method. |
| virtual std::vector< std::string > | getDependencies() const Declares dependencies on other columns. |
| virtual std::string | getSourceDependency() const =0 Declares the required data source. |
| virtual EntityIdStructure | getEntityIdStructure() const Gets the EntityID structure type for this computer. |
| virtual ColumnEntityIds | computeColumnEntityIds(ExecutionPlan const & plan) const Computes all EntityIDs for the column using the high-level variant approach. |
| virtual std::vector< EntityId > | computeCellEntityIds(ExecutionPlan const & plan, size_t row_index) const Computes EntityIDs for a specific row. |
| virtual bool | hasEntityIds() const Checks if this computer can provide EntityID information. |
Protected Functions
| Name | |
|---|---|
| IColumnComputer() =default |
Detailed Description
template <typename T >
class IColumnComputer;Templated interface for computing column values in a batch operation.
This interface defines the strategy for computing all values in a column in a single batch operation. Different implementations can provide different computation strategies (direct access, interval reductions, transformations, etc.). The template parameter T allows for heterogeneous column types.
Public Functions Documentation
function ~IColumnComputer
virtual ~IColumnComputer() =defaultfunction IColumnComputer
IColumnComputer(
IColumnComputer const &
) =deletefunction operator=
IColumnComputer & operator=(
IColumnComputer const &
) =deletefunction IColumnComputer
IColumnComputer(
IColumnComputer &&
) =deletefunction operator=
IColumnComputer & operator=(
IColumnComputer &&
) =deletefunction compute
virtual std::pair< std::vector< T >, ColumnEntityIds > compute(
ExecutionPlan const & plan
) const =0The core batch computation method.
Parameters:
- plan The execution plan containing cached access patterns.
Return: Vector of computed values for the entire column.
Reimplemented by: AnalogSliceGathererComputer::compute, EventInIntervalComputer::compute, EventInIntervalComputer::compute, EventInIntervalComputer::compute, EventInIntervalComputer::compute, EventInIntervalComputer::compute, EventInIntervalComputer::compute, EventInIntervalComputer::compute, IntervalOverlapComputer::compute, IntervalOverlapComputer::compute, IntervalPropertyComputer::compute, IntervalReductionComputer::compute, LineLengthComputer::compute, LineTimestampComputer::compute, MultiComputerOutputView::compute, StandardizeComputer::compute, TimestampInIntervalComputer::compute, TimestampValueComputer::compute
This method performs the actual computation of all column values based on the provided execution plan. The execution plan contains the cached access patterns (indices or intervals) for the data source.
function getDependencies
inline virtual std::vector< std::string > getDependencies() constDeclares dependencies on other columns.
Return: Vector of column names this computer depends on.
Reimplemented by: StandardizeComputer::getDependencies
For transformed columns that depend on other columns, this method returns the names of the columns that must be computed first.
function getSourceDependency
virtual std::string getSourceDependency() const =0Declares the required data source.
Return: The name of the required data source.
Reimplemented by: EventInIntervalComputer::getSourceDependency, StandardizeComputer::getSourceDependency
This method returns the name of the data source that this computer needs to access (e.g., “LFP”, “Spikes.x”).
function getEntityIdStructure
inline virtual EntityIdStructure getEntityIdStructure() constGets the EntityID structure type for this computer.
Return: The EntityID structure type for this computer.
Reimplemented by: EventInIntervalComputer::getEntityIdStructure, IntervalOverlapComputer::getEntityIdStructure, IntervalPropertyComputer::getEntityIdStructure, TimestampValueComputer::getEntityIdStructure
This indicates whether the computer provides no EntityIDs, simple EntityIDs (one per row), or complex EntityIDs (multiple per row).
function computeColumnEntityIds
inline virtual ColumnEntityIds computeColumnEntityIds(
ExecutionPlan const & plan
) constComputes all EntityIDs for the column using the high-level variant approach.
Parameters:
- plan The execution plan used for computation.
Return: ColumnEntityIds variant containing the EntityIDs for this column.
The returned variant contains one of:
- std::monostate: No EntityIDs available
- std::vector
: One EntityID per row (simple) - std::vector<std::vector
>: Multiple EntityIDs per row (complex)
Note: Shared EntityID collections are typically handled at the Column level for table transforms, not at the computer level.
function computeCellEntityIds
inline virtual std::vector< EntityId > computeCellEntityIds(
ExecutionPlan const & plan,
size_t row_index
) constComputes EntityIDs for a specific row.
Parameters:
- plan The execution plan used for computation.
- row_index The row index to get EntityIDs for.
Return: Vector of EntityIDs for the specified row. Empty if not available.
This is a convenience method that works across all EntityID structures.
function hasEntityIds
inline virtual bool hasEntityIds() constChecks if this computer can provide EntityID information.
Return: True if EntityIDs are available, false otherwise.
Protected Functions Documentation
function IColumnComputer
IColumnComputer() =defaultUpdated on 2026-11-13 at 20:25:40 +0000