org.apache.spark.graphx
Class EdgeContext<VD,ED,A>

Object
  extended by org.apache.spark.graphx.EdgeContext<VD,ED,A>
Direct Known Subclasses:
AggregatingEdgeContext

public abstract class EdgeContext<VD,ED,A>
extends Object

Represents an edge along with its neighboring vertices and allows sending messages along the edge. Used in Graph.aggregateMessages(scala.Function1, scala.runtime.BoxedUnit>, scala.Function2, org.apache.spark.graphx.TripletFields, scala.reflect.ClassTag).


Constructor Summary
EdgeContext()
           
 
Method Summary
abstract  ED attr()
          The attribute associated with the edge.
abstract  VD dstAttr()
          The vertex attribute of the edge's destination vertex.
abstract  long dstId()
          The vertex id of the edge's destination vertex.
abstract  void sendToDst(A msg)
          Sends a message to the destination vertex.
abstract  void sendToSrc(A msg)
          Sends a message to the source vertex.
abstract  VD srcAttr()
          The vertex attribute of the edge's source vertex.
abstract  long srcId()
          The vertex id of the edge's source vertex.
 EdgeTriplet<VD,ED> toEdgeTriplet()
          Converts the edge and vertex properties into an EdgeTriplet for convenience.
static
<VD,ED,A> scala.Some<scala.Tuple5<Object,Object,VD,VD,ED>>
unapply(EdgeContext<VD,ED,A> edge)
          Extractor mainly used for Graph#aggregateMessages*.
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EdgeContext

public EdgeContext()
Method Detail

unapply

public static <VD,ED,A> scala.Some<scala.Tuple5<Object,Object,VD,VD,ED>> unapply(EdgeContext<VD,ED,A> edge)
Extractor mainly used for Graph#aggregateMessages*. Example:

  val messages = graph.aggregateMessages(
    case ctx @ EdgeContext(_, _, _, _, attr) =>
      ctx.sendToDst(attr)
    , _ + _)
 

Parameters:
edge - (undocumented)
Returns:
(undocumented)

srcId

public abstract long srcId()
The vertex id of the edge's source vertex.


dstId

public abstract long dstId()
The vertex id of the edge's destination vertex.


srcAttr

public abstract VD srcAttr()
The vertex attribute of the edge's source vertex.


dstAttr

public abstract VD dstAttr()
The vertex attribute of the edge's destination vertex.


attr

public abstract ED attr()
The attribute associated with the edge.


sendToSrc

public abstract void sendToSrc(A msg)
Sends a message to the source vertex.


sendToDst

public abstract void sendToDst(A msg)
Sends a message to the destination vertex.


toEdgeTriplet

public EdgeTriplet<VD,ED> toEdgeTriplet()
Converts the edge and vertex properties into an EdgeTriplet for convenience.