org.graphstream.algorithm.generator
Class LCFGenerator

java.lang.Object
  extended by org.graphstream.stream.SourceBase
      extended by org.graphstream.algorithm.generator.BaseGenerator
          extended by org.graphstream.algorithm.generator.LCFGenerator
All Implemented Interfaces:
Generator, org.graphstream.stream.Source
Direct Known Subclasses:
Balaban10CageGraphGenerator, Balaban11CageGraphGenerator, BidiakisCubeGenerator, BiggsSmithGraphGenerator, CubicalGraphGenerator, DesarguesGraphGenerator, DodecahedralGraphGenerator, DyckGraphGenerator, F26AGraphGenerator, FosterGraphGenerator, FranklinGraphGenerator, FruchtGraphGenerator, GrayGraphGenerator, HarriesGraphGenerator, HarriesWongGraphGenerator, HeawoodGraphGenerator, LjubljanaGraphGenerator, McGeeGraphGenerator, MobiusKantorGraphGenerator, NauruGraphGenerator, PappusGraphGenerator, TetrahedralGraphGenerator, TruncatedCubicalGraphGenerator, TruncatedDodecahedralGraphGenerator, TruncatedOctahedralGraphGenerator, TruncatedTetrahedralGraphGenerator, Tutte12CageGraphGenerator, TutteCoxeterGraphGenerator, UtilityGraphGenerator, WagnerGraphGenerator

public class LCFGenerator
extends BaseGenerator

Build a graph using a lcf notation. Source : Wikipedia


Nested Class Summary
static class LCFGenerator.LCF
          Model a LCF notation.
 
Nested classes/interfaces inherited from class org.graphstream.stream.SourceBase
org.graphstream.stream.SourceBase.ElementType
 
Constructor Summary
LCFGenerator(LCFGenerator.LCF lcf, int initialRingSize, boolean canBeExtended)
          Build a new graph generator using a LCF notation.
 
Method Summary
 void begin()
          Begin the graph generation.
 boolean nextEvents()
          Perform the next step in generating the graph.
 
Methods inherited from class org.graphstream.algorithm.generator.BaseGenerator
addEdgeAttribute, addEdgeLabels, addNodeAttribute, addNodeLabels, end, isUsingInternalGraph, removeEdgeAttribute, removeNodeAttribute, setDirectedEdges, setEdgeAttributesRange, setNodeAttributesRange, setRandomSeed, setUseInternalGraph
 
Methods inherited from class org.graphstream.stream.SourceBase
addAttributeSink, addElementSink, addSink, attributeSinks, clearAttributeSinks, clearElementSinks, clearSinks, elementSinks, removeAttributeSink, removeElementSink, removeSink, sendAttributeChangedEvent, sendAttributeChangedEvent, sendEdgeAdded, sendEdgeAdded, sendEdgeRemoved, sendEdgeRemoved, sendGraphCleared, sendGraphCleared, sendNodeAdded, sendNodeAdded, sendNodeRemoved, sendNodeRemoved, sendStepBegins, sendStepBegins
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.graphstream.stream.Source
addAttributeSink, addElementSink, addSink, clearAttributeSinks, clearElementSinks, clearSinks, removeAttributeSink, removeElementSink, removeSink
 

Constructor Detail

LCFGenerator

public LCFGenerator(LCFGenerator.LCF lcf,
                    int initialRingSize,
                    boolean canBeExtended)
Build a new graph generator using a LCF notation.

Parameters:
lcf - the lcf notation describing the graph
initialRingSize - initial amount of nodes
canBeExtended - true if the graph can be extended, ie. if a node can be added in a new #nextEvents() call
Method Detail

begin

public void begin()
Description copied from interface: Generator
Begin the graph generation. This usually is the place for initialization of the generator. After calling this method, call the Generator.nextEvents() method to add elements to the graph.


nextEvents

public boolean nextEvents()
Description copied from interface: Generator
Perform the next step in generating the graph. While this method returns true, there are still more elements to add to the graph to generate it. Be careful that some generators never return false here, since they can generate graphs of arbitrary size. For such generators, simply stop calling this method when enough elements have been generated. A call to this method can produce an undetermined number of nodes and edges. Checking nodes count is advisable when generating the graph to avoid an unwanted big graph.

Returns:
true while there are elements to add to the graph.


Copyright © 2011. All Rights Reserved.