public class FullGenerator extends BaseGenerator
Probably not very useful, still sometimes needed. This generator creates
fully connected graphs of any size. Calling begin()
put one unique
node in the graph, then nextEvents()
will add a new node each time
it is called.
This generator has the ability to add randomly chosen numerical values on arbitrary attributes on edges or nodes of the graph, and to randomly choose a direction for edges.
A list of attributes can be given for nodes and edges. In this case each new node or edge added will have this attribute and the value will be a randomly chosen number. The range in which these numbers are chosen can be specified.
By default, edges are not oriented. It is possible to ask orientation, in which case the direction is chosen randomly.
SourceBase.ElementType
Modifier and Type | Field and Description |
---|---|
protected int |
nodeNames
Used to generate node names.
|
addEdgeLabels, addNodeLabels, directed, edgeAttributeRange, edgeAttributes, internalGraph, nodeAttributeRange, nodeAttributes, random, randomlyDirected
attrSinks, eltsSinks, eventProcessing, eventQueue, sourceId, sourceTime
Constructor and Description |
---|
FullGenerator()
New full graph generator.
|
FullGenerator(boolean directed,
boolean randomlyDirectedEdges)
New full graph generator.
|
FullGenerator(boolean directed,
boolean randomlyDirectedEdges,
String nodeAttribute,
String edgeAttribute)
New full graph generator.
|
Modifier and Type | Method and Description |
---|---|
void |
begin()
Begin the generator by adding a node.
|
boolean |
nextEvents()
Add a new node and connect it with all others.
|
addEdge, addEdgeAttribute, addEdgeLabels, addNode, addNode, addNodeAttribute, addNodeLabels, clearKeptData, delEdge, delNode, end, isUsingInternalGraph, removeEdgeAttribute, removeNodeAttribute, setDirectedEdges, setEdgeAttributesRange, setNodeAttributesRange, setRandomSeed, setUseInternalGraph
addAttributeSink, addElementSink, addSink, attributeSinks, clearAttributeSinks, clearElementSinks, clearSinks, elementSinks, manageEvents, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addAttributeSink, addElementSink, addSink, clearAttributeSinks, clearElementSinks, clearSinks, removeAttributeSink, removeElementSink, removeSink
protected int nodeNames
public FullGenerator()
public FullGenerator(boolean directed, boolean randomlyDirectedEdges)
directed
- Are edge directed?randomlyDirectedEdges
- randomly direct generated edges.public FullGenerator(boolean directed, boolean randomlyDirectedEdges, String nodeAttribute, String edgeAttribute)
directed
- Are edge directed?.randomlyDirectedEdges
- randomly direct generated edges.nodeAttribute
- put an attribute by that name on each node with a random
numeric value.edgeAttribute
- put an attribute by that name on each edge with a random
numeric value.public void begin()
Generator.begin()
public boolean nextEvents()
Generator.nextEvents()
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses