swarm.space
Class DblBuffer2dImpl
java.lang.Object
|
+--swarm.space.Discrete2dImpl
|
+--swarm.space.DblBuffer2dImpl
- Direct Known Subclasses:
- ConwayLife2dImpl, Diffuse2dImpl
- public class DblBuffer2dImpl
- extends Discrete2dImpl
- implements Discrete2dS, Discrete2d, DblBuffer2dS, DblBuffer2d
A double buffered space..
DblBuffer2d augments Discrete2d to provide a form of double buffered space. Two lattices are maintained: lattice (the current state), and newLattice (the future state). All reads take place from lattice, all writes take place to newLattice. newLattice is copied to lattice when updateLattice is called. DblBuffer2d can be used to implement one model of concurrent action, like in Ca2ds. NOTE: be very careful if you're using low-level macro access to the world, in particular be sure that you preserve the write semantics on the newLattice.
Methods implemented by this class for interface swarm.space.Discrete2d |
copyDiscrete2d$toDiscrete2d,
fastFillWithObject,
fastFillWithValue,
fillWithObject,
fillWithValue,
getObjectAtX$Y,
getSizeX,
getSizeY,
getValueAtX$Y,
putObject$atX$Y,
putValue$atX$Y,
setDiscrete2d$toFile |
Methods implemented by this class for interface swarm.defobj.Drop |
drop |
Methods implemented by this class for interface swarm.defobj.DefinedObject |
compare,
describe,
describeID,
getDisplayName,
getTypeName,
getZone,
perform,
perform$with,
perform$with$with,
perform$with$with$with,
respondsTo,
setDisplayName,
xfprint,
xfprintid,
xprint,
xprintid |
DblBuffer2dImpl
public DblBuffer2dImpl()
DblBuffer2dImpl
public DblBuffer2dImpl(ZoneImpl aZone,
int x,
int y)
- Convenience constructor for Discrete2d lattice
DblBuffer2dImpl
public DblBuffer2dImpl(ZoneImpl aZone)
- Default constructor for Impl class