org.apache.spark.graphx
Class EdgeTriplet<VD,ED>

Object
  extended by org.apache.spark.graphx.Edge<ED>
      extended by org.apache.spark.graphx.EdgeTriplet<VD,ED>
All Implemented Interfaces:
java.io.Serializable, scala.Equals, scala.Product

public class EdgeTriplet<VD,ED>
extends Edge<ED>

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

See Also:
Serialized Form

Constructor Summary
EdgeTriplet()
           
 
Method Summary
 VD dstAttr()
          The destination vertex attribute
 VD otherVertexAttr(long vid)
          Given one vertex in the edge return the other vertex.
 VD srcAttr()
          The source vertex attribute
 String toString()
           
 scala.Tuple3<scala.Tuple2<Object,VD>,scala.Tuple2<Object,VD>,ED> toTuple()
           
 VD vertexAttr(long vid)
          Get the vertex object for the given vertex in the edge.
 
Methods inherited from class org.apache.spark.graphx.Edge
attr, dstId, otherVertexId, relativeDirection, srcId
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface scala.Product
productArity, productElement, productIterator, productPrefix
 
Methods inherited from interface scala.Equals
canEqual, equals
 

Constructor Detail

EdgeTriplet

public EdgeTriplet()
Method Detail

srcAttr

public VD srcAttr()
The source vertex attribute

Returns:
(undocumented)

dstAttr

public VD dstAttr()
The destination vertex attribute

Returns:
(undocumented)

otherVertexAttr

public VD otherVertexAttr(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 attribute for the other vertex on the edge

vertexAttr

public VD vertexAttr(long vid)
Get the vertex object for the given vertex in the edge.

Parameters:
vid - the id of one of the two vertices on the edge
Returns:
the attr for the vertex with that id

toString

public String toString()
Overrides:
toString in class Object

toTuple

public scala.Tuple3<scala.Tuple2<Object,VD>,scala.Tuple2<Object,VD>,ED> toTuple()