public class UndirectedPrimVertex<E extends SpanningTreeEdgeData> extends UndirectedKruskalVertex<E> implements PrimVertex<E>
DEFAULT_WEIGHT| Constructor and Description |
|---|
UndirectedPrimVertex(EdgeDataFactory<E> edgeDataFactory)
Construct vertex from a factory for building appropriate EdgeData objects,
initialize vertex weight and color to the default values and set vertex
parent to null.
|
| Modifier and Type | Method and Description |
|---|---|
Color |
getColor()
Get the vertex color
|
ChildVertex |
getParent()
Get the vertex's parent
|
double |
getWeight()
Retrieve a vertex's weight.
|
void |
setColor(Color color)
Set the vertex color
|
void |
setParent(ChildVertex parent)
Set the parent of the given vertex
|
void |
setWeight(double weight)
Set vertex weight to the specified value.
|
getEdgeColor, getEdgeWeight, setEdgeColor, setEdgeWeightaddAdjacency, clearAdjacencies, removeAdjacencyadjacencyCount, containsAdjacency, getAdjacencies, getEdgeData, hasAdjacenciesequals, getGraph, setGraphclone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetEdgeWeight, setEdgeWeightgetEdgeColor, setEdgeColorgetEdgeDataaddAdjacency, adjacencyCount, clearAdjacencies, containsAdjacency, getAdjacencies, getGraph, hasAdjacencies, removeAdjacency, setGraphpublic UndirectedPrimVertex(EdgeDataFactory<E> edgeDataFactory)
edgeDataFactory - public final void setWeight(double weight)
WeightedVertexsetWeight in interface WeightedVertexweight - value to which to set the vertex weightpublic final double getWeight()
WeightedVertexgetWeight in interface WeightedVertexpublic void setColor(Color color)
ColoredVertexsetColor in interface ColoredVertexcolor - value to which to set the colorpublic Color getColor()
ColoredVertexgetColor in interface ColoredVertexpublic void setParent(ChildVertex parent)
ChildVertexsetParent in interface ChildVertexparent - vertex to be set as parentpublic ChildVertex getParent()
ChildVertexgetParent in interface ChildVertex