Packages

class MuGraph[TLabel] extends Graph[TLabel] with Cloneable

The MuGraph class stores vertex/edge-labeled multi-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
Graph[TLabel], Cloneable, Cloneable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MuGraph
  2. Graph
  3. Cloneable
  4. Cloneable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MuGraph(ch: Array[Set[Int]], label: Array[TLabel], elabel: Map[Pair, Set[TLabel]], inverse: Boolean = false, name: String = "g", id: Array[Int] = Array (), schema: Array[String] = Array ())(implicit arg0: ClassTag[TLabel])

    ch

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

    label

    the array of vertex labels: v -> vertex label

    elabel

    the map of edge labels: (u, v) -> edge label

    inverse

    whether to store inverse adjacency sets (parents)

    name

    the name of the multi-digraph

    id

    the array of vertex id's

    schema

    optional schema: map from label to label type

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.

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

    Definition Classes
    Graph
  5. def addVertices(g: MuGraph[TLabel], vset: Set[Int], makeMap: Boolean = false): (Array[TLabel], Map[Int, Int])

    Create an array vertices from selected vertices from graph 'g', those in 'vset'.

    Create an array vertices from selected vertices from graph 'g', those in 'vset'. If 'makeMap', record the mapping between g's vertices and the new vertices.

    g

    graph to be used for adding vertex labels

    vset

    selected vertices from graph g

    makeMap

    whether to make a map from new vertex id's to old vertex id's

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def buildId: Array[Int]

    Create an array [1, 2, ..., size] for default values for 'id's.

  8. def buildIndex: Unit

    Builds index from (start vertex, edge) -> end vertex.

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

    Definition Classes
    Graph
  10. val ch: Array[Set[Int]]
    Definition Classes
    Graph
  11. 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'.

    Definition Classes
    Graph
  12. def checkElabels: Boolean

    Check whether the edges in the 'elabel' map correspond to edges in the the adjacency list.

  13. def children(u: Int, elab: TLabel): Set[Int]

    Return the children of vertex 'u' that are connected via an edge labeled 'elab'.

    Return the children of vertex 'u' that are connected via an edge labeled 'elab'.

    u

    the source vertex

    elab

    the edge label

  14. def clone(): MuGraph[TLabel]

    Clone (make a deep copy) of 'this' multi-digraph.

    Clone (make a deep copy) of 'this' multi-digraph.

    Definition Classes
    MuGraphGraph → AnyRef
  15. val count: HashMap[(TLabel, TLabel, Int), Int]

    count of no.

    count of no. of occurences of a pair of vertices with a particular edge

  16. val edgeMap: HashMap[TLabel, Set[Pair]]

    index from edges the set of pairs of nodes

  17. val elabel: Map[Pair, Set[TLabel]]
  18. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. def equals(g2_: Any): Boolean

    To check if two graphs are equal.

    To check if two graphs are equal.

    g2_

    the graph to be compared with this graph

    Definition Classes
    MuGraph → AnyRef → Any
  20. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  21. def getVerticesWithLabel(l: TLabel): Equals

    Return the set of vertices in 'this' digraph with label 'l'.

    Return the set of vertices in 'this' digraph with label 'l'.

    l

    the label to match

    Definition Classes
    Graph
  22. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  23. val id: Array[Int]
  24. def indexEdges: Unit

    Build and index from edge -> (Vertex pair).

  25. val indexMap: HashMap_NE[(TLabel, TLabel)]

    index from (source node, edge) to the destination node

  26. var inverse: Boolean
    Definition Classes
    Graph
  27. def isConnected: Boolean

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

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

    Definition Classes
    Graph
  28. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  29. val label: Array[TLabel]
    Definition Classes
    Graph
  30. val labelMap: Map[TLabel, Set[Int]]

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

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

    Definition Classes
    Graph
  31. def makeUndirected(): MuGraph[TLabel]

    Make this multi-directed graph work like an undirected graph by making sure that for every edge 'u -> v', there is a 'v -> u' edge and that they have same edge label.

    Make this multi-directed graph work like an undirected graph by making sure that for every edge 'u -> v', there is a 'v -> u' edge and that they have same edge label.

    Definition Classes
    MuGraphGraph
  32. def nEdges: Int

    Return the number of edges in 'this' digraph.

    Return the number of edges in 'this' digraph.

    Definition Classes
    Graph
  33. def nSelfLoops: Int

    Determine the number of vertices in the digraph that have outgoing edges to themselves.

    Determine the number of vertices in the digraph that have outgoing edges to themselves.

    Definition Classes
    Graph
  34. val name: String
    Definition Classes
    Graph
  35. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  36. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  37. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  38. val pa: Array[Set[Int]]

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

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

    Definition Classes
    Graph
  39. def parents(v: Int, elab: TLabel): Set[Int]

    Return the parents of vertex 'v' that are connected via an edge labeled 'elab'.

    Return the parents of vertex 'v' that are connected via an edge labeled 'elab'. Requires the parents 'pa' to be added (@see Graph).

    v

    the destination vertex

    elab

    the edge label

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

    Print 'this' multi-digraph in a deep sense with all the information.

    Print 'this' multi-digraph in a deep sense with all the information.

    clip

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

    Definition Classes
    MuGraphGraph
  41. def same(g: Graph[TLabel]): Boolean

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

    Determine whether 'this' digraph and digraph '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

    Definition Classes
    Graph
  42. val schema: Array[String]
  43. def size: Int

    Return the size of graph in terms of the number of vertices.

    Return the size of graph in terms of the number of vertices.

    Definition Classes
    MuGraphGraph
  44. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  45. def toGraphIm(name2: String = name): graphalytics.Graph

    Return the equivalent immutable Graph.

    Return the equivalent immutable Graph. Assumes the default TLabel of type String. For other types (e.g., Double use '_.toDouble' rather than '.toString' in the last line of this method.

    name2

    the name to give the new immutable Graph

    Definition Classes
    Graph
    See also

    scalation.graphalytics.Graph

  46. def toLine(i: Int, clip: Boolean = true): String

    Convert the 'i'th row/line of 'this' multi-digraph to a string.

    Convert the 'i'th row/line of 'this' multi-digraph to a string.

    i

    the 'i'th row/line

    clip

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

    Definition Classes
    MuGraphGraph
  47. def toString(): String

    Convert 'this' multi-digraph to a string in a shallow sense.

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

    Definition Classes
    MuGraphGraph → AnyRef → Any
  48. def union(g2: Graph[TLabel]): Graph[TLabel]

    Take the union 'this' digraph and 'g2'.

    Take the union 'this' digraph and 'g2'.

    g2

    the other digraph

    Definition Classes
    Graph
  49. val vid: Array[Int]
    Definition Classes
    Graph
  50. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  52. 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 Graph[TLabel]

Inherited from Cloneable

Inherited from Cloneable

Inherited from AnyRef

Inherited from Any

Ungrouped