org.apache.spark.graphx
Class Edge<ED>

Object
  extended by org.apache.spark.graphx.Edge<ED>
All Implemented Interfaces:
java.io.Serializable, scala.Equals, scala.Product
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:
Serialized Form

Constructor Summary
Edge(long srcId, long dstId, ED attr)
           
 
Method Summary
 ED attr()
           
 long dstId()
           
 long otherVertexId(long vid)
          Given one vertex in the edge return the other vertex.
 EdgeDirection relativeDirection(long vid)
          Return the relative direction of the edge to the corresponding vertex.
 long srcId()
           
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface scala.Product
productArity, productElement, productIterator, productPrefix
 
Methods inherited from interface scala.Equals
canEqual, equals
 

Constructor Detail

Edge

public Edge(long srcId,
            long dstId,
            ED attr)
Method Detail

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.