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

Writer for graphs in edge list format. More...

#include <TNL/Graphs/Writers/EdgeListWriter.h>

Public Types

using AdjacencyMatrixType = typename GraphType::AdjacencyMatrixType
using DeviceType = typename GraphType::DeviceType
using GraphType = Graph
using HostAdjacencyMatrixType = typename AdjacencyMatrixType::template Self< ValueType, Devices::Host >
using IndexType = typename GraphType::IndexType
using ValueType = typename GraphType::ValueType

Static Public Member Functions

static void write (const TNL::String &fileName, const Graph &graph)
 Writes a graph to a file in edge list format.
static void write (std::ostream &str, const Graph &graph)
 Writes a graph to an output stream in edge list format.

Static Protected Member Functions

template<typename Matrix>
static void writeEdgeList (std::ostream &str, const Matrix &matrix)

Detailed Description

template<typename Graph>
struct TNL::Graphs::Writers::EdgeListWriter< Graph >

Writer for graphs in edge list format.

See TNL::Graphs::Readers::EdgeListReader for details about the format.

Template Parameters
GraphThe type of the graph to be written.

Member Function Documentation

◆ write() [1/2]

template<typename Graph>
void TNL::Graphs::Writers::EdgeListWriter< Graph >::write ( const TNL::String & fileName,
const Graph & graph )
inlinestatic

Writes a graph to a file in edge list format.

Parameters
fileNameis the name of the file to write to.
graphis the graph object to be written.

◆ write() [2/2]

template<typename Graph>
void TNL::Graphs::Writers::EdgeListWriter< Graph >::write ( std::ostream & str,
const Graph & graph )
inlinestatic

Writes a graph to an output stream in edge list format.

Parameters
stris the output stream to write to.
graphis the graph object to be written.

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