org.graphstream.algorithm.generator
Class ChvatalGenerator

java.lang.Object
  extended by org.graphstream.stream.SourceBase
      extended by org.graphstream.algorithm.generator.BaseGenerator
          extended by org.graphstream.algorithm.generator.ChvatalGenerator
All Implemented Interfaces:
Generator, org.graphstream.stream.Source

public class ChvatalGenerator
extends BaseGenerator

Generate the Chvatal graph.

In the mathematical field of graph theory, the Chvátal graph is an undirected graph with 12 vertices and 24 edges, discovered by Václav Chvátal (1970). It is triangle-free: its girth (the length of its shortest cycle) is four. It is 4-regular: each vertex has exactly four neighbors. And its chromatic number is 4: it can be colored using four colors, but not using only three. It is, as Chvátal observes, the smallest possible 4-chromatic 4-regular triangle-free graph; the only smaller 4-chromatic triangle-free graph is the Grötzsch graph, which has 11 vertices but is not regular.

Source : Wikipedia

Scientific Reference :
Chvátal, V. (1970), "The smallest triangle-free 4-chromatic 4-regular graph", Journal of Combinatorial Theory 9 (1): 93–94, doi:10.1016/S0021-9800(70)80057-6

Nested Class Summary
 
Nested classes/interfaces inherited from class org.graphstream.stream.SourceBase
org.graphstream.stream.SourceBase.ElementType
 
Constructor Summary
ChvatalGenerator()
           
 
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

ChvatalGenerator

public ChvatalGenerator()
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.