Packages

object Graph extends Serializable

The Graph object contains a collection of routines used to construct graphs from RDDs.

Source
Graph.scala
Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Graph
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. def apply[VD, ED](vertices: RDD[(VertexId, VD)], edges: RDD[Edge[ED]], defaultVertexAttr: VD = null.asInstanceOf[VD], edgeStorageLevel: StorageLevel = StorageLevel.MEMORY_ONLY, vertexStorageLevel: StorageLevel = StorageLevel.MEMORY_ONLY)(implicit arg0: ClassTag[VD], arg1: ClassTag[ED]): Graph[VD, ED]

    Construct a graph from a collection of vertices and edges with attributes.

    Construct a graph from a collection of vertices and edges with attributes. Duplicate vertices are picked arbitrarily and vertices found in the edge collection but not in the input vertices are assigned the default attribute.

    VD

    the vertex attribute type

    ED

    the edge attribute type

    vertices

    the "set" of vertices and their attributes

    edges

    the collection of edges in the graph

    defaultVertexAttr

    the default vertex attribute to use for vertices that are mentioned in edges but not in vertices

    edgeStorageLevel

    the desired storage level at which to cache the edges if necessary

    vertexStorageLevel

    the desired storage level at which to cache the vertices if necessary

  2. def fromEdgeTuples[VD](rawEdges: RDD[(VertexId, VertexId)], defaultValue: VD, uniqueEdges: Option[PartitionStrategy] = None, edgeStorageLevel: StorageLevel = StorageLevel.MEMORY_ONLY, vertexStorageLevel: StorageLevel = StorageLevel.MEMORY_ONLY)(implicit arg0: ClassTag[VD]): Graph[VD, Int]

    Construct a graph from a collection of edges encoded as vertex id pairs.

    Construct a graph from a collection of edges encoded as vertex id pairs.

    rawEdges

    a collection of edges in (src, dst) form

    defaultValue

    the vertex attributes with which to create vertices referenced by the edges

    uniqueEdges

    if multiple identical edges are found they are combined and the edge attribute is set to the sum. Otherwise duplicate edges are treated as separate. To enable uniqueEdges, a PartitionStrategy must be provided.

    edgeStorageLevel

    the desired storage level at which to cache the edges if necessary

    vertexStorageLevel

    the desired storage level at which to cache the vertices if necessary

    returns

    a graph with edge attributes containing either the count of duplicate edges or 1 (if uniqueEdges is None) and vertex attributes containing the total degree of each vertex.

  3. def fromEdges[VD, ED](edges: RDD[Edge[ED]], defaultValue: VD, edgeStorageLevel: StorageLevel = StorageLevel.MEMORY_ONLY, vertexStorageLevel: StorageLevel = StorageLevel.MEMORY_ONLY)(implicit arg0: ClassTag[VD], arg1: ClassTag[ED]): Graph[VD, ED]

    Construct a graph from a collection of edges.

    Construct a graph from a collection of edges.

    edges

    the RDD containing the set of edges in the graph

    defaultValue

    the default vertex attribute to use for each vertex

    edgeStorageLevel

    the desired storage level at which to cache the edges if necessary

    vertexStorageLevel

    the desired storage level at which to cache the vertices if necessary

    returns

    a graph with edge attributes described by edges and vertices given by all vertices in edges with value defaultValue

  4. implicit def graphToGraphOps[VD, ED](g: Graph[VD, ED])(implicit arg0: ClassTag[VD], arg1: ClassTag[ED]): GraphOps[VD, ED]

    Implicitly extracts the GraphOps member from a graph.

    Implicitly extracts the GraphOps member from a graph.

    To improve modularity the Graph type only contains a small set of basic operations. All the convenience operations are defined in the GraphOps class which may be shared across multiple graph implementations.