Essentia  2.1-beta6-dev
AsciiDAGParser Class Reference

#include <asciidagparser.h>

Public Member Functions

template<typename NetworkType >
 AsciiDAGParser (const NetworkType &network)
 
void parseGraph ()
 
const std::vector< std::string > & nodes () const
 
const std::vector< std::pair< std::string, std::string > > & namedEdges () const
 
const std::vector< std::pair< int, int > > & edges () const
 

Protected Member Functions

void parseEdges (const std::vector< AsciiBox > &boxes)
 

Protected Attributes

AsciiCanvas _network
 
std::vector< std::string > _nodes
 
std::vector< std::pair< int, int > > _edges
 
std::vector< std::pair< std::string, std::string > > _namedEdges
 

Constructor & Destructor Documentation

◆ AsciiDAGParser()

AsciiDAGParser ( const NetworkType &  network)
inline

Member Function Documentation

◆ edges()

const std::vector<std::pair<int, int> >& edges ( ) const
inline

Return the edges using node indices, to avoid ambiguities if 2 or more nodes have the same name. They are sorted in the same order as the named edges.

References AsciiDAGParser::_edges.

Referenced by NetworkParser::connections().

◆ namedEdges()

const std::vector<std::pair<std::string, std::string> >& namedEdges ( ) const
inline

Return the edges. They are sorted lexicographically.

References AsciiDAGParser::_namedEdges.

Referenced by NetworkParser::namedConnections().

◆ nodes()

const std::vector<std::string>& nodes ( ) const
inline

Return the node names. They are sorted lexicographically.

References AsciiDAGParser::_nodes.

Referenced by NetworkParser::algorithms().

◆ parseEdges()

void parseEdges ( const std::vector< AsciiBox > &  boxes)
protected

◆ parseGraph()

void parseGraph ( )

Does the actual parsing of the network, get:

  • node names
  • parameters, if any
  • connections, possibly (un)named

Referenced by AsciiDAGParser::AsciiDAGParser().

Member Data Documentation

◆ _edges

std::vector<std::pair<int, int> > _edges
protected

Referenced by AsciiDAGParser::edges().

◆ _namedEdges

std::vector<std::pair<std::string, std::string> > _namedEdges
protected

◆ _network

AsciiCanvas _network
protected

◆ _nodes

std::vector<std::string> _nodes
protected

Referenced by AsciiDAGParser::nodes().


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