swarm.space
Class DblBuffer2dCImpl

java.lang.Object
  |
  +--swarm.PhaseCImpl
        |
        +--swarm.space.DblBuffer2dCImpl

public class DblBuffer2dCImpl
extends PhaseCImpl
implements Discrete2dS, Discrete2dC, DblBuffer2dS, DblBuffer2dC

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.


Fields inherited from class swarm.PhaseCImpl
nextPhase
 
Constructor Summary
DblBuffer2dCImpl()
           
DblBuffer2dCImpl(DblBuffer2d nextPhase)
           
 
Methods implemented by this class for interface swarm.space.Discrete2dC
create$setSizeX$Y, createEnd, makeOffsets, setSizeX$Y
 
Methods implemented by this class for interface swarm.space.DblBuffer2dC
create$setSizeX$Y, createEnd
 
Methods implemented by this class for interface swarm.defobj.CreateC
create, createBegin, createEnd
 
Methods implemented by this class for interface swarm.defobj.CustomizeC
customizeBegin, customizeCopy, customizeEnd
 
Methods inherited from class swarm.PhaseCImpl
_copy_creating_phase_to_using_phase
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DblBuffer2dCImpl

public DblBuffer2dCImpl(DblBuffer2d nextPhase)

DblBuffer2dCImpl

public DblBuffer2dCImpl()