AbstractLattice<T>
, FiniteLattice
public class CellLattice extends RectangularLattice
Modifier and Type | Class | Description |
---|---|---|
static class |
CellLattice.NeighborIterator |
Extends the SimpleLattice neighbor iterator to provide methods that
specify the neighbor range in terms of a distance, rather than an index range.
|
RectangularLattice.Iterator
d, jumpCount, siteFactory, sites, size
Constructor | Description |
---|---|
CellLattice(Space space,
Vector dimVector,
SiteFactory factory) |
Modifier and Type | Method | Description |
---|---|---|
double[] |
getCellSize() |
Returns the spatial dimensions of all cells in the lattice, such that a cell in the
lattice will have a size in each direction as given by the corresponding value
in the returned array.
|
Vector |
getDimensions() |
Returns the array that specifies the spatial dimensions of the lattice of cells.
|
void |
setDimensions(Vector d) |
|
java.lang.Object |
site(Vector r) |
Returns the cell in which the given point lies.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
arrayIndex, D, getDownNeighbors, getSize, getUpNeighbors, increment, latticeIndex, latticeIndex, setNeighborRange, setPeriodicity, setSize, site, sites
public CellLattice(Space space, Vector dimVector, SiteFactory factory)
dimVector
- the spatial dimensions of the lattice, such that the total
space occupied by the lattice cells a rectangular box with
each side of length dimensions.x(i)/size[i] for side i. The
dimensions at any time are given by the array passed here, so
any changes to the array external to this class will result in
a change in the dimensions of this lattice (this is useful in
resizing the lattice to the dimensions of a box,
by giving a reference to box.boundary().dimension() here).
The dimensions array reference is final and cannot be changed .
The lattice dimension D is given by dimensions.length.public java.lang.Object site(Vector r)
public Vector getDimensions()
public void setDimensions(Vector d)
public double[] getCellSize()