scalation.graphalytics

Graph

Related Docs: object Graph | package graphalytics

case class Graph(adj: Array[ISet], label: Array[Int] = Array.ofDim (0), 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] = Array.ofDim (0), 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: 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. def addPar(): Unit

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

  5. val adj: Array[ISet]

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

  6. final def asInstanceOf[T0]: T0

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

  8. def clone(): Graph

    Clone (make a deep copy) of this graph.

    Clone (make a deep copy) of this graph.

    Definition Classes
    Graph → AnyRef
  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: Int): ISet

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

  13. val inverse: Boolean

    whether to store inverse adjacency sets (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[Int]

    the array of verter labels

  17. val labelMap: Map[TLabel, ISet]

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

  18. def nEdges: Int

    Returns the number of edges in the graph.

  19. def nLabels: TLabel

    Returns the maximum label value.

  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[ISet]

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

  25. def print: Unit

    Prints the adjacency set, 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
    Graph → 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( ... )
  32. 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

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

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