edu.stanford.rsl.konrad.utils
Class LinearInterpolatingDoubleArray
java.lang.Object
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
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 |
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 valuesvalues
- the values at each mesh point.
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)