|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--visad.ThingImpl
|
+--visad.DataImpl
|
+--visad.Set
Set is the abstract superclass of the VisAD hierarchy of sets.
Set-s are subsets of R^n for n>0. For the most part, Set objects are
immutable (but see SampledSet.getSamples(boolean)).
| Inner classes inherited from class visad.DataImpl |
DataImpl.Syncher |
| Inner classes inherited from class visad.ThingImpl |
ThingImpl.RemotePair |
| Field Summary | |
(package private) CoordinateSystem |
DomainCoordinateSystem
|
(package private) int |
DomainDimension
|
(package private) int |
hashCode
|
(package private) boolean |
hashCodeSet
|
(package private) int |
Length
|
(package private) ErrorEstimate[] |
SetErrors
|
(package private) Unit[] |
SetUnits
|
| Fields inherited from class visad.DataImpl |
Type |
| Constructor Summary | |
Set(MathType type)
construct a Set object |
|
Set(MathType type,
CoordinateSystem coord_sys)
Constructs a Set object with a non-default CoordinateSystem. |
|
Set(MathType type,
CoordinateSystem coord_sys,
Unit[] units,
ErrorEstimate[] errors)
Constructs a Set object with a non-default CoordinateSystem, non-default Unit-s, and non-default errors. |
|
| Method Summary | |
Data |
__getitem__(int index)
for JPython |
int |
__len__()
A wrapper around getLength for JPython. |
void |
addEqualsCache(Set set)
add set to a cache of Set-s equal to this |
void |
addNotEqualsCache(Set set)
add set to a cache of Set-s not equal to this |
(package private) static MathType |
adjustType(MathType type)
|
Object |
clone()
Clones this instance. |
abstract Object |
cloneButType(MathType type)
copy this Set, but give it a new MathType; this is safe, since constructor checks consistency of DomainCoordinateSystem and SetUnits with Type |
DataShadow |
computeRanges(ShadowType type,
DataShadow shadow)
|
DataShadow |
computeRanges(ShadowType type,
DataShadow shadow,
double[][] ranges,
boolean domain)
this default does not set ranges - it is used by FloatSet and DoubleSet |
static double[][] |
copyDoubles(double[][] samples)
|
static float[][] |
copyFloats(float[][] samples)
|
void |
cram_missing(boolean[] range_select)
|
static float[][] |
doubleToFloat(double[][] value)
|
int[] |
doubleToIndex(double[][] value)
|
abstract boolean |
equals(Object set)
test for equality |
boolean |
equalUnitAndCS(Set set)
test equality of SetUnits and DomainCoordinateSystem between this and set |
static double[][] |
floatToDouble(float[][] value)
|
CoordinateSystem |
getCoordinateSystem()
Gets the coordinate system of this domain set (DomainCoordinateSystem). |
int |
getDimension()
get DomainDimension (i.e., this is a subset of R^DomainDimension) |
(package private) static int |
getDimension(MathType type)
get DomainDimension (i.e., this is a subset of R^DomainDimension) |
double[][] |
getDoubles()
|
double[][] |
getDoubles(boolean copy)
|
int |
getLength()
get the number of samples |
int |
getManifoldDimension()
for non-SimpleSet, ManifoldDimension = DomainDimension |
int[][] |
getNeighbors(int dimension)
Returns the indexes of the neighboring points along a manifold dimesion for every point in the set. |
void |
getNeighbors(int[][] neighbors)
Returns the indexes of the neighboring points for every point in the set. |
void |
getNeighbors(int[][] neighbors,
float[][] weights)
|
float[][] |
getSamples()
return an enumeration of sample values in index order (i.e., not in getWedge order); the return array is organized as float[domain_dimension][number_of_samples] |
float[][] |
getSamples(boolean copy)
|
ErrorEstimate[] |
getSetErrors()
Returns the error estimates of the values in the set. |
Unit[] |
getSetUnits()
Returns the units of the values in the set. |
int[] |
getWedge()
return an enumeration of sample indices in a spatially coherent order; this is useful for efficiency |
double[][] |
indexToDouble(int[] index)
Returns an array of sample-point values corresponding to an array of sample-point indicies. |
abstract float[][] |
indexToValue(int[] index)
return Set values corresponding to Set indices |
String |
longString()
|
String |
longString(String pre)
|
static void |
main(String[] args)
|
VisADGeometryArray |
make1DGeometry(byte[][] color_values)
|
VisADGeometryArray |
make2DGeometry(byte[][] color_values,
boolean indexed)
|
VisADGeometryArray[] |
make3DGeometry(byte[][] color_values)
|
VisADGeometryArray[][] |
makeIsoLines(float[] intervals,
float lowlimit,
float highlimit,
float base,
float[] fieldValues,
byte[][] color_values,
boolean[] swap,
boolean dash,
boolean fill,
ScalarMap[] smap,
double scale_ratio,
double label_size,
float[][][] f_array)
return basic lines in array[0], fill-ins in array[1] and labels in array[2] |
VisADGeometryArray |
makeIsoSurface(float isolevel,
float[] fieldValues,
byte[][] color_values,
boolean indexed)
|
VisADGeometryArray |
makePointGeometry(byte[][] color_values)
|
Set |
makeSpatial(SetType type,
float[][] samples)
|
Set |
merge1DSets(Set set)
merge 1D sets; used for default animation set |
(package private) void |
setAnimationSampling(ShadowType type,
DataShadow shadow,
boolean domain)
domain == true is this is the domain of a Field |
boolean |
testEqualsCache(Set set)
test set against a cache of Set-s equal to this |
boolean |
testNotEqualsCache(Set set)
test set against a cache of Set-s not equal to this |
Data |
unary(int op,
MathType new_type,
int sampling_mode,
int error_mode)
|
int |
unitAndCSHashCode()
Returns the hash code of the units and coordinate-system. |
abstract int[] |
valueToIndex(float[][] value)
return Set indices of Set values closest to value elements (return -1 for any value outside Set range) |
| 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 |
| Methods inherited from class visad.ThingImpl |
adaptedAddReference,
adaptedRemoveReference,
addReference,
removeReference |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
int DomainDimension
int Length
CoordinateSystem DomainCoordinateSystem
transient boolean hashCodeSet
transient int hashCode
Unit[] SetUnits
ErrorEstimate[] SetErrors
| Constructor Detail |
public Set(MathType type)
throws VisADException
public Set(MathType type,
CoordinateSystem coord_sys)
throws VisADException
type - The type of the Set.coord_sys - The CoordinateSystem associated with this
Set.
public Set(MathType type,
CoordinateSystem coord_sys,
Unit[] units,
ErrorEstimate[] errors)
throws VisADException
type - The MathType of the set. May be a RealType,
a RealTupleType, or a SetType.coord_sys - Optional coordinate system for the domain of the
set. May be null, in which case
the default coordinate system of the domain is
used.units - Optional units for the values. May
be null, in which case
the default units of the domain are
used. If the ith element is
non-null and the RealType of the
corresponding domain component is an interval,
then the unit that is actually used is
units[i].getAbsoluteUnit().errors - Error estimates. May be null.
errors[i] is the error estimate
for the i-th component and may be
null.| Method Detail |
static int getDimension(MathType type)
throws VisADException
static MathType adjustType(MathType type)
throws VisADException
public Unit[] getSetUnits()
null. RETURN_VALUE[i]
is the unit of the i-th component
and may be null.public ErrorEstimate[] getSetErrors()
null. RETURN_VALUE[i]
is the error estimate for the i-th
component and may be null.public CoordinateSystem getCoordinateSystem()
null; otherwise, the
(default) coordinate system of the
underlying RealTupleType (which may be
null).public int getDimension()
public int getManifoldDimension()
public int getLength()
throws VisADException
public int __len__()
throws VisADException
public int[] getWedge()
public float[][] getSamples()
throws VisADException
public float[][] getSamples(boolean copy)
throws VisADException
public double[][] getDoubles()
throws VisADException
public double[][] getDoubles(boolean copy)
throws VisADException
public void cram_missing(boolean[] range_select)
public abstract float[][] indexToValue(int[] index)
throws VisADException
index - array of integer indices
public abstract int[] valueToIndex(float[][] value)
throws VisADException
value - float[domain_dimension][number_of_values] array of
Set values
public DataShadow computeRanges(ShadowType type,
DataShadow shadow)
throws VisADException
public DataShadow computeRanges(ShadowType type,
DataShadow shadow,
double[][] ranges,
boolean domain)
throws VisADException
void setAnimationSampling(ShadowType type,
DataShadow shadow,
boolean domain)
throws VisADException
public Set merge1DSets(Set set)
throws VisADException
public Set makeSpatial(SetType type,
float[][] samples)
throws VisADException
public VisADGeometryArray make1DGeometry(byte[][] color_values)
throws VisADException
public VisADGeometryArray make2DGeometry(byte[][] color_values,
boolean indexed)
throws VisADException
public VisADGeometryArray[] make3DGeometry(byte[][] color_values)
throws VisADException
public VisADGeometryArray makePointGeometry(byte[][] color_values)
throws VisADException
public VisADGeometryArray[][] makeIsoLines(float[] intervals,
float lowlimit,
float highlimit,
float base,
float[] fieldValues,
byte[][] color_values,
boolean[] swap,
boolean dash,
boolean fill,
ScalarMap[] smap,
double scale_ratio,
double label_size,
float[][][] f_array)
throws VisADException
public VisADGeometryArray makeIsoSurface(float isolevel,
float[] fieldValues,
byte[][] color_values,
boolean indexed)
throws VisADException
public double[][] indexToDouble(int[] index)
throws VisADException
index - The indicies of the sample points.[i][j] is the
jth component of sample-point
i.
public int[] doubleToIndex(double[][] value)
throws VisADException
public static double[][] floatToDouble(float[][] value)
public static float[][] doubleToFloat(double[][] value)
public static float[][] copyFloats(float[][] samples)
public static double[][] copyDoubles(double[][] samples)
public void getNeighbors(int[][] neighbors)
throws VisADException
Returns the indexes of the neighboring points for every point
in the set. neighbors.length should be at least
getLength(). On return, neighbors[i][j]
will be the index of the j -th neighboring point of
point i. This method will allocate and set the array
neighbors[i] for all i.
This implementation always throws an UnimplementedException.
neighbors - The array to contain the indexes of the
neighboring points.null.neighbors.length < getLength()
.
public void getNeighbors(int[][] neighbors,
float[][] weights)
throws VisADException
public int[][] getNeighbors(int dimension)
throws VisADException
Returns the indexes of the neighboring points along a manifold
dimesion for every point in the set. Elements [i][0]
and [i][1] of the returned array are the indexes of the
neighboring sample points in the direction of decreasing and increasing
manifold index, respectively, for sample point i. If a sample
point doesn't have a neighboring point (because it is an exterior point,
for example) then the value of the corresponding index will be -1.
This implementation always throws an UnimplementedException.
manifoldIndex - The index of the manifold dimension along
which to return the neighboring points.manifoldIndex < 0 ||
manifoldIndex >= getManifoldDimension()
.getManifoldDimension()public boolean testNotEqualsCache(Set set)
public void addNotEqualsCache(Set set)
public boolean testEqualsCache(Set set)
public void addEqualsCache(Set set)
public boolean equalUnitAndCS(Set set)
public int unitAndCSHashCode()
equalUnitAndCS(Set).
public Data __getitem__(int index)
throws VisADException,
RemoteException
public abstract boolean equals(Object set)
public Object clone()
public Data unary(int op,
MathType new_type,
int sampling_mode,
int error_mode)
throws VisADException,
RemoteException
public abstract Object cloneButType(MathType type)
throws VisADException
public String longString()
throws VisADException
public String longString(String pre)
throws VisADException
public static void main(String[] args)
throws VisADException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||