Loader for matrix data stored in matrix-market (.mtx) format.
More...
#include <io.hpp>
Loader for matrix data stored in matrix-market (.mtx) format.
◆ MtxLoader()
| spla::MtxLoader::MtxLoader |
( |
std::string | name = "" | ) |
|
|
explicit |
◆ ~MtxLoader()
| spla::MtxLoader::~MtxLoader |
( |
| ) |
|
|
default |
◆ calc_stats()
| void spla::MtxLoader::calc_stats |
( |
| ) |
|
◆ get_Ai()
| const std::vector< uint > & spla::MtxLoader::get_Ai |
( |
| ) |
const |
|
nodiscard |
◆ get_Aj()
| const std::vector< uint > & spla::MtxLoader::get_Aj |
( |
| ) |
const |
|
nodiscard |
◆ get_n_cols()
| uint spla::MtxLoader::get_n_cols |
( |
| ) |
const |
|
nodiscard |
◆ get_n_rows()
| uint spla::MtxLoader::get_n_rows |
( |
| ) |
const |
|
nodiscard |
◆ get_n_values()
| std::size_t spla::MtxLoader::get_n_values |
( |
| ) |
const |
|
nodiscard |
◆ load()
| bool spla::MtxLoader::load |
( |
std::filesystem::path | file_path, |
|
|
bool | offset_indices = true, |
|
|
bool | make_undirected = true, |
|
|
bool | remove_loops = true ) |
Load .mtx data from given file path.
- Parameters
-
| file_path | Relative or absolute path to file |
| offset_indices | True if requires indices offset by -1 |
| make_undirected | True if for each directed edge reverse edge must be added |
| remove_loops | True if self-loops must be removed |
- Returns
- True if successfully loaded
◆ output_stats()
| void spla::MtxLoader::output_stats |
( |
| ) |
|
◆ save()
| bool spla::MtxLoader::save |
( |
const std::filesystem::path & | file_path, |
|
|
bool | stats_only = false ) |
Saves loaded data at file.
- Parameters
-
| file_path | File to create where to save data |
| stats_only | Save only stats without actual graph data |
- Returns
- True if successfully saved
The documentation for this class was generated from the following files: