public class GridSpec extends Object
| Constructor and Description |
|---|
GridSpec(Scale scale,
double binWidth,
double phase,
double[] drange)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(GridSpec other)
Indicates whether this specification is a superset of the given one.
|
boolean |
containsBin(int ibin)
Tests whether a given bin index falls within this grid's bounds.
|
boolean |
containsDataPoint(double d)
Tests whether a given value in data coordinates falls within this
grid's bounds.
|
int |
getBinCount()
Returns the number of bins corresponding to the data extent
of this grid.
|
int |
getBinOffset(int ibin)
Returns the offset index for a given bin.
|
int[] |
getBinRange(double[] dataRange)
Returns the range of bin indices corresponding to a range in
data coordinates for this grid.
|
double |
getBinWidth()
Returns the bin width in scale units.
|
BinMapper |
getMapper()
Returns the mapper from axis data values to bin indices.
|
Scale |
getScale()
Returns the axis scaling.
|
boolean |
nearlyContainsBin(int ibin)
Tests whether a given bin index either
falls within this grid's bounds or is just outside them.
|
public GridSpec(Scale scale, double binWidth, double phase, double[] drange)
scale - axis scalebinWidth - bin width in scale unitsphase - scaled phase (non-degenerate range is 0..1)drange - 2-element [lo,hi] array giving required
minimum extent in data coordinatespublic Scale getScale()
public double getBinWidth()
public int getBinCount()
public BinMapper getMapper()
public boolean contains(GridSpec other)
other - comparison objectotherpublic boolean containsDataPoint(double d)
d - test data pointpublic boolean containsBin(int ibin)
ibin - test bin indexpublic boolean nearlyContainsBin(int ibin)
ibin - bin indexpublic int getBinOffset(int ibin)
ibin - bin index as returned by the mapperpublic int[] getBinRange(double[] dataRange)
dataRange - 2-element array (lo,hi) of data valuesCopyright © 2026 Central Laboratory of the Research Councils. All Rights Reserved.