org.wilmascope.graphgen.plugin
Class ScaleFreeGraphGenerator

java.lang.Object
  extended by org.wilmascope.graphgen.GraphGenerator
      extended by org.wilmascope.graphgen.plugin.ScaleFreeGraphGenerator
All Implemented Interfaces:
java.lang.Runnable, org.wilmascope.util.Plugin

public class ScaleFreeGraphGenerator
extends GraphGenerator
implements java.lang.Runnable

Generate a scale-free graph based on a stochastic model in which for each node u that is added, all existing nodes v i are considered and an edge ( u , v i ) is created with probability (1+deg( u ))/sum(deg( v j ))

Author:
dwyer

Constructor Summary
ScaleFreeGraphGenerator()
           
 
Method Summary
 void generate(GraphControl gc)
          Generate a scale-free graph based on a stockastic model in which for each node u that is added, all existing nodes vi are considered and an edge (u,vi) is created with probability (1+deg(vi))/sum(deg(vj))
 javax.swing.JPanel getControls()
           
 java.lang.String getName()
           
 void run()
           
 
Methods inherited from class org.wilmascope.graphgen.GraphGenerator
addRandomNode, getEdgeView, getNodeView, setView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScaleFreeGraphGenerator

public ScaleFreeGraphGenerator()
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface org.wilmascope.util.Plugin

generate

public void generate(GraphControl gc)
Generate a scale-free graph based on a stockastic model in which for each node u that is added, all existing nodes vi are considered and an edge (u,vi) is created with probability (1+deg(vi))/sum(deg(vj))

Specified by:
generate in class GraphGenerator
Parameters:
initSize - number of starting nodes
targetSize - stop after this many nodes

getControls

public javax.swing.JPanel getControls()
Specified by:
getControls in interface org.wilmascope.util.Plugin

run

public void run()
Specified by:
run in interface java.lang.Runnable