org.apache.commons.math3.analysis.interpolation

## Class MicrosphereInterpolator

- java.lang.Object
- - org.apache.commons.math3.analysis.interpolation.MicrosphereInterpolator

- All Implemented Interfaces:
    MultivariateInterpolator

      public class MicrosphereInterpolator
      extends Object
      implements MultivariateInterpolator

  Interpolator that implements the algorithm described in William Dudziak's MS thesis.
  Since:
    2.1
  Version:
    $Id: MicrosphereInterpolator.java 1379904 2012-09-01 23:54:52Z erans $

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFAULT_BRIGHTNESS_EXPONENT` Default exponent used the weights calculation.
    `static int` | `DEFAULT_MICROSPHERE_ELEMENTS` Default number of surface elements that composes the microsphere.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MicrosphereInterpolator()` Create a microsphere interpolator with default settings.
    `MicrosphereInterpolator(int elements, int exponent)` Create a microsphere interpolator.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `MultivariateFunction` | `interpolate(double[][] xval, double[] yval)` Computes an interpolating function for the data set.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_MICROSPHERE_ELEMENTS

          public static final int DEFAULT_MICROSPHERE_ELEMENTS

      Default number of surface elements that composes the microsphere.
      See Also:
        Constant Field Values

    - #### DEFAULT_BRIGHTNESS_EXPONENT

          public static final int DEFAULT_BRIGHTNESS_EXPONENT

      Default exponent used the weights calculation.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### MicrosphereInterpolator

          public MicrosphereInterpolator()

      Create a microsphere interpolator with default settings. Calling this constructor is equivalent to call `MicrosphereInterpolator(MicrosphereInterpolator.DEFAULT_MICROSPHERE_ELEMENTS, MicrosphereInterpolator.DEFAULT_BRIGHTNESS_EXPONENT)`.

    - #### MicrosphereInterpolator

          public MicrosphereInterpolator(int elements,
                                 int exponent)
                                  throws NotPositiveException,
                                         NotStrictlyPositiveException

      Create a microsphere interpolator.
      Parameters:
        `elements` - Number of surface elements of the microsphere.
        `exponent` - Exponent used in the power law that computes the weights (distance dimming factor) of the sample data.
      Throws:
        `NotPositiveException` - if `exponent < 0`.
        `NotStrictlyPositiveException` - if `elements <= 0`.

  - ### Method Detail

    - #### interpolate

          public MultivariateFunction interpolate(double[][] xval,
                                         double[] yval)
                                           throws DimensionMismatchException,
                                                  NoDataException,
                                                  NullArgumentException

      Computes an interpolating function for the data set.
      Specified by:
        `interpolate` in interface `MultivariateInterpolator`
      Parameters:
        `xval` - the arguments for the interpolation points. `xval[i][0]` is the first component of interpolation point `i`, `xval[i][1]` is the second component, and so on until `xval[i][d-1]`, the last component of that interpolation point (where `d` is thus the dimension of the space).
        `yval` - the values for the interpolation points
      Returns:
        a function which interpolates the data set
      Throws:
        `DimensionMismatchException` - when the array dimensions are not consistent.
        `NoDataException` - if an array has zero-length.
        `NullArgumentException` - if the arguments are `null`.

Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.