Splines

Provides a demonstration of using different types of splines available in JDSP

Akima Spline

Image
                    
AkimaSpline aks = new AkimaSpline();
aks.computeFunction(this.x, this.y);
double[] xnew = UtilMethods.linspace(0.0, 10.0, 201, true);
double[] result = aks.getValue(xnew);
                    
                  

B-Spline

B-Spline of Order 4

B-Spline of Order 5

Image
Image
                    
CubicSpline cbs = new B-Spline(4);
cbs.computeFunction(this.x, this.y);
double[] xnew = UtilMethods.linspace(0.0, 10.0, 201, true);
double[] result = cbs.getValue(xnew);
                    
                  
                    
CubicSpline cbs = new BSpline(5);
cbs.computeFunction(this.x, this.y);
double[] xnew = UtilMethods.linspace(0.0, 10.0, 201, true);
double[] result = cbs.getValue(xnew);
                    
                  

Cubic Spline

Image
                    
CubicSpline cbs = new CubicSpline();
cbs.computeFunction(this.x, this.y);
double[] xnew = UtilMethods.linspace(0.0, 10.0, 201, true);
double[] result = cbs.getValue(xnew);
                    
                  

Quadratic Spline

Image
                    
QuadraticSpline qbs = new QuadraticSpline();
qbs.computeFunction(this.x, this.y);
double[] xnew = UtilMethods.linspace(0.0, 10.0, 201, true);
double[] result = qbs.getValue(xnew);