List of all members.
Detailed Description
A vertex of the graph that the TopologicalSort can work on.
Constructor & Destructor Documentation
alma.acs.algorithms.Vertex.Vertex |
( |
Object |
userObject |
) |
|
Constructor that wraps a node in the graph that has to be sorted.
The userObject
must implement reasonable equals()
and hashCode()
methods.
- Parameters:
-
| userObject | the application's graph node, to be retrieved later through getUserObject |
Member Function Documentation
void alma.acs.algorithms.Vertex.addAdjacentVertex |
( |
Vertex |
vertex |
) |
|
Adds a dependent vertex to this vertex.
The direction of the graph is from "must occur first" to "may occur later". If node B depends on node A, then call vertexA.addAdjacentVertex(vertexB)
.
To use the example from Cormen, if you want to figure out in which order to put on your clothes, the vertex for socks must point to the vertex for shoes, stating that socks must be put on before you can put on your shoes, or in other words, that shoes depend on socks. So add the shoe vertex to the sock's adjacent vertex list.
- Parameters:
-
| vertex | another vertex that depends on this vertex. |
boolean alma.acs.algorithms.Vertex.equals |
( |
Object |
obj |
) |
|
List<Vertex> alma.acs.algorithms.Vertex.getAdjacencyList |
( |
|
) |
[package] |
int alma.acs.algorithms.Vertex.getColor |
( |
|
) |
[package] |
Object alma.acs.algorithms.Vertex.getUserObject |
( |
|
) |
|
Returns the application's graph node that was wrapped by this vertex.
int alma.acs.algorithms.Vertex.hashCode |
( |
|
) |
|
void alma.acs.algorithms.Vertex.setColor |
( |
int |
color |
) |
[package] |
Member Data Documentation
The documentation for this class was generated from the following file: