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...
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);