MATES 3.0-rc2

org.mates.sim.network
Class Topology.AllPairsShortestPathData

java.lang.Object
  extended byorg.mates.sim.network.Topology.AllPairsShortestPathData
Enclosing class:
Topology

public class Topology.AllPairsShortestPathData
extends java.lang.Object

Class containing both the distances and route table for the shortest path between all pairs of hosts.

Author:
Evan Sultanik

Constructor Summary
Topology.AllPairsShortestPathData(double[][] distances, int[][] predecessors)
          Constructs the all pairs shortest path information from a matrix of geodesic distances and a predecessor matrix.
 
Method Summary
 double[][] getDistances()
          Returns an nxn matrix where n == getNumHosts() and entry i,j corresponds to the distance of the shortest path from host i to host j.
 int[][] getPredecessors()
          Returns an nxn matrix where n == getNumHosts() and entry i,j corresponds to the predecessor of j in the shortest path from host i to host j.
 int[] getRoute(int i, int j)
          Convenience function that calls Topology.getRoute(int[][], int, int) on the current predecessor matrix.
 int[][] getRoutes()
          Returns an nxn matrix where n == getNumHosts() and entry i,j corresponds to the next host in the shortest path from host i to host j.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Topology.AllPairsShortestPathData

public Topology.AllPairsShortestPathData(double[][] distances,
                                         int[][] predecessors)
Constructs the all pairs shortest path information from a matrix of geodesic distances and a predecessor matrix.

Method Detail

getDistances

public double[][] getDistances()
Returns an nxn matrix where n == getNumHosts() and entry i,j corresponds to the distance of the shortest path from host i to host j. These entries may include Double.POSITIVE_INFINITY, if the graph is not connected.


getRoute

public int[] getRoute(int i,
                      int j)
Convenience function that calls Topology.getRoute(int[][], int, int) on the current predecessor matrix.


getRoutes

public int[][] getRoutes()
Returns an nxn matrix where n == getNumHosts() and entry i,j corresponds to the next host in the shortest path from host i to host j. This route table may include loops (but not cycles) if the graph is not connected.


getPredecessors

public int[][] getPredecessors()
Returns an nxn matrix where n == getNumHosts() and entry i,j corresponds to the predecessor of j in the shortest path from host i to host j. This predecessor matrix may include loops (but not cycles) if the graph is not connected.


MATES 3.0-rc2

Submit a bug or request a feature
http://mates.sourceforge.net/

Copyright 2004 Evan Sultanik