Essentia  2.1-beta5-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)

Member Function Documentation

◆ edges()

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

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

Return the edges. They are sorted lexicographically.

References AsciiDAGParser::_namedEdges.

Referenced by NetworkParser::namedConnections().

◆ nodes()

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

Return the node names. They are sorted lexicographically.

References AsciiDAGParser::_nodes.

Referenced by NetworkParser::algorithms().

◆ parseEdges()

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

◆ 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

Referenced by AsciiDAGParser::edges().

◆ _namedEdges

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

◆ _network

AsciiCanvas _network

◆ _nodes

std::vector<std::string> _nodes

Referenced by AsciiDAGParser::nodes().

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