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
|
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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.
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.