|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--gov.nist.antd.merlin.algorithm.AlgorithmTemplate
|
+--edu.gwu.csd.algorithm.GWUTemplate
|
+--edu.gwu.csd.algorithm.MapToRing
This algorithm is used to find a vertex mapping f[] and edge_to_path mapping from a Mesh topology graph ipG representing Ip layer (Upper Layer) to a WDM Ring topology (Lower Layer). creation Nov 29, 2001
| Field Summary | |
(package private) static java.lang.String |
ALGONAME
|
(package private) static int |
CENTER
|
(package private) static int |
CutSize
|
(package private) int[][][] |
cutStack
Initial Value -1 |
(package private) int |
cutStackPosition
Initial Value 0 |
(package private) int[][] |
deleted
Deleted Edge while finding an edge cut : Initial Value -1 |
(package private) int[] |
dfs
|
(package private) int[] |
dfsPath
Tmp Stack :Initial Value -1 |
(package private) int[][] |
dummyG
|
(package private) int[][] |
edgeCut
Initial Value -1 |
(package private) java.util.Hashtable |
fakeAsKey
This hashtable contains the mapping of real node to a sequence of nodes. |
(package private) static int |
FALSE
|
(package private) int[][] |
fLeftStack
Tmp Vertex Mapping :Initial Value -1 |
(package private) int[][] |
fRightStack
Tmp Vertex Mapping : Initial Value -1 |
(package private) int[][] |
fStack
Vertex Mapping :Initial Value -1 |
(package private) int |
fStackPosition
|
(package private) int |
giDebug
|
(package private) int |
giEdgeCnt
|
(package private) int |
giNodeCnt
|
(package private) int |
giPathIndex
|
(package private) int[][] |
gLeft
G_left component divided by an edge cut set : Initial Value 0 |
(package private) int[][] |
gppiPrtArr
|
(package private) int[][] |
gRight
G_right component divided by an edge cut set : Initial Value 0 |
(package private) int[][] |
h
Edge to Path Mapping : Initial Value 0 |
(package private) static int |
INFINITE
|
(package private) int[][] |
ipG
Original Input Graph : Initial Value 0 |
(package private) static int |
LEFT
|
(package private) int |
matrixSize
Size of the matrix. |
(package private) static int |
MAX
|
(package private) int |
maxNodeIdx
|
(package private) static int |
NIL
|
private java.lang.StringBuffer |
outStr
Contains the result of the algorithm. |
(package private) int[][] |
ppiEdgeArr
|
(package private) int[][] |
ppiNodeArr
|
(package private) java.util.Hashtable |
realAsKey
This hashtable contains the mapping of real node to a sequence of nodes. |
(package private) static int |
RIGHT
|
(package private) int[][] |
tmpIpG
Working space for ipG : Initial Value 0 |
(package private) static int |
TRUE
|
| Fields inherited from class edu.gwu.csd.algorithm.GWUTemplate |
listOfConnections, parameter |
| Fields inherited from class gov.nist.antd.merlin.algorithm.AlgorithmTemplate |
|
| Fields inherited from interface gov.nist.antd.optical.algorithm.Algorithm |
ROUTING, RWA, UNKNOWN, WAVELENGTH |
| Constructor Summary | |
MapToRing()
Creates an instance of the algorithm with the default name. |
|
| Method Summary | |
private void |
checkRing(Glass net,
RingList ring)
Checks if the network provides the ring topology that is needed. |
void |
deleteEdge(int[][] graph)
Delete an edge from graph[][] and the updated graph[][] will be saved in tmpIpG[][]. |
void |
dfSearch(int[][] graph,
int chk)
|
int |
doesNeedDummy(int[][] graph)
|
void |
edgeToRing(int[][] tmpGraph,
int flag,
int fStackPosition)
|
java.util.Vector |
execute(Glass net,
java.util.Vector theListOfConnections,
java.util.Vector theParameter)
This method executes the algorithm. |
private void |
fillConnection(OpticalConnection conn,
int[] nodeList)
This method creates the datastructure behind the optical Connection. |
int |
findEdgeCutOf2(int[][] tmpGraph,
int numOfNode)
Find an edge cut set of size 2 and the result is saved in EdgeCut[CutSize][CutSize]. |
int |
findInducedG(int[][] graph,
int vertex,
int flag)
Find the LEFT or RIGHT component of graph, connected from the vertex, edgeCut[0][0] and saved gLeft[][] for the flag LEFT or gRIGHT[][] for the flag RIGHT. |
int |
findNumOfEdge(int[][] graph)
Check the number of edges of the graph. |
int |
findNumOfNode(int[][] graph)
|
private void |
generateOpticalRoutes(OpticalConnection[] connections)
Generates the array if routes according to the connection request. |
java.lang.String |
getResultString()
Returns the result string. |
byte |
getType()
This algorithm is a Routing and Wavelength Algorithm for Ring topologies. |
int |
is2EdgeConnected(int[][] orgGraph)
|
int |
isDummy(int s,
int t)
|
int |
isIncluded(int[][] graph,
int node)
|
int |
isRing(int[][] tmpGraph)
Check whether the graph is ring or not. |
int |
loadTopologyData(java.lang.String[] args)
Read the input out of a file. |
static void |
main(java.lang.String[] args)
|
void |
map2toRing(int[][] graph,
int flag,
int numOfNode,
int fStackPosition)
void map2toRing(int graph[matrixSize][matrixSize], int flag, int fStackPosition) |
void |
merge2Rings(int[] vertexLeft,
int[] vertexRight,
int[][] edgeCut,
int flag,
int fStackPosition)
|
int |
reachable(int[][] graph,
int numOfNode)
|
int |
reachableFromTo(int[][] graph,
int numOfNode,
int from,
int to)
|
void |
ringToRing(int[][] tmpGraph,
int flag,
int fStackPosition)
|
void |
ringToRingOLD(int[][] graph,
int flag)
|
int |
run(java.lang.String[] args)
Starts the final execution of the algorithm. |
int[][] |
theAlgorithm(int[][] topo,
int[][] connections)
This method is the startmethod of the algorithm out of SSF. |
| Methods inherited from class edu.gwu.csd.algorithm.GWUTemplate |
config, customConfig, preComputeAlgorithm, toDML |
| Methods inherited from class gov.nist.antd.merlin.algorithm.AlgorithmTemplate |
execute, getName, isDebug, setDebug, setName |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
static final int INFINITE
static final int MAX
static final int NIL
static final int TRUE
static final int FALSE
static final int LEFT
static final int CENTER
static final int RIGHT
static final int CutSize
int matrixSize
int[][] ipG
int[][] tmpIpG
int[][] gLeft
int[][] gRight
int[][] fStack
int[][] fLeftStack
int[][] fRightStack
int fStackPosition
int[][] h
int[][] edgeCut
int[][][] cutStack
int cutStackPosition
int[][] deleted
int[][] dummyG
int[] dfsPath
int[] dfs
int maxNodeIdx
int giNodeCnt
int giEdgeCnt
int giDebug
int giPathIndex
int[][] gppiPrtArr
int[][] ppiNodeArr
int[][] ppiEdgeArr
java.util.Hashtable fakeAsKey
java.util.Hashtable realAsKey
private java.lang.StringBuffer outStr
static final java.lang.String ALGONAME
| Constructor Detail |
public MapToRing()
| Method Detail |
public int run(java.lang.String[] args)
args - The argumental array. The first argument is the filename.
public int loadTopologyData(java.lang.String[] args)
args - the argument string array of the main method
public void map2toRing(int[][] graph,
int flag,
int numOfNode,
int fStackPosition)
graph - The topology graph.flag - numOfNode - fStackPosition - public int isRing(int[][] tmpGraph)
tmpGraph - the graph that has to be checked
public int findNumOfEdge(int[][] graph)
graph - The topology graph.
public void deleteEdge(int[][] graph)
graph - The topology graph.
public int findEdgeCutOf2(int[][] tmpGraph,
int numOfNode)
numOfNode - ???
public int findInducedG(int[][] graph,
int vertex,
int flag)
graph - The topology Graphvertex - ???flag - LEFT/RIGHT
public void merge2Rings(int[] vertexLeft,
int[] vertexRight,
int[][] edgeCut,
int flag,
int fStackPosition)
public void edgeToRing(int[][] tmpGraph,
int flag,
int fStackPosition)
public void ringToRing(int[][] tmpGraph,
int flag,
int fStackPosition)
public void ringToRingOLD(int[][] graph,
int flag)
public int reachableFromTo(int[][] graph,
int numOfNode,
int from,
int to)
public int reachable(int[][] graph,
int numOfNode)
public int isDummy(int s,
int t)
public int isIncluded(int[][] graph,
int node)
public int doesNeedDummy(int[][] graph)
public int is2EdgeConnected(int[][] orgGraph)
public void dfSearch(int[][] graph,
int chk)
public int findNumOfNode(int[][] graph)
public static void main(java.lang.String[] args)
public int[][] theAlgorithm(int[][] topo,
int[][] connections)
theAlgorithm in class GWUTemplatetopo - An array containing the topology matrix [fromNodeID, toNodeID,
linkID].connections - An array containing the connections [sourceNodeID,
destNodeID].
private void generateOpticalRoutes(OpticalConnection[] connections)
connections - the array containing the connection request from node
to node.
private void checkRing(Glass net,
RingList ring)
net - The network.
private void fillConnection(OpticalConnection conn,
int[] nodeList)
conn - The connection that has to be completed.nodeList - The list of nodes that create the Path.public java.lang.String getResultString()
public byte getType()
getType in interface AlgorithmgetType in class AlgorithmTemplate
public java.util.Vector execute(Glass net,
java.util.Vector theListOfConnections,
java.util.Vector theParameter)
throws AlgorithmException
execute in interface Algorithmexecute in class GWUTemplatenet - the topologies network.theListOfConnections - The vector containing the connections.theParameter - not used here.
AlgorithmException - An AlgorithmException occured.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||