|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.mode.CubeWriter
public class CubeWriter
TableConsumer implementation which constructs and outputs a histogram data cube for an input table.
Constructor Summary | |
---|---|
CubeWriter(double[] loBounds,
double[] hiBounds,
int[] nbins,
double[] binSizes,
String[] colIds,
String scaleId,
uk.ac.starlink.util.Destination dest,
Class outType)
Constructor. |
Method Summary | |
---|---|
static double[] |
calculateCube(uk.ac.starlink.table.StarTable table,
double[] loBounds,
int[] nbins,
double[] binSizes)
Accumulates the contents of an N-dimensional histogram representing data from an N+1-columned table. |
void |
consume(uk.ac.starlink.table.StarTable inTable)
Consumes a table. |
static uk.ac.starlink.ttools.mode.CubeWriter.NumberWriter |
createNumberWriter(DataOutput out,
Class clazz)
Constructs an object which can write signed integer values to a DataOutput object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CubeWriter(double[] loBounds, double[] hiBounds, int[] nbins, double[] binSizes, String[] colIds, String scaleId, uk.ac.starlink.util.Destination dest, Class outType)
nbins
and binSizes
may be null (it will be worked out from the other).
Elements of loBounds
and hiBounds
may
be NaN to indicate that the corresponding bound should be calculated
from a pass through the data.
loBounds
- lower bounds for each dimensionhiBounds
- upper bounds for each dimensionnbins
- number of bins in each dimensionbinSizes
- extent of bins in each dimensioncolIds
- column ID strings for axesscaleId
- column ID string for scale column (or null)dest
- data output locatoroutType
- primitive numeric data type for output data;
if null worked out automaticallyMethod Detail |
---|
public void consume(uk.ac.starlink.table.StarTable inTable) throws IOException
TableConsumer
consume
in interface TableConsumer
inTable
- table to consume
IOException
public static double[] calculateCube(uk.ac.starlink.table.StarTable table, double[] loBounds, int[] nbins, double[] binSizes) throws IOException
table
- table with N+1 columnsloBounds
- N-element array of lower bounds by dimensionnbins
- N-element array of number of bins by dimensionbinSizes
- N-element array of bin extents by dimension
IOException
public static uk.ac.starlink.ttools.mode.CubeWriter.NumberWriter createNumberWriter(DataOutput out, Class clazz)
out
- destination streamclazz
- primitive numeric type for output
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |