public class CubeWriter extends Object implements TableConsumer
| Constructor and Description |
|---|
CubeWriter(double[] loBounds,
double[] hiBounds,
int[] nbins,
double[] binSizes,
String[] colExprs,
String scaleExpr,
Combiner combiner,
Destination dest,
Class<?> outType)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static double[] |
calculateCube(StarTable table,
Combiner combiner,
double[] loBounds,
int[] nbins,
double[] binSizes)
Accumulates the contents of an N-dimensional histogram representing
data from an N+1-columned table.
|
void |
consume(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.
|
public CubeWriter(double[] loBounds,
double[] hiBounds,
int[] nbins,
double[] binSizes,
String[] colExprs,
String scaleExpr,
Combiner combiner,
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 dimensioncolExprs - expression strings for axesscaleExpr - expression string for scale column (or null)combiner - combination modedest - data output locatoroutType - primitive numeric data type for output data;
if null worked out automaticallypublic void consume(StarTable inTable) throws IOException
TableConsumerconsume in interface TableConsumerinTable - table to consumeIOExceptionpublic static double[] calculateCube(StarTable table, Combiner combiner, double[] loBounds, int[] nbins, double[] binSizes) throws IOException
table - table with N+1 columnscombiner - combination modeloBounds - N-element array of lower bounds by dimensionnbins - N-element array of number of bins by dimensionbinSizes - N-element array of bin extents by dimensionIOExceptionpublic static uk.ac.starlink.ttools.mode.CubeWriter.NumberWriter createNumberWriter(DataOutput out, Class<?> clazz)
out - destination streamclazz - primitive numeric type for outputCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.