|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wilmascope.graphgen.GraphGenerator
org.wilmascope.graphgen.plugin.TreeGenerator
public class TreeGenerator
Generates a tree. Proceeds by adding a random number of children to a random node of the current tree. The probability of choosing a node is proportional to the number of free spaces for its children. Generation can be limited by the number of nodes, the maximum degree and optionally the tree height. The root node can be forced to have a given number of children.
Constructor Summary | |
---|---|
TreeGenerator()
|
Method Summary | |
---|---|
void |
generate(GraphControl gc)
This method will do the work of actually creating the 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 |
---|
public TreeGenerator()
Method Detail |
---|
public java.lang.String getName()
public javax.swing.JPanel getControls()
public void generate(GraphControl gc)
GraphGenerator
generate
in class GraphGenerator
gc
- the instance of GraphControl inwhich the graph will be generated
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |