Packages

object GraphGen

The GraphGen object is used to build random graph with various characteristics.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GraphGen
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. def extractSubgraph(size: Int, g: Graph, inverse: Boolean = false, name: String = "g"): Graph

    Extract a subgraph of 'size' vertices from graph 'g' by performing a breadth-first search from a random vertex.

    Extract 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

  2. def genBFSQuery(size: Int, avDegree: Int, g: Graph, inverse: Boolean = false, name: String = "g"): Graph

    Given a graph 'g', perform a breadth first search starting at a random vertex until the breadth first tree contains 'size' vertices.

    Given a graph 'g', perform 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'.

    size

    the number of vertices to extract

    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

  3. def genPowerLawGraph(size: Int, nLabels: Int, maxDegree: Int, distPow: Double, inverse: Boolean = false, name: String = "g"): Graph

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

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

    size

    the number of vertices

    nLabels

    the number of labels (distributed uniformly)

    maxDegree

    the maximum allowed degree for any vertex

    distPow

    the power/exponent

    inverse

    whether to create inverse adjacency (parents)

    name

    the name of the graph

  4. def genPowerLawGraph_PowLabels(size: Int, nLabels: Int, maxDegree: Int, distPow: Double, inverse: Boolean = false, name: String = "g"): Graph

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

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

    size

    the number of vertices

    nLabels

    the number of labels (distributed according to power law)

    maxDegree

    the maximum allowed degree for any vertex

    distPow

    the power/exponent

    inverse

    whether to create inverse adjacency (parents)

    name

    the name of the graph

  5. def genRandomConnectedGraph(size: Int, nLabels: Int, avDegree: Int, inverse: Boolean = false, name: String = "g"): Graph

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

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

    size

    the number of vertices to generate

    nLabels

    the number of labels (distributed uniformly)

    avDegree

    the average degree

    inverse

    whether to create inverse adjacency (parents)

    name

    the name of the graph

  6. def genRandomGraph(size: Int, nLabels: Int, avDegree: Int, inverse: Boolean = false, name: String = "g"): Graph

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

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

    size

    the number of vertices to generate

    nLabels

    the number of labels (distributed uniformly)

    avDegree

    the average degree

    inverse

    whether to create inverse adjacency (parents)

    name

    the name of the graph

  7. def genRandomGraph_PowLabels(size: Int, nLabels: Int, avDegree: Int, inverse: Boolean = false, name: String = "g"): Graph

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

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

    size

    the number of vertices to generate

    nLabels

    the number of labels (distributed according to power law)

    avDegree

    the average degree

    inverse

    whether to create inverse adjacency (parents)

    name

    the name of the graph