public class IncompleteGridGenerator extends BaseGenerator
Constructor and Description |
---|
IncompleteGridGenerator()
New generator.
|
IncompleteGridGenerator(boolean cross,
float holeProbability,
int holeMaxSize,
int holesPerStep)
New generator.
|
Modifier and Type | Method and Description |
---|---|
void |
begin()
Begin the graph generation.
|
void |
end()
End the graph generation by finalizing it.
|
boolean |
nextEvents()
Grow the graph.
|
addEdgeAttribute, addEdgeAttribute, addEdgeAttribute, addEdgeLabels, addNodeAttribute, addNodeAttribute, addNodeAttribute, addNodeLabels, isUsingInternalGraph, removeEdgeAttribute, removeNodeAttribute, setDirectedEdges, setRandomSeed, setUseInternalGraph
addAttributeSink, addElementSink, addSink, attributeSinks, clearAttributeSinks, clearElementSinks, clearSinks, elementSinks, removeAttributeSink, removeElementSink, removeSink, sendAttributeChangedEvent, sendAttributeChangedEvent, sendEdgeAdded, sendEdgeAdded, sendEdgeAttributeAdded, sendEdgeAttributeAdded, sendEdgeAttributeChanged, sendEdgeAttributeChanged, sendEdgeAttributeRemoved, sendEdgeAttributeRemoved, sendEdgeRemoved, sendEdgeRemoved, sendGraphAttributeAdded, sendGraphAttributeAdded, sendGraphAttributeChanged, sendGraphAttributeChanged, sendGraphAttributeRemoved, sendGraphAttributeRemoved, sendGraphCleared, sendGraphCleared, sendNodeAdded, sendNodeAdded, sendNodeAttributeAdded, sendNodeAttributeAdded, sendNodeAttributeChanged, sendNodeAttributeChanged, sendNodeAttributeRemoved, sendNodeAttributeRemoved, sendNodeRemoved, sendNodeRemoved, sendStepBegins, sendStepBegins
public IncompleteGridGenerator()
public IncompleteGridGenerator(boolean cross, float holeProbability, int holeMaxSize, int holesPerStep)
cross
- connect nodes diagonallyholeProbability
- probability of an hole in the gridholeMaxSize
- max size of holesholesPerStep
- number of attempt to create a hole by steppublic void begin()
Generator
Generator.nextEvents()
method to add elements to the graph.public boolean nextEvents()
Generator.nextEvents()
public void end()
BaseGenerator
Generator.nextEvents()
method returned false (or even if you stop before), this method must be
called to finish the graph.
In addition, BaseGenerator adds a "clear" operations that removes all the
kept edges and nodes identifiers and the associated data.end
in interface Generator
end
in class BaseGenerator