public class UndirectedWeightedEdge<E extends EdgeWeightData,V extends UndirectedEdgeDataVertex<E> & EdgeWeightVertex<E>>
extends java.lang.Object
Constructor and Description |
---|
UndirectedWeightedEdge(V from,
V to) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Since weighted edges are undirected, they are equal not only if they
have the same tail and head but also if they have opposite tails and heads.
|
V |
from()
Returns one end of the given edge.
|
AbstractGraph<? extends Vertex> |
getGraph()
Get the graph to which the edge belongs
|
int |
hashCode()
Overridden so that adding weighted edges to a HashSet will automatically eliminate
duplicates.
|
V |
to()
Returns one end of the given edge.
|
double |
weight()
Returns the edge's weight.
|
public final V from()
public final V to()
public final double weight()
public final AbstractGraph<? extends Vertex> getGraph()
public final boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public final int hashCode()
hashCode
in class java.lang.Object