The GraphGen
class is used to build random graph with various characteristics. Needs to generate vertex labels of various types including Int
, Double
, String
based on the type.
Value parameters
- stream
-
the random number stream to use (0 to 999)
- typeSelector
-
the variable for type matches (work around for generic erasure)
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
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
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 (2.1 is used in WWW graph pg 72 of m&m graph data)
- eLabels
-
the number of edge labels (distributed uniformly)
- 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
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 (2.1 is used in WWW graph pg 72 of m&m graph data)
- eLabels
-
the number of edge labels (distributed uniformly)
- 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
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
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)
- locality
-
whether to select children from anywhere in graph or locally
- nLabels
-
the number of vertex labels (distributed uniformly)
- name
-
the name of the graph
- size
-
the number of vertices to generate
Attributes
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 out-degree
- distPow
-
the power/exponent (2.1 is used in WWW graph pg 72 of m&m graph data)
- eLabels
-
the number of edge labels (distributed uniformly)
- 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
Set the Random Variate Generator, using the one based on the type.
Set the Random Variate Generator, using the one based on the type.
Value parameters
- nLabs
-
the number of labels to generate