Packages

class Graph extends Cloneable

The Graph class stores vertex-labeled directed graphs using an adjacency set 'ch' representation, e.g., 'ch = { {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 'pa' array can be stored at the cost of nearly doubling the storage requirements. ----------------------------------------------------------------------------

Linear Supertypes
Cloneable, Cloneable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Graph
  2. Cloneable
  3. Cloneable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Graph(ch: Array[Set[Int]], label: Array[TLabel] = Array.ofDim (0), inverse: Boolean = false, name: String = "g")

    ch

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

    label

    the array of vertex labels

    inverse

    whether to store inverse adjacency sets (parents)

    name

    the name of graph

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def buildLabelMap(label: Array[TLabel]): Map[TLabel, Set[Int]]

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

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

    label

    the array of vertex labels of type TLabel

  7. val ch: Array[Set[Int]]
  8. def checkEdges: Boolean

    Check whether the end-point vertex id of each edge is within bounds: 0 ..

    Check whether the end-point vertex id of each edge is within bounds: 0 .. 'maxId'.

  9. def clone(): Graph

    Clone (make a deep copy) of this graph.

    Clone (make a deep copy) of this graph.

    Definition Classes
    Graph → AnyRef
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. def getVerticesWithLabel(l: TLabel): Set[Int]

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

  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. val inverse: Boolean
  16. def isConnected: Boolean

    Determine whether 'this' graph is (weakly) connected.

  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. val label: Array[TLabel]
  19. val labelMap: Map[TLabel, Set[Int]]

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

  20. def nEdges: Int

    Return the number of edges in the graph.

  21. def nSelfLoops: Int

    Determine the number of vertices in the graph that have outgoing edges to themselves (self loops).

  22. val name: String
  23. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  25. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  26. val pa: Array[Set[Int]]

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

  27. def printG(clip: Boolean = true): Unit

    Print 'this' graph in a deep sense with all the information.

    Print 'this' graph in a deep sense with all the information.

    clip

    whether to clip out "Set(" and ")"

  28. def same(g: Graph): Boolean

    Determine whether 'this' graph and graph 'g' have the same vertices and edges.

    Determine whether 'this' graph and graph 'g' have the same vertices and edges. Note, this is more strict than graph isomorphism which allows vertices to be renumbered.

    g

    the other digraph

  29. def size: Int

    Return the number of vertices in the graph.

  30. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  31. def toLine(i: Int, clip: Boolean = true): String

    Convert the 'i'th row/line of 'this' graph to a string.

    Convert the 'i'th row/line of 'this' graph to a string.

    i

    the 'i'th row/line

    clip

    whether to clip out "Set(" and ")"

  32. def toString(): String

    Convert 'this' graph to a string in a shallow sense.

    Convert 'this' graph to a string in a shallow sense. Large arrays are not converted. Use 'print' to show all information.

    Definition Classes
    Graph → AnyRef → Any
  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( ... ) @native()
  35. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from Cloneable

Inherited from Cloneable

Inherited from AnyRef

Inherited from Any

Ungrouped