Interface WeightedEdge<V,W>
- All Known Implementing Classes:
DefaultWeightedEdge
public interface WeightedEdge<V,W>
An edge in a weighted graph.
Represents a directed edge from a source vertex to a target vertex with an associated weight. Can also represent undirected edges.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanChecks if this edge connects the given vertices.Returns the source vertex of this edge.Returns the target vertex of this edge.Returns the weight of this edge.default booleanisIncidentTo(V vertex) Checks if this edge is incident to the given vertex.
-
Method Details
-
getSource
-
getTarget
-
getWeight
-
connects
-
isIncidentTo
Checks if this edge is incident to the given vertex.- Parameters:
vertex- the vertex to check- Returns:
- true if vertex is source or target
-