All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
NetworKit::EdgeListWriter Class Reference

A writer for the edge list format. More...

#include <EdgeListWriter.h>

Public Member Functions

 EdgeListWriter ()=default
 
 EdgeListWriter (char separator, node firstNode, bool bothDirections=false)
 
void write (const Graph &G, std::string path)
 Write the graph to a file. More...
 

Protected Attributes

char separator
 character separating nodes in an edge line More...
 
node firstNode
 
bool bothDirections
 

Detailed Description

A writer for the edge list format.

The output will contain one edge per line, in the format fromNodeSEPARATORtoNode, where separator can be specified by the user.

Constructor & Destructor Documentation

NetworKit::EdgeListWriter::EdgeListWriter ( )
default
NetworKit::EdgeListWriter::EdgeListWriter ( char  separator,
node  firstNode,
bool  bothDirections = false 
)
Parameters
[in]separatorcharacter used to separate nodes in an edge line
[in]firstNodeindex of the first node in the file
[in]bothDirectionsfor undirected graphs: if every edge shall be written in both directions (default: false)

Member Function Documentation

void NetworKit::EdgeListWriter::write ( const Graph G,
std::string  path 
)

Write the graph to a file.

Parameters
[in]Gthe graph
[in]paththe output file path

Member Data Documentation

bool NetworKit::EdgeListWriter::bothDirections
protected
node NetworKit::EdgeListWriter::firstNode
protected
char NetworKit::EdgeListWriter::separator
protected

character separating nodes in an edge line


The documentation for this class was generated from the following files: