Class LinearizedChordDiagramGraphGenerator<V,E>
- java.lang.Object
-
- org.jgrapht.generate.LinearizedChordDiagramGraphGenerator<V,E>
-
- Type Parameters:
V
- the graph vertex typeE
- the graph edge type
- All Implemented Interfaces:
GraphGenerator<V,E,V>
public class LinearizedChordDiagramGraphGenerator<V,E> extends java.lang.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. 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
orDirectedPseudograph
.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.
- Author:
- Dimitrios Michail
-
-
Constructor Summary
Constructors Constructor Description LinearizedChordDiagramGraphGenerator(int n, int m)
ConstructorLinearizedChordDiagramGraphGenerator(int n, int m, long seed)
ConstructorLinearizedChordDiagramGraphGenerator(int n, int m, java.util.Random rng)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
generateGraph(Graph<V,E> target, java.util.Map<java.lang.String,V> resultMap)
Generates an instance.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jgrapht.generate.GraphGenerator
generateGraph
-
-
-
-
Constructor Detail
-
LinearizedChordDiagramGraphGenerator
public LinearizedChordDiagramGraphGenerator(int n, int m)
Constructor- Parameters:
n
- number of nodesm
- number of edges of each new node added during the network growth- Throws:
java.lang.IllegalArgumentException
- in case of invalid parameters
-
LinearizedChordDiagramGraphGenerator
public LinearizedChordDiagramGraphGenerator(int n, int m, long seed)
Constructor- Parameters:
n
- number of nodesm
- number of edges of each new node added during the network growthseed
- seed for the random number generator- Throws:
java.lang.IllegalArgumentException
- in case of invalid parameters
-
LinearizedChordDiagramGraphGenerator
public LinearizedChordDiagramGraphGenerator(int n, int m, java.util.Random rng)
Constructor- Parameters:
n
- number of nodesm
- number of edges of each new node added during the network growthrng
- the random number generator to use- Throws:
java.lang.IllegalArgumentException
- in case of invalid parameters
-
-
Method Detail
-
generateGraph
public void generateGraph(Graph<V,E> target, java.util.Map<java.lang.String,V> resultMap)
Generates an instance.- Specified by:
generateGraph
in interfaceGraphGenerator<V,E,V>
- Parameters:
target
- the target graph, which must allow self-loops and parallel edgesresultMap
- not used by this generator, can be null- Throws:
java.lang.IllegalArgumentException
- if the graph does not allow self-loops or parallel edges
-
-