public class DirectedWeightedEdgeImpl extends EdgeImpl implements DirectedWeightedEdge
DIRECTION_A_TO_B, DIRECTION_B_TO_A, NODIRECTION| Constructor and Description |
|---|
DirectedWeightedEdgeImpl(Vertex sourceVertex,
Vertex sinkVertex,
double weight)
Creates a DirectedWeightedEdgeImpl object whose source and sink vertices and
weight are specified by the parameters.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getDirection()
Returns the direction of the Edge
|
Vertex |
getSink()
Returns the sink Vertex of the edge.
|
Vertex |
getSource()
Returns the source Vertex of the edge.
|
double |
getWeight()
Returns the weight of the edge.
|
void |
setWeight(double weight)
Sets the weight of the edge.
|
String |
toString()
Returns a String representation of the DirectedWeightedEdge.
|
clone, getLabel, getOppositeVertex, getVertexA, getVertexB, hasLabel, isFollowVertexLabel, setFollowVertexLabel, setLabelequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetOppositeVertex, getVertexA, getVertexBisFollowVertexLabel, setFollowVertexLabelgetLabel, hasLabel, setLabelpublic String toString()
public double getWeight()
getWeight in interface WeightedEdgepublic void setWeight(double weight)
setWeight in interface WeightedEdgeweight - The new weight of the edgepublic Vertex getSource()
getSource in interface DirectedEdgepublic Vertex getSink()
getSink in interface DirectedEdgepublic int getDirection()
getDirection in interface DirectedEdgeCopyright © 2019 JULIE Lab, Germany. All rights reserved.