|
MATES 3.0-rc2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mates.sim.network.Topology.SingleSourceShortestPathData
Class containing both the distances and routes for the shortest path between one host and all other hosts.
Constructor Summary | |
Topology.SingleSourceShortestPathData(double[] distances,
int[] predecessors,
int source_index)
Constructs the shortest path information of a source host from a matrix of geodesic distances and a route matrix. |
Method Summary | |
double[] |
getDistances()
Returns an n -element array where n ==
getNumHosts() and entry i th
entry corresponds to the distance of the shortest path from
host source_index to host i .
|
int[] |
getPredecessors()
Returns the predecessor array for the shortest paths. |
Host |
getRoute(Host host)
Returns the next host in the route from the source host to host . |
int |
getRoute(int host_index)
Returns the next host in the route from the source host to the host with index host_index . |
Host |
getSource()
Returns the source host for the shortest paths. |
int |
getSourceIndex()
Returns the index of the source host for the shortest paths. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Topology.SingleSourceShortestPathData(double[] distances, int[] predecessors, int source_index)
Method Detail |
public double[] getDistances()
n
-element array where n ==
getNumHosts()
and entry i
th
entry corresponds to the distance of the shortest path from
host source_index
to host i
.
These entries may include Double.POSITIVE_INFINITY
, if the graph is not
connected.
public int[] getPredecessors()
public Host getRoute(Host host)
host
. If no path exists between the hosts,
null
is returned.
public int getRoute(int host_index)
host_index
. If no path
exists between the hosts, -1 is returned.
public Host getSource()
public int getSourceIndex()
|
MATES 3.0-rc2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |