IntervalOverlapComputer
IntervalOverlapComputer
Templated computer for analyzing overlaps between row intervals and column intervals. More…
#include <IntervalOverlapComputer.h>
Inherits from IColumnComputer< T >
Public Functions
| Name | |
|---|---|
| IntervalOverlapComputer(std::shared_ptr< DigitalIntervalSeries > source, IntervalOverlapOperation operation, std::string sourceName) Constructor for IntervalOverlapComputer. |
|
| virtual std::pair< std::vector< T >, ColumnEntityIds > | compute(ExecutionPlan const & plan) const override Computes the result for all row intervals in the execution plan. |
| std::string | getSourceDependency() const override |
| virtual EntityIdStructure | getEntityIdStructure() const override Gets the EntityID structure type for this computer. |
| virtual std::pair< std::vector< size_t >, ColumnEntityIds > | compute(ExecutionPlan const & plan) const The core batch computation method. |
Additional inherited members
Public Functions inherited from IColumnComputer< T >
| 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 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< T >
| Name | |
|---|---|
| IColumnComputer() =default |
Detailed Description
template <typename T >
class IntervalOverlapComputer;Templated computer for analyzing overlaps between row intervals and column intervals.
Source type: IIntervalSource Selector type: Interval Output type: T
This computer works with two sets of intervals: the row intervals (from the ExecutionPlan) and the column intervals (from an IIntervalSource). It can perform different operations to analyze their relationships:
- AssignID: For each row interval, finds the index of the column interval that contains it
- CountOverlaps: For each row interval, counts how many column intervals overlap with it
The template parameter T determines the return type:
- IntervalOverlapOperation::AssignID requires T = int64_t (returns -1 if no overlap)
- IntervalOverlapOperation::CountOverlaps requires T = int64_t or size_t
Public Functions Documentation
function IntervalOverlapComputer
inline IntervalOverlapComputer(
std::shared_ptr< DigitalIntervalSeries > source,
IntervalOverlapOperation operation,
std::string sourceName
)Constructor for IntervalOverlapComputer.
Parameters:
- source Shared pointer to the interval source (column intervals).
- operation The operation to perform on interval overlaps.
- sourceName The name of the data source (for dependency tracking).
function compute
inline virtual std::pair< std::vector< T >, ColumnEntityIds > compute(
ExecutionPlan const & plan
) const overrideComputes the result for all row intervals in the execution plan.
Parameters:
- plan The execution plan containing row interval boundaries.
Return: Vector of computed results for each row interval.
Reimplements: IColumnComputer::compute
function getSourceDependency
inline std::string getSourceDependency() const overridefunction getEntityIdStructure
inline virtual EntityIdStructure getEntityIdStructure() const overrideGets the EntityID structure type for this computer.
Return: The EntityID structure type for this computer.
Reimplements: IColumnComputer::getEntityIdStructure
This indicates whether the computer provides no EntityIDs, simple EntityIDs (one per row), or complex EntityIDs (multiple per row).
function compute
virtual std::pair< std::vector< size_t >, ColumnEntityIds > compute(
ExecutionPlan const & plan
) constThe 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.
Updated on 2026-11-13 at 20:25:40 +0000