|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.hpi.fgis.dude.postprocessor.WarshallTransitiveClosureGenerator.GraphRepresentation de.hpi.fgis.dude.postprocessor.WarshallTransitiveClosureGenerator.AdjacencyList
protected class WarshallTransitiveClosureGenerator.AdjacencyList
WarshallTransitiveClosureGenerator.AdjacencyList
is the adjacency list representation of the added pairs. It created a map of
vertices and their connections. The list requires less space than WarshallTransitiveClosureGenerator.AdjacencyMatrix
if the graph
is sparse. As we are having an undirected graph, the map saves each edge only once, which cuts the required space in half.
Constructor Summary | |
---|---|
WarshallTransitiveClosureGenerator.AdjacencyList(int elements)
Constructor of WarshallTransitiveClosureGenerator.AdjacencyList |
Method Summary | |
---|---|
void |
calculateTransitiveClosure()
Iterating over the matrix and searching for new connections between elements. |
boolean |
elementIsSet(int i,
int j)
Checks whether there is an edge between the two elements in the graph (element is already set in the matrix). |
int |
getSize()
Returns the number of elements in the matrix. |
void |
set(int i,
int j)
Sets elements (i, j) in the matrix to true. |
Methods inherited from class de.hpi.fgis.dude.postprocessor.WarshallTransitiveClosureGenerator.GraphRepresentation |
---|
populateGraph |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WarshallTransitiveClosureGenerator.AdjacencyList(int elements)
WarshallTransitiveClosureGenerator.AdjacencyList
elements
- Number of elements (size).Method Detail |
---|
public int getSize()
WarshallTransitiveClosureGenerator.GraphRepresentation
getSize
in class WarshallTransitiveClosureGenerator.GraphRepresentation
public void set(int i, int j)
WarshallTransitiveClosureGenerator.GraphRepresentation
set
in class WarshallTransitiveClosureGenerator.GraphRepresentation
i
- Coordinate i in the matrix.j
- Coordinate j in the matrix.public boolean elementIsSet(int i, int j)
WarshallTransitiveClosureGenerator.GraphRepresentation
elementIsSet
in class WarshallTransitiveClosureGenerator.GraphRepresentation
i
- The number of the first element.j
- The number of the second element.
true
, if there is an edge between the two elements; otherwise false
.public void calculateTransitiveClosure()
WarshallTransitiveClosureGenerator.GraphRepresentation
calculateTransitiveClosure
in class WarshallTransitiveClosureGenerator.GraphRepresentation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |