swarm.space
Interface Discrete2dC
- All Known Subinterfaces:
- Ca2dC, ConwayLife2dC, DblBuffer2dC, Diffuse2dC, Grid2dC
- All Known Implementing Classes:
- DblBuffer2dCImpl, Grid2dCImpl, Discrete2dCImpl
- public interface Discrete2dC
- extends SwarmObjectS, SwarmObjectC
Root class of all 2d discrete spaces..
A Discrete2d is basically a 2d array of ids. Subclasses add particular space semantics onto this. Currently Discrete2d grids are accessed by integer pairs of X and Y coordinates.
create$setSizeX$Y
public Object create$setSizeX$Y(Zone aZone,
int x,
int y)
- Convenience constructor for Discrete2d lattice
setSizeX$Y
public Object setSizeX$Y(int x,
int y)
- Set the world size.
makeOffsets
public Object makeOffsets()
- Given an array size, compute the offsets array that caches the multiplication by ysize. See the discrete2dSiteAt macro.
createEnd
public Object createEnd()
- Create the lattice, precompute the offsets based on Y coordinate.