scalation.graphalytics

Graph

class Graph extends AnyRef

The 'Graph' class stores vertex-labeled directed graphs using an adjacency set ('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) }. Optionally, invserse adjacency via the 'par' array can be stored at the cost of nearly doubling the storage requirements.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Graph
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Graph(adj: Array[ISet], label: Array[Int] = ..., inverse: Boolean = false)

    adj

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

    label

    the array of verter labels // * @param labelMap the map from label to the set of vertices with the label

    inverse

    whether to store inverse adjacency sets (parents)

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

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

    Definition Classes
    Any
  6. def addPar(): Unit

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

  7. val adj: Array[ISet]

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

  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def buildLabelMapFromLabels(label: Array[Int]): Map[TLabel, ISet]

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

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

    label

    the array of vertex labels of type TLabel

  10. def clone(): AnyRef

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

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

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

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

    Definition Classes
    AnyRef → Any
  15. def getVerticesWithLabel(l: Int): ISet

    Returns the set of vertices in the graph with label l.

  16. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  17. def isConnected: Boolean

    Determines whether or not the graph is connected.

  18. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  19. val label: Array[Int]

    the array of verter labels // * @param labelMap the map from label to the set of vertices with the label

  20. val labelMap: Map[TLabel, ISet]

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

  21. def nEdges: Int

    Returns the number of edges in the graph.

  22. def nLabels: TLabel

    Returns the maximum label value.

  23. def nSelfLoops: Int

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

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

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

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

    Definition Classes
    AnyRef
  27. var par: Array[ISet]

    The optional array of vertex inverse (parent) adjacency sets (incoming edges)

  28. def print: Unit

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

  29. def size: Int

    Returns the number of vertices in the graph.

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

    Definition Classes
    AnyRef
  31. 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
    Graph → AnyRef → Any
  32. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()
  35. def write2File(gFile: String): Unit

    Writes the graph to ONE file in the following format: <vertexId> <labelId> <adjVertex1> <adjVertex2> .

    Writes the graph to ONE file in the following format: <vertexId> <labelId> <adjVertex1> <adjVertex2> ...

    gFile

    the file in which to write the graph's label and edge information

  36. def write2IgraphFiles(prefix: String): (String, String)

    Writes the graph to TWO igraph compatible files.

    Writes the graph to TWO igraph compatible files.

    See also

    igraph.sourceforge.net

  37. def write2Neo4JFiles(lFile: String, eFile: String): Unit

    Writes the graph to TWO Neo4J compatible files: lFile and eFile so that they may be fed into Neo4j with one of its utilities.

    Writes the graph to TWO Neo4J compatible files: lFile and eFile so that they may be fed into Neo4j with one of its utilities. FIX: need to handle multiple edge types.

    lFile

    the file containing the graph labels (line: vertex-id TAB label)

    eFile

    the file the edges (line: start-id TAB end-id TAB type)

Inherited from AnyRef

Inherited from Any