NRP Core  1.4.1
NGraph Namespace Reference

A mathematical graph object: a simple, directed, connected graph, where nodes are of arbitrary type (colores, cities, names, etc.)
Operations for adding and removing edges and vertices, together with functions for finding neighbors, subgraphs, and other properties are included. More...

Classes

class  tGraph
 

Typedefs

typedef tGraph< unsigned int > Graph
 
typedef tGraph< int > iGraph
 
typedef tGraph< std::string > sGraph
 

Functions

template<typename T >
std::istream & operator>> (std::istream &s, tGraph< T > &G)
 
template<typename T >
std::ostream & operator<< (std::ostream &s, const tGraph< T > &G)
 

Detailed Description

A mathematical graph object: a simple, directed, connected graph, where nodes are of arbitrary type (colores, cities, names, etc.)
Operations for adding and removing edges and vertices, together with functions for finding neighbors, subgraphs, and other properties are included.

Example:

    enum color {blue, green, red, yellow, pink, black};
    tGraph<color> A;
    A.insert_edge(blue, red);
    A.insert_edge(yellow, blue);
    A.insert_edge(blue, black);
    tGraph<color> B(A), S=A.subgraph(blue);
 

Typedef Documentation

◆ Graph

typedef tGraph<unsigned int> NGraph::Graph

◆ iGraph

typedef tGraph<int> NGraph::iGraph

◆ sGraph

typedef tGraph<std::string> NGraph::sGraph

Function Documentation

◆ operator<<()

template<typename T >
std::ostream& NGraph::operator<< ( std::ostream &  s,
const tGraph< T > &  G 
)

◆ operator>>()

template<typename T >
std::istream& NGraph::operator>> ( std::istream &  s,
tGraph< T > &  G 
)