public class SimpleWeightedTypedEdge<T> extends Object implements WeightedTypedEdge<T>, Serializable
TypedEdge
.Constructor and Description |
---|
SimpleWeightedTypedEdge(T edgeType,
int from,
int to,
double weight) |
Modifier and Type | Method and Description |
---|---|
<E extends Edge> |
clone(int from,
int to)
Clones the contents associated with this edge, returning the copy mapped
to the provided vertices.
|
T |
edgeType()
Returns the type of information conveyed by this edge.
|
boolean |
equals(Object o)
Returns
true if o is an TypedEdge with the same
edge type and has the same vertices (independent of that edge's
orientation). |
<E extends Edge> |
flip()
Returns a copy of this edge with the
from and to vertices swapped. |
int |
from()
Returns the index of the tail vertex
|
int |
hashCode() |
int |
to()
Returns the index of the head vertex
|
String |
toString() |
double |
weight()
Returns the weight for this edge.
|
public SimpleWeightedTypedEdge(T edgeType, int from, int to, double weight)
public <E extends Edge> E clone(int from, int to)
public T edgeType()
public boolean equals(Object o)
true
if o
is an TypedEdge
with the same
edge type and has the same vertices (independent of that edge's
orientation).public <E extends Edge> E flip()
from
and to
vertices swapped.public double weight()
weight
in interface WeightedEdge
Copyright © 2012. All Rights Reserved.