## visad
Class FunctionImpl

    java.lang.Object
      visad.ThingImpl
          visad.DataImpl
              visad.FunctionImpl

All Implemented Interfaces:
  Cloneable, Data, Function, Serializable, Thing

Direct Known Subclasses:
  FieldImpl

public abstract class FunctionImpl
extends DataImpl
implements Function

FunctionImpl is the abstract superclass for approximate implmentations of mathematical functions. It inherits the Function interface.

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

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
`FunctionImpl(FunctionType type)` Construct a new FunctionImpl with the supplied FunctionType.

Method Summary
`Data` `__getitem__(Real domain)` A wrapper around `evaluate` for JPython.
`Data` `__getitem__(RealTuple domain)` A wrapper around `evaluate` for JPython.
`abstract Data` `derivative(int error_mode)` return the tuple of derivatives of this Function with respect to all RealType components of its domain RealTuple; propogate errors according to error_mode
`abstract Data` `derivative(MathType[] derivType_s, int error_mode)` return the tuple of derivatives of this Function with respect to all RealType components of its domain RealTuple; set result MathTypes of tuple components to derivType_s; propogate errors according to error_mode

`abstract Data`

`derivative(RealTuple location, RealType[] d_partial_s, MathType[] derivType_s, int error_mode)`
return the tuple of derivatives of this Function with respect to the RealTypes in d_partial_s; the RealTypes in d_partial_s may occur in this Function's domain RealTupleType, or, if the domain has a CoordinateSystem, in its Reference RealTupleType; set result MathTypes of tuple components to derivType_s; propogate errors according to error_mode

