sandmark.util.graph
Class Matrix
java.lang.Object
|
+--sandmark.util.graph.Matrix
- public class Matrix
- extends java.lang.Object
Method Summary |
void |
allPairsShortestPath()
|
static int[][] |
createMatrix(int n,
int fill)
|
boolean |
existsPath(int i,
int j)
|
boolean |
existsPath(Node from,
Node to)
|
(package private) void |
getPath(int i,
int j,
Path res)
|
Path |
getShortestPath(Node from,
Node to)
|
int |
getShortestPathLength(Node from,
Node to)
|
int |
getWeight(Edge edge)
|
int |
getWeight(int row,
int col)
|
int |
getWeight(Node source,
Node sink)
|
void |
setWeight(Edge edge,
int weight)
|
void |
setWeight(int row,
int col,
int weight)
|
void |
setWeight(Node source,
Node sink,
int weight)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
matrix
int[][] matrix
paths
int[][] paths
pathWeights
int[][] pathWeights
graph
Graph graph
node2number
java.util.Hashtable node2number
number2node
java.util.Hashtable number2node
Matrix
public Matrix(Graph graph,
int init)
setWeight
public void setWeight(int row,
int col,
int weight)
setWeight
public void setWeight(Node source,
Node sink,
int weight)
setWeight
public void setWeight(Edge edge,
int weight)
getWeight
public int getWeight(int row,
int col)
getWeight
public int getWeight(Node source,
Node sink)
getWeight
public int getWeight(Edge edge)
getPath
void getPath(int i,
int j,
Path res)
existsPath
public boolean existsPath(int i,
int j)
existsPath
public boolean existsPath(Node from,
Node to)
getShortestPath
public Path getShortestPath(Node from,
Node to)
getShortestPathLength
public int getShortestPathLength(Node from,
Node to)
allPairsShortestPath
public void allPairsShortestPath()
createMatrix
public static int[][] createMatrix(int n,
int fill)