Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alugowski/fast_matrix_market
Fast and full-featured Matrix Market I/O library for C++, Python, and R
https://github.com/alugowski/fast_matrix_market
blaze cpp csparse eigen-library eigen3 graphblas matrix-market matrix-market-format parallel parser python r sparse-matrix threaded
Last synced: 5 days ago
JSON representation
Fast and full-featured Matrix Market I/O library for C++, Python, and R
- Host: GitHub
- URL: https://github.com/alugowski/fast_matrix_market
- Owner: alugowski
- License: bsd-2-clause
- Created: 2023-01-10T06:38:53.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-05T11:23:50.000Z (3 months ago)
- Last Synced: 2024-10-11T12:41:08.423Z (27 days ago)
- Topics: blaze, cpp, csparse, eigen-library, eigen3, graphblas, matrix-market, matrix-market-format, parallel, parser, python, r, sparse-matrix, threaded
- Language: C++
- Homepage:
- Size: 863 KB
- Stars: 73
- Watchers: 5
- Forks: 7
- Open Issues: 7
-
Metadata Files:
- Readme: README.Armadillo.md
- License: LICENSE.txt
- Citation: CITATION.cff
Awesome Lists containing this project
README
# Armadillo Matrix Market
`fast_matrix_market` provides read/write methods for [Armadillo](https://arma.sourceforge.net/) sparse and dense matrices.
# Usage
```c++
#include
``````c++
arma::Mat A;
// or
arma::SpMat A;
```Not restricted to `double` matrices. Any type supported by Armadillo that makes sense in Matrix Market is also supported, such as `int64_t`, `float`, `std::complex`, etc.
### Reading
```c++
std::ifstream f("input.mtx");fast_matrix_market::read_matrix_market_arma(f, A);
```**Note:** Armadillo versions older than 10.5 [did not zero-initialize memory](https://arma.sourceforge.net/docs.html#changelog).
On those versions reading any Matrix Market file into a dense `arma::Mat` is not supported.### Writing
```c++
std::ofstream f("output.mtx", std::ios_base::binary);fast_matrix_market::write_matrix_market_arma(f, A);
```