public class RealTuple extends Tuple implements RealTupleIface
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
Constructor and Description |
---|
RealTuple(Real[] reals)
construct a RealTuple according to an array of Real objects
|
RealTuple(RealTupleType type)
construct a RealTuple object with the missing value
|
RealTuple(RealTupleType type,
double[] values)
Construct a RealTuple according to a RealTupleType and a double array
|
RealTuple(RealTupleType type,
Real[] reals,
CoordinateSystem coord_sys)
construct a RealTuple according to an array of Real objects;
coordinate_system may be null; otherwise coordinate_system.getReference()
must equal type.getCoordinateSystem.getReference()
|
RealTuple(RealTupleType type,
Real[] reals,
CoordinateSystem coord_sys,
Unit[] units,
boolean checkUnits)
Construct a RealTuple according to an array of Real objects;
coordinate_system may be null; otherwise coordinate_system.getReference()
must equal type.getCoordinateSystem.getReference()
|
Modifier and Type | Method and Description |
---|---|
void |
addReference(ThingReference listener)
Adds a listener for changes to this instance.
|
Data |
binary(Data data,
int op,
MathType new_type,
int sampling_mode,
int error_mode)
Pointwise binary operation between this and data.
|
Object |
clone()
Clones this instance.
|
DataShadow |
computeRanges(ShadowType type,
DataShadow shadow)
Recursive version of computeRanges(), called down through
Data object tree.
|
CoordinateSystem |
getCoordinateSystem()
get CoordinateSystem
|
ErrorEstimate[] |
getErrors()
get ErrorEstimates of Real components
|
Unit[] |
getTupleUnits()
get Units of Real components
|
double[] |
getValues()
Get the values of the Real components
|
String |
longString(String pre) |
static void |
main(String[] args)
run 'java visad.RealTuple' to test the RealTuple class
|
void |
removeReference(ThingReference listener)
Removes a listener for changes to this instance.
|
String |
toString()
Provide a String representation of this RealTuple.
|
Data |
unary(int op,
MathType new_type,
int sampling_mode,
int error_mode)
Pointwise unary operation applied to this.
|
__getitem__, __len__, adjustSamplingError, buildTupleType, equals, getComponent, getComponents, getComponents, getDimension, getLength, getRealComponents, hashCode, isMissing, makeTuple
__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, 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, unary
finalize, getClass, notify, notifyAll, wait, wait, wait
adjustSamplingError, getComponent, getDimension, getRealComponents, isMissing
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
public RealTuple(RealTupleType type)
type
- RealTupleType of this RealTuplepublic RealTuple(RealTupleType type, Real[] reals, CoordinateSystem coord_sys) throws VisADException, RemoteException
type
- RealTupleType of this RealTuplereals
- array of realscoord_sys
- CoordinateSystem for this RealTupleVisADException
RemoteException
public RealTuple(RealTupleType type, Real[] reals, CoordinateSystem coord_sys, Unit[] units, boolean checkUnits) throws VisADException, RemoteException
type
- RealTupleType of this RealTuplereals
- array of realscoord_sys
- CoordinateSystem for this RealTupleunits
- array of Units corresponding to the array of Reals.checkUnits
- true to make sure the units of the Reals are convertible
with the RealType units. NB: setting this to false
can cause problems if the units are not convertible.
Only do this if you know what you are doing.VisADException
RemoteException
public RealTuple(Real[] reals) throws VisADException, RemoteException
reals
- array of realsVisADException
RemoteException
public RealTuple(RealTupleType type, double[] values) throws VisADException, RemoteException
type
- RealTupleType of this RealTuplevalues
- values for each component. Units are the default units
of the RealTupleType components.VisADException
RemoteException
public final void addReference(ThingReference listener)
addReference
in interface Thing
addReference
in class ThingImpl
listener
- The listener for changes.public final void removeReference(ThingReference listener)
removeReference
in interface Thing
removeReference
in class ThingImpl
listener
- The change listener to be removed.public double[] getValues()
getValues
in interface RealTupleIface
public Unit[] getTupleUnits()
getTupleUnits
in interface RealTupleIface
public ErrorEstimate[] getErrors() throws VisADException, RemoteException
getErrors
in interface RealTupleIface
VisADException
- VisAD failure.RemoteException
- Java RMI failure.public CoordinateSystem getCoordinateSystem()
getCoordinateSystem
in interface RealTupleIface
null
.public Data binary(Data data, int op, MathType new_type, int sampling_mode, int error_mode) throws VisADException, RemoteException
DataImpl
binary
in interface Data
binary
in interface TupleIface
binary
in class Tuple
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
DataImpl
unary
in interface Data
unary
in interface TupleIface
unary
in class Tuple
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 DataShadow computeRanges(ShadowType type, DataShadow shadow) throws VisADException, RemoteException
Data
computeRanges
in interface Data
computeRanges
in interface TupleIface
computeRanges
in class Tuple
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 final Object clone()
clone
in interface RealTupleIface
clone
in class Tuple
public String toString()
toString
in interface RealTupleIface
toString
in class DataImpl
public String longString(String pre) throws VisADException, RemoteException
longString
in interface Data
longString
in interface TupleIface
longString
in class Tuple
pre
- String added to start of each lineVisADException
RemoteException
public static void main(String[] args) throws VisADException, RemoteException
VisADException
RemoteException
Copyright © 1996–2023 The SSEC Visualization Project. All rights reserved.