TimeIndexStorageFactory
TimeIndexStorageFactory
Factory functions for creating appropriate storage.
Functions
| Name | |
|---|---|
| std::shared_ptr< TimeIndexStorage > | createFromTimeIndices(std::vector< TimeFrameIndex > time_indices) Create storage from a vector of time indices. |
| std::shared_ptr< TimeIndexStorage > | createDenseFromZero(size_t count) Create dense storage for consecutive indices starting from 0. |
| std::shared_ptr< TimeIndexStorage > | createDense(TimeFrameIndex start_index, size_t count) Create dense storage for consecutive indices starting from a specific index. |
Functions Documentation
function createFromTimeIndices
std::shared_ptr< TimeIndexStorage > createFromTimeIndices(
std::vector< TimeFrameIndex > time_indices
)Create storage from a vector of time indices.
Parameters:
- time_indices Vector of TimeFrameIndex values
Return: Shared pointer to the appropriate storage implementation
Automatically chooses DenseTimeIndexStorage if indices are consecutive, otherwise uses SparseTimeIndexStorage.
function createDenseFromZero
std::shared_ptr< TimeIndexStorage > createDenseFromZero(
size_t count
)Create dense storage for consecutive indices starting from 0.
Parameters:
- count Number of consecutive indices
Return: Shared pointer to DenseTimeIndexStorage
function createDense
std::shared_ptr< TimeIndexStorage > createDense(
TimeFrameIndex start_index,
size_t count
)Create dense storage for consecutive indices starting from a specific index.
Parameters:
- start_index First TimeFrameIndex in the sequence
- count Number of consecutive indices
Return: Shared pointer to DenseTimeIndexStorage
Updated on 2026-11-13 at 20:25:41 +0000