`abstract Function` `derivative(RealType d_partial, int error_mode)` return the derivative of this Function with respect to d_partial; d_partial may occur in this Function's domain RealTupleType, or, if the domain has a CoordinateSystem, in its Reference RealTupleType; propogate errors according to error_mode
`abstract Function` `derivative(RealType d_partial, MathType derivType, int error_mode)` return the derivative of this Function with respect to d_partial; set result MathType to derivType; d_partial may occur in this Function's domain RealTupleType, or, if the domain has a CoordinateSystem, in its Reference RealTupleType; propogate errors according to error_mode
`Data` `evaluate(Real domain)` Evaluate this Function at domain; use default modes for resampling (Data.WEIGHTED_AVERAGE) and errors (Data.NO_ERRORS)
`Data` `evaluate(Real domain, int sampling_mode, int error_mode)` Evaluate this Function with non-default modes for resampling and errors
`Data` `evaluate(RealTuple domain)` Evaluate this Function at domain; use default modes for resampling (Data.WEIGHTED_AVERAGE) and errors (Data.NO_ERRORS)
`Data` `evaluate(RealTuple domain, int sampling_mode, int error_mode)` Evaluate this Function with non-default modes for resampling and errors
`CoordinateSystem` `getDomainCoordinateSystem()` Get the CoordinateSystem associated with the domain RealTuple
`int` `getDomainDimension()` Get the dimension (number of RealType components) of this Function's domain
`Unit[]` `getDomainUnits()` Get the default Units of the Real components of the domain.
`Field` `resample(Set set)` Return a Field of Function values at the samples in set using default sampling_mode (WEIGHTED_AVERAGE) and error_mode (NO_ERRORS); This combines unit conversions, coordinate transforms, resampling and interpolation
`abstract Field` `resample(Set set, int sampling_mode, int error_mode)` Resample range values of this Function to domain samples in set; return a Field (i.e., a finite sampling of a Function).

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, adjustSamplingError, asin, asin, asinDegrees, asinDegrees, atan, atan, atan2, atan2, atan2Degrees, atan2Degrees, atanDegrees, atanDegrees, binary, binary, ceil, ceil, changeMathType, clone, computeRanges, computeRanges, computeReferenceRanges, cos, cos, cosDegrees, cosDegrees, dataClone, divide, divide, exp, exp, floor, floor, getType, invertOp, local, log, log, longString, longString, main, 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, toString, unary, unary`

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

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

Methods inherited from interface visad.Data

`abs, abs, acos, acos, acosDegrees, acosDegrees, add, add, adjustSamplingError, asin, asin, asinDegrees, asinDegrees, atan, atan, atan2, atan2, atan2Degrees, atan2Degrees, atanDegrees, atanDegrees, binary, binary, ceil, ceil, changeMathType, computeRanges, computeRanges, computeRanges, cos, cos, cosDegrees, cosDegrees, dataClone, divide, divide, exp, exp, floor, floor, getType, isMissing, local, log, log, longString, 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, unary`

Methods inherited from interface visad.Thing
`addReference, removeReference`

Constructor Detail

### FunctionImpl

    public FunctionImpl(FunctionType type)

  Construct a new FunctionImpl with the supplied FunctionType.

Parameters:
  `type` - FunctionType used to define the structure

Method Detail

### getDomainDimension

    public int getDomainDimension()

  Get the dimension (number of RealType components) of this Function's domain

  Specified by:
    `getDomainDimension` in interface `Function`
  Returns:
    number of RealType components (n in R^n space)

### getDomainUnits

    public Unit[] getDomainUnits()

  Get the default Units of the Real components of the domain.

  Specified by:
    `getDomainUnits` in interface `Function`
  Returns:
    array of Unit-s in the same order as the RealTypes in the domain.

### getDomainCoordinateSystem

    public CoordinateSystem getDomainCoordinateSystem()

  Get the CoordinateSystem associated with the domain RealTuple

  Specified by:
    `getDomainCoordinateSystem` in interface `Function`
  Returns:
    CoordinateSystem of the domain

### evaluate

    public Data evaluate(Real domain)
                  throws VisADException,
                         RemoteException

  Evaluate this Function at domain; use default modes for resampling (Data.WEIGHTED_AVERAGE) and errors (Data.NO_ERRORS)

  Specified by:
    `evaluate` in interface `Function`
  Parameters:
    `domain` - value to evaluate at.
  Returns:
    Data object corresponding to the function value at that domain. may return a missing data object of the same type as the Function's range.
  Throws:
    `VisADException` - unable to evaluate function
    `RemoteException` - Java RMI exception

### evaluate

    public Data evaluate(Real domain,
                         int sampling_mode,
                         int error_mode)
                  throws VisADException,
                         RemoteException

  Evaluate this Function with non-default modes for resampling and errors

  Specified by:
    `evaluate` in interface `Function`
  Parameters:
    `domain` - value to evaluate at.
    `sampling_mode` - type of interpolation to perform (e.g., Data.WEIGHTED_AVERAGE, Data.NEAREST_NEIGHBOR)
    `error_mode` - type of error estimation to perform (e.g., Data.INDEPENDENT, Data.DEPENDENT, Data.NO_ERRORS)
  Returns:
    Data object corresponding to the function value at that domain, using the sampling_mode and error_modes specified. May return a missing data object of the same type as the Function's range.
  Throws:
    `VisADException` - unable to evaluate function
    `RemoteException` - Java RMI exception

### evaluate

    public Data evaluate(RealTuple domain)
                  throws VisADException,
                         RemoteException

  Evaluate this Function at domain; use default modes for resampling (Data.WEIGHTED_AVERAGE) and errors (Data.NO_ERRORS)

  Specified by:
    `evaluate` in interface `Function`
  Parameters:
    `domain` - value to evaluate at.
  Returns:
    Data object corresponding to the function value at that domain. may return a missing data object of the same type as the Function's range.
  Throws:
    `VisADException` - unable to evaluate function
    `RemoteException` - Java RMI exception

### evaluate

    public Data evaluate(RealTuple domain,
                         int sampling_mode,
                         int error_mode)
                  throws VisADException,
                         RemoteException

  Evaluate this Function with non-default modes for resampling and errors

  Specified by:
    `evaluate` in interface `Function`
  Parameters:
    `domain` - value to evaluate at.
    `sampling_mode` - type of interpolation to perform (e.g., Data.WEIGHTED_AVERAGE, Data.NEAREST_NEIGHBOR)
    `error_mode` - type of error estimation to perform (e.g., Data.INDEPENDENT, Data.DEPENDENT, Data.NO_ERRORS)
  Returns:
    Data object corresponding to the function value at that domain, using the sampling_mode and error_modes specified. May return a missing data object of the same type as the Function's range.
  Throws:
    `VisADException` - unable to evaluate function
    `RemoteException` - Java RMI exception

### resample

    public Field resample(Set set)
                   throws VisADException,
                          RemoteException

  Return a Field of Function values at the samples in set using default sampling_mode (WEIGHTED_AVERAGE) and error_mode (NO_ERRORS); This combines unit conversions, coordinate transforms, resampling and interpolation

  Specified by:
    `resample` in interface `Function`
  Parameters:
    `set` - finite sampling values for the function.
  Returns:
    Data object corresponding to the function value at that domain. may return a missing data object of the same type as the Function's range.
  Throws:
    `VisADException` - unable to resample function
    `RemoteException` - Java RMI exception

### resample

    public abstract Field resample(Set set,
                                   int sampling_mode,
                                   int error_mode)
                            throws VisADException,
                                   RemoteException

  Resample range values of this Function to domain samples in set; return a Field (i.e., a finite sampling of a Function). Use the specified sampling_mode and error_mode. This combines unit conversions, coordinate transforms, resampling and interpolation

  Specified by:
    `resample` in interface `Function`
  Parameters:
    `set` - finite sampling values for the function.
    `sampling_mode` - type of interpolation to perform (e.g., Data.WEIGHTED_AVERAGE, Data.NEAREST_NEIGHBOR)
    `error_mode` - type of error estimation to perform (e.g., Data.INDEPENDENT, Data.DEPENDENT, Data.NO_ERRORS)
  Returns:
    Data object corresponding to the function value at that domain, using the sampling_mode and error_modes specified. May return a missing data object of the same type as the Function's range.
  Throws:
    `VisADException` - unable to resample function
    `RemoteException` - Java RMI exception

### derivative

    public abstract Data derivative(RealTuple location,
                                    RealType[] d_partial_s,
                                    MathType[] derivType_s,
                                    int error_mode)
                             throws VisADException,
                                    RemoteException

  Description copied from interface: `Function`
  return the tuple of derivatives of this Function with respect to the RealTypes in d_partial_s; the RealTypes in d_partial_s may occur in this Function's domain RealTupleType, or, if the domain has a CoordinateSystem, in its Reference RealTupleType; set result MathTypes of tuple components to derivType_s; propogate errors according to error_mode

  Specified by:
    `derivative` in interface `Function`
  Throws:
    `VisADException`
    `RemoteException`

### derivative

    public abstract Data derivative(int error_mode)
                             throws VisADException,
                                    RemoteException

  Description copied from interface: `Function`
  return the tuple of derivatives of this Function with respect to all RealType components of its domain RealTuple; propogate errors according to error_mode

  Specified by:
    `derivative` in interface `Function`
  Throws:
    `VisADException`
    `RemoteException`

### derivative

    public abstract Data derivative(MathType[] derivType_s,
                                    int error_mode)
                             throws VisADException,
                                    RemoteException

  Description copied from interface: `Function`
  return the tuple of derivatives of this Function with respect to all RealType components of its domain RealTuple; set result MathTypes of tuple components to derivType_s; propogate errors according to error_mode

  Specified by:
    `derivative` in interface `Function`
  Throws:
    `VisADException`
    `RemoteException`

### derivative

    public abstract Function derivative(RealType d_partial,
                                        int error_mode)
                                 throws VisADException,
                                        RemoteException

  Description copied from interface: `Function`
  return the derivative of this Function with respect to d_partial; d_partial may occur in this Function's domain RealTupleType, or, if the domain has a CoordinateSystem, in its Reference RealTupleType; propogate errors according to error_mode

  Specified by:
    `derivative` in interface `Function`
  Throws:
    `VisADException`
    `RemoteException`

### derivative

    public abstract Function derivative(RealType d_partial,
                                        MathType derivType,
                                        int error_mode)
                                 throws VisADException,
                                        RemoteException

  Description copied from interface: `Function`
  return the derivative of this Function with respect to d_partial; set result MathType to derivType; d_partial may occur in this Function's domain RealTupleType, or, if the domain has a CoordinateSystem, in its Reference RealTupleType; propogate errors according to error_mode

  Specified by:
    `derivative` in interface `Function`
  Throws:
    `VisADException`
    `RemoteException`

### __getitem__

    public Data __getitem__(Real domain)
                     throws VisADException,
                            RemoteException

  A wrapper around `evaluate` for JPython.

  Throws:
    `VisADException`
    `RemoteException`

### __getitem__

    public Data __getitem__(RealTuple domain)
                     throws VisADException,
                            RemoteException

  A wrapper around `evaluate` for JPython.

  Throws:
    `VisADException`
    `RemoteException`