T
- the type of the data the vertex storespublic class WeightedDirectedVertex<T> extends DirectedVertex<T> implements WeightedVertex<T>
Modifier and Type | Method and Description |
---|---|
DirectedEdge<T> |
connectTo(Vertex<T> target,
double weight)
Connects the vertex to another in its graph
|
getAdjacentVertices, getEdges, getIncomingAdjacentVertices, getIncomingEdges, getOutgoingAdjacentVertices, getOutgoingEdges, removeAllEdges, removeAllIncomingEdges, removeAllOutgoingEdges, removeFromGraph
fromGraph, fromSameGraphAs
public DirectedEdge<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