|
|||||||||
| 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.Lattice1D
represents a one dimensional Lattice of cells.
All cells are arranged in one single row.
The data structure is a one dimensional array of Cells
Lattice,
Cell,
Serialized Form| Field Summary | |
protected de.tubs.cs.sc.casim.Cell[] |
cells
|
| 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 | |
Lattice1D(java.lang.Class state,
de.tubs.cs.sc.casim.LatticeDefinition ldef)
Constructor creates the one dimensional array of cells and 2 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 cell)
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)
returns the current state at the given coordinate. |
de.tubs.cs.sc.casim.State |
getState(int x,
int y)
returns the current state at given coordinates y must be 0 otherwise a RuntimeException is thrown |
de.tubs.cs.sc.casim.State |
getState(int x,
int y,
int z)
returns the current state at given coordinates y and z must be 0 otherwise a RuntimeException is thrown |
protected void |
reset()
reallocates all cells and calls again State.initialize for one cell |
protected void |
setIs(int i1)
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 |
| Field Detail |
protected de.tubs.cs.sc.casim.Cell[] cells
| Constructor Detail |
public Lattice1D(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 Lattice
public de.tubs.cs.sc.casim.State getState(int x,
int y)
getState in class Latticey - must be 0
Lattice2D.getState(int)
public de.tubs.cs.sc.casim.State getState(int x,
int y,
int z)
getState in class Latticey - must be 0z - must be 0
Lattice3D.getState(int)
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 cell)
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)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||