MuGraphGen

scalation.database.mugraph_pm.MuGraphGen
class MuGraphGen(typeSelector: Char)

The MuGraphGen class is used to build random graph with various characteristics.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

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

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 genBFSQuery(size: Int, avDegree: Int, g: MuGraph, inverse: Boolean, name: String): MuGraph

Given a graph g, performs a breadth first search starting at a random vertex until the breadth first tree contains size vertices. At each junction, it chooses a random number of children to traverse, with that random number averaging to avDegree.

Given a graph g, performs a breadth first search starting at a random vertex until the breadth first tree contains size vertices. At each junction, it chooses a random number of children to traverse, with that random number averaging to avDegree.

Value parameters

avDegree

the average out degree

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 genPowerLawGraph(size: Int, nLabels: Int, maxDegree: Int, distPow: Double, inverse: Boolean, name: String): MuGraph

Generates a graph with power law degree distribution with exponent distPow and uniformly distributed labels.

Generates a graph with power law degree distribution with exponent distPow and uniformly distributed labels.

Value parameters

distPow

the power/exponent

inverse

whether to create inverse adjacency (parents)

maxDegree

the maximum allowed degree for any vertex

nLabels

the number of labels (distributed uniformly)

name

the name of the graph

size

the number of vertices

Attributes

def genPowerLawGraph_PowLabels(size: Int, nLabels: Int, maxDegree: Int, distPow: Double, inverse: Boolean, name: String): MuGraph

Generates a graph with power law degree distribution with exponent distPow and power law distributed labels.

Generates a graph with power law degree distribution with exponent distPow and power law distributed labels.

Value parameters

distPow

the power/exponent

inverse

whether to create inverse adjacency (parents)

maxDegree

the maximum allowed degree for any vertex

nLabels

the number of labels (distributed according to power law)

name

the name of the graph

size

the number of vertices

Attributes

def genRandomConnectedGraph(size: Int, nLabels: Int, eLabels: Int, avDegree: Int, inverse: Boolean, name: String): MuGraph

Generates a random connected graph by using genRandomGraph and checking whether it is connected.

Generates a random connected graph by using genRandomGraph and checking whether it is connected.

Value parameters

avDegree

the average degree

eLabels

the number of edge labels (distributed uniformly)

inverse

whether to create inverse adjacency (parents)

nLabels

the number of vertex labels (distributed uniformly)

name

the name of the graph

size

the number of vertices to generate

Attributes

def genRandomGraph(size: Int, nLabels: Int, eLabels: Int, avDegree: Int, inverse: Boolean, name: String): MuGraph

Generates a random graph with the specified size (number of vertices), average degree and labels evenly distributed across vertices from 0 to nLabels - 1. Not necessarily a connected graph.

Generates a random graph with the specified size (number of vertices), average degree and labels evenly distributed across vertices from 0 to nLabels - 1. Not necessarily a connected graph.

Value parameters

avDegree

the average degree

eLabels

the number of edge labels (distributed uniformly)

inverse

whether to create inverse adjacency (parents)

nLabels

the number of vertex labels (distributed uniformly)

name

the name of the graph

size

the number of vertices to generate

Attributes

def genRandomGraph_PowLabels(size: Int, nLabels: Int, avDegree: Int, inverse: Boolean, name: String): MuGraph

Generates a random graph with labels distributed based on a power law distribution (currently with the magic number 2.1 for the power law exponent).

Generates a random graph with labels distributed based on a power law distribution (currently with the magic number 2.1 for the power law exponent).

Value parameters

avDegree

the average degree

inverse

whether to create inverse adjacency (parents)

nLabels

the number of labels (distributed according to power law)

name

the name of the graph

size

the number of vertices to generate

Attributes

def setVariate(nLabs: Int): Unit

Set the Random Variate Generator, using the one based on the typeSelector.

Set the Random Variate Generator, using the one based on the typeSelector.

Value parameters

nLabs

the number of labels to generate

Attributes