- java.lang.Object
-
- org.jgrapht.demo.DirectedGraphDemo
-
public class DirectedGraphDemo extends Object
This class demonstrates some of the operations that can be performed on directed graphs. After constructing a basic directed graph, it computes all the strongly connected components of this graph. It then finds the shortest path from one vertex to another using Dijkstra's shortest path algorithm. The sample code should help to clarify to users of JGraphT that the class org.jgrapht.alg.shortestpath.DijkstraShortestPath can be used to find shortest paths within directed graphs.- Author:
- Minh Van Nguyen
-
-
Constructor Summary
Constructors Constructor Description DirectedGraphDemo()
-
-
-
Method Detail
-
main
public static void main(String[] args)
The starting point for the demo.- Parameters:
args
- ignored.
-
-