|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdrcl.net.graph.ShortestPathTree
drcl.inet.tool.routing_msp2
This class sets up static routes for a network. The routes being set up form a shortest path tree rooted at each node as destination.
This class takes the adjacency matrix as the network topology and runs the Dijkstra algorithm to find the shortest path tree.
To use this class, invoke one of the setup(...) methods
to install appropriate routing entries to nodes (this is done by
Node.addRTEntry()).
Or one can choose not to install routing entries but only return the result
of the shortest path tree.
| Field Summary | |
int[][] |
adjMatrix
|
int[][] |
childIndices
|
LinkCost |
linkcost
|
Node[] |
realNodes
|
int[][] |
routes
|
| Constructor Summary | |
routing_msp2()
|
|
| Method Summary | |
boolean |
isProfilingDetailEnabled()
|
boolean |
isProfilingDetailPrintEnabled()
|
boolean |
isProfilingEnabled()
|
void |
reset()
|
void |
setProfilingDetailEnabled(boolean e)
|
void |
setProfilingDetailPrintEnabled(boolean e)
|
void |
setProfilingEnabled(boolean e)
|
void |
setup(Component network_,
int[][] adjMatrix_)
Sets up unicast routes for the network_. |
void |
setup(Component network_,
int[][] adjMatrix_,
boolean retainResult_,
boolean installRoutes_)
Sets up unicast routes for the network_. |
void |
setup(Component network_,
int[][] adjMatrix_,
long[] ids_)
Sets up unicast routes for the network_. |
void |
setup(Component network_,
int[][] adjMatrix_,
long[] ids_,
LinkCost linkcost_,
boolean retainResult_,
boolean installRoutes_)
See setup(Component, int[][], boolean, boolean). |
void |
setup(Node[] realNodes_,
int[][] adjMatrix_,
LinkCost linkcost_,
boolean retainResult_,
boolean installRoutes_)
Sets up unicast routes for the network_. |
void |
stopit()
|
| Methods inherited from class drcl.net.graph.ShortestPathTree |
getCost, isDebugEnabled, run, setDebugEnabled |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public Node[] realNodes
public int[][] adjMatrix
public LinkCost linkcost
public int[][] childIndices
public int[][] routes
| Constructor Detail |
public routing_msp2()
| Method Detail |
public void setProfilingEnabled(boolean e)
public boolean isProfilingEnabled()
public void setProfilingDetailEnabled(boolean e)
public boolean isProfilingDetailEnabled()
public void setProfilingDetailPrintEnabled(boolean e)
public boolean isProfilingDetailPrintEnabled()
public void stopit()
public void setup(Component network_,
int[][] adjMatrix_)
adjMatrix_ - adjacency matrix that describes network topology.
public void setup(Component network_,
int[][] adjMatrix_,
long[] ids_)
adjMatrix_ - adjacency matrix that describes network topology.ids_ - real node addresses. ids_[0] is the node address
of node 0. The indexing matches between ids_ and adjMatrix_.
public void setup(Component network_,
int[][] adjMatrix_,
boolean retainResult_,
boolean installRoutes_)
retainResult_ - if true, the result is stored in
childIndices and routes which are
(n x n) array where n is number of nodes.
The first dimension is the destination node index. For the
shortest path tree of each destination node, the second dimension
records the child node index and interface index to child,
respectively, in that tree.installRoutes_ - true if results are installed to the nodes.
public void setup(Component network_,
int[][] adjMatrix_,
long[] ids_,
LinkCost linkcost_,
boolean retainResult_,
boolean installRoutes_)
setup(Component, int[][], boolean, boolean).
ids_ - real node addresses. ids_[0] is the node address
of node 0. The indexing matches between ids_ and adjMatrix_.linkcost_ - cost matrix for network links; use downstream node
index as the first argument and the interface index of the
downstream node (to the upstream node) as the 2nd
argument. The interface index should be consistent with that
in adjMatrix_. For the format of adjMatrix,
see drcl.inet.InetUtil.createTopology(Component,String,
String,Object[],int[][],long[],drcl.inet.Link,boolean)public void reset()
public void setup(Node[] realNodes_,
int[][] adjMatrix_,
LinkCost linkcost_,
boolean retainResult_,
boolean installRoutes_)
If 'retainResult' is turned on, the result is returned in a (n x n) array where n is number of nodes. The first dimension is the destination node index. For the shortest path tree of each destination node, the second dimension records the parent node index in that tree.
linkcost_ - cost matrix for network links; use downstream node
index as the first argument and the interface index of the
downstream node (to the upstream node) as the 2nd
argument. The interface index should be consistent with that
in adjMatrix_. For the format of adjMatrix,
see drcl.inet.InetUtil.createTopology(Component,String,
String,Object[],int[][],long[],drcl.inet.Link,boolean)
|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||