Hi all!
I have implemented floyd warshall's algorithm but I'm facing problems when running it.
The problem occurs when I initialise a 2D array of doubles.
for i = 0..n
for j = 0..n
if(i == j) {
w[i][j] = 0;
} else {
w[i][j] = Double.POSITIVE_INFINITY;
}
The graph that I use, is a graph of a small city, from which I use about 18 000 nodes (n = 18 000)
This matrix initialisation always cause a exception on the Java heap size being exceeded (I put the heap size on the maximum of 1024M already)
What troubles me is how to get by this problem. I can't imagine everybody who ever implemented this algorithm to be using a supercomputer with loads of memory. So I know I must be doing something terribly wrong, but I just have no clue where I'm screwing things up.

