|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvisad.ThingImpl
visad.DataImpl
visad.Tuple
public class Tuple
Tuple is the general VisAD data class for vectors.
Tuple objects are immutable in the sense that the sequence of Data
objects cannot be modified; Tuple objects are mutable, however, in the
sense that a contained Data object might be mutable (e.g. it might
be a Field with modifiable range values).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class visad.DataImpl |
|---|
DataImpl.Syncher |
| Field Summary | |
|---|---|
static int |
cloneCnt
|
| 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 | |
|---|---|
Tuple(Data[] datums)
Construct a Tuple object from an array of Data objects; this constructs its MathType from the MathTypes of the data array |
|
Tuple(Data[] datums,
boolean copy)
Construct a Tuple object from an array of Data objects; this constructs its MathType from the MathTypes of the data array |
|
Tuple(TupleType type)
Construct a Tuple object with missing value |
|
Tuple(TupleType type,
Data[] datums)
Construct a Tuple object from a type and an array of Data objects |
|
Tuple(TupleType type,
Data[] datums,
boolean copy)
Construct a Tuple object from a type and an array of Data objects |
|
Tuple(TupleType type,
Data[] datums,
boolean copy,
boolean checkType)
Construct a Tuple object from a type and an array of Data objects |
|
| Method Summary | |
|---|---|
Data |
__getitem__(int index)
A wrapper around getComponent for JPython. |
int |
__len__()
A wrapper around getLength for JPython. |
Data |
adjustSamplingError(Data error,
int error_mode)
return a Tuple 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)
Pointwise binary operation between this and data. |
static TupleType |
buildTupleType(Data[] datums)
Make a TupleType for an array of Data |
Object |
clone()
Clones this instance. |
DataShadow |
computeRanges(ShadowType type,
DataShadow shadow)
Recursive version of computeRanges(), called down through Data object tree. |
boolean |
equals(Object obj)
Indicates if this Tuple is identical to an object. |
Data |
getComponent(int i)
Returns a component of this instance. |
Data[] |
getComponents()
Returns the components that constitute this instance. |
Data[] |
getComponents(boolean copy)
Returns the components that constitute this instance. |
int |
getDimension()
Return number of components in this Tuple. |
int |
getLength()
Return the number of components of the Tuple |
Real[] |
getRealComponents()
Get all the Real components from this Tuple. |
int |
hashCode()
Returns the hash code of this object. |
boolean |
isMissing()
Check if there is no Data in this Tuple. |
String |
longString(String pre)
|
static Tuple |
makeTuple(Data[] datums)
Create a Tuple from an array of Data objects. |
Data |
unary(int op,
MathType new_type,
int sampling_mode,
int error_mode)
Pointwise unary operation applied to this. |
| 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, 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 |
| Methods inherited from class visad.ThingImpl |
|---|
addReference, removeReference |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface visad.Data |
|---|
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 |
| Methods inherited from interface visad.Thing |
|---|
addReference, removeReference |
| Field Detail |
|---|
public static int cloneCnt
| Constructor Detail |
|---|
public Tuple(TupleType type)
type - the TupleType
public Tuple(TupleType type,
Data[] datums)
throws VisADException,
RemoteException
type - the TupleTypedatums - the Data components
VisADException
RemoteException
public Tuple(TupleType type,
Data[] datums,
boolean copy)
throws VisADException,
RemoteException
type - the TupleTypedatums - the Data componentscopy - if true, copy the data objects
VisADException
RemoteException
public Tuple(TupleType type,
Data[] datums,
boolean copy,
boolean checkType)
throws VisADException,
RemoteException
type - the TupleTypedatums - the Data componentscopy - if true, copy the data objectscheckType - if true, make sure the type matches the datum types.
VisADException
RemoteException
public Tuple(Data[] datums,
boolean copy)
throws VisADException,
RemoteException
datums - the Data componentscopy - if true, copy the data objects
VisADException
RemoteException
public Tuple(Data[] datums)
throws VisADException,
RemoteException
datums - the Data components
VisADException
RemoteException| Method Detail |
|---|
public static Tuple makeTuple(Data[] datums)
throws VisADException,
RemoteException
VisADException
RemoteException
public static TupleType buildTupleType(Data[] datums)
throws VisADException,
RemoteException
datums - array of Data objects
VisADException
RemoteException
public Real[] getRealComponents()
throws VisADException,
RemoteException
getRealComponents in interface TupleIfaceVisADException
RemoteExceptionpublic final Data[] getComponents()
null is returned. A returned array
may be modified without affecting the behavior of this instance.
null.public Data[] getComponents(boolean copy)
null is returned. IF copy==true a returned array
may be modified without affecting the behavior of this instance. Else, the returned array is the
actual component array
copy - if true then return a copy of the tuple array. Else return the actual array
null.public boolean isMissing()
isMissing in interface DataisMissing in interface TupleIfacepublic int getDimension()
getDimension in interface TupleIface
public Data getComponent(int i)
throws VisADException,
RemoteException
MathType is created that has
no data and is returned. A returned component is the actual component of
this instance and is not a copy or clone.
getComponent in interface TupleIfacei - The zero-based index of the coponent to
return.
i-th component of this
instance.
VisADException - if this instance has no components and
couldn't create one with no data.
RemoteException - if a Java RMI failure occurs.
TypeException - if the index is less than zero or greater than
getDimension()-1.
public Data binary(Data data,
int op,
MathType new_type,
int sampling_mode,
int error_mode)
throws VisADException,
RemoteException
DataImpl
binary in interface Databinary in interface TupleIfacebinary in class DataImpldata - 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 occurred
RemoteException - an RMI error occurred
public Data unary(int op,
MathType new_type,
int sampling_mode,
int error_mode)
throws VisADException,
RemoteException
DataImpl
unary in interface Dataunary in interface TupleIfaceunary in class DataImplop - 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 occurred
RemoteException - an RMI error occurred
public DataShadow computeRanges(ShadowType type,
DataShadow shadow)
throws VisADException,
RemoteException
Data
computeRanges in interface DatacomputeRanges in interface TupleIfacetype - 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 value
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred
public Data adjustSamplingError(Data error,
int error_mode)
throws VisADException,
RemoteException
adjustSamplingError in interface DataadjustSamplingError in interface TupleIfaceadjustSamplingError in class DataImplerror_mode - may be Data.INDEPENDENT, Data.DEPENDENT or
Data.NO_ERRORS;
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred
public Data __getitem__(int index)
throws VisADException,
RemoteException
getComponent for JPython.
VisADException
RemoteExceptionpublic int __len__()
getLength for JPython.
public int getLength()
public Object clone()
throws CloneNotSupportedException
Clones this instance. The clone() method of each
component is invoked.
This implementation throws CloneNotSupportedException if and
only if one of the components throws it.
clone in class DataImplCloneNotSupportedException - if cloning isn't supported.
public String longString(String pre)
throws VisADException,
RemoteException
longString in interface DatalongString in interface TupleIfacelongString in class DataImplpre - String added to start of each line
VisADException
RemoteExceptionpublic boolean equals(Object obj)
equals in class Objectobj - The object.
true if and only if the object is
a Tuple and both Tuple-s have identical component
sequences.public int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||