Class EdgeContext<VD,ED,A>

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

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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract ED
    The attribute associated with the edge.
    abstract VD
    The vertex attribute of the edge's destination vertex.
    abstract long
    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
    The vertex attribute of the edge's source vertex.
    abstract long
    The vertex id of the edge's source vertex.
    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 java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EdgeContext

      public EdgeContext()
  • Method Details

    • 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.