Class

edu.drexel.cs.dbgroup.portal

TGraph

Related Doc: package portal

Permalink

abstract class TGraph[VD, ED] extends Serializable

A TGraph abstractly represents a single evolving graph, consisting of nodes, node properties, edges, edge properties, and addition, modification, and deletion of these over time. The TGraph provides operations of the temporal algebra and accessors. Like Spark and GraphX, the TGraph is immutable -- operations return new TGraphs.

VD

the node/vertex attribute type

ED

the edge attribute type

Note

GraphLoader contains convenience operations for loading TGraphs

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TGraph
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TGraph()(implicit arg0: ClassTag[VD], arg1: ClassTag[ED])

    Permalink

Abstract Value Members

  1. abstract def coalesce(): TGraph[VD, ED]

    Permalink

    Coalesce the temporal graph.

    Coalesce the temporal graph. Some operations are known to have the potential to make the TGraph uncoalesced. If the graph is known to be coalesced, this is a no-op.

  2. abstract def createAttributeNodes(vAggFunc: (VD, VD) ⇒ VD)(vgroupby: (VertexId, VD) ⇒ VertexId): TGraph[VD, ED]

    Permalink

    Structural zoom.

    Structural zoom. Creates nodes from clusters of existing nodes, assigning them new ids. Edge ids remain unchanged and are all preserved.

    vAggFunc

    The function to apply to node attributes when multiple nodes are mapped by a Skolem function to a single group. Any associative function can be supported, since the attribute aggregation is performed in pairs (ala reduce).

    vgroupby

    The Skolem function that assigns a new node id consistently

    returns

    New tgraph with only the new nodes and edges connecting them. A multigraph.

  3. abstract def createTemporalNodes(window: WindowSpecification, vquant: Quantification, equant: Quantification, vAggFunc: (VD, VD) ⇒ VD, eAggFunc: (ED, ED) ⇒ ED): TGraph[VD, ED]

    Permalink

    Time zoom

    Time zoom

    window

    The desired duration of time intervals in the temporal sequence in sematic units (days, months, years) or number of changes

    vquant

    The quantification over vertices -- how much of the window must a node appear in to be included.

    equant

    The quantification over edges -- how much of the window must an edge appear in to be included.

    vAggFunc

    The function to apply to vertex attributes when multiple values exist in a time window. Any associative function can be supported, since the attribute aggregation is performed in pairs.

    returns

    New tgraph with a modified temporal resolution. Foreign key constraint is enforced.

  4. abstract def degree(): RDD[(VertexId, (Interval, Int))]

    Permalink

    The degree of each vertex in the graph by interval.

    The degree of each vertex in the graph by interval.

    Note

    Vertices with no edges are not returned in the resulting RDD.

  5. abstract def edges: RDD[TEdge[ED]]

    Permalink

    An RDD containing the edges and their associated attributes.

    An RDD containing the edges and their associated attributes.

    returns

    an RDD containing the edges in this graph, across all intervals.

  6. abstract def esubgraph(pred: (TEdgeTriplet[VD, ED]) ⇒ Boolean, tripletFields: TripletFields = TripletFields.All): TGraph[VD, ED]

    Permalink

    Select a subgraph based on the edge attributes.

    Select a subgraph based on the edge attributes.

    returns

    new TGraph, with only edges that pass the predicates, but all nodes, even if those nodes have 0 degree as a result.

  7. abstract def getSnapshot(time: LocalDate): Graph[VD, (EdgeId, ED)]

    Permalink

    Get a snapshot for a point in time.

    Get a snapshot for a point in time.

    returns

    Single GraphX org.apache.spark.graphx.Graph.

    Note

    Unless in GraphX, each edge in TGraph has an EdgeId.

    ,

    If the time is outside the graph bounds, an empty graph is returned.

  8. abstract def getTemporalSequence: RDD[Interval]

    Permalink

    Get the temporal sequence for the representative graphs composing this tgraph.

    Get the temporal sequence for the representative graphs composing this tgraph.

    returns

    RDD of Interval. Intervals are consecutive, nonoverlapping, and not necessarily equally sized.

  9. abstract def materialize(): Unit

    Permalink

    The call to materialize the data structure.

    The call to materialize the data structure. This is a convenience operation for evaluation purposes.

  10. abstract def numPartitions(): Int

    Permalink

    The number of partitions this graph occupies

  11. abstract def partitionBy(tgp: TGraphPartitioning): TGraph[VD, ED]

    Permalink

    Repartition the edges in the graph according to the strategy.

    Repartition the edges in the graph according to the strategy.

    tgp

    The partitioning object including strategy, runs, and number of partitions.

    returns

    new partitioned graph

  12. abstract def persist(newLevel: StorageLevel = StorageLevel.MEMORY_ONLY): TGraph[VD, ED]

    Permalink

    Caches the vertices and edges associated with this graph at the specified storage level, ignoring any target storage levels previously set.

    Caches the vertices and edges associated with this graph at the specified storage level, ignoring any target storage levels previously set.

    newLevel

    the level at which to cache the graph.

    returns

    A reference to this graph for convenience.

  13. abstract def pregel[A](initialMsg: A, defaultValue: A, maxIterations: Int = Int.MaxValue, activeDirection: EdgeDirection = EdgeDirection.Either)(vprog: (VertexId, VD, A) ⇒ VD, sendMsg: (EdgeTriplet[VD, (EdgeId, ED)]) ⇒ Iterator[(VertexId, A)], mergeMsg: (A, A) ⇒ A)(implicit arg0: ClassTag[A]): TGraph[VD, ED]

    Permalink

    Just as in GraphX, Execute a Pregel-like iterative vertex-parallel abstraction, but over each time instance of the TGraph.

    Just as in GraphX, Execute a Pregel-like iterative vertex-parallel abstraction, but over each time instance of the TGraph. The user-defined vertex-program vprog is executed in parallel on each vertex receiving any inbound messages and computing a new value for the vertex. The sendMsg function is then invoked on all out-edges and is used to compute an optional message to the destination vertex. The mergeMsg function is a commutative associative function used to combine messages destined to the same vertex. The computation is performed on all time periods consecutively or all together, depending on the implementation of the graph.

    On the first iteration all vertices receive the initialMsg and on subsequent iterations if a vertex does not receive a message then the vertex-program is not invoked.

    This function iterates until there are no remaining messages, or for maxIterations iterations.

    A

    the Pregel message type

    initialMsg

    the message each vertex will receive at the on the first iteration

    maxIterations

    the maximum number of iterations to run for

    activeDirection

    the direction of edges incident to a vertex that received a message in the previous round on which to run sendMsg. For example, if this is EdgeDirection.Out, only out-edges of vertices that received a message in the previous round will run. The default is EdgeDirection.Either, which will run sendMsg on edges where either side received a message in the previous round. If this is EdgeDirection.Both, sendMsg will only run on edges where *both* vertices received a message.

    vprog

    the user-defined vertex program which runs on each vertex and receives the inbound message and computes a new vertex value. On the first iteration the vertex program is invoked on all vertices and is passed the default message. On subsequent iterations the vertex program is only invoked on those vertices that receive messages.

    sendMsg

    a user supplied function that is applied to out edges of vertices that received messages in the current iteration

    mergeMsg

    a user supplied function that takes two incoming messages of type A and merges them into a single message of type A. This function must be commutative and associative and ideally the size of A should not increase.

    returns

    the resulting graph at the end of the computation

  14. abstract def size(): Interval

    Permalink

    The duration the temporal sequence

    The duration the temporal sequence

    returns

    an Interval from the earliest graph change to the last

  15. abstract def slice(bound: Interval): TGraph[VD, ED]

    Permalink

    Select a temporal subset of the graph.

    Select a temporal subset of the graph.

    bound

    Time period to extract. Intervals are closed-open.

    returns

    TGraph with the temporal intersection or empty graph if the requested interval is wholely outside of the graph bounds.

  16. abstract def unpersist(blocking: Boolean = true): TGraph[VD, ED]

    Permalink

    Uncaches both vertices and edges of this graph.

    Uncaches both vertices and edges of this graph. This is useful in iterative algorithms that build a new graph in each iteration.

  17. abstract def vertices: RDD[(VertexId, (Interval, VD))]

    Permalink

    An RDD containing the vertices and their associated attributes.

    An RDD containing the vertices and their associated attributes.

    returns

    an RDD containing the vertices in this graph, across all intervals. The vertex attributes are a tuple of (Interval, value), which means that if the same vertex appears in multiple periods, it will appear multiple times in the RDD. The interval is maximal. This is the direct match to our model.

    Note

    An RDD is returned rather than VertexRDD because VertexRDD cannot have duplicates for vid.

  18. abstract def vsubgraph(pred: (VertexId, VD, Interval) ⇒ Boolean): TGraph[VD, ED]

    Permalink

    Select a subgraph based on the vertex attributes.

    Select a subgraph based on the vertex attributes.

    returns

    new TGraph, with only nodes that pass the predicate are retained. Foreign key constraint is enforced.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. var name: String

    Permalink

    A friendly name for this TGraph

  13. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. def setName(_name: String): TGraph.this.type

    Permalink

    Assign a name to this TGraph

  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  18. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped