Interface declaring minimal set of operations to be applied to the vertices of an undirected graph during a run of Prim's algorithm for constructing a minimal spanning tree.
Recording and/or visualizing information arising in a run that
is processed by this VertexProcessorPrim may be
recorded suitably by VisitorPrim. The
VertexPropertyItemPrim provides an adequat
datastructure for manipulating relevant information.
Vertex,
Edge,
VisitorPrim,
VertexPropertyItemPrim| Method Summary | |
boolean |
adjacency(Vertex v,
Edge e)
Scans a vertex, that is proposes to relate it to the growing forest via the given edge, where getTarget(e)==v
is assumed. |
boolean |
init(Vertex v)
Initializes a vertex as not being adjacent to the growing forest. |
boolean |
process(Vertex v)
Processes a vertex, that is makes it part of the growing forest, and hereby fixes it definitively. |
| Method Detail |
public boolean init(Vertex v)
v - the vertex to be initialized
public boolean adjacency(Vertex v,
Edge e)
throws java.lang.IllegalArgumentException
getTarget(e)==v
is assumed.v - the vertex with new adjacency possibilitye - the edge making the vertex adjacent to the growing forestjava.lang.IllegalArgumentException - if getTarget(e)!=vjava.lang.IllegalStateException - if process(Vertex)
has already been called for v
public boolean process(Vertex v)
throws java.lang.IllegalStateException
v - the vertex to be processed, i.e. adjoint to the forestjava.lang.IllegalStateException - if adjacency(Vertex, Edge)
has not yet been called for v