swarm.space
Interface Discrete2d

All Known Subinterfaces:
Ca2d, ConwayLife2d, DblBuffer2d, Diffuse2d, Grid2d
All Known Implementing Classes:
Grid2dImpl, DblBuffer2dImpl, Discrete2dImpl

public interface Discrete2d
extends SwarmObject, SwarmObjectS, GridData, GridDataS

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
 java.lang.Object copyDiscrete2d$toDiscrete2d(Discrete2d a, Discrete2d b)
          This method copies the data in one Discrete2d object to another Discrete2d object.
 java.lang.Object fastFillWithObject(java.lang.Object anObj)
          Directly fills the lattice with an object.
 java.lang.Object fastFillWithValue(int aValue)
          Directly fills the lattice with a value.
 java.lang.Object fillWithObject(java.lang.Object anObj)
          Fills the space using putObject.
 java.lang.Object fillWithValue(int aValue)
          Fills the space using putValue.
 java.lang.Object putObject$atX$Y(java.lang.Object anObject, int x, int y)
          Put the given pointer to (x,y) overwriting whatever was there.
 java.lang.Object putValue$atX$Y(int v, int x, int y)
          Put the given integer to (x,y) overwriting whatever was there.
 int setDiscrete2d$toFile(Discrete2d a, java.lang.String filename)
          This method reads a PGM formatted file and pipes the data into a Discrete2d object.
 
Methods inherited from interface swarm.objectbase.SwarmObject
getCompleteProbeMap, getProbeForMessage, getProbeForVariable, getProbeMap
 
Methods inherited from interface swarm.space.GridData
getObjectAtX$Y, getSizeX, getSizeY, getValueAtX$Y
 
Methods inherited from interface swarm.defobj.Drop
drop
 
Methods inherited from 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
 
Methods inherited from interface swarm.defobj.GetName
getName
 

Method Detail

putObject$atX$Y

public java.lang.Object putObject$atX$Y(java.lang.Object anObject,
                                        int x,
                                        int y)
Put the given pointer to (x,y) overwriting whatever was there.

putValue$atX$Y

public java.lang.Object putValue$atX$Y(int v,
                                       int x,
                                       int y)
Put the given integer to (x,y) overwriting whatever was there.

fastFillWithValue

public java.lang.Object fastFillWithValue(int aValue)
Directly fills the lattice with a value.

fastFillWithObject

public java.lang.Object fastFillWithObject(java.lang.Object anObj)
Directly fills the lattice with an object.

fillWithValue

public java.lang.Object fillWithValue(int aValue)
Fills the space using putValue.

fillWithObject

public java.lang.Object fillWithObject(java.lang.Object anObj)
Fills the space using putObject.

setDiscrete2d$toFile

public int setDiscrete2d$toFile(Discrete2d a,
                                java.lang.String filename)
This method reads a PGM formatted file and pipes the data into a Discrete2d object.

copyDiscrete2d$toDiscrete2d

public java.lang.Object copyDiscrete2d$toDiscrete2d(Discrete2d a,
                                                    Discrete2d b)
This method copies the data in one Discrete2d object to another Discrete2d object. It assumes that both objects already exist.