org.jcurl.math
Class CSplineInterpolator

Package class diagram package CSplineInterpolator
java.lang.Object
  extended by org.jcurl.math.R1RNFunctionImpl
      extended by org.jcurl.math.R1R1Function
          extended by org.jcurl.math.CSplineInterpolator
All Implemented Interfaces:
Serializable, R1RNFunction

public class CSplineInterpolator
extends R1R1Function

The numerical algorithms are adapted from "Meyberg/Vachenauer": Hoehere Mathematik I, second edition. Could this be based on CurveCombinedwith 3-dimensional polynomes?

Version:
$Id: CSplineInterpolator.java 1031 2009-07-23 15:06:05Z mro $
Author:
M. Rohrmoser
See Also:
Serialized Form

Constructor Summary
CSplineInterpolator()
          Create a new spline interpolator with an initial capacity of 100 points.
CSplineInterpolator(int capacity)
          Create a new spline interpolator with the given initial capacity.
 
Method Summary
 void add(double x, double y)
          Add a point and discard the splines.
 double at(double x, int C)
          Convenience wrapper.
 double getMaxX()
           
 double getMinX()
           
 void reset()
          Discard the buffered points and splines.
 
Methods inherited from class org.jcurl.math.R1R1Function
at, at
 
Methods inherited from class org.jcurl.math.R1RNFunctionImpl
at, at, dim
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSplineInterpolator

public CSplineInterpolator()
Create a new spline interpolator with an initial capacity of 100 points.

See Also:
CSplineInterpolator(int)

CSplineInterpolator

public CSplineInterpolator(int capacity)
Create a new spline interpolator with the given initial capacity.

Parameters:
capacity -
Method Detail

add

public void add(double x,
                double y)
Add a point and discard the splines. The x-values must be strictly monotonous ascending - which is not checked for the moment. Reallocates the point buffer if necessary.

Parameters:
x -
y -

at

public double at(double x,
                 int C)
Convenience wrapper.

Specified by:
at in class R1R1Function
Parameters:
x - location
C - n'th derivative (0=value,1=incline,2=acceleration)
Returns:
value ot the n'th derivative
See Also:
R1R1Function.at(double, int, int)

getMaxX

public double getMaxX()

getMinX

public double getMinX()

reset

public void reset()
Discard the buffered points and splines.



Copyright © 2005-2009 jcurl.org. All Rights Reserved.