|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metsci.glimpse.util.math.LinearInterpolator
public class LinearInterpolator
Used for piecewise linear interpolation between given 2D points.
Constructor Summary | |
---|---|
LinearInterpolator(java.awt.geom.Point2D[] points)
|
Method Summary | |
---|---|
static LinearInterpolator |
createFromArrays(double[] x,
double[] y)
Arrays should be arranged so that x[k] corresponds to y[k] for all k. |
double |
evaluate(double x)
Returns the interpolated y value for the given x value. |
static LinearInterpolator |
parseLinearInterpolator(java.lang.String function)
Creates a LinearInterpolator from a String
describing the points. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LinearInterpolator(java.awt.geom.Point2D[] points)
points
- the points used in the interpolation. They do NOT have to
be in increasing values of x but must have distinct x
values.Method Detail |
---|
public double evaluate(double x)
public static LinearInterpolator createFromArrays(double[] x, double[] y) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public static LinearInterpolator parseLinearInterpolator(java.lang.String function) throws java.lang.IllegalArgumentException
LinearInterpolator
from a String
describing the points.
function
- a string in the format of "x1,y1;x2,y2;x3,y3;...".
java.lang.IllegalArgumentException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |