de.tubs.cs.sc.casim
Class Lattice2DSquare
java.lang.Object
|
+--de.tubs.cs.sc.casim.Lattice
|
+--de.tubs.cs.sc.casim.CALattice
|
+--de.tubs.cs.sc.casim.Lattice2D
|
+--de.tubs.cs.sc.casim.Lattice2DSquare
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- Lattice2DAsync, Lattice2DNative, Lattice2DThreaded
- public class Lattice2DSquare
- extends Lattice2D
Lattice2DSquare
- See Also:
- Serialized Form
Constructor Summary |
Lattice2DSquare(java.lang.Class state,
de.tubs.cs.sc.casim.LatticeDefinition ldef)
Constructor of 2 dimensional square lattice |
Method Summary |
protected de.tubs.cs.sc.casim.State[] |
getNeighborsMoore(de.tubs.cs.sc.casim.Cell c)
getNeighborsMoore returns the Moore neighborhood
with radius 1. |
protected de.tubs.cs.sc.casim.State[] |
getNeighborsMoore(de.tubs.cs.sc.casim.Cell cell,
int r)
returns the Moore neighborhood with radius r. |
protected de.tubs.cs.sc.casim.State[] |
getNeighborsvonNeumann(de.tubs.cs.sc.casim.Cell c)
getNeighborsvonNeumann returns the von Neumann neighborhood
with radius 1. |
protected de.tubs.cs.sc.casim.State[] |
getNeighborsvonNeumann(de.tubs.cs.sc.casim.Cell cell,
int r)
returns the von Neumann neighborhood with radius r. |
protected int |
getNrOfNeighbors()
|
Methods inherited from class de.tubs.cs.sc.casim.Lattice2D |
backup, getDimension, getNeighborRelative, getNeighborsArbitrary, getOldState, getState, getState, getState, reset, setIs, toString, transition |
Methods inherited from class de.tubs.cs.sc.casim.Lattice |
addBoundaryHandler, beginBlock, callAnalyze, callInitialize, endBlock, finish, getBoundaryHandler, getDefinition, getStateClass, getX, getY, getZ, setNeighborhood, waitForReadyForBackup, waitForReadyForTransition |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Lattice2DSquare
public Lattice2DSquare(java.lang.Class state,
de.tubs.cs.sc.casim.LatticeDefinition ldef)
throws CAException
- Constructor of 2 dimensional square lattice
- Parameters:
state
- the Java class of the State of the cells of the latticeldef
- the LatticeDefinition with further lattice parameters
getNrOfNeighbors
protected int getNrOfNeighbors()
- Specified by:
getNrOfNeighbors
in class CALattice
- Returns:
- the number of neighbors of every cell in the lattice
getNeighborsMoore
protected final de.tubs.cs.sc.casim.State[] getNeighborsMoore(de.tubs.cs.sc.casim.Cell cell,
int r)
- returns the Moore neighborhood with radius r.
- Specified by:
getNeighborsMoore
in class CALattice
- Returns:
- an array of States, all references must be casted
to the State subclass.
- See Also:
CALattice.getNeighbors(de.tubs.cs.sc.casim.Cell)
getNeighborsvonNeumann
protected final de.tubs.cs.sc.casim.State[] getNeighborsvonNeumann(de.tubs.cs.sc.casim.Cell cell,
int r)
- returns the von Neumann neighborhood with radius r.
- Specified by:
getNeighborsvonNeumann
in class CALattice
- Returns:
- an array of States, all references must be casted
to the State subclass.
- See Also:
CALattice.getNeighbors(de.tubs.cs.sc.casim.Cell)
getNeighborsvonNeumann
protected final de.tubs.cs.sc.casim.State[] getNeighborsvonNeumann(de.tubs.cs.sc.casim.Cell c)
- getNeighborsvonNeumann returns the von Neumann neighborhood
with radius 1.
- Specified by:
getNeighborsvonNeumann
in class CALattice
- Returns:
- an array of States, all references must be casted
to the State subclass.
- See Also:
CALattice.getNeighbors(de.tubs.cs.sc.casim.Cell)
getNeighborsMoore
protected final de.tubs.cs.sc.casim.State[] getNeighborsMoore(de.tubs.cs.sc.casim.Cell c)
- getNeighborsMoore returns the Moore neighborhood
with radius 1.
- Specified by:
getNeighborsMoore
in class CALattice
- Returns:
- an array of States, all references must be casted
to the State subclass.
- See Also:
CALattice.getNeighbors(de.tubs.cs.sc.casim.Cell)