
Fast Bspline class 1.0 File ID: 83552 


 Fast Bspline class 1.0 License: Shareware File Size: 10.0 KB Downloads: 60
Submit Rating: 



Fast Bspline class 1.0 Description 

Description: fastBSpline  A fast, lightweight class that implements nonuniform B splines of any order Matlab's spline functions are very general. This generality comes at the price of speed. For largescale applications, including model fitting where some components of the model are defined in terms of splines, such as generalized additive models, a faster solution is desirable. The fastBSpline class implements a lightweight set of Bspline features, including evaluation, differentiation, and parameter fitting. The hard work is done by C code, resulting in up to 10x acceleration for evaluating splines and up to 50x acceleration when evaluating of spline derivatives. Nevertheless, fastBSplines are manipulated using an intuitive, high level objectoriented interface, thus allowing Clevel performance without the messiness. Use CompileMexFiles to compile the required files. If mex files are not available, evaluation will be done in .m code, so you may still use the code if you can't use a compiler for your platform. B splines are defined in terms of basis functions: y(x) = sum_i B_i(x,knots)*weights_i B (the basis) is defined in terms of knots, a nondecreasing sequence of values. Each basis function is a piecewise polynomial of order length(knots)length(weights)1. The most commonly used Bspline is the cubic Bspline. In that case there are 4 more knots than there are weights. Another commonly used Bspline is the linear Bspline, whose basis function are shaped like tents, and whose application results in piecewise linear interpolation. The class offers two static functions to fit the weights of a spline: lsqspline and pspline. It includes facilities for computing the basis B and the derivatives of the spline at all points. Constructor: sp = fastBSpline(knots,weights); Example use: %Fit a noisy measurement with a smoothnesspenalized spline (pspline) x = (0:.5:10)'; y = sin(x*pi*.41.9)+randn(size(x))*.2; knots = [0,0,0,0:.5:10,10,10,10]; %Notice there are as many knots as observations %Because there are so many knots, this is an exact interpolant sp1 = fastBSpline.lsqspline(knots,3,x,y); %Fit penalized on the smoothness of the spline sp2 = fastBSpline.pspline(knots,3,x,y,.7); clf; rg = 2:.005:12; plot(x,y,'o',rg,sp1.evalAt(rg),rg,sp2.evalAt(rg)); legend('measured','interpolant','smoothed'); fastBSpline properties: outOfRange  Determines how the spline is extrapolated outside the range of the knots knots  The knots of the spline (read only) weights  The weights of the spline (read only) fastBSpline Methods: fastBSpline  Construct a B spline from weights at the knots lsqspline  Construct a leastsquares spline from noisy measurements pspline  Construct a smoothnesspenalized spline from noisy measurements evalAt  Evaluate a spline at the given points getBasis  Get the values of the underlying basis at the given points Btimesy  Evaluate the product getBasis(x)'*y dx  Returns another fastBSpline object which computes the derivative of the original spline Disclaimer: fastBSpline is not meant to replace Matlab's spline functions; it does not include any code from the Mathworks 
More Similar Code 

Computes the Hinfinity optimal causal filter (indirect Bspline filter) for the cubic spline.
[INPUT] d: delay
[OUTPUT] psi: the optimal filter psi(z) in a TF object gopt: optimal value
This file is based on the following paper: M. Nagahara and Y. Yamamoto, Hinfinity optimal approxmation for causal spline interpolation, Signal Processing, Vol. 91, No. 2, pp. 176184, 2011.
Bsplines is a natural signal representation for continous signals, where many continousdomain operations can be carried out exactly once the Bspline approximation has been done.
The Bspline estimation procedure in this...
The package comprises of a graphical utility to place uniform Bspline control points and see how the Bspline is redrawn as control points or control point weights are adjusted, and functions to estimate Bsplines with known knot vector, given a...
This toolbox contains all the functions necessary for extraction and registration of medical RTOG images using a cubicBspline free form deformation technique. The optimization routine uses a difference of squares along with smoothness and...
This patch for PHP will allow multiple class inheritance:class A { public $a = 1;}class B { public $b = 2;}class C extends A, B { public $c = 3;}$c = new C() ;echo $c>a; // 1echo $c>b; // 2echo $c>c; // 3
Matlab class that creates an interactive, closed spline which can be used as a region of interest. Can be used to select regions in an image
VVAR uses a preexisting "scratch" file to store variables and can be used to preallocate a huge array much faster than using zeros. On a MacBook Pro with 64 bit MATLAB and 4Gb RAM, creating an 8Gb double array with VVAR was 100x faster...
Usage: [mfRefinedMesh, mnTriangulation] = LoopSubdivisionLimited( mfMeshPoints, mnTriangulation, fMinResolution, vbBoundaryEdges)
This function subdivides surface meshes, using the Loop subdivision algorithm [1]. This algorithm is...
This function "refinepatch" can refine any triangular mesh surface ( patch) with 4split spline interpolation, see screenshot.
Literature: The spline interpolation of the face edges is done by the Opposite Edge Method,...
Single file Delphi database with comprehensive SQL support, strong encryption, BLOBs and multiuser mode support. This BDE alternative is fully compatible with standard and thirdparty database components and reporting engines. Absolute DB does not... 
User Review for Fast Bspline class 
