SandMark version 2.0


sandmark.util.graph
Class Matrix

java.lang.Object
  |
  +--sandmark.util.graph.Matrix

public class Matrix
extends java.lang.Object


Field Summary
(package private)  Graph graph
           
(package private)  int[][] matrix
           
(package private)  java.util.Hashtable node2number
           
(package private)  java.util.Hashtable number2node
           
(package private)  int[][] paths
           
(package private)  int[][] pathWeights
           
 
Constructor Summary
Matrix(Graph graph, int init)
           
 
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
 

Field Detail

matrix

int[][] matrix

paths

int[][] paths

pathWeights

int[][] pathWeights

graph

Graph graph

node2number

java.util.Hashtable node2number

number2node

java.util.Hashtable number2node
Constructor Detail

Matrix

public Matrix(Graph graph,
              int init)
Method Detail

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)

SandMark version 2.0

Mon Jun 17 12:30:47 MST 2002