Documentation of 'visad.RealTuple' Java class
RealTuple
visad

Class RealTuple

    • Constructor Detail

      • RealTuple

        public RealTuple(RealTupleType type)
        construct a RealTuple object with the missing value
        Parameters:
        type - RealTupleType of this RealTuple
      • RealTuple

        public RealTuple(RealTupleType type,
                         Real[] reals,
                         CoordinateSystem coord_sys)
                  throws VisADException,
                         java.rmi.RemoteException
        construct a RealTuple according to an array of Real objects; coordinate_system may be null; otherwise coordinate_system.getReference() must equal type.getCoordinateSystem.getReference()
        Parameters:
        type - RealTupleType of this RealTuple
        reals - array of reals
        coord_sys - CoordinateSystem for this RealTuple
        Throws:
        VisADException
        java.rmi.RemoteException
      • RealTuple

        public RealTuple(RealTupleType type,
                         Real[] reals,
                         CoordinateSystem coord_sys,
                         Unit[] units,
                         boolean checkUnits)
                  throws VisADException,
                         java.rmi.RemoteException
        Construct a RealTuple according to an array of Real objects; coordinate_system may be null; otherwise coordinate_system.getReference() must equal type.getCoordinateSystem.getReference()
        Parameters:
        type - RealTupleType of this RealTuple
        reals - array of reals
        coord_sys - CoordinateSystem for this RealTuple
        units - 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.
        Throws:
        VisADException
        java.rmi.RemoteException
      • RealTuple

        public RealTuple(Real[] reals)
                  throws VisADException,
                         java.rmi.RemoteException
        construct a RealTuple according to an array of Real objects
        Parameters:
        reals - array of reals
        Throws:
        VisADException
        java.rmi.RemoteException
      • RealTuple

        public RealTuple(RealTupleType type,
                         double[] values)
                  throws VisADException,
                         java.rmi.RemoteException
        Construct a RealTuple according to a RealTupleType and a double array
        Parameters:
        type - RealTupleType of this RealTuple
        values - values for each component. Units are the default units of the RealTupleType components.
        Throws:
        VisADException
        java.rmi.RemoteException
    • Method Detail

      • addReference

        public final void addReference(ThingReference listener)
        Adds a listener for changes to this instance. Because instances of this class don't change, this method does nothing.
        Specified by:
        addReference in interface Thing
        Overrides:
        addReference in class ThingImpl
        Parameters:
        listener - The listener for changes.
      • removeReference

        public final void removeReference(ThingReference listener)
        Removes a listener for changes to this instance. Because instances of this class don't change, this method does nothing.
        Specified by:
        removeReference in interface Thing
        Overrides:
        removeReference in class ThingImpl
        Parameters:
        listener - The change listener to be removed.
      • getValues

        public double[] getValues()
        Get the values of the Real components
        Specified by:
        getValues in interface RealTupleIface
        Returns:
        double array of the values of each Real component
      • getTupleUnits

        public Unit[] getTupleUnits()
        get Units of Real components
        Specified by:
        getTupleUnits in interface RealTupleIface
        Returns:
        The units of the components.
      • binary

        public Data binary(Data data,
                           int op,
                           MathType new_type,
                           int sampling_mode,
                           int error_mode)
                    throws VisADException,
                           java.rmi.RemoteException
        Description copied from class: DataImpl
        Pointwise binary operation between this and data. Applies to Reals, Tuples (recursively to components), and to Field ranges (Field domains implicitly resampled if necessary). Does not apply to Field domains or Sets (regarded as domains of Fields wthout ranges). Data.ADD is only op defined for Text, interpreted as concatenate. MathTypes of this and data must match, or one may match the range of the other if it is a FunctionType.
        Specified by:
        binary in interface Data
        Specified by:
        binary in interface TupleIface
        Overrides:
        binary in class Tuple
        Parameters:
        data - other Data operand for binary operation
        op - may be Data.ADD, Data.SUBTRACT, etc; these include all binary operations defined for Java primitive data types
        new_type - MathType of the result
        sampling_mode - may be Data.NEAREST_NEIGHBOR or Data.WEIGHTED_AVERAGE
        error_mode - may be Data.INDEPENDENT, Data.DEPENDENT or Data.NO_ERRORS;
        Returns:
        result, with MathType = new_type
        Throws:
        VisADException - a VisAD error occurred
        java.rmi.RemoteException - an RMI error occurred
      • unary

        public Data unary(int op,
                          MathType new_type,
                          int sampling_mode,
                          int error_mode)
                   throws VisADException,
                          java.rmi.RemoteException
        Description copied from class: DataImpl
        Pointwise unary operation applied to this. Applies to Reals, Tuples (recursively to components), and to Field ranges (Field domains implicitly resampled if necessary). Does not apply to Field domains, Sets (regarded as domains of Fields wthout ranges) or Text.
        Specified by:
        unary in interface Data
        Specified by:
        unary in interface TupleIface
        Overrides:
        unary in class Tuple
        Parameters:
        op - may be Data.ABS, Data.ACOS, etc; these include all unary operations defined for Java primitive data types
        new_type - MathType of the result
        sampling_mode - may be Data.NEAREST_NEIGHBOR or Data.WEIGHTED_AVERAGE
        error_mode - may be Data.INDEPENDENT, Data.DEPENDENT or Data.NO_ERRORS;
        Returns:
        result, with MathType = new_type
        Throws:
        VisADException - a VisAD error occurred
        java.rmi.RemoteException - an RMI error occurred
      • computeRanges

        public DataShadow computeRanges(ShadowType type,
                                        DataShadow shadow)
                                 throws VisADException,
                                        java.rmi.RemoteException
        Description copied from interface: Data
        Recursive version of computeRanges(), called down through Data object tree.
        Specified by:
        computeRanges in interface Data
        Specified by:
        computeRanges in interface TupleIface
        Overrides:
        computeRanges in class Tuple
        Parameters:
        type - ShadowType generated for MathType of this
        shadow - DataShadow instance whose contained double[][] array and animation sampling Set are modified according to RealType values in this, and used as return value
        Returns:
        DataShadow instance containing double[][] array of RealType ranges, and an animation sampling Set
        Throws:
        VisADException - a VisAD error occurred
        java.rmi.RemoteException - an RMI error occurred
      • clone

        public final java.lang.Object clone()
        Clones this instance.
        Specified by:
        clone in interface RealTupleIface
        Overrides:
        clone in class Tuple
        Returns:
        A clone of this instance.
      • toString

        public java.lang.String toString()
        Provide a String representation of this RealTuple.
        Specified by:
        toString in interface RealTupleIface
        Overrides:
        toString in class DataImpl
        Returns:
        a String representation of this
      • longString

        public java.lang.String longString(java.lang.String pre)
                                    throws VisADException,
                                           java.rmi.RemoteException
        Specified by:
        longString in interface Data
        Specified by:
        longString in interface TupleIface
        Overrides:
        longString in class Tuple
        Parameters:
        pre - String added to start of each line
        Returns:
        a longer String than returned by toString(), indented by pre (a string of blanks)
        Throws:
        VisADException
        java.rmi.RemoteException
      • main

        public static void main(java.lang.String[] args)
                         throws VisADException,
                                java.rmi.RemoteException
        run 'java visad.RealTuple' to test the RealTuple class
        Throws:
        VisADException
        java.rmi.RemoteException

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.