org.jgrapht.generate

## Class LinearizedChordDiagramGraphGenerator<V,E>

• java.lang.Object
• org.jgrapht.generate.LinearizedChordDiagramGraphGenerator<V,E>
• Type Parameters:
V - the graph vertex type
E - the graph edge type
All Implemented Interfaces:
GraphGenerator<V,E,V>

public class LinearizedChordDiagramGraphGenerator<V,E>
extends Object
implements GraphGenerator<V,E,V>
The linearized chord diagram graph model generator.

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. Journal Combinatorica, 24(1): 5--34, 2004.

In contrast with the Barabási-Albert model, the model of Bollobás and Riordan allow 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.

Since:
February 2017
Author:
Dimitrios Michail
• ### Constructor Summary

Constructors
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
• ### Method Summary

All Methods
Modifier and Type Method and Description
void generateGraph(Graph<V,E> target, VertexFactory<V> vertexFactory, Map<String,V> resultMap)
Generates an instance.
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Constructor Detail

• #### LinearizedChordDiagramGraphGenerator

public LinearizedChordDiagramGraphGenerator(int n,
int m)
Constructor
Parameters:
n - number of nodes
m - number of edges of each new node added during the network growth
Throws:
IllegalArgumentException - in case of invalid parameters
• #### LinearizedChordDiagramGraphGenerator

public LinearizedChordDiagramGraphGenerator(int n,
int m,
long seed)
Constructor
Parameters:
n - number of nodes
m - number of edges of each new node added during the network growth
seed - seed for the random number generator
Throws:
IllegalArgumentException - in case of invalid parameters
• #### LinearizedChordDiagramGraphGenerator

public LinearizedChordDiagramGraphGenerator(int n,
int m,
Random rng)
Constructor
Parameters:
n - number of nodes
m - number of edges of each new node added during the network growth
rng - the random number generator to use
Throws:
IllegalArgumentException - in case of invalid parameters
• ### Method Detail

• #### generateGraph

public void generateGraph(Graph<V,E> target,
VertexFactory<V> vertexFactory,
Map<String,V> resultMap)
Generates an instance.
Specified by:
generateGraph in interface GraphGenerator<V,E,V>
Parameters:
target - the target graph, which must allow self-loops and parallel edges
vertexFactory - the vertex factory
resultMap - not used by this generator, can be null
Throws:
IllegalArgumentException - if the graph does not allow self-loops or parallel edges