package dijkstras;

import dijkstras.Dijkstras;		// My implementation of Dijkstras algorithm in package dijkstras

/*
	This class test Dijkstras shortest path algorithm
*/

class TestDijkstras
{


	// Test A

	public static void testA(){

		int N = 6;		// No. of vertices
		int M = 10;		// No. of edges
		int edges[][] = {	{1,2,10}, 		// Edges
							{2,3,1},
							{3,4,4},
							{4,3,6},
							{5,4,2},
							{1,5,5},
							{2,5,2},
							{5,2,3},
							{5,3,9},
							{4,1,7}
						};

		int s = 1;		// source vertex			 	

		Dijkstras dk = new Dijkstras(N, M, edges, s);				

		dk.findShortestPaths();

		System.out.println("Shortest Distances: ");
		dk.showDist();

		System.out.println("Shortest Paths: ");
		for(int i=1;i<=N;i++){
			
			System.out.print(i+ ": ");
			dk.printPath(i);
			System.out.println();
		}

	}	



	public static void main(String args[]){

			// Call testA() 

			testA();
	}
}	
@@ -242,17 +242,17 @@
 int N = 
-6
+7
 ;%09%09// No
@@ -276,17 +276,17 @@
 nt M = 1
-0
+2
 ;%09%09// No
@@ -479,16 +479,48 @@
 %09%7B4,1,7%7D
+,%0A%09%09%09%09%09%09%09%7B6,7,5%7D,%0A%09%09%09%09%09%09%09%7B7,6,6%7D
 %0A%09%09%09%09%09%09%7D

Update test case for Dijkstras