|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.bristol.star.cdf.Shaper
public abstract class Shaper
Takes care of turning raw variable record values into shaped record values. The raw values are those stored in the CDF data stream, and the shaped ones are those notionally corresponding to record values.
Constructor Summary | |
---|---|
protected |
Shaper(int[] dimSizes,
boolean[] dimVarys)
Constructor. |
Method Summary | |
---|---|
static Shaper |
createShaper(DataType dataType,
int[] dimSizes,
boolean[] dimVarys,
boolean rowMajor)
Returns an appropriate shaper instance. |
abstract int |
getArrayIndex(int[] coords)
Returns the index into the raw value array at which the value for the given element of the notional array can be found. |
int[] |
getDimSizes()
Returns the dimensions of the notional array. |
boolean[] |
getDimVarys()
Returns the dimension variances of the array. |
abstract int |
getRawItemCount()
Returns the number of array elements in the raw value array. |
abstract java.lang.Class<?> |
getShapeClass()
Returns the data type of the result of the shape method. |
abstract int |
getShapedItemCount()
Returns the number of array elements in the shaped value array. |
abstract java.lang.Object |
shape(java.lang.Object rawValue,
boolean rowMajor)
Takes a raw value array and turns it into an object of the notional shape for this shaper. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Shaper(int[] dimSizes, boolean[] dimVarys)
dimSizes
- dimensionality of shaped arraydimVarys
- for each dimension, true for varying, false for fixedMethod Detail |
---|
public abstract int getRawItemCount()
public abstract int getShapedItemCount()
public int[] getDimSizes()
public boolean[] getDimVarys()
public abstract java.lang.Class<?> getShapeClass()
shape
method.
public abstract java.lang.Object shape(java.lang.Object rawValue, boolean rowMajor)
rawValue
- input raw value array
public abstract int getArrayIndex(int[] coords)
coords
- coordinate array, same length as dimensionality
public static Shaper createShaper(DataType dataType, int[] dimSizes, boolean[] dimVarys, boolean rowMajor)
dataType
- data typedimSizes
- dimensions of notional shaped arraydimVarys
- variances of shaped arrayrowMajor
- majority of raw data array;
true for row major, false for column major
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |