org.wilmascope.graphgen.plugin
Class RandomGraphGenerator

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

public class RandomGraphGenerator
extends GraphGenerator

Generates a random (connected) graph with (up to) a specified number of nodes and edges with random node positions in either 2 or 3 dimensions.

The algorithm is extremely simplistic:

Author:
dwyer

Constructor Summary
RandomGraphGenerator()
          set up controlPanel with controls for setting parameters
 
Method Summary
 void createLayeredDirectedAcyclicGraph(GraphControl graphControl)
           
 void generate(GraphControl gc)
          Generate the random graph
 javax.swing.JPanel getControls()
           
 java.lang.String getName()
           
 
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

RandomGraphGenerator

public RandomGraphGenerator()
set up controlPanel with controls for setting parameters

Method Detail

getName

public java.lang.String getName()

generate

public void generate(GraphControl gc)
Generate the random graph

Specified by:
generate in class GraphGenerator
Parameters:
gc - the instance of GraphControl inwhich the graph will be generated
See Also:
org.wilmascope.graphgen.GraphModifier#generate(org.wilmascope.control.GraphControl)

createLayeredDirectedAcyclicGraph

public void createLayeredDirectedAcyclicGraph(GraphControl graphControl)

getControls

public javax.swing.JPanel getControls()