org.graphstream.algorithm.generator
Class PreferentialAttachmentGenerator

java.lang.Object
  extended by org.graphstream.stream.SourceBase
      extended by org.graphstream.algorithm.generator.BaseGenerator
          extended by org.graphstream.algorithm.generator.PreferentialAttachmentGenerator
All Implemented Interfaces:
Generator, org.graphstream.stream.Source

Deprecated.

@Deprecated
public class PreferentialAttachmentGenerator
extends BaseGenerator

Scale-free tree generator using the preferential attachment rule as defined in the Barabási-Albert model.

THIS GENERATOR IS DEPRECATED, USE THE BarabasiAlbertGenerator INSTEAD.

This is a very simple graph generator that generates a tree using the preferential attachment rule defined in the Barabási-Albert model: nodes are generated one by one, and each time attached by an edge to another node that has more chance to chosen if it already has lots of nodes attached to it.

The more this generator is iterated, the more nodes are generated. It can therefore generate trees of any size.

Since:
20061128
Scientific Reference :
Albert-László Barabási & Réka Albert "Emergence of scaling in random networks". Science 286: 509–512. October 1999. doi:10.1126/science.286.5439.509.

Nested Class Summary
 
Nested classes/interfaces inherited from class org.graphstream.stream.SourceBase
org.graphstream.stream.SourceBase.ElementType
 
Constructor Summary
PreferentialAttachmentGenerator()
          Deprecated. New generator.
 
Method Summary
 void begin()
          Deprecated. Start the generator.
 void end()
          Deprecated. Clean degrees.
 boolean nextEvents()
          Deprecated. Step of the generator.
 
Methods inherited from class org.graphstream.algorithm.generator.BaseGenerator
addEdgeAttribute, addEdgeLabels, addNodeAttribute, addNodeLabels, isUsingInternalGraph, removeEdgeAttribute, removeNodeAttribute, setDirectedEdges, setEdgeAttributesRange, setNodeAttributesRange, setRandomSeed, setUseInternalGraph
 
Methods inherited from class org.graphstream.stream.SourceBase
addAttributeSink, addElementSink, addSink, attributeSinks, clearAttributeSinks, clearElementSinks, clearSinks, elementSinks, removeAttributeSink, removeElementSink, removeSink, sendAttributeChangedEvent, sendAttributeChangedEvent, sendEdgeAdded, sendEdgeAdded, sendEdgeRemoved, sendEdgeRemoved, sendGraphCleared, sendGraphCleared, sendNodeAdded, sendNodeAdded, sendNodeRemoved, sendNodeRemoved, sendStepBegins, sendStepBegins
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.graphstream.stream.Source
addAttributeSink, addElementSink, addSink, clearAttributeSinks, clearElementSinks, clearSinks, removeAttributeSink, removeElementSink, removeSink
 

Constructor Detail

PreferentialAttachmentGenerator

public PreferentialAttachmentGenerator()
Deprecated. 
New generator.

Method Detail

begin

public void begin()
Deprecated. 
Start the generator. A single node is added.

See Also:
Generator.begin()

nextEvents

public boolean nextEvents()
Deprecated. 
Step of the generator. Add a node and try to connect it with some others. The complexity of this method is O(n) with n the number of nodes actually in the graph.

Returns:
true while there are elements to add to the graph.
See Also:
Generator.nextEvents()

end

public void end()
Deprecated. 
Clean degrees.

Specified by:
end in interface Generator
Overrides:
end in class BaseGenerator
See Also:
Generator.end()


Copyright © 2011. All Rights Reserved.