de.tubs.cs.sc.casim
Class Lattice2DTriangle

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.Lattice2DTriangle
All Implemented Interfaces:
java.io.Serializable

public final class Lattice2DTriangle
extends Lattice2D

represents a two dimensional lattice with regular triangles as representation of each cell.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class de.tubs.cs.sc.casim.Lattice2D
backingUp, cells, transitioning
 
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
Lattice2DTriangle(java.lang.Class state, de.tubs.cs.sc.casim.LatticeDefinition ldef)
          Constructor of 2 dimensional triangle lattice
 
Method Summary
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()
           
 
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.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, wait, wait, wait
 

Constructor Detail

Lattice2DTriangle

public Lattice2DTriangle(java.lang.Class state,
                         de.tubs.cs.sc.casim.LatticeDefinition ldef)
                  throws CAException
Constructor of 2 dimensional triangle lattice

Parameters:
state - the Java class of the State of the cells of the lattice
ldef - the LatticeDefinition with further lattice parameters
Method Detail

getNeighborsMoore

protected 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)

getNrOfNeighbors

protected int getNrOfNeighbors()
Specified by:
getNrOfNeighbors in class CALattice
Returns:
the number of neighbors of every cell in the lattice

getNeighborsvonNeumann

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.

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 de.tubs.cs.sc.casim.State[] getNeighborsMoore(de.tubs.cs.sc.casim.Cell c)
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)

getNeighborsvonNeumann

protected de.tubs.cs.sc.casim.State[] getNeighborsvonNeumann(de.tubs.cs.sc.casim.Cell cell)
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)