Graph
|
#include "HKUAL_graph.h" #include <iostream> using namespace std; using namespace HKUAL; int main(){ Graph<string> g; g.addVertex("A"); g.addVertex("B"); g.addVertex("C"); g.addVertex("D"); g.addEdge("A","B"); g.addEdge("A","C"); g.addEdge("B","D"); cout << g.shortestDistance("C","D") << endl; return 0; } |
Member Functions
Specifying the Graph | ||||||||||||||||
|
||||||||||||||||
Graph property | ||||||||||||||||
|
||||||||||||||||
Vertex Property | ||||||||||||||||
|
||||||||||||||||
Distance information | ||||||||||||||||
|
||||||||||||||||
Subgraph selection | ||||||||||||||||
|
© The University of Hong Kong Algorithms Library - hkual@cs.hku.hk |