Backend implementation using Apache Arrow Parquet files with lazy loading. Matrices are stored as individual Parquet files and loaded on-demand with LRU caching.
riemtan::DataBackend -> ParquetBackend
new()Load metadata from JSON file
Load a matrix from Parquet file
Update LRU cache with a new matrix
Initialize a ParquetBackend
ParquetBackend$new(data_dir, cache_size = 10)data_dirPath to directory containing Parquet files and metadata.json
cache_sizeMaximum number of matrices to cache (default 10)
iInteger index
iInteger index
matA dppMatrix object
A dppMatrix object
get_matrix()Get a specific matrix by index
ParquetBackend$get_matrix(i)iInteger index
A dppMatrix object
get_all_matrices()Get all matrices (loads all from disk if necessary)
ParquetBackend$get_all_matrices(parallel = NULL, progress = FALSE)parallelLogical indicating whether to use parallel loading (default: NULL, auto-detect)
progressLogical indicating whether to show progress (default: FALSE)
A list of dppMatrix objects
get_matrices_parallel()Load multiple matrices in parallel (batch loading)
ParquetBackend$get_matrices_parallel(indices, progress = FALSE)indicesVector of integer indices to load
progressLogical indicating whether to show progress (default: FALSE)
A list of dppMatrix objects
Integer count
get_dimensions()Get matrix dimensions
ParquetBackend$get_dimensions()Integer p (matrices are p x p)
get_metadata()Get metadata
ParquetBackend$get_metadata()List containing metadata information
clear_cache()Clear the cache
ParquetBackend$clear_cache()
get_cache_size()Get current cache size
ParquetBackend$get_cache_size()Integer number of cached matrices
clone()The objects of this class are cloneable with this method.
ParquetBackend$clone(deep = FALSE)deepWhether to make a deep clone.