scalation.graphalytics

Graph

case class Graph(adj: Array[ISet], label: Array[Int] = ..., inverse: Boolean = false) extends Cloneable with Product with Serializable

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, inverse adjacency via the 'par' array can be stored at the cost of nearly doubling the storage requirements.

adj

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

label

the array of verter labels

inverse

whether to store inverse adjacency sets (parents)

Linear Supertypes
Serializable, Serializable, Product, Equals, Cloneable, Cloneable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Graph
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Cloneable
  7. Cloneable
  8. AnyRef
  9. Any
  1. Hide All
  2. Show all
Learn more about member selection
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

    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 buildLabelMap(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(): Graph

    Clone (make a deep copy) of this graph.

    Clone (make a deep copy) of this graph.

    Definition Classes
    Graph → AnyRef
  11. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. def finalize(): Unit

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

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

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

  15. val inverse: Boolean

    whether to store inverse adjacency sets (parents)

  16. def isConnected: Boolean

    Determines whether or not the graph is connected.

  17. final def isInstanceOf[T0]: Boolean

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

    the array of verter labels

  19. val labelMap: Map[TLabel, ISet]

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

  20. def nEdges: Int

    Returns the number of edges in the graph.

  21. def nLabels: TLabel

    Returns the maximum label value.

  22. def nSelfLoops: Int

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

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

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

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

    Definition Classes
    AnyRef
  26. val par: Array[ISet]

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

  27. def print: Unit

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

  28. def size: Int

    Returns the number of vertices in the graph.

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

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. 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

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

  36. 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 Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Cloneable

Inherited from Cloneable

Inherited from AnyRef

Inherited from Any

Ungrouped