visad
Class SampledSet
java.lang.Object
|
+--visad.ThingImpl
|
+--visad.DataImpl
|
+--visad.Set
|
+--visad.SimpleSet
|
+--visad.SampledSet
- Direct Known Subclasses:
- GriddedSet, IrregularSet, ProductSet, SingletonSet, UnionSet
- public abstract class SampledSet
- extends SimpleSet
- implements SampledSetIface
SampledSet is the abstract superclass of GriddedSets, PolyCells and MultiCells.
SampledSet objects are intended to be immutable (but see getSamples(boolean) for an exception).
- See Also:
- Serialized Form
|
Field Summary |
(package private) float[] |
Hi
|
(package private) float[] |
Low
|
(package private) float[][] |
Samples
|
|
Method Summary |
Object |
clone()
Clones this instance. |
DataShadow |
computeRanges(ShadowType type,
DataShadow shadow)
|
DataShadow |
computeRanges(ShadowType type,
DataShadow shadow,
double[][] ranges,
boolean domain)
|
void |
cram_missing(boolean[] range_select)
|
(package private) void |
cram_samples(float[][] samples)
|
float[] |
getHi()
|
float[] |
getLow()
|
void |
getNeighbors(int[][] neighbors,
float[][] weights)
|
float[][] |
getSamples()
Returns a copy of the samples of this instance. |
float[][] |
getSamples(boolean copy)
Returns the samples of this instance or a copy of the samples.
Note that, if the actual sample array is returned, then it is possible
to modify the values of this instance -- breaking the immutability aspect
of this class. |
(package private) void |
init_samples(float[][] samples)
|
(package private) void |
init_samples(float[][] samples,
boolean copy)
|
boolean |
isMissing()
|
VisADGeometryArray |
make1DGeometry(byte[][] color_values)
create a 1-D GeometryArray from this Set and color_values;
only used by Irregular3DSet and Gridded3DSet |
VisADGeometryArray[] |
make3DGeometry(byte[][] color_values)
create a 3-D GeometryArray from this Set and color_values;
NOTE - this version only makes points;
NOTE - when textures are supported by Java3D the Gridded3DSet
implementation of make3DGeometry should use Texture3D, and
the Irregular3DSet implementation should resample to a
Gridded3DSet and use Texture3D;
only used by Irregular3DSet and Gridded3DSet |
VisADGeometryArray |
makePointGeometry(byte[][] color_values)
create a PointArray from this Set and color_values;
can be applied to ManifoldDimension = 1, 2 or 3 |
static void |
setGeometryArray(VisADGeometryArray array,
float[][] samples,
int color_length,
byte[][] color_values)
copy and transpose samples and color_values into array;
if color_length == 3 don't use color_values[3] |
void |
setGeometryArray(VisADGeometryArray array,
int color_length,
byte[][] color_values)
copy and transpose Samples (from this Set( and color_values
into array; if color_length == 3 don't use color_values[3] |
| Methods inherited from class visad.Set |
__getitem__,
__len__,
addEqualsCache,
addNotEqualsCache,
adjustType,
cloneButType,
copyDoubles,
copyFloats,
doubleToFloat,
doubleToIndex,
equals,
equalUnitAndCS,
floatToDouble,
getCoordinateSystem,
getDimension,
getDimension,
getDoubles,
getDoubles,
getLength,
getNeighbors,
getNeighbors,
getSetErrors,
getSetUnits,
getWedge,
indexToDouble,
indexToValue,
longString,
longString,
main,
make2DGeometry,
makeIsoLines,
makeIsoSurface,
makeSpatial,
merge1DSets,
testEqualsCache,
testNotEqualsCache,
unary,
unitAndCSHashCode,
valueToIndex |
| Methods inherited from class visad.DataImpl |
__add__,
__add__,
__div__,
__div__,
__mod__,
__mod__,
__mul__,
__mul__,
__neg__,
__pow__,
__pow__,
__radd__,
__rdiv__,
__rmod__,
__rmul__,
__rpow__,
__rsub__,
__sub__,
__sub__,
abs,
abs,
acos,
acos,
acosDegrees,
acosDegrees,
add,
add,
adjustSamplingError,
asin,
asin,
asinDegrees,
asinDegrees,
atan,
atan,
atan2,
atan2,
atan2Degrees,
atan2Degrees,
atanDegrees,
atanDegrees,
binary,
binary,
ceil,
ceil,
changeMathType,
computeRanges,
computeRanges,
computeReferenceRanges,
cos,
cos,
cosDegrees,
cosDegrees,
dataClone,
divide,
divide,
exp,
exp,
floor,
floor,
getType,
invertOp,
local,
log,
log,
max,
max,
min,
min,
multiply,
multiply,
negate,
negate,
notifyReferences,
pow,
pow,
remainder,
remainder,
rint,
rint,
round,
round,
setParent,
sin,
sin,
sinDegrees,
sinDegrees,
sqrt,
sqrt,
subtract,
subtract,
tan,
tan,
tanDegrees,
tanDegrees,
toString,
unary |
Samples
float[][] Samples
Low
float[] Low
Hi
float[] Hi
SampledSet
public SampledSet(MathType type,
int manifold_dimension)
throws VisADException
SampledSet
public SampledSet(MathType type,
int manifold_dimension,
CoordinateSystem coord_sys,
Unit[] units,
ErrorEstimate[] errors)
throws VisADException
SampledSet
public SampledSet(MathType type)
throws VisADException
SampledSet
public SampledSet(MathType type,
CoordinateSystem coord_sys,
Unit[] units,
ErrorEstimate[] errors)
throws VisADException
init_samples
void init_samples(float[][] samples)
throws VisADException
init_samples
void init_samples(float[][] samples,
boolean copy)
throws VisADException
cram_missing
public void cram_missing(boolean[] range_select)
- Overrides:
- cram_missing in class Set
cram_samples
void cram_samples(float[][] samples)
getNeighbors
public void getNeighbors(int[][] neighbors,
float[][] weights)
throws VisADException
- Overrides:
- getNeighbors in class Set
isMissing
public boolean isMissing()
getSamples
public float[][] getSamples()
throws VisADException
Returns a copy of the samples of this instance. Element [i][j]
of the returned array is the j-th value of the
i-th component.
This method is equivalent to getSamples(true).
- Returns:
- A copy of the sample array.
- Overrides:
- getSamples in class Set
- See Also:
getSamples(boolean)
getSamples
public float[][] getSamples(boolean copy)
throws VisADException
Returns the samples of this instance or a copy of the samples.
Note that, if the actual sample array is returned, then it is possible
to modify the values of this instance -- breaking the immutability aspect
of this class. Don't do this unless you enjoy debugging.
- Parameters:
copy - Whether or not a copy of the sample array
should be returned.- Returns:
- The sample array is
copy is
false; otherwise, a copy of the sample array.- Overrides:
- getSamples in class Set
computeRanges
public DataShadow computeRanges(ShadowType type,
DataShadow shadow)
throws VisADException
- Overrides:
- computeRanges in class Set
computeRanges
public DataShadow computeRanges(ShadowType type,
DataShadow shadow,
double[][] ranges,
boolean domain)
throws VisADException
- Overrides:
- computeRanges in class Set
make1DGeometry
public VisADGeometryArray make1DGeometry(byte[][] color_values)
throws VisADException
- create a 1-D GeometryArray from this Set and color_values;
only used by Irregular3DSet and Gridded3DSet
- Overrides:
- make1DGeometry in class Set
make3DGeometry
public VisADGeometryArray[] make3DGeometry(byte[][] color_values)
throws VisADException
- create a 3-D GeometryArray from this Set and color_values;
NOTE - this version only makes points;
NOTE - when textures are supported by Java3D the Gridded3DSet
implementation of make3DGeometry should use Texture3D, and
the Irregular3DSet implementation should resample to a
Gridded3DSet and use Texture3D;
only used by Irregular3DSet and Gridded3DSet
- Overrides:
- make3DGeometry in class Set
makePointGeometry
public VisADGeometryArray makePointGeometry(byte[][] color_values)
throws VisADException
- create a PointArray from this Set and color_values;
can be applied to ManifoldDimension = 1, 2 or 3
- Overrides:
- makePointGeometry in class Set
setGeometryArray
public void setGeometryArray(VisADGeometryArray array,
int color_length,
byte[][] color_values)
throws VisADException
- copy and transpose Samples (from this Set( and color_values
into array; if color_length == 3 don't use color_values[3]
setGeometryArray
public static void setGeometryArray(VisADGeometryArray array,
float[][] samples,
int color_length,
byte[][] color_values)
throws VisADException
- copy and transpose samples and color_values into array;
if color_length == 3 don't use color_values[3]
getLow
public float[] getLow()
- Specified by:
- getLow in interface SampledSetIface
getHi
public float[] getHi()
- Specified by:
- getHi in interface SampledSetIface
clone
public Object clone()
- Clones this instance.
- Returns:
- A clone of this instance.
- Overrides:
- clone in class Set