In fact, the current task is to write a threaded program that computes the all-to-all shortest path.
So, a natural way to parallelize given problem is to provide that each thread solved the SSSP for k ( = n / P )
nodes ( see http://www.hpc2n.umu.se/events/ngssc/04/parallel/notes/lecture_6.pdf )
Concerning C#, you can try also MC# ( www.mcsharp.net).
Follows is the code-snippet of our implementation of all-to-all algorithm :
Parallel_ShortestPath psp = new Parallel_ShortestPath();
int q = n / P,
r = n % P;
int from = 0,
to;
// Run the (asynchronous) methods
for ( i = 0; i < P; i++) {
to = from + q + (i < r ? 1 : 0);
psp.ComputeShortestPath ( from, to, n, w, degrees, edges, SP, psp.sendStop );
from = to;
}
// Get the stop signals
for ( i = 0; i < P; i++)
psp.getStop ? ();
public async ComputeShortestPath ( int from, int to, int n, int[,] w, int[] degrees,
int[,] edges, int[,] SP, channel() sendStop ) {
....
}