object MGraphGen
The MGraphGen
companion object provides simple methods for creating data
and query graphs.
- Alphabetic
- By Inheritance
- MGraphGen
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
def
buildQGraph[TLabel](nodes: Set[Int], chMap: Map[Int, Set[Int]], gLabel: Array[TLabel], gELabel: Map[(Int, Int), TLabel], inverse: Boolean, name: String)(implicit arg0: ClassTag[TLabel]): MGraph[TLabel]
Build a query graph from the subgraph extracted from the data graph.
Build a query graph from the subgraph extracted from the data graph. Includes the renumbering of vertex ids.
- nodes
the nodes extracted from the data graph
- chMap
the child map: vertex -> children
- gLabel
the labels from the data graph
- inverse
whether to create inverse adjacency (parents)
- name
the name for the new query graph
-
def
extractSubgraph[TLabel](size: Int, g: MGraph[TLabel], inverse: Boolean = false, name: String = "g", stream: Int = 0)(implicit arg0: ClassTag[TLabel]): MGraph[TLabel]
Extracts a subgraph of 'size' vertices from graph 'g' by performing a breadth-first search from a random vertex.
Extracts a subgraph of 'size' vertices from graph 'g' by performing a breadth-first search from a random vertex.
- size
the number of vertices to extract
- g
the data graph to extract from
- inverse
whether to create inverse adjacency (parents)
- name
the name of the graph
-
def
genGraph[TLabel](typeSel: TLabel, stream: Int = 0, gSize: Int = 100, nLabels: Int = 50, eLabels: Int = 5, gAvDegree: Int = 8, addPa: Boolean = false)(implicit arg0: ClassTag[TLabel]): MGraph[TLabel]
Randomly generate a data graph 'g'.
Randomly generate a data graph 'g'.
- typeSel
the type selector
- gSize
the size of the data graph
- nLabels
the number of distinct labels
- gAvDegree
the average vertex out-degree for data graph
- addPa
whether to add direct references to parents
-
def
genGraphs[TLabel](typeSel: TLabel, stream: Int = 0, gSize: Int = 100, qSize: Int = 10, nLabels: Int = 50, eLabels: Int = 5, gAvDegree: Int = 8, qAvDegree: Int = 2, addPa: Boolean = false)(implicit arg0: ClassTag[TLabel]): (MGraph[TLabel], MGraph[TLabel])
Randomly generate both a data graph 'g' and a query graph 'q'.
Randomly generate both a data graph 'g' and a query graph 'q'.
- typeSel
the type selector
- gSize
the size of the data graph
- qSize
the size of the query graph
- nLabels
the number of distinct labels
- gAvDegree
the average vertex out-degree for data graph
- qAvDegree
the average vertex out-degree for query graph
- addPa
whether to add direct references to parents
-
def
genPowerGraphs[TLabel](typeSel: TLabel, stream: Int = 0, gSize: Int = 100, qSize: Int = 10, nLabels: Int = 50, eLabels: Int = 5, gAvDegree: Int = 8, qAvDegree: Int = 2, addPa: Boolean = false)(implicit arg0: ClassTag[TLabel]): (MGraph[TLabel], MGraph[TLabel])
Randomly generate both a data graph 'g' and a query graph 'q' using Power Law
Randomly generate both a data graph 'g' and a query graph 'q' using Power Law
- typeSel
the type selector
- gSize
the size of the data graph
- qSize
the size of the query graph
- nLabels
the number of distinct labels
- gAvDegree
the average vertex out-degree for data graph
- qAvDegree
the average vertex out-degree for query graph
- addPa
whether to add direct references to parents