T
- the type of the data the vertex storespublic class WeightedUndirectedVertex<T> extends UndirectedVertex<T> implements WeightedVertex<T>
Modifier and Type | Method and Description |
---|---|
UndirectedEdge<T> |
connectTo(Vertex<T> target,
double weight)
Connects the vertex to another in its graph
|
getAdjacentVertices, getEdges, removeAllEdges, removeFromGraph
fromGraph, fromSameGraphAs
public UndirectedEdge<T> connectTo(Vertex<T> target, double weight)
WeightedVertex
connectTo
in interface WeightedVertex<T>
target
- the vertex to add an edge toweight
- the weight to assign the new edge