visad
Class SampledSet
- java.lang.Object
-
- visad.ThingImpl
-
- visad.DataImpl
-
- visad.Set
-
- visad.SimpleSet
-
- visad.SampledSet
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Data, SampledSetIface, SetIface, SimpleSetIface, Thing
- 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 seegetSamples(boolean)for an exception).- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class visad.DataImpl
DataImpl.Syncher
-
-
Field Summary
-
Fields inherited from interface visad.Data
ABS, ACOS, ACOS_DEGREES, ADD, ASIN, ASIN_DEGREES, ATAN, ATAN_DEGREES, ATAN2, ATAN2_DEGREES, CEIL, COS, COS_DEGREES, DEGREES_TO_RADIANS, DEPENDENT, DIVIDE, EXP, FLOOR, INDEPENDENT, INV_ATAN2, INV_ATAN2_DEGREES, INV_DIVIDE, INV_POW, INV_REMAINDER, INV_SUBTRACT, LOG, MAX, MIN, MULTIPLY, NEAREST_NEIGHBOR, NEGATE, NO_ERRORS, NOP, POW, RADIANS_TO_DEGREES, REMAINDER, RINT, ROUND, SIN, SIN_DEGREES, SQRT, SUBTRACT, TAN, TAN_DEGREES, WEIGHTED_AVERAGE
-
-
Constructor Summary
Constructors Constructor and Description SampledSet(MathType type)SampledSet(MathType type, CoordinateSystem coord_sys, Unit[] units, ErrorEstimate[] errors)SampledSet(MathType type, int manifold_dimension)SampledSet(MathType type, int manifold_dimension, CoordinateSystem coord_sys, Unit[] units, ErrorEstimate[] errors)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Objectclone()Clones this instance.DataShadowcomputeRanges(ShadowType type, DataShadow shadow)Recursive version of computeRanges(), called down through Data object tree.DataShadowcomputeRanges(ShadowType type, DataShadow shadow, double[][] ranges, boolean domain)this default does not set ranges - it is used by FloatSet and DoubleSetvoidcram_missing(boolean[] range_select)voidfinalize()float[]getHi()Returns the maximum sample values.float[]getLow()Returns the minimum sample values.voidgetNeighbors(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.booleanisMissing()VisADGeometryArraymake1DGeometry(byte[][] color_values)create a 1-D GeometryArray from this Set and color_values; only used by Irregular3DSet and Gridded3DSetVisADGeometryArray[]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 Gridded3DSetVisADGeometryArraymakePointGeometry(byte[][] color_values)create a PointArray from this Set and color_values; can be applied to ManifoldDimension = 1, 2 or 3static voidsetCacheSizeThreshold(int threshold)static voidsetGeometryArray(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]voidsetGeometryArray(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.SimpleSet
getManifoldDimension, valueToInterp
-
Methods inherited from class visad.Set
__getitem__, __len__, addEqualsCache, addNotEqualsCache, cloneButType, copyDoubles, copyFloats, doubleToFloat, doubleToIndex, equals, equalUnitAndCS, floatToDouble, getCoordinateSystem, 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, cos, cos, cosDegrees, cosDegrees, dataClone, divide, divide, exp, exp, floor, floor, getType, local, log, log, max, max, min, min, multiply, multiply, negate, negate, notifyReferences, pow, pow, remainder, remainder, rint, rint, round, round, sin, sin, sinDegrees, sinDegrees, sqrt, sqrt, subtract, subtract, tan, tan, tanDegrees, tanDegrees, toString, unary
-
Methods inherited from class visad.ThingImpl
addReference, removeReference
-
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface visad.SimpleSetIface
valueToInterp
-
Methods inherited from interface visad.SetIface
cloneButType, doubleToIndex, equals, equalUnitAndCS, getCoordinateSystem, getDimension, getDoubles, getDoubles, getLength, getManifoldDimension, getNeighbors, getNeighbors, getSetErrors, getSetUnits, getWedge, indexToDouble, indexToValue, make2DGeometry, makeIsoLines, makeIsoSurface, makeSpatial, merge1DSets, valueToIndex
-
Methods inherited from interface visad.Data
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, cos, cos, cosDegrees, cosDegrees, dataClone, divide, divide, exp, exp, floor, floor, getType, local, log, log, longString, longString, max, max, min, min, multiply, multiply, negate, negate, pow, pow, remainder, remainder, rint, rint, round, round, sin, sin, sinDegrees, sinDegrees, sqrt, sqrt, subtract, subtract, tan, tan, tanDegrees, tanDegrees, unary, unary
-
Methods inherited from interface visad.Thing
addReference, removeReference
-
-
-
-
Constructor Detail
-
SampledSet
public SampledSet(MathType type, int manifold_dimension) throws VisADException
- Parameters:
type-manifold_dimension-- Throws:
VisADException
-
SampledSet
public SampledSet(MathType type, int manifold_dimension, CoordinateSystem coord_sys, Unit[] units, ErrorEstimate[] errors) throws VisADException
- Parameters:
type-manifold_dimension-coord_sys-units-errors-- Throws:
VisADException
-
SampledSet
public SampledSet(MathType type) throws VisADException
- Parameters:
type-- Throws:
VisADException
-
SampledSet
public SampledSet(MathType type, CoordinateSystem coord_sys, Unit[] units, ErrorEstimate[] errors) throws VisADException
- Parameters:
type-coord_sys-units-errors-- Throws:
VisADException
-
-
Method Detail
-
finalize
public void finalize() throws java.lang.Throwable- Overrides:
finalizein classjava.lang.Object- Throws:
java.lang.Throwable
-
setCacheSizeThreshold
public static void setCacheSizeThreshold(int threshold)
- Parameters:
threshold-
-
cram_missing
public void cram_missing(boolean[] range_select)
- Specified by:
cram_missingin interfaceSetIface- Overrides:
cram_missingin classSet- Parameters:
range_select-
-
getNeighbors
public void getNeighbors(int[][] neighbors, float[][] weights) throws VisADException- Specified by:
getNeighborsin interfaceSetIface- Overrides:
getNeighborsin classSet- Parameters:
neighbors-weights-- Throws:
VisADException
-
isMissing
public boolean isMissing()
-
getSamples
public float[][] getSamples() throws VisADExceptionReturns a copy of the samples of this instance. Element
[i][j]of the returned array is thej-th value of thei-th component.This method is equivalent to
getSamples(true).- Specified by:
getSamplesin interfaceSetIface- Overrides:
getSamplesin classSet- Returns:
- A copy of the sample array.
- Throws:
VisADException- See Also:
getSamples(boolean)
-
getSamples
public float[][] getSamples(boolean copy) throws VisADExceptionReturns 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.
- Specified by:
getSamplesin interfaceSetIface- Overrides:
getSamplesin classSet- Parameters:
copy- Whether or not a copy of the sample array should be returned.- Returns:
- The sample array is
copyisfalse; otherwise, a copy of the sample array. - Throws:
VisADException
-
computeRanges
public DataShadow computeRanges(ShadowType type, DataShadow shadow) throws VisADException
Description copied from interface:DataRecursive version of computeRanges(), called down through Data object tree.- Specified by:
computeRangesin interfaceData- Overrides:
computeRangesin classSet- Parameters:
type-shadow-- Returns:
- DataShadow
- Throws:
VisADException
-
computeRanges
public DataShadow computeRanges(ShadowType type, DataShadow shadow, double[][] ranges, boolean domain) throws VisADException
Description copied from class:Setthis default does not set ranges - it is used by FloatSet and DoubleSet- Overrides:
computeRangesin classSet- Parameters:
type-shadow-ranges-domain-- Returns:
- DataShadow
- Throws:
VisADException
-
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- Specified by:
make1DGeometryin interfaceSetIface- Overrides:
make1DGeometryin classSet- Parameters:
color_values-- Returns:
- new VisADGeometryArray
- Throws:
VisADException
-
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- Specified by:
make3DGeometryin interfaceSetIface- Overrides:
make3DGeometryin classSet- Parameters:
color_values-- Returns:
- arrays of VisADGeometryArray
- Throws:
VisADException
-
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- Specified by:
makePointGeometryin interfaceSetIface- Overrides:
makePointGeometryin classSet- Parameters:
color_values-- Returns:
- VisADGeometryArray
- Throws:
VisADException
-
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]- Parameters:
array-color_length-color_values-- Throws:
VisADException
-
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]- Parameters:
array-samples-color_length-color_values-- Throws:
VisADException
-
getLow
public float[] getLow()
Description copied from interface:SampledSetIfaceReturns the minimum sample values.- Specified by:
getLowin interfaceSampledSetIface- Returns:
- array of low values
-
getHi
public float[] getHi()
Description copied from interface:SampledSetIfaceReturns the maximum sample values.- Specified by:
getHiin interfaceSampledSetIface- Returns:
- array of hi values
-
-
DMelt 3.0 © DataMelt by jWork.ORG