EdgeTriplet Class

An edge triplet represents an edge along with the vertex attributes of its neighboring vertices.

VD: the type of the vertex attribute.

ED: the type of the edge attribute

instance constructor:

new EdgeTriplet()

var attr: ED
The attribute associated with the edge

var dstAttr: VD
The destination vertex attribute

var dstId: VertexId
The vertex id of the target vertex

def otherVertexAttr(vid: VertexId): VD
Given one vertex in the edge return the other vertex.

def otherVertexId(vid: VertexId): VertexId
Given one vertex in the edge return the other vertex.

def relativeDirection(vid: VertexId): EdgeDirection
Return the relative direction of the edge to the corresponding vertex.

var srcAttr: VD
The source vertex attribute

var srcId: VertexId
The vertex id of the source vertex

def toString(): String
def
toTuple: ((VertexId, VD), (VertexId, VD), ED)

def vertexAttr(vid: VertexId): VD
Get the vertex object for the given vertex in the edge

Example:

Reference:

https://github.com/apache/spark/blob/v2.4.5/graphx/src/main/scala/org/apache/spark/graphx/EdgeTriplet.scala

Last updated

Was this helpful?