de.tubs.cs.sc.casim
Class LatticeDefinition

java.lang.Object
  |
  +--de.tubs.cs.sc.casim.LatticeDefinition
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class LatticeDefinition
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

represents a class with all necessary parameters to define lattice geometrie, dimension, size and boundary conditions

See Also:
Lattice, Serialized Form

Field Summary
static int BOUNDARY_HANDLER_BOTTOM
           
static int BOUNDARY_HANDLER_FRONT
           
static int BOUNDARY_HANDLER_LEFT
           
static int BOUNDARY_HANDLER_REAR
           
static int BOUNDARY_HANDLER_RIGHT
           
static int BOUNDARY_HANDLER_TOP
           
static int CACHE_ALL
           
static int CACHE_INNER
           
static int CACHE_NONE
           
protected  int dimension
           
static int NEIGHBORHOOD_ARBITRARY
           
static int NEIGHBORHOOD_MOORE
           
static int NEIGHBORHOOD_VONNEUMANN
           
 
Constructor Summary
LatticeDefinition()
          Constructor creates a default LatticeDefintion with a 2D square Lattice with a 10x10 array and periodic boundary conditions, a von Neumann neighborhood with radius 1
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(de.tubs.cs.sc.casim.LatticeDefinition ldef)
           
 java.lang.Class[] getBoundary()
           
 java.lang.Class getBoundary(int iIndex)
           
 int getCacheNeighborhood()
           
 int getDimension()
           
 int getGeometry()
           
 int getInitOption()
           
 java.lang.Class getLatticeClass()
           
 int getLatticeOption()
           
 int getNeighborhood()
           
 int getNeighborhoodRadius()
           
 java.lang.String getSizeString()
           
 int getX()
           
 int getY()
           
 int getZ()
           
 boolean is1D()
           
 boolean is2D()
           
 boolean is2DHexagonal()
           
 boolean is2DSquare()
           
 boolean is2DTriangle()
           
 boolean is3D()
           
 boolean isNeighborhoodArbitrary()
           
 boolean isNeighborhoodMoore()
           
 boolean isNeighborhoodVonNeumann()
           
 void setAllBoundary(java.lang.Class boundaryClass)
           
 void setBoundary(java.lang.Class[] b)
           
 void setBoundary(int iIndex, java.lang.Class boundaryClass)
          sets the boundary kind at dimension and direction
 void setCacheNeighborhood(int cacheNeighborhood)
          sets the cache neighborhood property to a new value Caching increases performance espezially for smaller lattices It costs memory for all neighborhood references.
 void setDimension(int dimension)
           
 void setGeometry(int geometry)
           
 void setInitOption(int option)
           
 void setKind(int dimension, int geometry)
          sets the new kind of the lattice
 void setLatticeClass(java.lang.Class c)
           
 void setLatticeOption(int option)
           
 void setNeighborhood(int iNeighborhood)
           
 void setNeighborhoodRadius(int iNeighborhoodRadius)
           
 void setX(int x)
          sets the width of the lattice
 void setY(int y)
          sets the height of the lattice
 void setZ(int z)
          sets the depth of the lattice
 java.lang.String ToString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NEIGHBORHOOD_VONNEUMANN

public static final int NEIGHBORHOOD_VONNEUMANN
See Also:
Constant Field Values

NEIGHBORHOOD_MOORE

public static final int NEIGHBORHOOD_MOORE
See Also:
Constant Field Values

NEIGHBORHOOD_ARBITRARY

public static final int NEIGHBORHOOD_ARBITRARY
See Also:
Constant Field Values

BOUNDARY_HANDLER_LEFT

public static final int BOUNDARY_HANDLER_LEFT
See Also:
Constant Field Values

BOUNDARY_HANDLER_RIGHT

public static final int BOUNDARY_HANDLER_RIGHT
See Also:
Constant Field Values

BOUNDARY_HANDLER_BOTTOM

public static final int BOUNDARY_HANDLER_BOTTOM
See Also:
Constant Field Values

BOUNDARY_HANDLER_TOP

public static final int BOUNDARY_HANDLER_TOP
See Also:
Constant Field Values

BOUNDARY_HANDLER_FRONT

