Class BarabasiAlbertGeometry

Object
AbstractGeometry
AbstractNetwork
BarabasiAlbertGeometry

public class BarabasiAlbertGeometry extends AbstractNetwork
Scale-free network following the Barabási & Albert preferential attachment process.
  • Constructor Details

    • BarabasiAlbertGeometry

      public BarabasiAlbertGeometry(EvoLudo engine)
      Create a Barabási-Albert geometry tied to the given engine.
      Parameters:
      engine - EvoLudo pacemaker
  • Method Details

    • parse

      public boolean parse(String arg)
      Description copied from class: AbstractGeometry
      Parse geometry-specific CLI options.
      Overrides:
      parse in class AbstractGeometry
      Parameters:
      arg - the argument string without the geometry key
      Returns:
      true if parsing succeeded, false if invalid
    • init

      public void init()
      Generates a connected undirected scale-free network following the Barabási–Albert preferential attachment model.
      Specified by:
      init in class AbstractGeometry
    • pickPreferentialNode

      private int pickPreferentialNode(int n, int ndice)
      Picks a node according to preferential attachment.
      Parameters:
      n - current node index
      ndice - random index for selection
      Returns:
      selected node index