This documentation is also online here:
There is no documentation (as yet) on any of the mathematical details of the implementation. Refer to the Ooyama article, and there may be some notes in the source.
The HTML documentation is generated from the source files by Doxygen (http://www.doxygen.org). Thanks to Dimitri for a great tool.
This release builds against GCC 4.0. Names in the BSplineBase template base class needed to be declared in the BSpline subclass scope, now that GCC enforces the standard rule about non-template-type-dependent names being resolved when templates are declared.
The driver program now takes an optional third command-line argument for setting the boundary condition type.
There is an R script for generating plots of several combinations of the cutoff and boundary condition options to the driver program. See Samples for details.
This release updates the code to compile with GCC 3.2, which enforces more standards compliance like the use of 'typename'. Also the GNU libstdc++ no longer uses pointers as vector iterators, so occurences of vector<>::begin() have been replaced with &(vector[0])
Lastly, in this release the C++ filename extension has been changed from cxx to cpp.
Each file is a simple text format with two columns. The first column is time, the second is the field measurement. This is the format which the example driver program expects. Any text file with alternating X and Y values will work in the driver program.
To run the driver program, pipe the data into the standard input, and pass the step, cutoff, and boundary-condition options on the command line.
BSpline interface version: $Id: README,v 1.8 2005/05/31 19:21:25 granger Exp $ BSpline implementation version: $Id: README,v 1.8 2005/05/31 19:21:25 granger Exp $ Usage: ./driver <step> <cutoff> [<bc>] <step> is the number of points to skip in the input. <cutoff> is the cutoff wavelength. <bc> is the boundary condition--0, 1, or 2--meaning zero the 0th, 1st, or 2nd derivative at the end points.
For example:
./driver 1 5 2 < sample.temps
The driver produces two output files:
The R (http://www.r-project.org) script runs the driver program on the sample temperatures over a range of boundary conditions and cutoff frequencies. The results are plotted in 6 PNG images.
| Cutoff | BC 0 | BC 1 | BC 2 |
|---|---|---|---|
| 5 | plot-1.png | plot-2.png | plot-3.png |
| 30 | plot-4.png | plot-5.png | plot-6.png |
Note that for boundary condition 0, the endpoints are not at zero as might be expected. The spline algorithm first removes the mean from the input data to improve the matrix calculations, and the mean is added back in when evaluating the spline at any point. Thus the endpoints for boundary condition 0 will actually be the mean value of the input range. If you need to force the endpoints to be zero, remove the mean from the data before computing the spline, or else change the source code for computing the spline.
This work was done for meteorological research at the University Corporation for Atmospheric Research (http://www.ucar.edu/). There is no warranty of any kind. Please see the COPYRIGHT file.
The distribution contains two parts. The b-spline code itself is contained in the lib/ directory, while the top directory only contains a test driver program. There are MS VC++ projects and/or workspaces for both, but they may not be current. On UNIX, running make in the top directory builds only the driver program by including the template implementation directly. Run make in the lib directory to build a library with float and double instantiations of the BSpline templates.
To install the code into an include directory, all of the *.cxx and *.h files in lib/ must be copied into the include directory.
1.4.2