cz.muni.fi.xmravec.bc.prodes
Class LinearInterpolator

java.lang.Object
  extended by cz.muni.fi.xmravec.bc.prodes.LinearInterpolator

public class LinearInterpolator
extends java.lang.Object

Linear Interpolar


Constructor Summary
LinearInterpolator(double A, double B, double a, double b)
          Creates a linaer interpolator for given interval
 
Method Summary
 double interpolate(double x)
          Calculates y value for given x value within the interval
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearInterpolator

public LinearInterpolator(double A,
                          double B,
                          double a,
                          double b)
Creates a linaer interpolator for given interval

Parameters:
A - y value - start of the interval
B - y value - end of the interval
a - x value - start of the interval
b - x value - end of the interval
Method Detail

interpolate

public double interpolate(double x)
Calculates y value for given x value within the interval

Parameters:
x - x value within the interval
Returns:
y value