public class CellLattice extends RectangularLattice
Modifier and Type | Class and 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 and Description |
---|
CellLattice(ISpace space,
IVector dimVector,
SiteFactory siteFactory) |
Modifier and Type | Method and 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.
|
IVector |
getDimensions()
Returns the array that specifies the spatial dimensions of the lattice of cells.
|
void |
setDimensions(IVector d) |
java.lang.Object |
site(IVector r)
Returns the cell in which the given point lies.
|
arrayIndex, D, getSize, increment, latticeIndex, latticeIndex, setSize, site, sites
public CellLattice(ISpace space, IVector dimVector, SiteFactory siteFactory)
dimensions
- 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.siteFactory
- makes the sites of the latticepublic java.lang.Object site(IVector r)
public IVector getDimensions()
public void setDimensions(IVector d)
public double[] getCellSize()