tatami_mtx
Matrix Market to tatami matrices
|
Read tatami matrices from Matrix Market files. More...
Classes | |
struct | Automatic |
Enable automatic type determination. More... | |
struct | Options |
Options for load_matrix() and friends. More... | |
Functions | |
template<typename Value_ , typename Index_ , typename StoredValue_ = Automatic, typename StoredIndex_ = Automatic> | |
std::shared_ptr< tatami::Matrix< Value_, Index_ > > | load_matrix (byteme::Reader &reader, const Options &options) |
template<typename Value_ , typename Index_ , typename StoredValue_ = Automatic, typename StoredIndex_ = Automatic> | |
std::shared_ptr< tatami::Matrix< Value_, Index_ > > | load_matrix_from_text_file (const char *filepath, const Options &options) |
template<typename Value_ , typename Index_ , typename StoredValue_ = Automatic, typename StoredIndex_ = Automatic> | |
std::shared_ptr< tatami::Matrix< Value_, Index_ > > | load_matrix_from_gzip_file (const char *filepath, const Options &options) |
template<typename Value_ , typename Index_ , typename StoredValue_ = Automatic, typename StoredIndex_ = Automatic> | |
std::shared_ptr< tatami::Matrix< Value_, Index_ > > | load_matrix_from_some_file (const char *filepath, const Options &options) |
template<typename Value_ , typename Index_ , typename StoredValue_ = Automatic, typename StoredIndex_ = Automatic> | |
std::shared_ptr< tatami::Matrix< Value_, Index_ > > | load_matrix_from_text_buffer (const unsigned char *buffer, size_t n, const Options &options) |
template<typename Value_ , typename Index_ , typename StoredValue_ = Automatic, typename StoredIndex_ = Automatic> | |
std::shared_ptr< tatami::Matrix< Value_, Index_ > > | load_matrix_from_zlib_buffer (const unsigned char *buffer, size_t n, const Options &options) |
template<typename Value_ , typename Index_ , typename StoredValue_ = Automatic, typename StoredIndex_ = Automatic> | |
std::shared_ptr< tatami::Matrix< Value_, Index_ > > | load_matrix_from_some_buffer (const unsigned char *buffer, size_t n, const Options &options) |
Read tatami matrices from Matrix Market files.
std::shared_ptr< tatami::Matrix< Value_, Index_ > > tatami_mtx::load_matrix | ( | byteme::Reader & | reader, |
const Options & | options | ||
) |
Load a tatami::Matrix
from a Matrix Market file. Coordinate formats will yield a sparse matrix, while array formats will yield a dense matrix. The storage types depend on the Matrix Market field type as well as the settings of StoredValue_
and StoredIndex_
.
Value_ | Data type for the tatami::Matrix interface. |
Index_ | Integer index type for the tatami::Matrix interface. |
StoredValue_ | Matrix data type that is stored in memory. If set to Automatic , it defaults to double for real/double fields and int for integer fields. |
StoredIndex_ | Index data type that is stored in memory for sparse matrices. If set to Automatic , it defaults to uint8_t if no dimension is greater than 255; uint16_t if no dimension is greater than 65536; and int otherwise. |
reader | A byteme::Reader instance containing bytes from a Matrix Market file. |
options | Options for loading the matrix. |
tatami::Matrix
instance containing data from the Matrix Market file. std::shared_ptr< tatami::Matrix< Value_, Index_ > > tatami_mtx::load_matrix_from_text_file | ( | const char * | filepath, |
const Options & | options | ||
) |
Load a tatami::Matrix
from a Matrix Market text file, see load_matrix()
for details.
Value_ | Data type for the tatami::Matrix interface. |
Index_ | Integer index type for the tatami::Matrix interface. |
StoredValue_ | Matrix data type that is stored in memory, see load_matrix() for details. |
StoredIndex_ | Index data type that is stored in memory for sparse matrices, see load_matrix() for details. |
parallel_ | Whether to parallelize the loading and parsing. |
filepath | Path to a Matrix Market file. |
options | Options for loading the matrix. |
tatami::Matrix
instance containing data from the Matrix Market file. std::shared_ptr< tatami::Matrix< Value_, Index_ > > tatami_mtx::load_matrix_from_gzip_file | ( | const char * | filepath, |
const Options & | options | ||
) |
Load a tatami::Matrix
from a Gzip-compressed Matrix Market file, see load_matrix()
for details.
Value_ | Data type for the tatami::Matrix interface. |
Index_ | Integer index type for the tatami::Matrix interface. |
StoredValue_ | Matrix data type that is stored in memory, see load_matrix() for details. |
StoredIndex_ | Index data type that is stored in memory for sparse matrices, see load_matrix() for details. |
filepath | Path to a Matrix Market file. |
options | Options for loading the matrix. |
tatami::Matrix
instance containing data from the Matrix Market file. std::shared_ptr< tatami::Matrix< Value_, Index_ > > tatami_mtx::load_matrix_from_some_file | ( | const char * | filepath, |
const Options & | options | ||
) |
Load a tatami::Matrix
from a possibly Gzip-compressed Matrix Market file, see load_matrix()
for details.
Value_ | Data type for the tatami::Matrix interface. |
Index_ | Integer index type for the tatami::Matrix interface. |
StoredValue_ | Matrix data type that is stored in memory, see load_matrix() for details. |
StoredIndex_ | Index data type that is stored in memory for sparse matrices, see load_matrix() for details. |
filepath | Path to a Matrix Market file. |
options | Options for loading the matrix. |
tatami::Matrix
instance containing data from the Matrix Market file. std::shared_ptr< tatami::Matrix< Value_, Index_ > > tatami_mtx::load_matrix_from_text_buffer | ( | const unsigned char * | buffer, |
size_t | n, | ||
const Options & | options | ||
) |
Load a tatami::Matrix
from a buffer containing a Matrix Market file, see load_matrix()
for details.
Value_ | Data type for the tatami::Matrix interface. |
Index_ | Integer index type for the tatami::Matrix interface. |
StoredValue_ | Matrix data type that is stored in memory, see load_matrix() for details. |
StoredIndex_ | Index data type that is stored in memory for sparse matrices, see load_matrix() for details. |
buffer | Array containing the contents of an uncompressed Matrix Market file. |
n | Length of the array. |
options | Options for loading the matrix. |
tatami::Matrix
instance containing data from the Matrix Market file. std::shared_ptr< tatami::Matrix< Value_, Index_ > > tatami_mtx::load_matrix_from_zlib_buffer | ( | const unsigned char * | buffer, |
size_t | n, | ||
const Options & | options | ||
) |
Load a tatami::Matrix
from a buffer containing a Gzip/Zlib-compressed Matrix Market file, see load_matrix()
for details.
Value_ | Data type for the tatami::Matrix interface. |
Index_ | Integer index type for the tatami::Matrix interface. |
StoredValue_ | Matrix data type that is stored in memory, see load_matrix() for details. |
StoredIndex_ | Index data type that is stored in memory for sparse matrices, see load_matrix() for details. |
buffer | Array containing the contents of a Matrix Market file after Gzip/Zlib compression. |
n | Length of the array. |
options | Options for loading the matrix. |
tatami::Matrix
instance containing data from the Matrix Market file. std::shared_ptr< tatami::Matrix< Value_, Index_ > > tatami_mtx::load_matrix_from_some_buffer | ( | const unsigned char * | buffer, |
size_t | n, | ||
const Options & | options | ||
) |
Load a tatami::Matrix
from a buffer containing a possibly Gzip/Zlib-compressed Matrix Market file, see load_matrix()
for details.
Value_ | Data type for the tatami::Matrix interface. |
Index_ | Integer index type for the tatami::Matrix interface. |
StoredValue_ | Matrix data type that is stored in memory, see load_matrix() for details. |
StoredIndex_ | Index data type that is stored in memory for sparse matrices, see load_matrix() for details. |
buffer | Array containing the contents of a Matrix Market file, possibly after Gzip/Zlib compression. |
n | Length of the array. |
options | Options for loading the matrix. |
tatami::Matrix
instance containing data from the Matrix Market file.