swarm.space
Interface Discrete2dC

All Known Subinterfaces:
Ca2dC, ConwayLife2dC, DblBuffer2dC, Diffuse2dC, Grid2dC
All Known Implementing Classes:
DblBuffer2dCImpl, Grid2dCImpl

public abstract 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.


Method Summary
 Object createEnd()
          Create the lattice, precompute the offsets based on Y coordinate.
 Object makeOffsets()
          Given an array size, compute the offsets array that caches the multiplication by ysize.
 Object setSizeX$Y(int x, int y)
          Set the world size.
 

Method Detail

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.