edu.stanford.rsl.konrad.utils
Class LinearInterpolatingDoubleArray

java.lang.Object
  extended by edu.stanford.rsl.konrad.utils.LinearInterpolatingDoubleArray

public class LinearInterpolatingDoubleArray
extends java.lang.Object

Class to perform linear interpolation along an arbitrary mesh given the function values at each mesh point.

Author:
akmaier

Constructor Summary
LinearInterpolatingDoubleArray()
           
LinearInterpolatingDoubleArray(double[] mesh, double[] values)
          Constructs the interpolating Array.
 
Method Summary
 double[] getMesh()
           
 double getValue(double meshPoint)
          Interpolated the value at meshPoint from the given array.
 double[] getValues()
           
 void setMap(double[] mesh, double[] values)
           
 int size()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearInterpolatingDoubleArray

public LinearInterpolatingDoubleArray()

LinearInterpolatingDoubleArray

public LinearInterpolatingDoubleArray(double[] mesh,
                                      double[] values)
Constructs the interpolating Array. Requires two double arrays.

Parameters:
mesh - the mesh with the gridding of the values
values - the values at each mesh point.
Method Detail

getValues

public double[] getValues()

getMesh

public double[] getMesh()

getValue

public double getValue(double meshPoint)
Interpolated the value at meshPoint from the given array.

Parameters:
meshPoint - the value to interpolate at
Returns:
the interpolated value

size

public int size()

setMap

public void setMap(double[] mesh,
                   double[] values)