|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gov.nist.antd.merlin.protocol.protectionlink.LinkGraph
This class creates a graph from an object OpNet but it doesn't care about the data inside a link.
This class was developed at the National Institute of Standards and Technology by employees of the Federal Government in the course of their official duties. Pursuant to title 17 Section 105 of the United States Code this software is not subject to copyright protection and is in the public domain. NIST assumes no responsibility whatsoever for its use by other parties, and makes no guarantees, expressed or implied, about its quality, reliability, or any other characteristic.
We would appreciate acknowledgement if the software is used.
NIST ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION AND DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
| Field Summary | |
static int |
INFINITY
Value for an infinite cost |
java.util.Map |
vertexMap
This hasmap maps Integer (Host Id) and Vertex |
| Constructor Summary | |
LinkGraph(Glass net)
Default constructor Creates a graph of the given net |
|
| Method Summary | |
void |
addEdge(ExtRouter source,
ExtRouter dest,
OpticalLink cost)
Add a new edge to the graph. |
void |
buildPath(Vertex source,
Vertex dest,
java.util.Vector v)
Recursive routine to build path to dest after running shortest path algorithm. |
void |
clearAll()
Initializes the vertex output info prior to running any shortest path algorithm. |
Vertex |
getVertex(int id)
Return a Vertex that match the given id |
java.util.Vector |
getVertices()
Return the vertices of this graph |
void |
printPath(int id)
Driver routine to handle unreachables and print total cost. |
private void |
printPath(Vertex dest)
Recursive routine to print shortest path to dest after running shortest path algorithm. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int INFINITY
public java.util.Map vertexMap
| Constructor Detail |
public LinkGraph(Glass net)
net - The net we need a graph representation.| Method Detail |
public void addEdge(ExtRouter source,
ExtRouter dest,
OpticalLink cost)
source - The source of the edgedest - The destination of the edgecost - The link between the nodes.public void printPath(int id)
id - The id of the destinationprivate void printPath(Vertex dest)
dest - The destination vertex.
public void buildPath(Vertex source,
Vertex dest,
java.util.Vector v)
source - The source vertex.dest - The destination vertexv - The vector where the path is stored.public Vertex getVertex(int id)
id - The vertex id
public void clearAll()
public java.util.Vector getVertices()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||