|
JavaGenes, NASA Ames. Written largely by Al Globus | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.javaGenes.graph.apsp
All-pairs-shortest-path algorithm and supporting functions for graphs.
Graph
Constructor Summary | |
apsp()
|
Method Summary | |
static void |
Apsp(int[][] d)
apsp - Floyd Warshall algorithm for computing All-Pairs Shortest Paths. |
static int[][] |
CTabToAdjM(int[][] ct,
int n)
CTabToAdjM - Converts a connection table (CT) into an adjcency matrix. |
static void |
PrintIMat(int[][] m)
Print a two dimensional integer matrix |
static void |
test(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public apsp()
Method Detail |
public static void test(java.lang.String[] args)
public static void Apsp(int[][] d)
d
- is a adjacency matrix. Usually this will be set up by
CTabToAdjM()public static int[][] CTabToAdjM(int[][] ct, int n)
ct
- a connection table. Each row (first index) is an array containing the indices
of the vertices that share edges with the vertex at the row indexn
- the longest possible path in the graph (maximum is the number of vertices-1)
the return value is a connectivity matrix suitable for use by apsp()public static void PrintIMat(int[][] m)
|
JavaGenes, NASA Ames. Written largely by Al Globus | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |