C - The class representing the cells of the gridpublic class CellGrid<C> extends java.lang.Object implements Grid<C>, java.io.Serializable
| Constructor and Description |
|---|
CellGrid()
Instantiates a new grid.
|
CellGrid(int[] dimensionSizes)
Instantiates a new grid with the specified dimension sizes.
|
CellGrid(int[] dimensionSizes,
java.util.List<C> data)
Instantiates a new grid with the specified dimension sizes.
|
| Modifier and Type | Method and Description |
|---|---|
C |
get(double[] coords)
Gets the cell at the specified coordinates.
|
C |
get(int[] coords)
Gets the cell at the specified coordinates.
|
java.util.Collection<C> |
getAllValues()
Return the collection of all values contained in the grid
|
double[] |
getCoordRanges()
Get the extent of the coordinate axes for all values within this grid.
|
java.util.Set<double[]> |
getCoordsWithValues()
Get the set of coordinates that have non-null values
|
int |
getDimensionCount()
Gets the dimension count.
|
int[] |
getDimensionSizes()
Gets the dimension sizes.
|
int |
getNumValues()
Get the number of cells filled.
|
boolean |
isContinuous()
Return whether the grid values should be considered continuous.
|
java.util.Iterator<C> |
iterator()
Get an iterator across the grid elements
|
C |
set(double[] coords,
C element)
Sets the cell content at the specified coordinates
|
C |
set(int[] coords,
C element)
Sets the cell content at the specified coordinates
|
void |
setDimensionSizes(int[] sizes)
Sets the dimension sizes.
|
public CellGrid()
public CellGrid(int[] dimensionSizes)
dimensionSizes - the dimension sizespublic CellGrid(int[] dimensionSizes,
java.util.List<C> data)
dimensionSizes - the dimension sizesdata - the initial datapublic C get(double[] coords)
public C get(int[] coords)
public java.util.Collection<C> getAllValues()
getAllValues in interface Grid<C>public double[] getCoordRanges()
getCoordRanges in interface Grid<C>public java.util.Set<double[]> getCoordsWithValues()
getCoordsWithValues in interface Grid<C>public int getDimensionCount()
getDimensionCount in interface Grid<C>public int[] getDimensionSizes()
public int getNumValues()
getNumValues in interface Grid<C>public boolean isContinuous()
isContinuous in interface Grid<C>public java.util.Iterator<C> iterator()
iterator in interface java.lang.Iterable<C>public void setDimensionSizes(int[] sizes)
sizes - the new dimension sizes