public class FieldImpl extends FunctionImpl implements Field
A FieldImpl domain type may be either a RealType (for a function with domain = R) or a RealTupleType (for a function with domain = R^n for n > 0).
DataImpl.Syncher
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
Modifier | Constructor and Description |
---|---|
|
FieldImpl(FunctionType type)
construct a FieldImpl from type;
use default Set of FunctionType domain;
initial values are missing
|
|
FieldImpl(FunctionType type,
Set set)
Constructs from the type of function and a set of domain points.
|
protected |
FieldImpl(FunctionType type,
Set set,
boolean createRangeArray)
Trusted constructor for subclasses that don't need to have the
Range array instantiated (i.e., FlatField).
|
Modifier and Type | Method and Description |
---|---|
Data |
__getitem__(int index)
A wrapper around
getSample for JPython. |
int |
__len__()
A wrapper around
getLength for JPython. |
void |
__setitem__(int index,
Data data)
A wrapper around
setSample for JPython. |
void |
__setitem__(int index,
double data)
A wrapper around
setSample for JPython. |
Data |
adjustSamplingError(Data error,
int error_mode)
return a Field that clones this, except its ErrorEstimate-s
are adjusted for sampling errors in error
|
Data |
binary(Data data,
int op,
MathType new_type,
int sampling_mode,
int error_mode)
return new Field with value 'this op data';
test for various relations between types of this and data
|
Object |
clone()
Clones this instance.
|
static Field |
combine(Field[] fields)
Resample all elements of the fields array to the domain
set of fields[0], then return a Field whose range samples
are Tuples merging the corresponding range samples from
each element of fields; if the range of fields[i] is a
Tuple without a RangeCoordinateSystem, then each Tuple
component of a range sample of fields[i] becomes a
Tuple component of a range sample of the result -
otherwise a range sample of fields[i] becomes a Tuple
component of a range sample of the result; this assumes
all elements of the fields array have the same domain
dimension; use default sampling_mode (Data.NEAREST_NEIGHBOR)
and default error_mode (Data.NO_ERRORS)
|
static Field |
combine(Field[] fields,
boolean flatten)
Resample all elements of the fields array to the domain
set of fields[0], then return a Field whose range samples
are Tuples merging the corresponding range samples from
each element of fields.
|
static Field |
combine(Field[] fields,
int sampling_mode,
int error_mode)
resample all elements of the fields array to the domain
set of fields[0], then return a Field whose range samples
are Tuples merging the corresponding range samples from
each element of fields; if the range of fields[i] is a
Tuple without a RangeCoordinateSystem, then each Tuple
component of a range sample of fields[i] becomes a
Tuple component of a range sample of the result -
otherwise a range sample of fields[i] becomes a Tuple
component of a range sample of the result; this assumes
all elements of the fields array have the same domain
dimension
|
static Field |
combine(Field[] fields,
int sampling_mode,
int error_mode,
boolean flatten)
Resample all elements of the fields array to the domain
set of fields[0], then return a Field whose range samples
are Tuples merging the corresponding range samples from
each element of fields.
|
static Field |
combine(Field[] fields,
int sampling_mode,
int error_mode,
boolean flatten,
boolean copy)
Resample all elements of the fields array to the domain
set of fields[0], then return a Field whose range samples
are Tuples merging the corresponding range samples from
each element of fields.
|
DataShadow |
computeRanges(ShadowType type,
DataShadow shadow)
Recursive version of computeRanges(), called down through
Data object tree.
|
Data |
derivative(int error_mode)
return the tuple of derivatives of this Function with respect to
all RealType components of its domain RealTuple;
propogate errors according to error_mode
|
Data |
derivative(MathType[] derivType_s,
int error_mode)
return the tuple of derivatives of this Function with respect to
all RealType components of its domain RealTuple;
set result MathTypes of tuple components to derivType_s;
propogate errors according to error_mode
|
Data |
derivative(RealTuple location,
RealType[] d_partial_s,
MathType[] derivType_s,
int error_mode)
return the tuple of derivatives of this Function with respect
to the RealTypes in d_partial_s; the RealTypes in d_partial_s
may occur in this Function's domain RealTupleType, or, if the
domain has a CoordinateSystem, in its Reference RealTupleType;
set result MathTypes of tuple components to derivType_s;
propogate errors according to error_mode
|
Function |
derivative(RealType d_partial,
int error_mode)
return the derivative of this Function with respect to d_partial;
d_partial may occur in this Function's domain RealTupleType, or,
if the domain has a CoordinateSystem, in its Reference
RealTupleType; propogate errors according to error_mode
|
Function |
derivative(RealType d_partial,
MathType derivType,
int error_mode)
return the derivative of this Function with respect to d_partial;
set result MathType to derivType; d_partial may occur in this
Function's domain RealTupleType, or, if the domain has a
CoordinateSystem, in its Reference RealTupleType;
propogate errors according to error_mode
|
Enumeration |
domainEnumeration()
Here's how to use this:
for (Enumeration e = field.domainEnumeration() ; e.hasMoreElements(); ) {
RealTuple domain_sample = (RealTuple) e.nextElement();
Data range = field.evaluate(domain_sample);
}
|
Field |
domainFactor(RealType factor)
Factors this instance into a (nested) field-of-fields.
|
Field |
domainFactor(RealType factor,
boolean copy)
Factors this instance into a (nested) field-of-fields.
|
Field |
domainMultiply()
Combine domains of two outermost nested Fields into a single
domain and Field.
|
Field |
domainMultiply(CoordinateSystem resultCS)
Combine domains of two outermost nested Fields into a single
domain and Field.
|
Field |
domainMultiply(int collapse_depth)
Combine domains of
collapse_depth if possible. |
Field |
domainMultiply(int collapse_depth,
CoordinateSystem resultCS)
Combine domains of
collapse_depth if possible. |
boolean |
equals(Object obj) |
Field |
extract(int component)
extract field from this[].component
|
Field |
extract(MathType type)
extract Field from this.component using the MathType
of one of the range componenets
|
Field |
extract(String name)
extract Field from this.component using the name
of one of the range componenets
|
Unit[] |
getDefaultRangeUnits()
get default range Unit-s for 'Flat' components
|
CoordinateSystem |
getDomainCoordinateSystem()
Get the CoordinateSystem associated with the domain RealTuple
|
Set |
getDomainSet()
Returns the domain-set of this instance.
|
Unit[] |
getDomainUnits()
Returns the units of the values in the domain set.
|
float[][] |
getFloats()
invokes getFloats(true)
|
float[][] |
getFloats(boolean copy)
get range values for 'Flat' components in their default range
Units (as defined by the range of this FieldImpl's
FunctionType); the return array is dimensioned
float[number_of_range_components][number_of_range_samples];
copy is ignored for FieldImpl
|
int |
getLength()
get number of samples
|
CoordinateSystem[] |
getRangeCoordinateSystem()
Get range CoordinateSystem for 'RealTuple' range;
second index enumerates samples.
|
CoordinateSystem[] |
getRangeCoordinateSystem(int component)
get range CoordinateSystem for 'RealTuple' components;
second index enumerates samples
|
Unit[][] |
getRangeUnits()
return array of Units associated with each RealType
component of range; these may differ from default
Units of range RealTypes, but must be convertable;
the second index enumerates samples since Units may
differ between samples
|
Data |
getSample(int index)
Get the range value at the index-th sample.
|
Data |
getSample(int index,
boolean metadataOnly)
Get the metadata for the range value at the index-th sample.
|
String[][] |
getStringValues()
get range values for Text components; the return array is dimensioned
double[number_of_range_components][number_of_range_samples]
|
double[][] |
getValues()
invokes getValues(true)
|
double[][] |
getValues(boolean copy)
get range values for 'Flat' components in their default range
Units (as defined by the range of this FieldImpl's
FunctionType); the return array is dimensioned
double[number_of_range_components][number_of_range_samples];
copy is ignored for FieldImpl
|
boolean |
isFlatField()
return true if this a FlatField or a RemoteField adapting a FlatField
|
boolean |
isMissing()
test whether Field value is missing
|
String |
longString(String pre) |
Field |
resample(Set set,
int sampling_mode,
int error_mode)
Resample range values of this Field to domain samples in set either
byt nearest neighbor or multi-linear interpolation.
|
Field |
resampleDouble(Set set,
int sampling_mode,
int error_mode)
Resample range values of this Field to domain samples in set either
byt nearest neighbor or multi-linear interpolation.
|
void |
setSample(int index,
Data range)
Set the range value at the index-th sample; makes a local copy
|
void |
setSample(int index,
Data range,
boolean copy)
Set the range value at the index-th sample
|
void |
setSample(int index,
Data range,
boolean copy,
boolean checkRangeType)
Set the range value at the index-th sample
|
void |
setSample(RealTuple domain,
Data range)
set the range value at the sample nearest to domain
|
void |
setSample(RealTuple domain,
Data range,
boolean copy)
set the range value at the sample nearest to domain
|
void |
setSamples(Data[] range,
boolean copy)
Set the range samples of the function; the order of range samples
must be the same as the order of domain indices in the DomainSet;
copy range objects if copy is true;
|
void |
setSamples(Data[] range,
boolean copy,
boolean checkAllRangeTypes)
Set the range samples of the function; the order of range samples
must be the same as the order of domain indices in the DomainSet;
copy range objects if copy is true;
should use same MathType object in each Data object in range array
|
void |
setSamples(double[][] range)
set range array as range values of this FieldImpl;
this must have a Flat range; the array is dimensioned
float[number_of_range_components][number_of_range_samples];
the order of range values must be the same as the order of domain
indices in the DomainSet
|
void |
setSamples(float[][] range)
set range array as range values of this FieldImpl;
this must have a Flat range; the array is dimensioned
float[number_of_range_components][number_of_range_samples];
the order of range values must be the same as the order of domain
indices in the DomainSet
|
Data |
unary(int op,
MathType new_type,
int sampling_mode,
int error_mode)
return new Field with value 'op this'
|
__getitem__, __getitem__, evaluate, evaluate, evaluate, evaluate, getDomainDimension, resample
__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, asin, asin, asinDegrees, asinDegrees, atan, atan, atan2, atan2, atan2Degrees, atan2Degrees, atanDegrees, atanDegrees, binary, ceil, ceil, changeMathType, computeRanges, computeRanges, cos, cos, cosDegrees, cosDegrees, dataClone, divide, divide, exp, exp, floor, floor, getType, local, log, log, longString, main, 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
addReference, removeReference
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
evaluate, evaluate, evaluate, evaluate, getDomainDimension, resample
abs, abs, acos, acos, acosDegrees, acosDegrees, add, add, asin, asin, asinDegrees, asinDegrees, atan, atan, atan2, atan2, atan2Degrees, atan2Degrees, atanDegrees, atanDegrees, binary, ceil, ceil, changeMathType, computeRanges, computeRanges, cos, cos, cosDegrees, cosDegrees, dataClone, divide, divide, exp, exp, floor, floor, getType, local, log, log, 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
addReference, removeReference
public FieldImpl(FunctionType type) throws VisADException
VisADException
public FieldImpl(FunctionType type, Set set) throws VisADException
type
- The type of function.set
- The set of domain points. Defines the units
and any coordinate system transformation
for the domain of the funciton. May be
null
, in which case the default
domain set (FunctionType.getDomain()
) is
used. May not be FloatSet
or
DoubleSet
. If non-null
,
then must be compatible with the domain of the
FunctionType.CoordinateSystemException
- if the CoordinateSystem
of the
domain set is null
but the
CoordinateSystem
of the domain of
the FunctionType} is not; or if both CoordinateSystem
s are non-null
and do not have the same reference RealTupleType
.VisADException
- if a VisAD failure occurs.protected FieldImpl(FunctionType type, Set set, boolean createRangeArray) throws VisADException
type
- The type of function.set
- The set of domain points. Defines the units
and any coordinate system transformation
for the domain of the funciton. May be
null
, in which case the default
domain set (FunctionType.getDomain()
) is
used. May not be FloatSet
or
DoubleSet
. If non-null
,
then must be compatible with the domain of the
FunctionType.createRangeArray
- If true then the Range array is allocated.CoordinateSystemException
- if the CoordinateSystem
of the
domain set is null
but the
CoordinateSystem
of the domain of
the FunctionType} is not; or if both CoordinateSystem
s are non-null
and do not have the same reference RealTupleType
.VisADException
- if a VisAD failure occurs.public void setSamples(Data[] range, boolean copy) throws VisADException, RemoteException
setSamples
in interface Field
range
- The range valuescopy
- should the range values be copiedVisADException
RemoteException
public void setSamples(Data[] range, boolean copy, boolean checkAllRangeTypes) throws VisADException, RemoteException
range
- The range valuescopy
- should the range values be copiedcheckAllRangeTypes
- If true then ensure that the MathType of
each element in the range matches the type
of this field. If false then only check the
first range element. This is the "trust
the calling method" flag. If you pass in false
and there are elements in the range whose type
does not match the type of this field then
this may result in hard-to-track-down bugs.VisADException
RemoteException
public Set getDomainSet()
Returns the domain-set of this instance. The actual set is returned: it is not a copy or a clone.
Note that it is possible to simultaneously modify the domain-set of
both this instance and of a clone by modifying the values in the array
returned by invoking getSamples(false)
on the domain-set of
either this instance or the clone. Don't do this unless you enjoy
debugging.
getDomainSet
in interface Field
public Unit[] getDomainUnits()
getDomainUnits
in interface Function
getDomainUnits
in class FunctionImpl
public CoordinateSystem getDomainCoordinateSystem()
FunctionImpl
getDomainCoordinateSystem
in interface Function
getDomainCoordinateSystem
in class FunctionImpl
public String[][] getStringValues() throws VisADException, RemoteException
getStringValues
in interface Field
VisADException
RemoteException
public float[][] getFloats() throws VisADException, RemoteException
Field
getFloats
in interface Field
VisADException
RemoteException
public float[][] getFloats(boolean copy) throws VisADException, RemoteException
getFloats
in interface Field
VisADException
RemoteException
public double[][] getValues() throws VisADException, RemoteException
Field
getValues
in interface Field
VisADException
RemoteException
public double[][] getValues(boolean copy) throws VisADException, RemoteException
getValues
in interface Field
VisADException
RemoteException
public void setSamples(double[][] range) throws VisADException, RemoteException
setSamples
in interface Field
VisADException
RemoteException
public void setSamples(float[][] range) throws VisADException, RemoteException
setSamples
in interface Field
VisADException
RemoteException
public Unit[][] getRangeUnits() throws VisADException, RemoteException
getRangeUnits
in interface Field
VisADException
RemoteException
public CoordinateSystem[] getRangeCoordinateSystem() throws VisADException, RemoteException
getRangeCoordinateSystem
in interface Field
VisADException
RemoteException
public CoordinateSystem[] getRangeCoordinateSystem(int component) throws VisADException, RemoteException
getRangeCoordinateSystem
in interface Field
VisADException
RemoteException
public Unit[] getDefaultRangeUnits()
getDefaultRangeUnits
in interface Field
public Data getSample(int index) throws VisADException, RemoteException
Get the range value at the index-th sample. The actual range value is returned -- not a copy.
This implementation uses getSample(int, boolean)
.
getSample
in interface Field
index
- index of requested range sampleVisADException
RemoteException
public Data getSample(int index, boolean metadataOnly) throws VisADException, RemoteException
index
- index of requested range samplemetadataOnly
- true if only the metadata is needed,
false if both metadata and data are
desired.VisADException
RemoteException
public void setSample(RealTuple domain, Data range, boolean copy) throws VisADException, RemoteException
setSample
in interface Field
VisADException
RemoteException
public void setSample(RealTuple domain, Data range) throws VisADException, RemoteException
Field
setSample
in interface Field
VisADException
RemoteException
public void setSample(int index, Data range) throws VisADException, RemoteException
setSample
in interface Field
index
- index in domainrange
- sample at that indexVisADException
RemoteException
public void setSample(int index, Data range, boolean copy) throws VisADException, RemoteException
setSample
in interface Field
index
- index in domainrange
- sample at that indexcopy
- true to make a copyVisADException
RemoteException
public void setSample(int index, Data range, boolean copy, boolean checkRangeType) throws VisADException, RemoteException
index
- index in domainrange
- sample at that indexcopy
- true to make a copycheckRangeType
- setting to false will not check to make
sure that the sample MathType is the same as
this FieldImpl's range. This saves on time
at the expense of accuracy. Use this only
if you like shooting yourself in the foot.VisADException
RemoteException
public boolean isMissing()
public Data binary(Data data, int op, MathType new_type, int sampling_mode, int error_mode) throws VisADException, RemoteException
binary
in interface Data
binary
in class DataImpl
data
- other Data operand for binary operationop
- may be Data.ADD, Data.SUBTRACT, etc; these include all
binary operations defined for Java primitive data typesnew_type
- MathType of the resultsampling_mode
- may be Data.NEAREST_NEIGHBOR or
Data.WEIGHTED_AVERAGEerror_mode
- may be Data.INDEPENDENT, Data.DEPENDENT or
Data.NO_ERRORS;VisADException
- a VisAD error occurredRemoteException
- an RMI error occurredpublic Data unary(int op, MathType new_type, int sampling_mode, int error_mode) throws VisADException, RemoteException
unary
in interface Data
unary
in class DataImpl
op
- may be Data.ABS, Data.ACOS, etc; these include all
unary operations defined for Java primitive data typesnew_type
- MathType of the resultsampling_mode
- may be Data.NEAREST_NEIGHBOR or
Data.WEIGHTED_AVERAGEerror_mode
- may be Data.INDEPENDENT, Data.DEPENDENT or
Data.NO_ERRORS;VisADException
- a VisAD error occurredRemoteException
- an RMI error occurredpublic static Field combine(Field[] fields) throws VisADException, RemoteException
fields
- fields to combineVisADException
RemoteException
public static Field combine(Field[] fields, boolean flatten) throws VisADException, RemoteException
flatten
is true and
if the range of fields[i] is a
Tuple without a RangeCoordinateSystem, then each Tuple
component of a range sample of fields[i] becomes a
Tuple component of a range sample of the result -
otherwise a range sample of fields[i] becomes a Tuple
component of a range sample of the result; this assumes
all elements of the fields array have the same domain
dimension; use default sampling_mode (Data.NEAREST_NEIGHBOR)
and default error_mode (Data.NO_ERRORS)fields
- fields to combineflatten
- true to flatten range tuples with no CoordinateSystemVisADException
RemoteException
public static Field combine(Field[] fields, int sampling_mode, int error_mode) throws VisADException, RemoteException
VisADException
RemoteException
public static Field combine(Field[] fields, int sampling_mode, int error_mode, boolean flatten) throws VisADException, RemoteException
flatten
is true and
if the range of fields[i] is a
Tuple without a RangeCoordinateSystem, then each Tuple
component of a range sample of fields[i] becomes a
Tuple component of a range sample of the result -
otherwise a range sample of fields[i] becomes a Tuple
component of a range sample of the result; this assumes
all elements of the fields array have the same domain
dimension.fields
- fields to combinesampling_mode
- sampling mode to use (e.g., Data.NEAREST_NEIGHBOR)error_mode
- error mode to use (e.g., Data.NO_ERRORS)flatten
- true to flatten range tuples with no CoordinateSystemVisADException
RemoteException
public static Field combine(Field[] fields, int sampling_mode, int error_mode, boolean flatten, boolean copy) throws VisADException, RemoteException
flatten
is true and
if the range of fields[i] is a
Tuple without a RangeCoordinateSystem, then each Tuple
component of a range sample of fields[i] becomes a
Tuple component of a range sample of the result -
otherwise a range sample of fields[i] becomes a Tuple
component of a range sample of the result; this assumes
all elements of the fields array have the same domain
dimension.fields
- fields to combinesampling_mode
- sampling mode to use (e.g., Data.NEAREST_NEIGHBOR)error_mode
- error mode to use (e.g., Data.NO_ERRORS)flatten
- true to flatten range tuples with no CoordinateSystemcopy
- true to copy the values from the original fieldsVisADException
RemoteException
public Field extract(MathType type) throws VisADException, RemoteException
VisADException
RemoteException
public Field extract(String name) throws VisADException, RemoteException
VisADException
RemoteException
public Field extract(int component) throws VisADException, RemoteException
extract
in interface Field
VisADException
RemoteException
public Field domainFactor(RealType factor) throws DomainException, VisADException, RemoteException
domainFactor
in interface Field
factor
- The type of the domain for the outer field.DomainException
- The domain of this instance cannot be factored
as requested.VisADException
- VisAD failure.RemoteException
- Java RMI failure.for copy information
public Field domainFactor(RealType factor, boolean copy) throws DomainException, VisADException, RemoteException
factor
- The type of the domain for the outer field.copy
- true to make copies of the data objectsDomainException
- The domain of this instance cannot be factored
as requested.VisADException
- VisAD failure.RemoteException
- Java RMI failure.public Field domainMultiply() throws VisADException, RemoteException
CoordinateSystem
-s the new domain will have
a CartesianProductCoordinateSystem
of
Set-s CoordinateSystemsdomainMultiply
in interface Field
VisADException
- unable to collapse domainsRemoteException
- unable to collapse domains of remote datapublic Field domainMultiply(CoordinateSystem resultCS) throws VisADException, RemoteException
resultCS
would be used
for the new domainresultCS
- CoordinateSystem to use for the new domain setVisADException
- unable to collapse domainsRemoteException
- unable to collapse domains of remote datapublic Field domainMultiply(int collapse_depth) throws VisADException, RemoteException
collapse_depth
if possible.domainMultiply
in interface Field
collapse_depth
- depth to collapse toVisADException
- unable to collapse domainsRemoteException
- unable to collapse domains of remote datapublic Field domainMultiply(int collapse_depth, CoordinateSystem resultCS) throws VisADException, RemoteException
collapse_depth
if possible.
Use resultCS
as the CoordinateSystem for the new domain.collapse_depth
- depth to collapse toresultCS
- CoordinateSystem to use for the new domain setVisADException
- unable to collapse domainsRemoteException
- unable to collapse domains of remote datapublic Data derivative(RealTuple location, RealType[] d_partial_s, MathType[] derivType_s, int error_mode) throws VisADException, RemoteException
Function
derivative
in interface Function
derivative
in class FunctionImpl
VisADException
RemoteException
public Data derivative(int error_mode) throws VisADException, RemoteException
Function
derivative
in interface Function
derivative
in class FunctionImpl
VisADException
RemoteException
public Data derivative(MathType[] derivType_s, int error_mode) throws VisADException, RemoteException
Function
derivative
in interface Function
derivative
in class FunctionImpl
VisADException
RemoteException
public Function derivative(RealType d_partial, int error_mode) throws VisADException, RemoteException
Function
derivative
in interface Function
derivative
in class FunctionImpl
VisADException
RemoteException
public Function derivative(RealType d_partial, MathType derivType, int error_mode) throws VisADException, RemoteException
Function
derivative
in interface Function
derivative
in class FunctionImpl
VisADException
RemoteException
public Field resample(Set set, int sampling_mode, int error_mode) throws VisADException, RemoteException
resample
in interface Function
resample
in class FunctionImpl
set
- finite sampling values for the function.sampling_mode
- type of interpolation to perform (e.g.,
Data.WEIGHTED_AVERAGE, Data.NEAREST_NEIGHBOR)error_mode
- type of error estimation to perform (e.g.,
Data.INDEPENDENT, Data.DEPENDENT, Data.NO_ERRORS)VisADException
- unable to resample functionRemoteException
- Java RMI exceptionpublic Field resampleDouble(Set set, int sampling_mode, int error_mode) throws VisADException, RemoteException
set
- finite sampling values for the function.sampling_mode
- type of interpolation to perform (e.g.,
Data.WEIGHTED_AVERAGE, Data.NEAREST_NEIGHBOR)error_mode
- type of error estimation to perform (e.g.,
Data.INDEPENDENT, Data.DEPENDENT, Data.NO_ERRORS)VisADException
- unable to resample functionRemoteException
- Java RMI exceptionpublic DataShadow computeRanges(ShadowType type, DataShadow shadow) throws VisADException, RemoteException
Data
computeRanges
in interface Data
type
- ShadowType generated for MathType of thisshadow
- DataShadow instance whose contained double[][]
array and animation sampling Set are modified
according to RealType values in this, and used
as return valueVisADException
- a VisAD error occurredRemoteException
- an RMI error occurredpublic Data adjustSamplingError(Data error, int error_mode) throws VisADException, RemoteException
adjustSamplingError
in interface Data
adjustSamplingError
in class DataImpl
error_mode
- may be Data.INDEPENDENT, Data.DEPENDENT or
Data.NO_ERRORS;VisADException
- a VisAD error occurredRemoteException
- an RMI error occurredpublic boolean isFlatField()
Field
isFlatField
in interface Field
public int __len__() throws VisADException, RemoteException
getLength
for JPython.VisADException
RemoteException
public Data __getitem__(int index) throws VisADException, RemoteException
getSample
for JPython.VisADException
RemoteException
public void __setitem__(int index, Data data) throws VisADException, RemoteException
setSample
for JPython.VisADException
RemoteException
public void __setitem__(int index, double data) throws VisADException, RemoteException
setSample
for JPython.VisADException
RemoteException
public Object clone() throws CloneNotSupportedException
Clones this instance. The MathType
, domain Set
, and
CoordinateSystem
are shallow copied. Each range value, however,
has its clone()
method invoked.
Note that it is possible to simultaneously modify the domain-set of
both this instance and the clone by modifying the values in the array
returned by invoking getSamples(false)
on the domain-set of
either this instance or the clone. Don't do this unless you enjoy
debugging.
clone
in class DataImpl
CloneNotSupportedException
- if cloning isn't supported by a
range-value.public String longString(String pre) throws VisADException, RemoteException
longString
in interface Data
longString
in class DataImpl
pre
- String added to start of each lineVisADException
RemoteException
public Enumeration domainEnumeration() throws VisADException, RemoteException
Here's how to use this: for (Enumeration e = field.domainEnumeration() ; e.hasMoreElements(); ) { RealTuple domain_sample = (RealTuple) e.nextElement(); Data range = field.evaluate(domain_sample); }
domainEnumeration
in interface Field
VisADException
RemoteException
Copyright © 1996–2023 The SSEC Visualization Project. All rights reserved.