Template Numerical Library version\ main:4e6e2c1
Loading...
Searching...
No Matches
TNL::Graphs::Readers::MtxReader< Graph > Struct Template Reference

Reader for graphs in Matrix Market format. More...

#include <TNL/Graphs/Readers/MtxReader.h>

Public Types

using DeviceType = typename Graph::DeviceType
using IndexType = typename Graph::IndexType
using MatrixType = typename Graph::AdjacencyMatrixType
using ValueType = typename Graph::ValueType

Static Public Member Functions

static void read (const std::string &file_name, Graph &graph)
 Reads a graph from a Matrix Market file.

Detailed Description

template<typename Graph>
struct TNL::Graphs::Readers::MtxReader< Graph >

Reader for graphs in Matrix Market format.

This reader uses TNL::Matrices::MatrixReader to read the adjacency matrix of the graph from a file in Matrix Market format (.mtx) and sets it as the adjacency matrix of the provided graph.

Template Parameters
GraphThe type of the graph to be read.

Member Function Documentation

◆ read()

template<typename Graph>
void TNL::Graphs::Readers::MtxReader< Graph >::read ( const std::string & file_name,
Graph & graph )
inlinestatic

Reads a graph from a Matrix Market file.

Parameters
file_nameis the name of the file containing the adjacency matrix in Matrix Market format.
graphis the graph object to be populated.

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