Class Edge<ED>

Object
org.apache.spark.graphx.Edge<ED>
Type Parameters:
ED - type of the edge attribute

param: 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, scala.Serializable
Direct Known Subclasses:
EdgeTriplet

public class Edge<ED> extends Object implements scala.Serializable, scala.Product
A single directed edge consisting of a source id, target id, and the data associated with the edge.

See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Edge(long srcId, long dstId, ED attr)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    long
     
    long
    otherVertexId(long vid)
    Given one vertex in the edge return the other vertex.
    Return the relative direction of the edge to the corresponding vertex.
    long
     

    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, productIterator, productPrefix
  • Constructor Details

    • Edge

      public Edge(long srcId, long dstId, ED attr)
  • Method Details

    • srcId

      public long srcId()
    • dstId

      public long dstId()
    • attr

      public ED 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

      public EdgeDirection relativeDirection(long vid)
      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.