Packages

class MuGraphAlgebra[TLabel] extends MuGraph[TLabel]

The MuGraphAlgebra class provide graph algebra operation on MuGraphs. ----------------------------------------------------------------------------

Linear Supertypes
MuGraph[TLabel], Graph[TLabel], Cloneable, Cloneable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MuGraphAlgebra
  2. MuGraph
  3. Graph
  4. Cloneable
  5. Cloneable
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MuGraphAlgebra(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

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

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

    Definition Classes
    MuGraph
  8. def buildIndex: Unit

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

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

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

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

    Definition Classes
    MuGraph
  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

    Definition Classes
    MuGraph
  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

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

    index from edges the set of pairs of nodes

    index from edges the set of pairs of nodes

    Definition Classes
    MuGraph
  17. val elabel: Map[Pair, Set[TLabel]]
    Definition Classes
    MuGraph
  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. def expand(paths: Rows, elab: TLabel, keep: Boolean = false): Rows

    Expand, expands the given paths by adding one forward edge of given edge label to each path.

    Expand, expands the given paths by adding one forward edge of given edge label to each path.

    paths

    the paths to be expanded

    elab

    the label of the edges to be expanded

    keep

    whether the given path has to be inluded along with the expanded vertices

  21. def expandAll(paths: Rows, keep: Boolean = false): Rows

    Expand all, expands the given paths by adding one forward edge to each path.

    Expand all, expands the given paths by adding one forward edge to each path.

    paths

    the paths to be expanded

    keep

    whether the given path has to be included along with the expanded vertices

  22. def expandBack(paths: Rows, elab: TLabel, keep: Boolean = false): Rows

    Exapand back, expands(of given edge label) the edges in backward direction, one at a time.

    Exapand back, expands(of given edge label) the edges in backward direction, one at a time.

    paths

    the paths(set of edges) that are already explored

    elab

    the edge label of the edges to be expanded

    keep

    whether the given path has to be inluded along with the expanded vertices

  23. def expandBackAll(paths: Rows, keep: Boolean = false): Rows

    Exapand back all, expands the edges of given paths in backward direction, one at a time.

    Exapand back all, expands the edges of given paths in backward direction, one at a time.

    paths

    the paths(set of edges)

    keep

    whether the given path has to be inluded along with the expanded vertices

  24. def expandBackBySchema(paths: Rows, lab: String, keep: Boolean = false): Rows

    Expand back by type, expands the given paths by adding one backward edge (of given type lab) to each path.

    Expand back by type, expands the given paths by adding one backward edge (of given type lab) to each path.

    paths

    the paths to be expanded

    keep

    whether the given path has to be inluded along with the expanded vertices

  25. def expandBySchema(paths: Rows, lab: String, keep: Boolean = false): Rows

    Expand by schema, expands the given paths by adding one forward edge (of given type lab) to each path.

    Expand by schema, expands the given paths by adding one forward edge (of given type lab) to each path.

    paths

    the paths to be expanded

    keep

    whether the given path has to be inluded along with the expanded vertices

  26. def expandEdges(paths: Rows): Rows_lab

    Expand edges, expands the paths and return the name of edges.

    Expand edges, expands the paths and return the name of edges.

    paths

    the paths to be expanded

  27. def expandInto(paths: Rows, elab: TLabel): Rows

    Expand into, checks if there is an edge from the last node in the given path to the first node in the same path (leading to a triangle).

    Expand into, checks if there is an edge from the last node in the given path to the first node in the same path (leading to a triangle).

    paths

    the vertices connected by a path

    elab

    the edge label to be checked from the end node in the path to the start node

  28. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  29. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  30. def getLabels(rows: Rows): Rows_lab

    The getLabels returns the labels of the given vertices (indices).

    The getLabels returns the labels of the given vertices (indices).

    rows

    the indices of vertices in the form of rows

  31. def getVertices: Rows

    Return all the vertices in the graph.

  32. def getVerticesWithLabel(l: TLabel): Set[Int]

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

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

    Definition Classes
    Graph
  33. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  34. val id: Array[Int]
    Definition Classes
    MuGraph
  35. def indexEdges: Unit

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

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

    Definition Classes
    MuGraph
  36. val indexMap: HashMap_NE[(TLabel, TLabel)]

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

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

    Definition Classes
    MuGraph
  37. def induceEdges(vset: Path, new_index: ReArray[Int], g2: MuGraph[TLabel]): Map[Pair, Set[TLabel]]

    Induce edges, of the vertices 'vset' that are conatined in 'this' graph and graph g2.

    Induce edges, of the vertices 'vset' that are conatined in 'this' graph and graph g2.

    vset

    the vertex set

    new_index

    contains the reference to old indexes

    g2

    graph g2

  38. def induceEdges(renumb: Map[Int, Int], g2: MuGraph[TLabel]): Map[Pair, Set[TLabel]]

    Induce edges, edges corresponding to 'this' graph and 'g2' graph are induced.

    Induce edges, edges corresponding to 'this' graph and 'g2' graph are induced.

    renumb

    the map from new index -> old index

    g2

    the graph g2

  39. def induceEdges(vset: Path, new_index: ReArray[Int]): Map[Pair, Set[TLabel]]

    Induce edges, the map of edges with the vertices only from vset

    Induce edges, the map of edges with the vertices only from vset

    vset

    the set of vertices, to be considered for selecting the edges

    new_index

    the old index of the vertices to be used for accessing edges of graph

  40. def intersect(g2: MuGraph[TLabel]): MuGraph[TLabel]

    Intersect, performs the interscetion of two graphs including vertices and edges.

    Intersect, performs the interscetion of two graphs including vertices and edges.

    g2

    the graph that has to be intersect with the current graph

  41. var inverse: Boolean
    Definition Classes
    Graph
  42. def isConnected: Boolean

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

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

    Definition Classes
    Graph
  43. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  44. val label: Array[TLabel]
    Definition Classes
    Graph
  45. 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
  46. 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
  47. def minus(g2: MuGraph[TLabel]): MuGraph[TLabel]

    Perform the minus operation of two graphs.

    Perform the minus operation of two graphs.

    g2

    the subgraph to be excluded from this graph

  48. def nEdges: Int

    Return the number of edges in 'this' digraph.

    Return the number of edges in 'this' digraph.

    Definition Classes
    Graph
  49. 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
  50. val name: String
    Definition Classes
    Graph
  51. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  52. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  53. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  54. 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
  55. 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

    Definition Classes
    MuGraph
  56. 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
  57. def renumber(x: Pair, renumb: Map[Int, Int]): Pair

    Renumber, check if the vertices are renumbered.

    Renumber, check if the vertices are renumbered.

    x

    pair of vertices

    renumb

    a map containing the map from old to new vertex

  58. def same(i: Int, g1: MuGraph[TLabel], g2: MuGraph[TLabel]): Boolean

    Same, checks if a vertex is same in two graphs.

    Same, checks if a vertex is same in two graphs.

    i

    index of the vertex

    g1

    first graph

    g2

    second graph

  59. 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
  60. val schema: Array[String]
    Definition Classes
    MuGraph
  61. def selectByELabel(θ: (TLabel, TLabel) ⇒ Boolean, c: TLabel, schema: Array[String])(vs: Set[Int]): Array[(Pair, Set[TLabel])]

    Select by edge label the edges in the graph having both the vertices 'vs' and satifying the theta predicate 'exists elabel(e) θ c'.

    Select by edge label the edges in the graph having both the vertices 'vs' and satifying the theta predicate 'exists elabel(e) θ c'.

    θ

    comparison/theta operator

    c

    the vertex label sought

    vs

    the set of vertices to be considered for the input graph

  62. def selectByEdgeGraph(θ: (TLabel, TLabel) ⇒ Boolean, c: TLabel): MuGraph[TLabel]

    Select by edge, the Graph with the edges satisfying the theta predicate

    Select by edge, the Graph with the edges satisfying the theta predicate

    θ

    comparison operator

    c

    label of the edge

  63. def selectBySchema(θ: (String, String) ⇒ Boolean, c: String)(vs: Set[Int] = null): Rows

    Select by schema type the vertices in the graph satifying the theta predicate 'schema(v) θ c'.

    Select by schema type the vertices in the graph satifying the theta predicate 'schema(v) θ c'.

    θ

    comparison/theta operator

    c

    the vertex label sought

    vs

    the set of vertices to be considered for the input graph

  64. def selectByVLabel(θ: (TLabel, TLabel) ⇒ Boolean, c: TLabel)(vs: Set[Int] = null): Rows

    Select by vertex label the vertices in the graph satifying the theta predicate 'label(v) θ c'.

    Select by vertex label the vertices in the graph satifying the theta predicate 'label(v) θ c'.

    θ

    comparison/theta operator

    c

    the vertex label sought

    vs

    the set of vertices to be considered for the input graph

  65. def selectByVertexGraph(θ: (TLabel, TLabel) ⇒ Boolean, c: TLabel): MuGraph[TLabel]

    Select by vertex, the graph with the vertices satisfying the theta predicate, and the edges connecting the selected vertices

    Select by vertex, the graph with the vertices satisfying the theta predicate, and the edges connecting the selected vertices

    θ

    comparison/theta operator

    c

    label of the vertex

  66. 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
  67. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  68. 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

  69. 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
  70. 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
  71. def union(x: Rows_lab, y: Rows_lab): Rows_lab

    Union, the result rows are combined.

    Union, the result rows are combined.

    x

    rows produced as result from the first operation

    y

    rows produced as result from the second operation

  72. def union(g2: MuGraph[TLabel]): MuGraph[TLabel]

    Union, performs the union of two graphs including both vertices and edges

    Union, performs the union of two graphs including both vertices and edges

    g2

    the graph that has to be unioned with 'this' graph

  73. 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
  74. def vertexSet: Set[Int]

    Return the indices of all vertices in the graph.

  75. val vid: Array[Int]
    Definition Classes
    Graph
  76. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  77. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  78. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from MuGraph[TLabel]

Inherited from Graph[TLabel]

Inherited from Cloneable

Inherited from Cloneable

Inherited from AnyRef

Inherited from Any

Ungrouped