Skip to main content

IntervalReductionComputer

IntervalReductionComputer

Column computer that performs reduction operations over intervals. More…

#include <IntervalReductionComputer.h>

Inherits from IColumnComputer< double >

Public Functions

Name
IntervalReductionComputer(std::shared_ptr< IAnalogSource > source, ReductionType reduction)
Constructs an IntervalReductionComputer.
IntervalReductionComputer(std::shared_ptr< IAnalogSource > source, ReductionType reduction, std::string sourceName)
Constructs an IntervalReductionComputer with custom source name.
virtual std::pair< std::vector< double >, ColumnEntityIds > compute(const ExecutionPlan & plan) const override
The core batch computation method.
std::string getSourceDependency() const override

Additional inherited members

Public Functions inherited from IColumnComputer< double >

Name
virtual ~IColumnComputer() =default
IColumnComputer(IColumnComputer const & ) =delete
IColumnComputer & operator=(IColumnComputer const & ) =delete
IColumnComputer(IColumnComputer && ) =delete
IColumnComputer & operator=(IColumnComputer && ) =delete
virtual std::vector< std::string > getDependencies() const
Declares dependencies on other columns.
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 inherited from IColumnComputer< double >

Name
IColumnComputer() =default

Detailed Description

class IntervalReductionComputer;

Column computer that performs reduction operations over intervals.

Source type: IAnalogSource Selector type: Interval Output type: double

This computer takes an analog source and performs reduction operations (mean, max, min, std dev, etc.) over specified intervals. It uses the ExecutionPlan to get interval pairs and computes the reduction for each interval using efficient span-based data access.

Public Functions Documentation

function IntervalReductionComputer

IntervalReductionComputer(
    std::shared_ptr< IAnalogSource > source,
    ReductionType reduction
)

Constructs an IntervalReductionComputer.

Parameters:

  • source Shared pointer to the analog source to compute over.
  • reduction The type of reduction operation to perform.

function IntervalReductionComputer

IntervalReductionComputer(
    std::shared_ptr< IAnalogSource > source,
    ReductionType reduction,
    std::string sourceName
)

Constructs an IntervalReductionComputer with custom source name.

Parameters:

  • source Shared pointer to the analog source to compute over.
  • reduction The type of reduction operation to perform.
  • sourceName Custom name for the source dependency.

function compute

virtual std::pair< std::vector< double >, ColumnEntityIds > compute(
    const ExecutionPlan & plan
) const override

The core batch computation method.

Parameters:

  • plan The execution plan containing cached access patterns.

Return: Vector of computed values for the entire column.

Reimplements: IColumnComputer::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 getSourceDependency

std::string getSourceDependency() const override

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