Class/Object

edu.drexel.cs.dbgroup.portal.representations

RepresentativeGraph

Related Docs: object RepresentativeGraph | package representations

Permalink

class RepresentativeGraph[VD, ED] extends TGraphNoSchema[VD, ED]

Linear Supertypes
TGraphNoSchema[VD, ED], TGraph[VD, ED], Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RepresentativeGraph
  2. TGraphNoSchema
  3. TGraph
  4. Serializable
  5. Serializable
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RepresentativeGraph(intvs: Array[Interval], grphs: ParSeq[Graph[VD, (EdgeId, ED)]], defValue: VD, storLevel: StorageLevel = StorageLevel.MEMORY_ONLY, coal: Boolean = false)(implicit arg0: ClassTag[VD], arg1: ClassTag[ED])

    Permalink

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. def aggregateMessages[A](sendMsg: (TEdgeTriplet[VD, ED]) ⇒ Iterator[(VertexId, A)], mergeMsg: (A, A) ⇒ A, defVal: A, tripletFields: TripletFields = TripletFields.All)(implicit arg0: ClassTag[A]): RepresentativeGraph[(VD, A), ED]

    Permalink

    Aggregates values from the neighboring edges and vertices of each vertex, for each representative graph.

    Aggregates values from the neighboring edges and vertices of each vertex, for each representative graph. Unlike in GraphX, this returns a new graph, not an RDD. The user-supplied sendMsg function is invoked on each edge of the graph, generating 0 or more messages to be sent to either vertex in the edge. The mergeMsg function is then used to combine all messages destined to the same vertex.

    A

    the type of message to be sent to each vertex

    sendMsg

    runs on each edge, sending messages to neighboring vertices using the TEdgeTriplet.

    mergeMsg

    used to combine messages from sendMsg destined to the same vertex. This combiner should be commutative and associative.

    tripletFields

    which fields should be included in the TEdgeTriplet passed to the sendMsg function. If not all fields are needed, specifying this can improve performance.

    Definition Classes
    RepresentativeGraphTGraphNoSchema
  5. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def clusteringCoefficient(): RepresentativeGraph[(VD, Double), ED]

    Permalink

    Compute the clustering coefficient of each vertex, which is equal to the number of triangles that pass through it divided by k*(k-1), where k is the vertex degree

    Compute the clustering coefficient of each vertex, which is equal to the number of triangles that pass through it divided by k*(k-1), where k is the vertex degree

    returns

    Graph with vertices where each vertex attribute has added a clustering coefficient between 0.0 and 1.0.

    Definition Classes
    RepresentativeGraphTGraphNoSchema
  8. def coalesce(): RepresentativeGraph[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.

    Definition Classes
    RepresentativeGraphTGraph
  9. val coalesced: Boolean

    Permalink
    Definition Classes
    TGraphNoSchema
  10. def connectedComponents(): RepresentativeGraph[(VD, VertexId), ED]

    Permalink

    Run connected components algorithm on a temporal graph return a graph with the vertex value containing the lowest vertex id in the connected component containing that vertex.

    Run connected components algorithm on a temporal graph return a graph with the vertex value containing the lowest vertex id in the connected component containing that vertex.

    returns

    New graph with vertex attribute the id of the smallest vertex in each connected component for Intervals in which the vertex appears

    Definition Classes
    RepresentativeGraphTGraphNoSchema
  11. def createAttributeNodes(vAggFunc: (VD, VD) ⇒ VD)(vgroupby: (VertexId, VD) ⇒ VertexId): RepresentativeGraph[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.

    Definition Classes
    RepresentativeGraphTGraph
  12. def createTemporalByChange(c: ChangeSpec, vquant: Quantification, equant: Quantification, vAggFunc: (VD, VD) ⇒ VD, eAggFunc: (ED, ED) ⇒ ED): RepresentativeGraph[VD, ED]

    Permalink
    Attributes
    protected
    Definition Classes
    RepresentativeGraphTGraphNoSchema
  13. def createTemporalByTime(c: TimeSpec, vquant: Quantification, equant: Quantification, vAggFunc: (VD, VD) ⇒ VD, eAggFunc: (ED, ED) ⇒ ED): RepresentativeGraph[VD, ED]

    Permalink
    Definition Classes
    RepresentativeGraphTGraphNoSchema
  14. def createTemporalNodes(res: WindowSpecification, vquant: Quantification, equant: Quantification, vAggFunc: (VD, VD) ⇒ VD, eAggFunc: (ED, ED) ⇒ ED): TGraphNoSchema[VD, ED]

    Permalink

    Time zoom

    Time zoom

    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.

    Definition Classes
    TGraphNoSchemaTGraph
  15. val defaultValue: VD

    Permalink
    Definition Classes
    TGraphNoSchema
  16. 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.

    Definition Classes
    RepresentativeGraphTGraph
    Note

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

  17. def difference(other: TGraphNoSchema[VD, ED]): RepresentativeGraph[VD, ED]

    Permalink

    Produce the difference of two temporal graphs.

    Produce the difference of two temporal graphs.

    other

    The other TGraph

    returns

    new TemporaGraph with the diffrence of entities from both graphs within each chronon.

    Definition Classes
    RepresentativeGraphTGraphNoSchema
  18. 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.

    Definition Classes
    RepresentativeGraphTGraph
  19. lazy val edgesRaw: RDD[TEdge[ED]]

    Permalink
  20. def emap[ED2](map: (TEdge[ED]) ⇒ ED2)(implicit arg0: ClassTag[ED2]): RepresentativeGraph[VD, ED2]

    Permalink

    Transforms each edge attribute in the graph using the map function.

    Transforms each edge attribute in the graph using the map function. The map function is not passed the vertex value for the vertices adjacent to the edge. If vertex values are desired, use mapTriplets. Special case of general transform, included here for better compatibility with GraphX.

    ED2

    the new edge data type

    map

    the function from an edge object with a time index to a new edge value.

    Definition Classes
    RepresentativeGraphTGraphNoSchema
  21. def emptyGraph[V, E](defVal: V)(implicit arg0: ClassTag[V], arg1: ClassTag[E]): RepresentativeGraph[V, E]

    Permalink
    Attributes
    protected
    Definition Classes
    RepresentativeGraphTGraphNoSchema
  22. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  24. def esubgraph(pred: (TEdgeTriplet[VD, ED]) ⇒ Boolean, tripletFields: TripletFields = TripletFields.All): RepresentativeGraph[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.

    Definition Classes
    RepresentativeGraphTGraph
  25. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  26. def fromRDDs[V, E](verts: RDD[(VertexId, (Interval, V))], edgs: RDD[TEdge[E]], defVal: V, storLevel: StorageLevel = StorageLevel.MEMORY_ONLY, coalesced: Boolean = false)(implicit arg0: ClassTag[V], arg1: ClassTag[E]): RepresentativeGraph[V, E]

    Permalink
    Definition Classes
    RepresentativeGraphTGraphNoSchema
  27. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  28. 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.

    Definition Classes
    RepresentativeGraphTGraph
    Note

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

    ,

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

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

    Definition Classes
    RepresentativeGraphTGraph
  30. var graphs: ParSeq[Graph[VD, (EdgeId, ED)]]

    Permalink
    Attributes
    protected
  31. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  32. def intersection(other: TGraphNoSchema[VD, ED], vFunc: (VD, VD) ⇒ VD, eFunc: (ED, ED) ⇒ ED): RepresentativeGraph[VD, ED]

    Permalink

    Produce the intersection of two temporal graphs.

    Produce the intersection of two temporal graphs.

    other

    The other TGraph

    vFunc

    The aggregate function on vertices

    eFunc

    The aggregate function on edges

    returns

    new TemporaGraph with the intersection of entities from both graphs within each chronon.

    Definition Classes
    RepresentativeGraphTGraphNoSchema
  33. val intervals: Array[Interval]

    Permalink
  34. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  35. 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.

    Definition Classes
    RepresentativeGraphTGraph
  36. var name: String

    Permalink

    A friendly name for this TGraph

    A friendly name for this TGraph

    Definition Classes
    TGraph
  37. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  40. def numPartitions(): Int

    Permalink

    Spark-specific

    Spark-specific

    Definition Classes
    RepresentativeGraphTGraph
  41. def pageRank(uni: Boolean, tol: Double, resetProb: Double = 0.15, numIter: Int = Int.MaxValue): RepresentativeGraph[(VD, Double), ED]

    Permalink

    Run pagerank on all intervals.

    Run pagerank on all intervals. It is up to the implementation to run sequantially, in parallel, incrementally, etc. The number of iterations will depend on both the numIter argument and the rate of convergence, whichever occurs first.

    uni

    Treat the graph as undirected or directed. true = directed

    tol

    epsilon, measure of convergence

    resetProb

    probability of reset/jump

    numIter

    number of iterations of the algorithm to run. If omitted, will run until convergence of the tol argument.

    returns

    New graph with pageranks for each interval (coalesced)

    Definition Classes
    RepresentativeGraphTGraphNoSchema
  42. def partitionBy(tgp: TGraphPartitioning): RepresentativeGraph[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

    Definition Classes
    RepresentativeGraphTGraph
  43. def persist(newLevel: StorageLevel = MEMORY_ONLY): RepresentativeGraph[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.

    Definition Classes
    RepresentativeGraphTGraph
  44. def pregel[A](initialMsg: A, defValue: 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]): RepresentativeGraph[VD, ED]

    Permalink

    Analytics

    Analytics

    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

    Definition Classes
    RepresentativeGraphTGraph
  45. def setName(_name: String): RepresentativeGraph.this.type

    Permalink

    Assign a name to this TGraph

    Assign a name to this TGraph

    Definition Classes
    TGraph
  46. def shortestPaths(uni: Boolean, landmarks: Seq[VertexId]): RepresentativeGraph[(VD, Map[VertexId, Int]), ED]

    Permalink

    Computes shortest paths to the given set of landmark vertices.

    Computes shortest paths to the given set of landmark vertices.

    uni

    Treat the graph as undirected or directed. true = directed

    landmarks

    the list of landmark vertex ids to which shortest paths will be computed

    returns

    Graph with vertices where each vertex attribute is the shortest-path distance to each reachable landmark vertex.

    Definition Classes
    RepresentativeGraphTGraphNoSchema
  47. 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

    Definition Classes
    RepresentativeGraphTGraph
  48. def slice(bound: Interval): RepresentativeGraph[VD, ED]

    Permalink

    Algebraic operations

    Algebraic operations

    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.

    Definition Classes
    RepresentativeGraphTGraph
  49. lazy val span: Interval

    Permalink
  50. val storageLevel: StorageLevel

    Permalink
    Definition Classes
    TGraphNoSchema
  51. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  53. def triangleCount(): RepresentativeGraph[(VD, Int), ED]

    Permalink

    Compute the number of triangles passing through each vertex.

    Compute the number of triangles passing through each vertex.

    returns

    Graph with vertices where each vertex attribute has added a number of triangles.

    Definition Classes
    RepresentativeGraphTGraphNoSchema
  54. def union(other: TGraphNoSchema[VD, ED], vFunc: (VD, VD) ⇒ VD, eFunc: (ED, ED) ⇒ ED): RepresentativeGraph[VD, ED]

    Permalink

    Produce a union of two temporal graphs.

    Produce a union of two temporal graphs.

    other

    The other TGraph

    vFunc

    The aggregate function on vertices

    eFunc

    The aggregate function on edges

    returns

    new TGraph with the union of entities from both graphs within each chronon.

    Definition Classes
    RepresentativeGraphTGraphNoSchema
  55. def unpersist(blocking: Boolean = true): RepresentativeGraph[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.

    Definition Classes
    RepresentativeGraphTGraph
  56. 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.

    Definition Classes
    RepresentativeGraphTGraph
    Note

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

  57. lazy val verticesRaw: RDD[(VertexId, (Interval, VD))]

    Permalink
  58. def vmap[VD2](map: (VertexId, Interval, VD) ⇒ VD2, defVal: VD2)(implicit arg0: ClassTag[VD2], eq: =:=[VD, VD2] = null): RepresentativeGraph[VD2, ED]

    Permalink

    Transforms each vertex attribute in the graph for each time period using the map function.

    Transforms each vertex attribute in the graph for each time period using the map function. Special case of general transform, included here for better compatibility with GraphX.

    VD2

    the new vertex data type

    map

    the function from a vertex object to a new vertex value

    Definition Classes
    RepresentativeGraphTGraphNoSchema
  59. def vsubgraph(pred: (VertexId, VD, Interval) ⇒ Boolean): RepresentativeGraph[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.

    Definition Classes
    RepresentativeGraphTGraph
  60. final def wait(): Unit

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

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

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

Inherited from TGraphNoSchema[VD, ED]

Inherited from TGraph[VD, ED]

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped