scalation.graphalytics

Graph2

Related Doc: package graphalytics

case class Graph2(adj: Array[AList], label: Array[TLabel] = Array.ofDim [TLabel] (0), elabel: Map[(Int, Int), TLabel] = Map (), inverse: Boolean = false) extends Product with Serializable

The Graph2 class is used for representing "Directed Graphs". It uses an adjacency list 'adj' representation, e.g., adj = { (1, 2), (0), (1) } means that the graph has the following edges { (0, 1), (0, 2), (1, 0), (2, 1) }. Options: (1) the graph may have vertex labels, (2) the graph may have edge labels, and (3) the graph may maintain inverse adjacency via the parent 'par' array can be stored at the cost of nearly doubling the storage requirements.

adj

the array of vertex (child) adjacency list (outgoing edges)

label

the array of vertex labels

elabel

the map of edge labels

inverse

whether to store inverse adjacency list (parents)

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Graph2
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Graph2(adj: Array[AList], label: Array[TLabel] = Array.ofDim [TLabel] (0), elabel: Map[(Int, Int), TLabel] = Map (), inverse: Boolean = false)

    adj

    the array of vertex (child) adjacency list (outgoing edges)

    label

    the array of vertex labels

    elabel

    the map of edge labels

    inverse

    whether to store inverse adjacency list (parents)

Value Members

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

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

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

    Definition Classes
    AnyRef → Any
  4. val adj: Array[AList]

    the array of vertex (child) adjacency list (outgoing edges)

  5. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  6. def buildLabelMap(label: Array[TLabel]): Map[TLabel, AList]

    Given an array of labels, returns an index from labels to the lists of vertices containing those labels

    Given an array of labels, returns an index from labels to the lists of vertices containing those labels

    label

    the array of vertex labels of type TLabel

  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. val elabel: Map[(Int, Int), TLabel]

    the map of edge labels

  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  12. def getVerticesWithLabel(l: TLabel): AList

    Returns the list of vertices in the graph with label 'l'.

    Returns the list of vertices in the graph with label 'l'.

    l

    the vertex label

  13. val inverse: Boolean

    whether to store inverse adjacency list (parents)

  14. def isConnected: Boolean

    Determines whether or not the graph is connected.

  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. val label: Array[TLabel]

    the array of vertex labels

  17. val labelMap: Map[TLabel, AList]

    the map from label to the list of vertices with the label

  18. def makePar(): Array[AList]

    Add the inverse adjacency list for rapid accesses to parent vertices.

  19. def nEdges: Int

    Returns the number of edges in the graph.

  20. def nSelfLoops: Int

    Determines the number of vertices in the graph that have outgoing edges to themselves.

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

    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  24. val par: Array[AList]

    the optional array of vertex inverse (parent) adjacency list (incoming edges)

  25. def print: Unit

    Prints the adjacency list, labels, and labelMap of the graph.

  26. def size: Int

    Returns the number of vertices in the graph.

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

    Definition Classes
    AnyRef
  28. def toString(): String

    Indicate basic information about this graph.

    Indicate basic information about this graph. Due to its potential size, use print to show graph details.

    Definition Classes
    Graph2 → AnyRef → Any
  29. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped