public class UndirectedKruskalVertex<E extends SpanningTreeEdgeData> extends UndirectedEdgeDataVertex<E> implements KruskalVertex<E>
Constructor and Description |
---|
UndirectedKruskalVertex(EdgeDataFactory<E> edgeDataFactory)
Construct vertex from a factory for building appropriate EdgeData objects.
|
Modifier and Type | Method and Description |
---|---|
Color |
getEdgeColor(EdgeColorVertex<E> to)
Retrieve the color of the edge whose head is the given vertex
|
double |
getEdgeWeight(EdgeWeightVertex<E> to)
Retrieve the weight of the edge from the calling vertex to the vertex passed
as parameter.
|
void |
setEdgeColor(EdgeColorVertex<E> to,
Color color)
Set the color of the edge whose head is the given vertex.
|
void |
setEdgeWeight(EdgeWeightVertex<E> to,
double weight)
Set the weight of the edge from the calling vertex to the vertex passed
as parameter.
|
addAdjacency, clearAdjacencies, removeAdjacency
adjacencyCount, containsAdjacency, getAdjacencies, getEdgeData, hasAdjacencies
equals, getGraph, setGraph
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEdgeData
addAdjacency, adjacencyCount, clearAdjacencies, containsAdjacency, getAdjacencies, getGraph, hasAdjacencies, removeAdjacency, setGraph
public UndirectedKruskalVertex(EdgeDataFactory<E> edgeDataFactory)
edgeDataFactory
- factory to use for constructing new EdgeData objectspublic final void setEdgeWeight(EdgeWeightVertex<E> to, double weight)
EdgeWeightVertex
setEdgeWeight
in interface EdgeWeightVertex<E extends SpanningTreeEdgeData>
to
- head of the edge for which to set the weightweight
- value to which the edge's weight is to be setpublic final double getEdgeWeight(EdgeWeightVertex<E> to)
EdgeWeightVertex
getEdgeWeight
in interface EdgeWeightVertex<E extends SpanningTreeEdgeData>
to
- head of the edge for which to get the weightpublic final void setEdgeColor(EdgeColorVertex<E> to, Color color)
EdgeColorVertex
setEdgeColor
in interface EdgeColorVertex<E extends SpanningTreeEdgeData>
to
- head of the edge whose color is to be setcolor
- value to which to set the edge's colorpublic final Color getEdgeColor(EdgeColorVertex<E> to)
EdgeColorVertex
getEdgeColor
in interface EdgeColorVertex<E extends SpanningTreeEdgeData>
to
- head of the edge whose color is to be retrieved