Package org.apache.spark.graphx
Class Edge<ED>
Object
org.apache.spark.graphx.Edge<ED>
- Type Parameters:
ED
- type of the edge attributeparam: srcId The vertex id of the source vertex param: dstId The vertex id of the target vertex param: attr The attribute associated with the edge
- All Implemented Interfaces:
Serializable
,scala.Equals
,scala.Product
- Direct Known Subclasses:
EdgeTriplet
A single directed edge consisting of a source id, target id,
and the data associated with the edge.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionattr()
long
dstId()
long
otherVertexId
(long vid) Given one vertex in the edge return the other vertex.relativeDirection
(long vid) Return the relative direction of the edge to the corresponding vertex.long
srcId()
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface scala.Equals
canEqual, equals
Methods inherited from interface scala.Product
productArity, productElement, productElementName, productElementNames, productIterator, productPrefix
-
Constructor Details
-
Edge
-
-
Method Details
-
srcId
public long srcId() -
dstId
public long dstId() -
attr
-
otherVertexId
public long otherVertexId(long vid) Given one vertex in the edge return the other vertex.- Parameters:
vid
- the id one of the two vertices on the edge.- Returns:
- the id of the other vertex on the edge.
-
relativeDirection
Return the relative direction of the edge to the corresponding vertex.- Parameters:
vid
- the id of one of the two vertices in the edge.- Returns:
- the relative direction of the edge to the corresponding vertex.
-