tatami_hdf5
tatami bindings for HDF5-backed matrices
Loading...
Searching...
No Matches
tatami_hdf5::WriteCompressedSparseMatrixOptions Struct Reference

Parameters for write_compressed_sparse_matrix(). More...

#include <write_compressed_sparse_matrix.hpp>

Public Attributes

std::optional< std::string > data_name
 
std::optional< std::string > index_name
 
std::optional< std::string > ptr_name
 
std::optional< WriteStorageLayoutcolumnar
 
std::optional< WriteStorageTypedata_type
 
bool force_integer = false
 
std::optional< WriteStorageTypeindex_type
 
std::optional< WriteStorageTypeptr_type
 
int deflate_level = 6
 
hsize_t chunk_size = sanisizer::cap<hsize_t>(10000)
 
bool two_pass = false
 
int num_threads = 1
 

Detailed Description

Member Data Documentation

◆ data_name

std::optional<std::string> tatami_hdf5::WriteCompressedSparseMatrixOptions::data_name

Name of the dataset in which to store the data values for non-zero elements. If unset, defaults to "data".

◆ index_name

std::optional<std::string> tatami_hdf5::WriteCompressedSparseMatrixOptions::index_name

Name of the dataset in which to store the indices for non-zero elements. If unset, defaults to "indices".

◆ ptr_name

std::optional<std::string> tatami_hdf5::WriteCompressedSparseMatrixOptions::ptr_name

Name of the dataset in which to store the column/row pointers. If unset, defaults to "indptr".

◆ columnar

std::optional<WriteStorageLayout> tatami_hdf5::WriteCompressedSparseMatrixOptions::columnar

Whether to save in the compressed sparse column layout. If unset, this is determined from the layout of the input matrix.

◆ data_type

std::optional<WriteStorageType> tatami_hdf5::WriteCompressedSparseMatrixOptions::data_type

Storage type for the matrix data. If unset, it is automatically determined from the range and integralness of the data in the input matrix.

◆ force_integer

bool tatami_hdf5::WriteCompressedSparseMatrixOptions::force_integer = false

Whether to force non-integer floating point values into an integer storage mode. Only relevant if data_type is unset. If true and/or all values are integers, the smallest integer storage mode that fits the (truncated) floats is used. If false and any non-integer values are detected, the DOUBLE storage mode is used instead.

◆ index_type

std::optional<WriteStorageType> tatami_hdf5::WriteCompressedSparseMatrixOptions::index_type

Storage type for the row/column indices. If unset, it is automatically determined from the range of the indices in the input matrix.

◆ ptr_type

std::optional<WriteStorageType> tatami_hdf5::WriteCompressedSparseMatrixOptions::ptr_type

Storage type for the index pointers. If unset, it is automatically determined from the number of structural non-zero elements.

◆ deflate_level

int tatami_hdf5::WriteCompressedSparseMatrixOptions::deflate_level = 6

Compression level of DEFLATE. This should be any integer between 0 and 9 inclusive. At zero, no compression is performed.

◆ chunk_size

hsize_t tatami_hdf5::WriteCompressedSparseMatrixOptions::chunk_size = sanisizer::cap<hsize_t>(10000)

Size of the chunks used for compression.

◆ two_pass

bool tatami_hdf5::WriteCompressedSparseMatrixOptions::two_pass = false

Whether to use a two-pass algorithm to first determine the number of non-zero elements before creating the dataset. If false, a one-pass algorithm with extensible HDF5 datasets is used. Ignored if either data_type or index_type is unset, in which case a two-pass algorithm is always used.

◆ num_threads

int tatami_hdf5::WriteCompressedSparseMatrixOptions::num_threads = 1

Number of threads to use for the first pass through the input matrix. This is only used to determine the number of non-zero elements and check storage types.


The documentation for this struct was generated from the following file: