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

    Author:
    Dimitrios Michail
    • 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,
                                  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
        resultMap - not used by this generator, can be null
        Throws:
        IllegalArgumentException - if the graph does not allow self-loops or parallel edges