OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
GraphMLWriter< Graph > Class Template Reference

Detailed Description

template<typename Graph>
class GraphMLWriter< Graph >

From a Graphbasic structure it write a GraphML format file

Definition at line 543 of file GraphMLWriter.hpp.

#include <GraphMLWriter.hpp>

Public Member Functions

 GraphMLWriter (Graph &g)
 
bool write (std::string file, std::string graph_name="Graph")
 It write a GraphML file from a graph.
 

Private Member Functions

std::string get_vertex_properties_list ()
 It get the vertex properties list.
 
std::string get_edge_properties_list ()
 It get the edge properties list.
 
std::string get_vertex_list ()
 Get the string containing the set of vertices.
 
std::string get_edge_list ()
 return the edge list as a string
 

Private Attributes

Graph & g
 Graph to write.
 

Constructor & Destructor Documentation

◆ GraphMLWriter()

template<typename Graph >
GraphMLWriter< Graph >::GraphMLWriter ( Graph &  g)
inline

GraphMLWriter constructor, it take a graph and write a GraphML format

Parameters
gGraph to write

Definition at line 688 of file GraphMLWriter.hpp.

Member Function Documentation

◆ get_edge_list()

template<typename Graph >
std::string GraphMLWriter< Graph >::get_edge_list ( )
inlineprivate

return the edge list as a string

Returns
the edge list as string

edge node output string

Get an edge iterator

Definition at line 641 of file GraphMLWriter.hpp.

◆ get_edge_properties_list()

template<typename Graph >
std::string GraphMLWriter< Graph >::get_edge_properties_list ( )
inlineprivate

It get the edge properties list.

It get the edge properties list of the edge defined as a GraphML header

Returns
a string that define the edge properties in graphML format

edge property output string

Definition at line 579 of file GraphMLWriter.hpp.

◆ get_vertex_list()

template<typename Graph >
std::string GraphMLWriter< Graph >::get_vertex_list ( )
inlineprivate

Get the string containing the set of vertices.

Returns
the set of vertices as string

vertex node output string

Get a vertex iterator

Definition at line 599 of file GraphMLWriter.hpp.

◆ get_vertex_properties_list()

template<typename Graph >
std::string GraphMLWriter< Graph >::get_vertex_properties_list ( )
inlineprivate

It get the vertex properties list.

It get the vertex properties list of the vertex defined as a GraphML header and define position and shape of the node

Returns
a string that define the vertex properties in graphML format

vertex property output string

Definition at line 557 of file GraphMLWriter.hpp.

◆ write()

template<typename Graph >
bool GraphMLWriter< Graph >::write ( std::string  file,
std::string  graph_name = "Graph" 
)
inline

It write a GraphML file from a graph.

Parameters
filepath where to write
nameof the graph

Definition at line 698 of file GraphMLWriter.hpp.

Field Documentation

◆ g

template<typename Graph >
Graph& GraphMLWriter< Graph >::g
private

Graph to write.

Definition at line 546 of file GraphMLWriter.hpp.


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