|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org._3pq.jgrapht.edge.DefaultEdge
A skeletal implementation of the Edge interface, to minimize the effort required to implement the interface.
| Fields inherited from interface org._3pq.jgrapht.Edge |
DEFAULT_EDGE_WEIGHT |
| Constructor Summary | |
DefaultEdge(java.lang.Object sourceVertex,
java.lang.Object targetVertex)
Constructor for DefaultEdge. |
|
| Method Summary | |
java.lang.Object |
clone()
Creates and returns a shallow copy of this edge. |
boolean |
containsVertex(java.lang.Object v)
Returns true if this edge contains the specified vertex. |
java.lang.Object |
getSource()
Returns the source vertex of this edge. |
java.lang.Object |
getTarget()
Returns the target vertex of this edge. |
double |
getWeight()
Returns the weight of this edge. |
java.lang.Object |
oppositeVertex(java.lang.Object v)
Returns the vertex opposite to the specified vertex. |
void |
setWeight(double weight)
Sets the weight of this edge. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DefaultEdge(java.lang.Object sourceVertex,
java.lang.Object targetVertex)
sourceVertex - source vertex of the edge.targetVertex - target vertex of the edge.| Method Detail |
public java.lang.Object getSource()
EdgegetSource in interface EdgeEdge.getSource()public java.lang.Object getTarget()
EdgegetTarget in interface EdgeEdge.getTarget()public void setWeight(double weight)
EdgeUnsupportedOperationException is thrown.setWeight in interface EdgeEdge.setWeight(double)public double getWeight()
Edge1.0 is returned.getWeight in interface EdgeEdge.getWeight()public java.lang.Object clone()
Edgeclone in interface Edgeclone in class java.lang.ObjectEdge.clone()public boolean containsVertex(java.lang.Object v)
Edge
this.getSource().equals(v) || this.getTarget().equals(v)
containsVertex in interface EdgeEdge.containsVertex(java.lang.Object)public java.lang.Object oppositeVertex(java.lang.Object v)
EdgeoppositeVertex in interface EdgeEdge.oppositeVertex(java.lang.Object)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||