de.tubs.cs.sc.casim
Class CellNC

java.lang.Object
  |
  +--de.tubs.cs.sc.casim.Cell
        |
        +--de.tubs.cs.sc.casim.CellNC
All Implemented Interfaces:
java.io.Serializable

public class CellNC
extends Cell

See Also:
Serialized Form

Field Summary
 
Fields inherited from class de.tubs.cs.sc.casim.Cell
lattice, x, y, z
 
Constructor Summary
CellNC(de.tubs.cs.sc.casim.CALattice l, java.lang.Class state, int x, int y, int z)
          Cell constructor sets Lattice reference, creates the two states, current and backup.
 
Method Summary
 de.tubs.cs.sc.casim.State[] getNeighbors()
          getNeighbors uses the settings of the parent lattice for calculation the neighborhood The neighborhood is calculated only once and cached in the cell.
 de.tubs.cs.sc.casim.State[] getNeighborsMoore()
           
 de.tubs.cs.sc.casim.State[] getNeighborsMoore(int r)
           
 de.tubs.cs.sc.casim.State[] getNeighborsvonNeumann()
           
 de.tubs.cs.sc.casim.State[] getNeighborsvonNeumann(int r)
           
 java.lang.String toString()
           
 
Methods inherited from class de.tubs.cs.sc.casim.Cell
backup, getNeighborRelative, getNeighborRelative, getNeighborRelative, getOldState, getState, onlyOneState, transition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CellNC

public CellNC(de.tubs.cs.sc.casim.CALattice l,
              java.lang.Class state,
              int x,
              int y,
              int z)
       throws CAException
Cell constructor sets Lattice reference, creates the two states, current and backup.

Method Detail

getNeighbors

public de.tubs.cs.sc.casim.State[] getNeighbors()
getNeighbors uses the settings of the parent lattice for calculation the neighborhood The neighborhood is calculated only once and cached in the cell. So it's impossible to changed neighborhood conditions during simulation using getNeighbors. You should use getNeighborRelative instead.

Overrides:
getNeighbors in class Cell
See Also:
LatticeDefinition

getNeighborsvonNeumann

public de.tubs.cs.sc.casim.State[] getNeighborsvonNeumann(int r)
Overrides:
getNeighborsvonNeumann in class Cell
Returns:
a State[] of States representing the von Neumann neighborhood with radius r of the cell.

getNeighborsMoore

public de.tubs.cs.sc.casim.State[] getNeighborsMoore(int r)
Overrides:
getNeighborsMoore in class Cell
Returns:
a State[] of States representing the Moore neighborhood with radius r of the cell.

getNeighborsvonNeumann

public de.tubs.cs.sc.casim.State[] getNeighborsvonNeumann()
Overrides:
getNeighborsvonNeumann in class Cell
Returns:
a State[] of States representing the von Neumann neighborhood with radius 1 of the cell.

getNeighborsMoore

public de.tubs.cs.sc.casim.State[] getNeighborsMoore()
Overrides:
getNeighborsMoore in class Cell
Returns:
a State[] of States representing the Moore neighborhood with radius 1 of the cell.

toString

public java.lang.String toString()
Overrides:
toString in class Cell
Returns:
a String of this cell and the neighborhood in identifier representation.