GraphGen

scalation.database.graph_pm.GraphGen
See theGraphGen companion class
object GraphGen

The GraphGen companion object provides simple methods for creating data and query graphs.

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
GraphGen.type

Members list

Value members

Concrete methods

def buildQGraph(nodes: Set[Int], chMap: Map[Int, Set[Int]], gLabel: Array[ValueType], gELabel: Map[(Int, Int), ValueType], inverse: Boolean, name: String): Graph

Build a query graph from the subgraph extracted from the data graph. Includes the renumbering of vertex ids.

Build a query graph from the subgraph extracted from the data graph. Includes the renumbering of vertex ids.

Value parameters

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

nodes

the nodes extracted from the data graph

Attributes

def extractSubgraph(size: Int, g: Graph, inverse: Boolean, name: String, stream: Int): Graph

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.

Value parameters

g

the data graph to extract from

inverse

whether to create inverse adjacency (parents)

name

the name of the graph

size

the number of vertices to extract

Attributes

def genGraph(typeSel: Char, stream: Int, gSize: Int, nLabels: Int, eLabels: Int, gAvDegree: Int, addPa: Boolean): Graph

Randomly generate a data graph g.

Randomly generate a data graph g.

Value parameters

addPa

whether to add direct references to parents

gAvDegree

the average vertex out-degree for data graph

gSize

the size of the data graph

nLabels

the number of distinct labels

typeSel

the type selector

Attributes

def genGraphs(typeSel: Char, stream: Int, gSize: Int, qSize: Int, nLabels: Int, eLabels: Int, gAvDegree: Int, qAvDegree: Int, addPa: Boolean): (Graph, Graph)

Randomly generate both a data graph g and a query graph q.

Randomly generate both a data graph g and a query graph q.

Value parameters

addPa

whether to add direct references to parents

gAvDegree

the average vertex out-degree for data graph

gSize

the size of the data graph

nLabels

the number of distinct labels

qAvDegree

the average vertex out-degree for query graph

qSize

the size of the query graph

typeSel

the type selector

Attributes

def genPowerGraphs(typeSel: Char, stream: Int, gSize: Int, qSize: Int, nLabels: Int, eLabels: Int, gAvDegree: Int, qAvDegree: Int, addPa: Boolean): (Graph, Graph)

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

Value parameters

addPa

whether to add direct references to parents

gAvDegree

the average vertex out-degree for data graph

gSize

the size of the data graph

nLabels

the number of distinct labels

qAvDegree

the average vertex out-degree for query graph

qSize

the size of the query graph

typeSel

the type selector

Attributes