|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--de.tubs.cs.sc.casim.Lattice
|
+--de.tubs.cs.sc.casim.CALattice
|
+--de.tubs.cs.sc.casim.Lattice3D
represents a three dimensional Lattice of cells.
All cells are arranged in rows and columns and levels.
The data structure is a three dimensional array of Cells.
Lattice,
Cell,
Serialized Form| Field Summary |
| Fields inherited from class de.tubs.cs.sc.casim.CALattice |
neighborhoodIndexes |
| Fields inherited from class de.tubs.cs.sc.casim.Lattice |
boundaryHandler, lx, ly, lz |
| Constructor Summary | |
Lattice3D(java.lang.Class state,
de.tubs.cs.sc.casim.LatticeDefinition ldef)
Constructor creates the three dimensional array of cells and 6 BoundaryHandler calls reset to initialize all cells |
|
| Method Summary | |
protected void |
backup()
calls backup for each cell |
int |
getDimension()
|
protected de.tubs.cs.sc.casim.State |
getNeighborRelative(de.tubs.cs.sc.casim.Cell cell,
int x,
int y,
int z)
returns the relative neighbor of cell with given relative coordinates. |
protected de.tubs.cs.sc.casim.State[] |
getNeighborsArbitrary(de.tubs.cs.sc.casim.Cell cell)
returns a previously defined arbitrary neighborhood. |
protected de.tubs.cs.sc.casim.State[] |
getNeighborsMoore(de.tubs.cs.sc.casim.Cell c)
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 cell)
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()
|
de.tubs.cs.sc.casim.State |
getOldState(int x,
int y,
int z)
returns the old state at the given coordinates. |
de.tubs.cs.sc.casim.State |
getState(int x)
always throws a RuntimeException |
de.tubs.cs.sc.casim.State |
getState(int x,
int y)
always throws a RuntimeException |
de.tubs.cs.sc.casim.State |
getState(int x,
int y,
int z)
returns the current state at the given coordinates. |
protected void |
reset()
reallocates all cells and calls again State.initialize for one cell |
protected void |
setIs(int i1,
int i2,
int i3)
Set the position in the lattice for neighborhood accesses. |
protected void |
transition()
calls transition for each cells state |
| Methods inherited from class de.tubs.cs.sc.casim.CALattice |
defineNeighborsArbitrary, getNeighbors, reversetransition |
| 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, toString, wait, wait, wait |
| Constructor Detail |
public Lattice3D(java.lang.Class state,
de.tubs.cs.sc.casim.LatticeDefinition ldef)
throws CAException
state - the Java class of the State of the cells of the latticeldef - the LatticeDefinition with further lattice parameters| Method Detail |
public int getDimension()
getDimension in class Lattice
protected void reset()
throws CAException
reset in class LatticeCAExceptionpublic de.tubs.cs.sc.casim.State getState(int x)
getState in class LatticeLattice1D.getState(int)
public de.tubs.cs.sc.casim.State getState(int x,
int y)
getState in class LatticeLattice2D.getState(int)
public de.tubs.cs.sc.casim.State getState(int x,
int y,
int z)
getState in class Lattice
public de.tubs.cs.sc.casim.State getOldState(int x,
int y,
int z)
getOldState in class LatticeCell.getNeighbors(),
BoundaryHandler.getOutsideState(int)protected void backup()
backup in class LatticeLattice.backup()protected void transition()
transition in class LatticeLattice.transition()protected int getNrOfNeighbors()
getNrOfNeighbors in class CALattice
protected de.tubs.cs.sc.casim.State[] getNeighborsMoore(de.tubs.cs.sc.casim.Cell cell,
int r)
getNeighborsMoore in class CALatticeCALattice.getNeighbors(de.tubs.cs.sc.casim.Cell)
protected de.tubs.cs.sc.casim.State[] getNeighborsvonNeumann(de.tubs.cs.sc.casim.Cell cell,
int r)
getNeighborsvonNeumann in class CALatticeCALattice.getNeighbors(de.tubs.cs.sc.casim.Cell)protected de.tubs.cs.sc.casim.State[] getNeighborsMoore(de.tubs.cs.sc.casim.Cell c)
getNeighborsMoore in class CALatticeCALattice.getNeighbors(de.tubs.cs.sc.casim.Cell)protected de.tubs.cs.sc.casim.State[] getNeighborsvonNeumann(de.tubs.cs.sc.casim.Cell cell)
getNeighborsvonNeumann in class CALatticeCALattice.getNeighbors(de.tubs.cs.sc.casim.Cell)
protected de.tubs.cs.sc.casim.State getNeighborRelative(de.tubs.cs.sc.casim.Cell cell,
int x,
int y,
int z)
getNeighborRelative in class CALatticeCALattice.getNeighbors(de.tubs.cs.sc.casim.Cell)protected de.tubs.cs.sc.casim.State[] getNeighborsArbitrary(de.tubs.cs.sc.casim.Cell cell)
getNeighborsArbitrary in class CALatticeCALattice.getNeighbors(de.tubs.cs.sc.casim.Cell)
protected void setIs(int i1,
int i2,
int i3)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||