V
- the graph vertex typeE
- the graph edge typepublic class LinearizedChordDiagramGraphGenerator<V,E> extends Object implements GraphGenerator<V,E,V>
The generator makes precise several unspecified mathematical details of the Barabási-Albert model, such as the initial configuration of the first nodes, and whether the $m$ links assigned to a new node are added one by one, or simultaneously, etc. The generator is described in the paper: Bélaa Bollobás and Oliver Riordan. The Diameter of a Scale-Free Random Graph. Journal Combinatorica, 24(1): 5--34, 2004.
In contrast with the Barabási-Albert model, the model of Bollobás and Riordan allows for multiple
edges (parallel-edges) and self-loops. They show, however, that their number will be small. This
means that this generator works only on graphs which allow multiple edges (parallel-edges) such
as Pseudograph
or DirectedPseudograph
.
The generator starts with a graph of one node and grows the network by adding $n-1$ additional nodes. The additional nodes are added one by one and each of them is connected to $m$ previously added nodes (or to itself with a small probability), where the probability of connecting to a node is proportional to its degree.
Constructor and Description |
---|
LinearizedChordDiagramGraphGenerator(int n,
int m)
Constructor
|
LinearizedChordDiagramGraphGenerator(int n,
int m,
long seed)
Constructor
|
LinearizedChordDiagramGraphGenerator(int n,
int m,
Random rng)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
generateGraph(Graph<V,E> target,
Map<String,V> resultMap)
Generates an instance.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
generateGraph
public LinearizedChordDiagramGraphGenerator(int n, int m)
n
- number of nodesm
- number of edges of each new node added during the network growthIllegalArgumentException
- in case of invalid parameterspublic LinearizedChordDiagramGraphGenerator(int n, int m, long seed)
n
- number of nodesm
- number of edges of each new node added during the network growthseed
- seed for the random number generatorIllegalArgumentException
- in case of invalid parameterspublic LinearizedChordDiagramGraphGenerator(int n, int m, Random rng)
n
- number of nodesm
- number of edges of each new node added during the network growthrng
- the random number generator to useIllegalArgumentException
- in case of invalid parameterspublic void generateGraph(Graph<V,E> target, Map<String,V> resultMap)
generateGraph
in interface GraphGenerator<V,E,V>
target
- the target graph, which must allow self-loops and parallel edgesresultMap
- not used by this generator, can be nullIllegalArgumentException
- if the graph does not allow self-loops or parallel edgesCopyright © 2018. All rights reserved.