|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.upb.swtpra05.group03.shuttle.SCCCalculator
Calculates the strong connected components of a given topology.
| Field Summary | |
(package private) java.util.HashMap |
AdjacentVertices
Stores the adjacent Stations for each Station |
(package private) java.util.LinkedList |
B
List of the investigated Vertices -- needed for calculation -- |
(package private) int |
biggestscc
Number of the biggest SCC |
(package private) int |
biggestsccvertices
The number of Vertices in the biggest SCC |
(package private) int |
dfbi
dfb Index -- needed for calculation -- |
(package private) int[] |
DFBI
The DFB Index of the Vertice -- needed for calculation -- |
private static java.util.logging.Logger |
log
Logger |
(package private) int[] |
Q
is the Vertice root of a SCC? |
(package private) boolean |
ready
Are all SCCs connected? |
(package private) int |
scc
Number of the current SCC -- needed for calculation -- |
(package private) java.util.LinkedList |
SCC
Vertices that are temporarly not in a SCC -- needed for calculation -- |
(package private) java.util.HashMap |
SCCs
HashMap with all calculated SCCs |
(package private) boolean[] |
stack
Is the Vertice stacked? |
(package private) java.util.HashMap |
StationIDtoSCC
Maps the StationID to the SCC Number |
(package private) de.upb.swtpra.kernel.TopologyData |
topology
The Topology |
(package private) java.util.HashMap |
Vertices
The Stations |
(package private) java.util.HashMap |
VerticesNum
The Number a Vertice got -- needed for calculation -- |
| Constructor Summary | |
SCCCalculator()
Constructor.. nothing needed here |
|
| Method Summary | |
private void |
calculateSCC()
Calculates all Strong Connected Components |
private void |
DFSSCC(de.upb.swtpra.kernel.TopologyDataObject tdobj)
The SCC Algorithm |
private void |
generateStationIDtoSCCMap()
Generates the StationIDtoSCC HashMap |
private java.util.LinkedList |
getAdjacentStations(de.upb.swtpra.kernel.TopologyDataObject tdobject)
Returns all adjacent Stations to the given Station |
java.util.HashMap |
getSCCs()
Returns the SCC HashMap |
void |
init(ModuleContainerInterface manager)
Initializes this module. |
boolean |
isGoodConnection(int StartStationID,
int EndStationID)
Returns true if a Connection is within one SCC or the EndStation is within the biggest SCC |
void |
newMessageReceived(de.upb.swtpra.kernel.message.Message msg)
React on the received message of the shuttle or not. |
private void |
trackdown(de.upb.swtpra.kernel.TopologyDataObject tdobject,
java.util.LinkedList adjacent)
Tracks down a given Track and adds all found Stations to the adjacent List. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final java.util.logging.Logger log
de.upb.swtpra.kernel.TopologyData topology
java.util.HashMap Vertices
java.util.HashMap AdjacentVertices
java.util.HashMap VerticesNum
int[] DFBI
int[] Q
boolean[] stack
java.util.LinkedList B
java.util.LinkedList SCC
int dfbi
java.util.HashMap SCCs
int scc
java.util.HashMap StationIDtoSCC
int biggestscc
int biggestsccvertices
boolean ready
| Constructor Detail |
public SCCCalculator()
| Method Detail |
public void init(ModuleContainerInterface manager)
Module
init in interface Modulemanager - The module manager which contain all modulespublic java.util.HashMap getSCCs()
public boolean isGoodConnection(int StartStationID,
int EndStationID)
isGoodConnection in interface SCCCalculatorInterfaceStartStationID - EndStationID -
private void generateStationIDtoSCCMap()
private void DFSSCC(de.upb.swtpra.kernel.TopologyDataObject tdobj)
tdobj - private void calculateSCC()
private void trackdown(de.upb.swtpra.kernel.TopologyDataObject tdobject,
java.util.LinkedList adjacent)
tdobject - adjacent - private java.util.LinkedList getAdjacentStations(de.upb.swtpra.kernel.TopologyDataObject tdobject)
tdobject -
public void newMessageReceived(de.upb.swtpra.kernel.message.Message msg)
ShuttleModule
newMessageReceived in interface ShuttleModulemsg - The received message of the shuttle
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||