public class LifeGenerator extends BaseGenerator
SourceBase.ElementType
Modifier and Type | Field and Description |
---|---|
(package private) boolean[] |
cells |
(package private) int |
height |
private static int[] |
LINK_WITH |
private static int[] |
NEIGHT |
(package private) boolean |
pushCoords |
(package private) double |
step |
(package private) boolean[] |
swap |
(package private) boolean |
tore |
(package private) int |
width |
addEdgeLabels, addNodeLabels, directed, edgeAttributeRange, edgeAttributes, internalGraph, nodeAttributeRange, nodeAttributes, random, randomlyDirected
attrSinks, eltsSinks, eventProcessing, eventQueue, sourceId, sourceTime
Constructor and Description |
---|
LifeGenerator(BufferedImage cellsData) |
LifeGenerator(InputStream in) |
LifeGenerator(int width,
int height,
boolean[] data) |
LifeGenerator(String path) |
Modifier and Type | Method and Description |
---|---|
protected void |
addEdge(int x1,
int y1,
int x2,
int y2) |
protected void |
addNode(int x,
int y) |
void |
begin()
Begin the graph generation.
|
protected void |
computeNextState() |
protected void |
delEdge(int x1,
int y1,
int x2,
int y2) |
protected void |
delNode(int x,
int y) |
protected String |
edgeId(int x1,
int y1,
int x2,
int y2) |
int |
getHeight() |
int |
getWidth() |
boolean |
isCoordsPushed() |
boolean |
isTore() |
protected void |
loadData(BufferedImage data) |
boolean |
nextEvents()
Perform the next step in generating the graph.
|
protected String |
nodeId(int x,
int y) |
void |
setPushCoords(boolean on) |
void |
setTore(boolean on) |
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
private static final int[] NEIGHT
private static final int[] LINK_WITH
int width
int height
boolean[] cells
boolean[] swap
boolean tore
boolean pushCoords
double step
public LifeGenerator(int width, int height, boolean[] data)
public LifeGenerator(String path) throws IOException
IOException
public LifeGenerator(InputStream in) throws IOException
IOException
public LifeGenerator(BufferedImage cellsData)
protected void loadData(BufferedImage data)
protected void computeNextState()
protected void addNode(int x, int y)
protected void delNode(int x, int y)
protected void addEdge(int x1, int y1, int x2, int y2)
protected void delEdge(int x1, int y1, int x2, int y2)
public void begin()
Generator
Generator.nextEvents()
method to add elements to the graph.public boolean nextEvents()
Generator
public void setTore(boolean on)
public boolean isTore()
public void setPushCoords(boolean on)
public boolean isCoordsPushed()
public int getWidth()
public int getHeight()
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses