## visad
Class DoubleTuple

    java.lang.Object
      visad.ThingImpl
          visad.DataImpl
              visad.Tuple
                  visad.RealTuple
                      visad.DoubleTuple

All Implemented Interfaces:
  Cloneable, Data, RealTupleIface, Serializable, Thing, TupleIface

public class DoubleTuple
extends RealTuple

This provides a LoCal RealTuple that can hold numeric values without taking the hit that having lots and lots of Real objects around.

See Also:
  Serialized Form

Nested Class Summary

Nested classes inherited from class visad.DataImpl
`DataImpl.Syncher`

Nested classes inherited from class visad.ThingImpl
`ThingImpl.RemotePair`

Field Summary
`(package private) Data[]` `components` Holds the components as we create them
`(package private) double[]` `doubles` The numeric values
`(package private) RealTupleType` `tt` The tuple type
`(package private) Unit[]` `units` The units for the numeric values

Fields inherited from class visad.Tuple
`tupleComponents`

Fields inherited from class visad.DataImpl
`Type`

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
`DoubleTuple(double[] doubles)` Construct a new DoubleTuple of generic values
`DoubleTuple(RealTupleType type, double[] doubles)` Construct a new DoubleTuple
`DoubleTuple(RealTupleType type, double[] doubles, Unit[] units)` Construct a new DoubleTuple

Method Summary
`boolean` `equals(Object obj)` Indicates if this Tuple is identical to an object.
`Data` `getComponent(int i)` Get the i'th component.
`Data[]` `getComponents()` Create, if needed, and return the component array.
`Unit[]` `getTupleUnits()` Get Units of Real components
`double[]` `getValues()` Get the values of the Real components
`int` `hashCode()` Returns the hash code of this object.
`static void` `main(String[] args)` run 'java visad.DoubleTuple' to test the RealTuple class

Methods inherited from class visad.RealTuple
`addReference, binary, clone, computeRanges, getCoordinateSystem, getErrors, longString, removeReference, toString, unary`

Methods inherited from class visad.Tuple
`__getitem__, __len__, adjustSamplingError, buildTupleType, checkTupleType, getDimension, getLength, getRealComponents, isMissing, makeTuple`

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, computeReferenceRanges, cos, cos, cosDegrees, cosDegrees, dataClone, divide, divide, exp, exp, floor, floor, getType, invertOp, local, log, log, longString, max, max, min, min, multiply, multiply, negate, negate, notifyReferences, pow, pow, remainder, remainder, rint, rint, round, round, setParent, sin, sin, sinDegrees, sinDegrees, sqrt, sqrt, subtract, subtract, tan, tan, tanDegrees, tanDegrees, unary`

Methods inherited from class visad.ThingImpl
`adaptedAddReference, adaptedRemoveReference`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface visad.TupleIface
`adjustSamplingError, getDimension, getRealComponents, isMissing`

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`

Field Detail

### doubles

    double[] doubles

  The numeric values

### tt

    RealTupleType tt

  The tuple type

### units

    Unit[] units

  The units for the numeric values

### components

    Data[] components

  Holds the components as we create them

Constructor Detail

### DoubleTuple

    public DoubleTuple(double[] doubles)
                throws VisADException

  Construct a new DoubleTuple of generic values

Parameters:
  `doubles` - the values
Throws:
  `VisADException` - problem creating MathType

### DoubleTuple

    public DoubleTuple(RealTupleType type,
                       double[] doubles)

  Construct a new DoubleTuple

Parameters:
  `type` - The type
  `doubles` - The reals

### DoubleTuple

    public DoubleTuple(RealTupleType type,
                       double[] doubles,
                       Unit[] units)

  Construct a new DoubleTuple

Parameters:
  `type` - The type
  `doubles` - The reals
  `units` - The units for the reals (may be null)

Method Detail

### getComponent

    public Data getComponent(int i)
                      throws VisADException,
                             RemoteException

  Get the i'th component. This creates it if needed and stores it in the components array

  Specified by:
    `getComponent` in interface `TupleIface`
  Overrides:
    `getComponent` in class `Tuple`
  Parameters:
    `i` - Which one
  Returns:
    The component
  Throws:
    `RemoteException` - On badness
    `VisADException` - On badness

### getComponents

    public Data[] getComponents()

  Create, if needed, and return the component array.

  Overrides:
    `getComponents` in class `Tuple`
  Returns:
    components

### getTupleUnits

    public Unit[] getTupleUnits()

  Get Units of Real components

  Specified by:
    `getTupleUnits` in interface `RealTupleIface`
  Overrides:
    `getTupleUnits` in class `RealTuple`
  Returns:
    the units of the components

### getValues

    public double[] getValues()

  Get the values of the Real components

  Specified by:
    `getValues` in interface `RealTupleIface`
  Overrides:
    `getValues` in class `RealTuple`
  Returns:
    double array of the values of each Real component

### equals

    public boolean equals(Object obj)

  Indicates if this Tuple is identical to an object.

  Overrides:
    `equals` in class `Tuple`
  Parameters:
    `obj` - The object.
  Returns:
    `true` if and only if the object is a Tuple and both Tuple-s have identical component sequences.

### hashCode

    public int hashCode()

  Returns the hash code of this object.

  Overrides:
    `hashCode` in class `Tuple`
  Returns:
    The hash code of this object.

### main

    public static void main(String[] args)
                     throws VisADException,
                            RemoteException

  run 'java visad.DoubleTuple' to test the RealTuple class

  Parameters:
    `args` - ignored
  Throws:
    `RemoteException` - Java RMI problem
    `VisADException` - Unable to create the VisAD objects