visad
Class TupleType
- java.lang.Object
-
- visad.MathType
-
- visad.TupleType
-
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- RealTupleType
public class TupleType extends MathType
TupleType is the general VisAD data type for vectors.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description TupleType(MathType[] types)array of component types
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description MathType__getitem__(int index)A wrapper aroundgetComponentfor JPython.int__len__()A wrapper aroundgetComponentsfor JPython.MathTypebinary(MathType type, int op, java.util.Vector names)ShadowTypebuildShadowType(DataDisplayLink link, ShadowType parent)MathTypecloneDerivative(RealType d_partial)booleanequals(java.lang.Object type)ScalarTypes are equal if they have the same name; TupleTypes are equal if their components are equal; FunctionTypes are equal if their domains and ranges are equalbooleanequalsExceptName(MathType type)this is useful for determining compatibility of Data objects for binary mathematical operations; any RealTypes are equal; any TextTypes are equal; TupleTypes are equal if their components are equal; FunctionTypes are equal if their domains and ranges are equalbooleanequalsExceptNameButUnits(MathType type)MathTypegetComponent(int i)return component for i between 0 and getDimension() - 1MathType[]getComponents()get array of componentsintgetDimension()get number of componentsbooleangetFlat()Is this a "flat" tuple?intgetIndex(MathType type)return index of first component with type; if no such component, return -1intgetIndex(java.lang.String name)return index of first RealType component with name; if no such component, return -1intgetNumberOfRealComponents()RealType[]getRealComponents()inthashCode()DatamissingData()returns a missing Data object for any MathTypejava.lang.StringprettyString(int indent)MathTypeunary(int op, java.util.Vector names)-
Methods inherited from class visad.MathType
addTimeAlias, findScalarType, guessMaps, main, prettyString, stringToType, toString
-
-
-
-
Constructor Detail
-
TupleType
public TupleType(MathType[] types) throws VisADException
array of component types- Throws:
VisADException
-
-
Method Detail
-
getDimension
public int getDimension()
get number of components
-
getComponents
public MathType[] getComponents()
get array of components
-
getRealComponents
public RealType[] getRealComponents()
-
getNumberOfRealComponents
public int getNumberOfRealComponents()
-
__getitem__
public MathType __getitem__(int index) throws VisADException
A wrapper aroundgetComponentfor JPython.- Returns:
- The requested Data object.
- Throws:
VisADException
-
__len__
public int __len__()
A wrapper aroundgetComponentsfor JPython.- Returns:
- The number of components of this TupleType
-
getComponent
public MathType getComponent(int i) throws VisADException
return component for i between 0 and getDimension() - 1- Throws:
VisADException
-
getIndex
public int getIndex(java.lang.String name)
return index of first RealType component with name; if no such component, return -1
-
getIndex
public int getIndex(MathType type)
return index of first component with type; if no such component, return -1
-
equals
public boolean equals(java.lang.Object type)
Description copied from class:MathTypeScalarTypes are equal if they have the same name; TupleTypes are equal if their components are equal; FunctionTypes are equal if their domains and ranges are equal
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equalsExceptName
public boolean equalsExceptName(MathType type)
Description copied from class:MathTypethis is useful for determining compatibility of Data objects for binary mathematical operations; any RealTypes are equal; any TextTypes are equal; TupleTypes are equal if their components are equal; FunctionTypes are equal if their domains and ranges are equal- Specified by:
equalsExceptNamein classMathType
-
equalsExceptNameButUnits
public boolean equalsExceptNameButUnits(MathType type)
- Specified by:
equalsExceptNameButUnitsin classMathType
-
cloneDerivative
public MathType cloneDerivative(RealType d_partial) throws VisADException
- Specified by:
cloneDerivativein classMathType- Throws:
VisADException
-
binary
public MathType binary(MathType type, int op, java.util.Vector names) throws VisADException
- Specified by:
binaryin classMathType- Throws:
VisADException
-
unary
public MathType unary(int op, java.util.Vector names) throws VisADException
- Specified by:
unaryin classMathType- Throws:
VisADException
-
getFlat
public boolean getFlat()
Is this a "flat" tuple?- Returns:
- true if all components are RealType or RealTupleType.
-
prettyString
public java.lang.String prettyString(int indent)
- Specified by:
prettyStringin classMathType
-
missingData
public Data missingData()
Description copied from class:MathTypereturns a missing Data object for any MathType- Specified by:
missingDatain classMathType
-
buildShadowType
public ShadowType buildShadowType(DataDisplayLink link, ShadowType parent) throws VisADException, java.rmi.RemoteException
- Specified by:
buildShadowTypein classMathType- Throws:
VisADExceptionjava.rmi.RemoteException
-
-
DMelt 3.0 © DataMelt by jWork.ORG