public static final int BOUNDARY_HANDLER_FRONT
See Also:
Constant Field Values

BOUNDARY_HANDLER_REAR

public static final int BOUNDARY_HANDLER_REAR
See Also:
Constant Field Values

dimension

protected int dimension

CACHE_NONE

public static final int CACHE_NONE
See Also:
Constant Field Values

CACHE_INNER

public static final int CACHE_INNER
See Also:
Constant Field Values

CACHE_ALL

public static final int CACHE_ALL
See Also:
Constant Field Values
Constructor Detail

LatticeDefinition

public LatticeDefinition()
Constructor creates a default LatticeDefintion with a 2D square Lattice with a 10x10 array and periodic boundary conditions, a von Neumann neighborhood with radius 1

Method Detail

getX

public final int getX()
Returns:
the width of the lattice

getY

public final int getY()
Returns:
the height of the lattice

getZ

public final int getZ()
Returns:
the Depth of the lattice

getBoundary

public final java.lang.Class getBoundary(int iIndex)
Returns:
the boundary class at given edge

getBoundary

public final java.lang.Class[] getBoundary()

setBoundary

public final void setBoundary(java.lang.Class[] b)

getDimension

public final int getDimension()
Returns:
the dimension of the lattice 1,2,3

getGeometry

public final int getGeometry()
Returns:
the geometry of the lattice TRIANGLE,SQUARE,HEXAGONAL

is1D

public boolean is1D()
Returns:
true for one dimensional lattices otherwise false

is2D

public boolean is2D()
Returns:
true for two dimensional lattices otherwise false

is2DTriangle

public final boolean is2DTriangle()
Returns:
true for two dimensional triangle lattices otherwise false

is2DSquare

public final boolean is2DSquare()
Returns:
true for two dimensional square lattices otherwise false that is the default

is2DHexagonal

public final boolean is2DHexagonal()
Returns:
true for two dimensional hexagonal lattices otherwise false

is3D

public final boolean is3D()
Returns:
true for three dimensional lattices otherwise false

getCacheNeighborhood

public final int getCacheNeighborhood()
Returns:
true if the neighborhood is cached true is the default

getNeighborhood

public final int getNeighborhood()
Returns:
the kind of neighborhood can be one of NEIGHBORHOOD_VONNEUMANN NEIGHBORHOOD_MOORE

isNeighborhoodVonNeumann

public final boolean isNeighborhoodVonNeumann()

isNeighborhoodMoore

public final boolean isNeighborhoodMoore()

isNeighborhoodArbitrary

public boolean isNeighborhoodArbitrary()

getNeighborhoodRadius

public final int getNeighborhoodRadius()
Returns:
the neighborhood radius

setX

public void setX(int x)
sets the width of the lattice


setY

public void setY(int y)
sets the height of the lattice


setZ

public void setZ(int z)
sets the depth of the lattice


setGeometry

public void setGeometry(int geometry)

setDimension

public void setDimension(int dimension)

setKind

public void setKind(int dimension,
                    int geometry)
sets the new kind of the lattice


setCacheNeighborhood

public void setCacheNeighborhood(int cacheNeighborhood)
sets the cache neighborhood property to a new value Caching increases performance espezially for smaller lattices It costs memory for all neighborhood references.


setBoundary

public void setBoundary(int iIndex,
                        java.lang.Class boundaryClass)
sets the boundary kind at dimension and direction


setAllBoundary

public void setAllBoundary(java.lang.Class boundaryClass)

setNeighborhood

public void setNeighborhood(int iNeighborhood)

setNeighborhoodRadius

public void setNeighborhoodRadius(int iNeighborhoodRadius)

getSizeString

public java.lang.String getSizeString()

setLatticeClass

public void setLatticeClass(java.lang.Class c)

getLatticeClass

public java.lang.Class getLatticeClass()

setInitOption

public void setInitOption(int option)

getInitOption

public int getInitOption()

setLatticeOption

public void setLatticeOption(int option)

getLatticeOption

public int getLatticeOption()

equals

public boolean equals(de.tubs.cs.sc.casim.LatticeDefinition ldef)
Returns:
true if this equals to ldef

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
java.lang.CloneNotSupportedException

ToString

public java.lang.String ToString()