diff -rc2P -x *.info -x *.info-* gsl-1.5/BUGS gsl-1.6/BUGS *** gsl-1.5/BUGS Fri Jun 18 16:21:21 2004 --- gsl-1.6/BUGS Mon Dec 27 19:18:37 2004 *************** *** 6,10 **** From: keith.briggs@bt.com - To: gsl-discuss@sources.redhat.com Subject: gsl_sf_hyperg_2F1 bug report Date: Thu, 31 Jan 2002 12:30:04 -0000 --- 6,9 ---- *************** *** 52,119 **** ---------------------------------------------------------------------- - - BUG#5 -- broken error terms for implicit odes - - The error terms for the implicit ode integrators are broken. They - have 'FIXME' entries still in the code. Only the bsimp error term is - implemented. - - ---------------------------------------------------------------------- - - BUG#8 -- inexact coefficients in rk8pd.c - - From: Luc Maisonobe - To: gsl-discuss@sources.redhat.com - Subject: further thoughts about Dormand-Prince 8 (RK8PD) - Date: Wed, 14 Aug 2002 10:50:49 +0200 - - I was looking for some references concerning Runge-Kutta methods when I - noticed GSL had an high order one. I also found a question in the list - archive (April 2002) about the references of this method which is - implemented in rk8pd.c. It was said the coefficients were taken from the - "Numerical Algorithms with C" book by Engeln-Mullges and Uhlig. - - I have checked the coefficients somewhat with a little java tool I have - developped (see http://www.spaceroots.org/archive.htm#RKCheckSoftware) - and found they were not exact. I think this method is really the method - that is already in rksuite (http://www.netlib.org/ode/rksuite/) were the - coefficients are given as real values with 30 decimal digits. The - coefficients have probably been approximated as fractions later on. - However, these approximations are not perfect, they are good only for - the first 16 or 18 digits depending on the coefficient. - - This has no consequence for practical purposes since they are stored in - double variables, but give a false impression of beeing exact - expressions. Well, there are even some coefficients that should really - be rational numbers but for which wrong numerators and denominators are - given. As an example, the first and fourth elements of the b7 array are - given as 29443841.0 / 614563906.0 and 77736538.0 / 692538347, hence the - sum off all elements of the b7 array (which should theoretically be - equal to ah[5]) only approximate this. For these two coefficients, this - could have been avoided using 215595617.0 / 4500000000.0 and - 202047683.0 / 1800000000.0, which also looks more coherent with the - other coefficients. - - The rksuite comments say this method is described in this paper : - - High Order Embedded Runge-Kutta Formulae - P.J. Prince and J.R. Dormand - J. Comp. Appl. Math.,7, pp. 67-75, 1981 - - It also says the method is an 8(7) method (i.e. the coefficients set - used to advance integration is order 8 and error estimation is order 7). - If I use my tool to check the order, I am forced to check the order - conditions numerically with a tolerance since I do not have an exact - expression of the coefficients. Since even if some conditions are not - mathematically met, the residuals are small and could be below the - tolerance. There are tolerance values for which such numerical test - dedeuce the method is of order 9, as is said in GSL. However, I am not - convinced, there are to few parameters for the large number of order - conditions needed at order 9. - - I would suggest to correct the coefficients in rk8pd.c (just put the - literal constants of rksuite) and to add the reference to the article. - - ---------------------------------------------------------------------- BUG#10 -- gsl_sf_fermi_dirac_int error estimates --- 51,54 ---- *************** *** 161,173 **** ---------------------------------------------------------------------- - BUG#17 -- ode failures - - When an ODE function returns an error code the higher level ode - functions should recover transparently and not modify the state, so - that the step can be retried cleanly with a different value of h. - Currently the solver may partially modify the state, if the error - occurs in the middle of an RK step calculation for example. - - ---------------------------------------------------------------------- BUG#18 -- R250 discrepancy, and initialisation in R250 / GSFR4 --- 96,99 ---- *************** *** 221,224 **** --- 147,244 ---- Reported by "Kevin M. Huffenberger" ---------------------------------------------------------------------- + BUG#22 - test suite fails with djgpp + + Andris Pavenis reports that the test suite fails + on DOS with djgpp due to missing $(EXEEXT) extensions on the + executables in TESTS. This is an automake problem, but can be worked + around by adding the extensions $(EXEEXT) manually to each executable + in the TEST= lines in */Makefile.am. He supplied a patch to do this. + ---------------------------------------------------------------------- + BUG#26 - underflow in gsl_sf_legendre_sphPlm_array + + there is a potential underflow in legendre_poly.c in the lines + + lnpre = -0.25*M_LNPI + 0.5 * (lnpoch.val + m*lncirc.val); + y_mm = sqrt((2.0+1.0/m)/(4.0*M_PI)) * sgn * exp(lnpre); + + for large negative values of lnpre. + + #include + #include + #include + + int main (void) { + int lmax=2000, l=1997, m=796; + double Xlm[2005]; + double cx = 0.921; + int status = gsl_sf_legendre_sphPlm_array(lmax,m,cx,Xlm); + double v = Xlm[l-m]; + printf("cx= %.5e l=%d m=%d Plm=%.18e status=%d\n",cx,l,m,v, status); + } + + ---------------------------------------------------------------------- + BUG#27 - handling of zero leading coefficients in poly/*solve routines + The poly/solve_ and poly/zsolve_ routines should handle the case of + leading coefficients being zero more gracefully. Currently the + leading coefficient is assumed to be non-zero. + ---------------------------------------------------------------------- + BUG#28 - underflow for small parameters in gsl_ran_gamma + + The function gsl_ran_gamma does not handle the case of small + parameters well, a<<1, returning 0 (probably via underflow). + + #include + #include + #include + + int main() { + gsl_rng *rng; + double x; + gsl_rng_env_setup(); + rng = gsl_rng_alloc (gsl_rng_default); + x = gsl_ran_gamma(rng, 1e-3, 1.0); + printf("%.18e\n", x); + } + ---------------------------------------------------------------------- + BUG#29 - missing documentation for gsl_sf_legendre_Pl_deriv_array etc + + There is no documentation for the _deriv_ functions in + specfunc/legendre_poly.c. They are tested and part of the public API + so they should be documented. + + ---------------------------------------------------------------------- + BUG#30 - incorrect result from gsl_sf_elljac_e + + The function gsl_sf_elljac_e returns an incorrect result in the first + case below, due propagated inaccuracies from cancellation error. The + correct result should be dn(3K)=sqrt(2) but the returned result is + 1.0. + + #include + #include + #include + #include + #include + + int main (void) + { + double m = 0.5; + double phi = M_PI_2; + double sn; + double cn; + double dn1,dn2; + double K; + int ignore; + + K = gsl_sf_ellint_F(M_PI_2,sqrt(m), GSL_PREC_DOUBLE); + ignore = gsl_sf_elljac_e(3*K, m, &sn, &cn, &dn1); + ignore = gsl_sf_elljac_e(3*K+0.00000001, m, &sn, &cn, &dn2); + + printf("%.18e\n", dn1); + printf("%.18e\n", dn2); + return 0; + } + + ---------------------------------------------------------------------- diff -rc2P -x *.info -x *.info-* gsl-1.5/ChangeLog gsl-1.6/ChangeLog *** gsl-1.5/ChangeLog Sun Jun 6 16:45:17 2004 --- gsl-1.6/ChangeLog Fri Nov 12 17:19:34 2004 *************** *** 1,2 **** --- 1,16 ---- + 2004-10-26 Brian Gough + + * test_gsl_histogram.sh: trim \r from test output for + compatibility with Cygwin. + + 2004-07-29 Brian Gough + + * modified all makefiles to use TESTS=$(check_programs) + to get correct EXEEXT behavior + + 2004-07-23 Brian Gough + + * added wavelet/ directory + 2004-05-28 Brian Gough diff -rc2P -x *.info -x *.info-* gsl-1.5/INSTALL gsl-1.6/INSTALL *** gsl-1.5/INSTALL Fri Jun 18 16:16:18 2004 --- gsl-1.6/INSTALL Mon Dec 27 19:18:37 2004 *************** *** 38,42 **** If you run "make check" and get some failures, please see the notes on platform specific problems below. If you find failures that are not ! mentioned, please report them. The library can be installed using the command, --- 38,42 ---- If you run "make check" and get some failures, please see the notes on platform specific problems below. If you find failures that are not ! mentioned, please report them to bug-gsl@gnu.org. The library can be installed using the command, *************** *** 71,79 **** 2) With gcc-2.95/2.96 the tests fail in the eigen/ directory. This is due to a compiler optimization bug which causes errors in the ! manipulation of complex numbers. Do not use the library if you ! encounter this problem. ! This is fixed in more recent versions of gcc. Compiling without ! optimisation will work around the bug. 3) Attempts to run 'strip' on the static library libgsl.a will probably --- 71,78 ---- 2) With gcc-2.95/2.96 the tests fail in the eigen/ directory. This is due to a compiler optimization bug which causes errors in the ! manipulation of complex numbers. ! This is fixed in more recent versions of gcc. Do not use the library ! if you encounter this problem---install a newer version of gcc. 3) Attempts to run 'strip' on the static library libgsl.a will probably *************** *** 209,218 **** =========================== ! GSL should compile with GCC under Cygwin or MinGW+MSYS on Microsoft ! Windows. ! ! There are some scripts for converting makefiles into Microsoft Visual ! C++ project files in the msvc/ directory of the CVS repository on ! sources.redhat.com. Hints for OpenBSD --- 208,213 ---- =========================== ! GSL should compile cleanly with GCC under Cygwin or MinGW+MSYS on ! Microsoft Windows. Hints for OpenBSD *************** *** 236,252 **** ================= ! F J Frankin reported on the gsl-discuss ! mailing list that some early versions of GCC-2.95 have a problem with ! long argument lists on PPC architecture, and this prevents GSL from ! compiling correctly (e.g. the test program in the blas directory gives ! a segmentation fault when run). This problem is fixed in recent ! versions of GCC. Hints for Solaris ================= ! Some warnings about "end of loop code not reached". These can be ! ignored -- they come from the do { ... ; return ; } while(0) statement ! in the GSL_ERROR macro. ------------------------------ --- 231,249 ---- ================= ! F J Frankin reported that some early ! versions of GCC-2.95 have a problem with long argument lists on PPC ! architecture, and this prevents GSL from compiling correctly (e.g. the ! test program in the blas directory gives a segmentation fault when ! run). This problem is fixed in more recent versions of GCC. Hints for Solaris ================= ! If you are using the Sun compilers then the library should be compiled ! with the Sun C compiler 'cc', not the Sun C++ compiler 'CC'. ! ! There may be some warnings about "end of loop code not reached". These ! can be ignored -- they come from the do { ... ; return ; } while(0) ! statement in the GSL_ERROR macro. ------------------------------ diff -rc2P -x *.info -x *.info-* gsl-1.5/Makefile.am gsl-1.6/Makefile.am *** gsl-1.5/Makefile.am Sat Mar 20 23:07:20 2004 --- gsl-1.6/Makefile.am Fri Dec 24 13:54:21 2004 *************** *** 3,9 **** # AUTOMAKE_OPTIONS = readme-alpha ! SUBDIRS = gsl utils sys test err const complex cheb block vector matrix permutation combination sort ieee-utils cblas blas linalg eigen specfunc dht qrng rng randist fft poly fit multifit statistics siman sum integration interpolation histogram ode-initval roots multiroots min multimin monte ntuple diff deriv cdf doc ! SUBLIBS = block/libgslblock.la blas/libgslblas.la complex/libgslcomplex.la cheb/libgslcheb.la dht/libgsldht.la diff/libgsldiff.la deriv/libgslderiv.la eigen/libgsleigen.la err/libgslerr.la fft/libgslfft.la fit/libgslfit.la histogram/libgslhistogram.la ieee-utils/libgslieeeutils.la integration/libgslintegration.la interpolation/libgslinterpolation.la linalg/libgsllinalg.la matrix/libgslmatrix.la min/libgslmin.la monte/libgslmonte.la multifit/libgslmultifit.la multimin/libgslmultimin.la multiroots/libgslmultiroots.la ntuple/libgslntuple.la ode-initval/libgslodeiv.la permutation/libgslpermutation.la combination/libgslcombination.la poly/libgslpoly.la qrng/libgslqrng.la randist/libgslrandist.la rng/libgslrng.la roots/libgslroots.la siman/libgslsiman.la sort/libgslsort.la specfunc/libgslspecfunc.la statistics/libgslstatistics.la sum/libgslsum.la sys/libgslsys.la test/libgsltest.la utils/libutils.la vector/libgslvector.la cdf/libgslcdf.la pkginclude_HEADERS = gsl_math.h gsl_pow_int.h gsl_nan.h gsl_machine.h gsl_mode.h gsl_precision.h gsl_types.h gsl_version.h --- 3,9 ---- # AUTOMAKE_OPTIONS = readme-alpha ! SUBDIRS = gsl utils sys test err const complex cheb block vector matrix permutation combination sort ieee-utils cblas blas linalg eigen specfunc dht qrng rng randist fft poly fit multifit statistics siman sum integration interpolation histogram ode-initval roots multiroots min multimin monte ntuple diff deriv cdf wavelet doc ! SUBLIBS = block/libgslblock.la blas/libgslblas.la complex/libgslcomplex.la cheb/libgslcheb.la dht/libgsldht.la diff/libgsldiff.la deriv/libgslderiv.la eigen/libgsleigen.la err/libgslerr.la fft/libgslfft.la fit/libgslfit.la histogram/libgslhistogram.la ieee-utils/libgslieeeutils.la integration/libgslintegration.la interpolation/libgslinterpolation.la linalg/libgsllinalg.la matrix/libgslmatrix.la min/libgslmin.la monte/libgslmonte.la multifit/libgslmultifit.la multimin/libgslmultimin.la multiroots/libgslmultiroots.la ntuple/libgslntuple.la ode-initval/libgslodeiv.la permutation/libgslpermutation.la combination/libgslcombination.la poly/libgslpoly.la qrng/libgslqrng.la randist/libgslrandist.la rng/libgslrng.la roots/libgslroots.la siman/libgslsiman.la sort/libgslsort.la specfunc/libgslspecfunc.la statistics/libgslstatistics.la sum/libgslsum.la sys/libgslsys.la test/libgsltest.la utils/libutils.la vector/libgslvector.la cdf/libgslcdf.la wavelet/libgslwavelet.la pkginclude_HEADERS = gsl_math.h gsl_pow_int.h gsl_nan.h gsl_machine.h gsl_mode.h gsl_precision.h gsl_types.h gsl_version.h *************** *** 14,18 **** pkgconfig_DATA= gsl.pc ! EXTRA_DIST = autogen.sh gsl-config.in gsl.pc.in configure.ac THANKS BUGS gsl.spec.in gsl.m4 test_gsl_histogram.sh lib_LTLIBRARIES = libgsl.la --- 14,18 ---- pkgconfig_DATA= gsl.pc ! EXTRA_DIST = autogen.sh gsl-config.in gsl.pc.in configure.ac THANKS BUGS SUPPORT gsl.spec.in gsl.m4 test_gsl_histogram.sh lib_LTLIBRARIES = libgsl.la diff -rc2P -x *.info -x *.info-* gsl-1.5/Makefile.in gsl-1.6/Makefile.in *** gsl-1.5/Makefile.in Thu Jun 24 11:49:35 2004 --- gsl-1.6/Makefile.in Fri Dec 31 15:15:19 2004 *************** *** 144,150 **** target_alias = @target_alias@ ! SUBDIRS = gsl utils sys test err const complex cheb block vector matrix permutation combination sort ieee-utils cblas blas linalg eigen specfunc dht qrng rng randist fft poly fit multifit statistics siman sum integration interpolation histogram ode-initval roots multiroots min multimin monte ntuple diff deriv cdf doc ! SUBLIBS = block/libgslblock.la blas/libgslblas.la complex/libgslcomplex.la cheb/libgslcheb.la dht/libgsldht.la diff/libgsldiff.la deriv/libgslderiv.la eigen/libgsleigen.la err/libgslerr.la fft/libgslfft.la fit/libgslfit.la histogram/libgslhistogram.la ieee-utils/libgslieeeutils.la integration/libgslintegration.la interpolation/libgslinterpolation.la linalg/libgsllinalg.la matrix/libgslmatrix.la min/libgslmin.la monte/libgslmonte.la multifit/libgslmultifit.la multimin/libgslmultimin.la multiroots/libgslmultiroots.la ntuple/libgslntuple.la ode-initval/libgslodeiv.la permutation/libgslpermutation.la combination/libgslcombination.la poly/libgslpoly.la qrng/libgslqrng.la randist/libgslrandist.la rng/libgslrng.la roots/libgslroots.la siman/libgslsiman.la sort/libgslsort.la specfunc/libgslspecfunc.la statistics/libgslstatistics.la sum/libgslsum.la sys/libgslsys.la test/libgsltest.la utils/libutils.la vector/libgslvector.la cdf/libgslcdf.la pkginclude_HEADERS = gsl_math.h gsl_pow_int.h gsl_nan.h gsl_machine.h gsl_mode.h gsl_precision.h gsl_types.h gsl_version.h --- 144,150 ---- target_alias = @target_alias@ ! SUBDIRS = gsl utils sys test err const complex cheb block vector matrix permutation combination sort ieee-utils cblas blas linalg eigen specfunc dht qrng rng randist fft poly fit multifit statistics siman sum integration interpolation histogram ode-initval roots multiroots min multimin monte ntuple diff deriv cdf wavelet doc ! SUBLIBS = block/libgslblock.la blas/libgslblas.la complex/libgslcomplex.la cheb/libgslcheb.la dht/libgsldht.la diff/libgsldiff.la deriv/libgslderiv.la eigen/libgsleigen.la err/libgslerr.la fft/libgslfft.la fit/libgslfit.la histogram/libgslhistogram.la ieee-utils/libgslieeeutils.la integration/libgslintegration.la interpolation/libgslinterpolation.la linalg/libgsllinalg.la matrix/libgslmatrix.la min/libgslmin.la monte/libgslmonte.la multifit/libgslmultifit.la multimin/libgslmultimin.la multiroots/libgslmultiroots.la ntuple/libgslntuple.la ode-initval/libgslodeiv.la permutation/libgslpermutation.la combination/libgslcombination.la poly/libgslpoly.la qrng/libgslqrng.la randist/libgslrandist.la rng/libgslrng.la roots/libgslroots.la siman/libgslsiman.la sort/libgslsort.la specfunc/libgslspecfunc.la statistics/libgslstatistics.la sum/libgslsum.la sys/libgslsys.la test/libgsltest.la utils/libutils.la vector/libgslvector.la cdf/libgslcdf.la wavelet/libgslwavelet.la pkginclude_HEADERS = gsl_math.h gsl_pow_int.h gsl_nan.h gsl_machine.h gsl_mode.h gsl_precision.h gsl_types.h gsl_version.h *************** *** 155,159 **** pkgconfig_DATA = gsl.pc ! EXTRA_DIST = autogen.sh gsl-config.in gsl.pc.in configure.ac THANKS BUGS gsl.spec.in gsl.m4 test_gsl_histogram.sh lib_LTLIBRARIES = libgsl.la --- 155,159 ---- pkgconfig_DATA = gsl.pc ! EXTRA_DIST = autogen.sh gsl-config.in gsl.pc.in configure.ac THANKS BUGS SUPPORT gsl.spec.in gsl.m4 test_gsl_histogram.sh lib_LTLIBRARIES = libgsl.la *************** *** 199,203 **** specfunc/libgslspecfunc.la statistics/libgslstatistics.la \ sum/libgslsum.la sys/libgslsys.la test/libgsltest.la \ ! utils/libutils.la vector/libgslvector.la cdf/libgslcdf.la am_libgsl_la_OBJECTS = version.lo libgsl_la_OBJECTS = $(am_libgsl_la_OBJECTS) --- 199,204 ---- specfunc/libgslspecfunc.la statistics/libgslstatistics.la \ sum/libgslsum.la sys/libgslsys.la test/libgsltest.la \ ! utils/libutils.la vector/libgslvector.la cdf/libgslcdf.la \ ! wavelet/libgslwavelet.la am_libgsl_la_OBJECTS = version.lo libgsl_la_OBJECTS = $(am_libgsl_la_OBJECTS) diff -rc2P -x *.info -x *.info-* gsl-1.5/NEWS gsl-1.6/NEWS *** gsl-1.5/NEWS Fri Jun 18 16:17:18 2004 --- gsl-1.6/NEWS Mon Dec 27 17:33:55 2004 *************** *** 1,3 **** ! * What is new in gsl-1.5: ** Multifit routines now handle iterations where |f| is already --- 1,62 ---- ! * What is new in gsl-1.6: ! ! ** Added a new wavelet directory, with 1-dimensional and 2-dimensional ! discrete wavelet transforms. ! ! ** Added support for LQ and P^T LQ decompositions. To find the QR ! decomposition of large systems (M>>N) use the LQ decomposition, ! solving the transpose of the original system. This allows more ! efficient memory access, and is useful for solving large least-squares ! problems. ! ! ** Fixed a bug in the SYRK and HERK blas functions gsl_blas_{s,d,c,z}syrk ! and gsl_blas_{c,z}herk which caused invalid memory access for non-square ! matrices. ! ! ** Fixed a bug in gsl_swap_vectors which caused it to return incorrect ! results when swapping vectors with different strides. ! ! ** Corrected the error estimate for gsl_cheb_eval_n_err to use ! evaluation order instead of the approximation order. ! ! ** Improved the reliability of the gsl_sf_gamma_inc family of ! functions. ! ! ** Equal abscissae are now handled gracefully in the cspline and ! periodic cspline interpolations. ! ! ** Removed potential cancellation error in calculation of uniform ! histogram ranges. ! ! ** Improved numerical stability of integration for akima and cspline ! interpolation. ! ! ** Differential equation solvers now handle error codes returned from ! user-defined functions. ! ! ** Improved error estimates in ode-initval solvers, and provide exact ! derivatives on output. Added new semi-implicit ode-initval solver, ! gsl_odeiv_step_rk2simp. ! ! ** Added missing function definition for gsl_sf_psi_1. ! ! ** Fixed the function gsl_sf_expint_Ei_scaled to call ! gsl_sf_expint_Ei_scaled_e instead of gsl_sf_expint_Ei_e. ! ! ** Added cumulative distribution function for exponential power ! distribution. ! ! ** The functions gsl_cdf_beta_P and gsl_cdf_beta_Q now return ! consistent results of 0 or 1 for out of range values, x<0 and x>1, ! rather than 0 for left and right tails simultaneously. ! ! ** The Jacobi eigensolvers gsl_eigen_jacobi and gsl_eigen_jacobi_invert ! have new implementations from Golub and Van Loan. ! ! ** The standard output and standard error streams are now flushed by ! the default error handler before the program aborts, in order to ! ensure that error messages are properly displayed on some platforms. ! ! * What was new in gsl-1.5: ** Multifit routines now handle iterations where |f| is already diff -rc2P -x *.info -x *.info-* gsl-1.5/SUPPORT gsl-1.6/SUPPORT *** gsl-1.5/SUPPORT Thu Jan 1 01:00:00 1970 --- gsl-1.6/SUPPORT Fri Dec 24 13:54:21 2004 *************** *** 0 **** --- 1,24 ---- + Commercial support for GNU software is available from companies listed + in the GNU Service Directory at http://www.gnu.org/prep/service.html + + The following companies specifically mention the GNU Scientific Library: + + ---------------------------------------------------------------------- + Network Theory Ltd + 15 Royal Park + Bristol + United Kingdom + Tel: +44 117 3179309 + Fax: +44 117 9048108 + http://www.network-theory.co.uk/gsl/ + + We provide software maintenance contracts for commercial users of the + GNU Scientific Library. + + We can also provide general numerical consulting for all types of + scientific and quantitative applications. + + Rate: $1495/year (950 ukp) for base maintenance contract. + + Updated: 2004-04-26 + ---------------------------------------------------------------------- diff -rc2P -x *.info -x *.info-* gsl-1.5/THANKS gsl-1.6/THANKS *** gsl-1.5/THANKS Fri Jun 18 16:26:57 2004 --- gsl-1.6/THANKS Fri Dec 31 14:33:15 2004 *************** *** 1,2 **** --- 1,5 ---- + * Jim McElwaine for very useful comments and discussions + about the dilogarithm and related functions. + * Simone Piccardi for extensions to the histogram routines, and providing the ntuple code *************** *** 261,265 **** * Giulio Bottazzi documentation bug reports ! * Olaf Lenz rng frwite/fread * Jamie Lokier for testing --- 264,268 ---- * Giulio Bottazzi documentation bug reports ! * Olaf Lenz rng frwite/fread, bug reports * Jamie Lokier for testing *************** *** 296,297 **** --- 299,336 ---- * Rémi Butel fixes for multimin overflow conditions + + * Andris Pavenis Makefile fix for EXEEXT + + * Daniel Webb bug report for potential cspline + division by zero + + * Ewald Stamp bugfix for vector/swap_source.c + + * Joerg Wensch LQ decompositions + + * Jason Stover patch for cdf/beta.c + + * Ralph Menikoff bug report for gsl_sf_expint_scaled + + * Yoshiki documentation bug report + + * Nigel Lowry documentation proofreading + + * Giulio Bottazzi cdf for exponential power + distribution, bug reports + + * Tuomo Keskitalo many improvements to ode-initval + + * Britton Kerin documentation bug reports + + * Patricio Rojo patch for numerical + instability in interpolation integrate function + + * Damir Herman improved accuracy of + histogram range calculations + + * John Salmon bug report for gsl_cheb_eval_n_err + + * Dirk Eddelbuettel for bug reports and testing, and + maintaining the Debian package for GSL. + diff -rc2P -x *.info -x *.info-* gsl-1.5/TODO gsl-1.6/TODO *** gsl-1.5/TODO Tue Aug 12 12:13:45 2003 --- gsl-1.6/TODO Mon Dec 27 19:18:37 2004 *************** *** 6,17 **** requirements. - * Fix error terms in implicit ODE solvers rk2imp, rk4imp, gear1, gear2. - - * Generate the examples in the manual directly from example .c - files (these will also make a nice 'quick check' of programs - that can be compiled against the installed library) - - * PyGSL -- python bindings for GSL, see http://pygsl.sf.net/ - * 1st-line support on the mailing lists (e.g. checking that bugs are reproducible, and that all relevant information is supplied) --- 6,9 ---- *************** *** 35,40 **** * Complex Bessel Functions - * Incomplete gamma functions 6.5.2 or 6.5.3 in Abramowitz & Stegun - * Additional volunteers with access to a good library to get copies of papers for other developers. --- 27,30 ---- *************** *** 99,102 **** --- 89,94 ---- gsl_roots_fsolver_brent) + * PyGSL -- python bindings for GSL, see http://pygsl.sf.net/ + Wishlist or vague ideas ======================= *************** *** 120,127 **** Devroye's book on Random Variates (1st ed) is/was in the public ! domain. The troff source has been lost, unfortunately, but he says we ! could scan it in if anyone would like to do that. It is 800 pages so a ! spare copy of the book that could have the binding removed would be ! needed, plus a scanner with an Automatic Document Feeder. * Investigate complex support in GCC: Operations like sin(z) silently --- 112,117 ---- Devroye's book on Random Variates (1st ed) is/was in the public ! domain. ! * Investigate complex support in GCC: Operations like sin(z) silently diff -rc2P -x *.info -x *.info-* gsl-1.5/autogen.sh gsl-1.6/autogen.sh *** gsl-1.5/autogen.sh Wed Jul 17 19:19:48 2002 --- gsl-1.6/autogen.sh Sat Sep 11 15:00:51 2004 *************** *** 8,9 **** --- 8,10 ---- automake --add-missing --gnu autoconf + echo "Now use ./configure --enable-maintainer-mode" diff -rc2P -x *.info -x *.info-* gsl-1.5/blas/ChangeLog gsl-1.6/blas/ChangeLog *** gsl-1.5/blas/ChangeLog Mon Mar 18 19:39:49 2002 --- gsl-1.6/blas/ChangeLog Fri Dec 24 13:56:16 2004 *************** *** 1,2 **** --- 1,12 ---- + 2004-12-21 Brian Gough + + * blas.c (gsl_blas_ssyrk): corrected K to be A->size2 instead of + A->size1 + (gsl_blas_dsyrk): as above + (gsl_blas_csyrk): as above + (gsl_blas_zsyrk): as above + (gsl_blas_cherk): as above + (gsl_blas_zherk): as above + Mon Mar 18 19:39:34 2002 Brian Gough diff -rc2P -x *.info -x *.info-* gsl-1.5/blas/TODO gsl-1.6/blas/TODO *** gsl-1.5/blas/TODO Mon Apr 16 11:01:28 2001 --- gsl-1.6/blas/TODO Fri Dec 24 13:54:21 2004 *************** *** 1,3 **** --- 1,5 ---- + * We need a test suite for this directory! + * Verify that we support the full CBLAS interface and that the GSL CBLAS library can be used standalone diff -rc2P -x *.info -x *.info-* gsl-1.5/blas/blas.c gsl-1.6/blas/blas.c *** gsl-1.5/blas/blas.c Fri Jul 25 16:18:07 2003 --- gsl-1.6/blas/blas.c Fri Dec 24 13:54:21 2004 *************** *** 1628,1632 **** const size_t M = C->size1; const size_t N = C->size2; ! const size_t K = (Trans == CblasNoTrans) ? A->size1 : A->size2; if (M != N) --- 1628,1632 ---- const size_t M = C->size1; const size_t N = C->size2; ! const size_t K = (Trans == CblasNoTrans) ? A->size2 : A->size1; if (M != N) *************** *** 1651,1655 **** const size_t M = C->size1; const size_t N = C->size2; ! const size_t K = (Trans == CblasNoTrans) ? A->size1 : A->size2; if (M != N) --- 1651,1655 ---- const size_t M = C->size1; const size_t N = C->size2; ! const size_t K = (Trans == CblasNoTrans) ? A->size2 : A->size1; if (M != N) *************** *** 1677,1681 **** const size_t M = C->size1; const size_t N = C->size2; ! const size_t MA = (Trans == CblasNoTrans) ? A->size1 : A->size2; if (M != N) --- 1677,1681 ---- const size_t M = C->size1; const size_t N = C->size2; ! const size_t K = (Trans == CblasNoTrans) ? A->size2 : A->size1; if (M != N) *************** *** 1683,1692 **** GSL_ERROR ("matrix C must be square", GSL_ENOTSQR); } ! else if (N != MA) { GSL_ERROR ("invalid length", GSL_EBADLEN); } ! cblas_csyrk (CblasRowMajor, Uplo, Trans, INT (N), INT (MA), GSL_COMPLEX_P (&alpha), A->data, INT (A->tda), GSL_COMPLEX_P (&beta), C->data, INT (C->tda)); --- 1683,1692 ---- GSL_ERROR ("matrix C must be square", GSL_ENOTSQR); } ! else if (N != K) { GSL_ERROR ("invalid length", GSL_EBADLEN); } ! cblas_csyrk (CblasRowMajor, Uplo, Trans, INT (N), INT (K), GSL_COMPLEX_P (&alpha), A->data, INT (A->tda), GSL_COMPLEX_P (&beta), C->data, INT (C->tda)); *************** *** 1702,1706 **** const size_t M = C->size1; const size_t N = C->size2; ! const size_t K = (Trans == CblasNoTrans) ? A->size1 : A->size2; if (M != N) --- 1702,1706 ---- const size_t M = C->size1; const size_t N = C->size2; ! const size_t K = (Trans == CblasNoTrans) ? A->size2 : A->size1; if (M != N) *************** *** 1728,1732 **** const size_t M = C->size1; const size_t N = C->size2; ! const size_t K = (Trans == CblasNoTrans) ? A->size1 : A->size2; if (M != N) --- 1728,1732 ---- const size_t M = C->size1; const size_t N = C->size2; ! const size_t K = (Trans == CblasNoTrans) ? A->size2 : A->size1; if (M != N) *************** *** 1752,1756 **** const size_t M = C->size1; const size_t N = C->size2; ! const size_t K = (Trans == CblasNoTrans) ? A->size1 : A->size2; if (M != N) --- 1752,1756 ---- const size_t M = C->size1; const size_t N = C->size2; ! const size_t K = (Trans == CblasNoTrans) ? A->size2 : A->size1; if (M != N) diff -rc2P -x *.info -x *.info-* gsl-1.5/block/Makefile.am gsl-1.6/block/Makefile.am *** gsl-1.5/block/Makefile.am Sun Jul 27 10:49:48 2003 --- gsl-1.6/block/Makefile.am Sat Sep 11 14:45:08 2004 *************** *** 7,11 **** INCLUDES= -I$(top_builddir) -I$(top_srcdir) ! TESTS = test test_LDADD = libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la --- 7,11 ---- INCLUDES= -I$(top_builddir) -I$(top_srcdir) ! TESTS = $(check_PROGRAMS) test_LDADD = libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la diff -rc2P -x *.info -x *.info-* gsl-1.5/block/Makefile.in gsl-1.6/block/Makefile.in *** gsl-1.5/block/Makefile.in Thu Jun 24 11:49:36 2004 --- gsl-1.6/block/Makefile.in Fri Dec 31 15:15:20 2004 *************** *** 149,153 **** INCLUDES = -I$(top_builddir) -I$(top_srcdir) ! TESTS = test test_LDADD = libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la --- 149,153 ---- INCLUDES = -I$(top_builddir) -I$(top_srcdir) ! TESTS = $(check_PROGRAMS) test_LDADD = libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la diff -rc2P -x *.info -x *.info-* gsl-1.5/cblas/Makefile.am gsl-1.6/cblas/Makefile.am *** gsl-1.5/cblas/Makefile.am Sun Jul 27 10:49:48 2003 --- gsl-1.6/cblas/Makefile.am Sat Sep 11 14:45:09 2004 *************** *** 11,15 **** check_PROGRAMS = test ! TESTS = test test_LDADD = libgslcblas.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la --- 11,15 ---- check_PROGRAMS = test ! TESTS = $(check_PROGRAMS) test_LDADD = libgslcblas.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la diff -rc2P -x *.info -x *.info-* gsl-1.5/cblas/Makefile.in gsl-1.6/cblas/Makefile.in *** gsl-1.5/cblas/Makefile.in Thu Jun 24 11:49:37 2004 --- gsl-1.6/cblas/Makefile.in Fri Dec 31 15:15:21 2004 *************** *** 153,157 **** check_PROGRAMS = test ! TESTS = test test_LDADD = libgslcblas.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la --- 153,157 ---- check_PROGRAMS = test ! TESTS = $(check_PROGRAMS) test_LDADD = libgslcblas.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la diff -rc2P -x *.info -x *.info-* gsl-1.5/cblas/TODO gsl-1.6/cblas/TODO *** gsl-1.5/cblas/TODO Fri Jul 19 20:42:39 2002 --- gsl-1.6/cblas/TODO Mon Oct 11 15:29:11 2004 *************** *** 2,5 **** --- 2,8 ---- make sure double/float are replaced by BASE everywhere + well... not _everywhere_; internal accumulations should + be done in double always; there's no reason not too, + it's safer and maybe even faster [GJ] gbmv_c : use conj*imag instead of having branches form Trans & ConjTrans diff -rc2P -x *.info -x *.info-* gsl-1.5/cdf/ChangeLog gsl-1.6/cdf/ChangeLog *** gsl-1.5/cdf/ChangeLog Wed Aug 27 11:41:03 2003 --- gsl-1.6/cdf/ChangeLog Fri Nov 12 17:17:25 2004 *************** *** 1,2 **** --- 1,11 ---- + 2004-10-26 Brian Gough + + * exppow.c: added exppow distribution + + 2004-10-01 Brian Gough + + * beta.c (gsl_cdf_beta_P, gsl_cdf_beta_P): return consistent + results for out of range values. + 2003-08-27 Brian Gough diff -rc2P -x *.info -x *.info-* gsl-1.5/cdf/Makefile.am gsl-1.6/cdf/Makefile.am *** gsl-1.5/cdf/Makefile.am Wed Aug 13 09:34:22 2003 --- gsl-1.6/cdf/Makefile.am Fri Nov 12 17:17:25 2004 *************** *** 6,14 **** INCLUDES= -I$(top_builddir) ! libgslcdf_la_SOURCES = beta.c cauchy.c cauchyinv.c chisq.c chisqinv.c exponential.c exponentialinv.c fdist.c flat.c flatinv.c gamma.c gammainv.c gauss.c gaussinv.c gumbel1.c gumbel1inv.c gumbel2.c gumbel2inv.c laplace.c laplaceinv.c logistic.c logisticinv.c lognormal.c lognormalinv.c pareto.c paretoinv.c rayleigh.c rayleighinv.c tdist.c tdistinv.c weibull.c weibullinv.c noinst_HEADERS = beta_inc.c rat_eval.h test_auto.c ! TESTS = test check_PROGRAMS = test --- 6,14 ---- INCLUDES= -I$(top_builddir) ! libgslcdf_la_SOURCES = beta.c cauchy.c cauchyinv.c chisq.c chisqinv.c exponential.c exponentialinv.c exppow.c fdist.c flat.c flatinv.c gamma.c gammainv.c gauss.c gaussinv.c gumbel1.c gumbel1inv.c gumbel2.c gumbel2inv.c laplace.c laplaceinv.c logistic.c logisticinv.c lognormal.c lognormalinv.c pareto.c paretoinv.c rayleigh.c rayleighinv.c tdist.c tdistinv.c weibull.c weibullinv.c noinst_HEADERS = beta_inc.c rat_eval.h test_auto.c ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/cdf/Makefile.in gsl-1.6/cdf/Makefile.in *** gsl-1.5/cdf/Makefile.in Thu Jun 24 11:49:38 2004 --- gsl-1.6/cdf/Makefile.in Fri Dec 31 15:15:22 2004 *************** *** 147,155 **** INCLUDES = -I$(top_builddir) ! libgslcdf_la_SOURCES = beta.c cauchy.c cauchyinv.c chisq.c chisqinv.c exponential.c exponentialinv.c fdist.c flat.c flatinv.c gamma.c gammainv.c gauss.c gaussinv.c gumbel1.c gumbel1inv.c gumbel2.c gumbel2inv.c laplace.c laplaceinv.c logistic.c logisticinv.c lognormal.c lognormalinv.c pareto.c paretoinv.c rayleigh.c rayleighinv.c tdist.c tdistinv.c weibull.c weibullinv.c noinst_HEADERS = beta_inc.c rat_eval.h test_auto.c ! TESTS = test check_PROGRAMS = test --- 147,155 ---- INCLUDES = -I$(top_builddir) ! libgslcdf_la_SOURCES = beta.c cauchy.c cauchyinv.c chisq.c chisqinv.c exponential.c exponentialinv.c exppow.c fdist.c flat.c flatinv.c gamma.c gammainv.c gauss.c gaussinv.c gumbel1.c gumbel1inv.c gumbel2.c gumbel2inv.c laplace.c laplaceinv.c logistic.c logisticinv.c lognormal.c lognormalinv.c pareto.c paretoinv.c rayleigh.c rayleighinv.c tdist.c tdistinv.c weibull.c weibullinv.c noinst_HEADERS = beta_inc.c rat_eval.h test_auto.c ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test *************** *** 167,176 **** libgslcdf_la_LIBADD = am_libgslcdf_la_OBJECTS = beta.lo cauchy.lo cauchyinv.lo chisq.lo \ ! chisqinv.lo exponential.lo exponentialinv.lo fdist.lo flat.lo \ ! flatinv.lo gamma.lo gammainv.lo gauss.lo gaussinv.lo gumbel1.lo \ ! gumbel1inv.lo gumbel2.lo gumbel2inv.lo laplace.lo laplaceinv.lo \ ! logistic.lo logisticinv.lo lognormal.lo lognormalinv.lo \ ! pareto.lo paretoinv.lo rayleigh.lo rayleighinv.lo tdist.lo \ ! tdistinv.lo weibull.lo weibullinv.lo libgslcdf_la_OBJECTS = $(am_libgslcdf_la_OBJECTS) check_PROGRAMS = test$(EXEEXT) --- 167,176 ---- libgslcdf_la_LIBADD = am_libgslcdf_la_OBJECTS = beta.lo cauchy.lo cauchyinv.lo chisq.lo \ ! chisqinv.lo exponential.lo exponentialinv.lo exppow.lo fdist.lo \ ! flat.lo flatinv.lo gamma.lo gammainv.lo gauss.lo gaussinv.lo \ ! gumbel1.lo gumbel1inv.lo gumbel2.lo gumbel2inv.lo laplace.lo \ ! laplaceinv.lo logistic.lo logisticinv.lo lognormal.lo \ ! lognormalinv.lo pareto.lo paretoinv.lo rayleigh.lo \ ! rayleighinv.lo tdist.lo tdistinv.lo weibull.lo weibullinv.lo libgslcdf_la_OBJECTS = $(am_libgslcdf_la_OBJECTS) check_PROGRAMS = test$(EXEEXT) diff -rc2P -x *.info -x *.info-* gsl-1.5/cdf/beta.c gsl-1.6/cdf/beta.c *** gsl-1.5/cdf/beta.c Sat Jul 26 14:45:45 2003 --- gsl-1.6/cdf/beta.c Mon Oct 11 15:33:44 2004 *************** *** 31,39 **** double P; ! if (x <= 0.0 || x > 1.0) { return 0.0; } P = beta_inc_AXPY (1.0, 0.0, a, b, x); --- 31,44 ---- double P; ! if (x <= 0.0 ) { return 0.0; } + if ( x >= 1.0 ) + { + return 1.0; + } + P = beta_inc_AXPY (1.0, 0.0, a, b, x); *************** *** 46,52 **** double P; ! if (x < 0.0 || x >= 1.0) { return 0.0; } --- 51,62 ---- double P; ! if ( x >= 1.0) { return 0.0; + } + + if ( x <= 0.0 ) + { + return 1.0; } diff -rc2P -x *.info -x *.info-* gsl-1.5/cdf/exppow.c gsl-1.6/cdf/exppow.c *** gsl-1.5/cdf/exppow.c Thu Jan 1 01:00:00 1970 --- gsl-1.6/cdf/exppow.c Fri Nov 12 17:17:25 2004 *************** *** 0 **** --- 1,70 ---- + /* cdf/exppow.c + * + * Copyright (C) 2004 Giulio Bottazzi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + #include + #include + #include + #include + + /* The exponential power density is parametrized according to + + p(x) dx = (1/(2 a Gamma(1 + 1/b))) * exp(-|x/a|^b) dx + + so that the distribution reads + + / x<0 0.5 - Gamma_inc_P(1/b,|x/a|^b) + P(x) = | x=0 0.5 + \ x>0 0.5 + Gamma_inc_P(1/b,|x/a|^b) + + + for x in (-infty,+infty) */ + + double + gsl_cdf_exppow_P (const double x, const double a, const double b) + { + const double u = x / a; + + if (u < 0) + { + double P = 0.5 * gsl_sf_gamma_inc_Q (1.0 / b, pow (-u, b)); + return P; + } + else + { + double P = 0.5 * (1.0 + gsl_sf_gamma_inc_P (1.0 / b, pow (u, b))); + return P; + } + } + + double + gsl_cdf_exppow_Q (const double x, const double a, const double b) + { + const double u = x / a; + + if (u < 0) + { + double Q = 0.5 * (1.0 + gsl_sf_gamma_inc_P (1.0 / b, pow (-u, b))); + return Q; + } + else + { + double Q = 0.5 * gsl_sf_gamma_inc_Q (1.0 / b, pow (u, b)); + return Q; + } + } diff -rc2P -x *.info -x *.info-* gsl-1.5/cdf/gsl_cdf.h gsl-1.6/cdf/gsl_cdf.h *** gsl-1.5/cdf/gsl_cdf.h Fri Jul 25 16:18:17 2003 --- gsl-1.6/cdf/gsl_cdf.h Fri Nov 12 17:17:25 2004 *************** *** 83,86 **** --- 83,89 ---- double gsl_cdf_exponential_Qinv (const double Q, const double mu); + double gsl_cdf_exppow_P (const double x, const double a, const double b); + double gsl_cdf_exppow_Q (const double x, const double a, const double b); + double gsl_cdf_tdist_P (const double x, const double nu); double gsl_cdf_tdist_Q (const double x, const double nu); diff -rc2P -x *.info -x *.info-* gsl-1.5/cdf/test.c gsl-1.6/cdf/test.c *** gsl-1.5/cdf/test.c Wed Aug 13 09:25:52 2003 --- gsl-1.6/cdf/test.c Fri Nov 12 17:17:25 2004 *************** *** 41,44 **** --- 41,45 ---- void test_exponential (void); void test_exponentialinv (void); + void test_exppow (void); void test_tdist (void); void test_fdist (void); *************** *** 62,65 **** --- 63,67 ---- test_ugaussian (); test_exponential (); + test_exppow (); test_tdist (); test_fdist (); *************** *** 218,221 **** --- 220,245 ---- TEST (gsl_cdf_exponential_Qinv, (0.99999, 0.7), 7.00003500023333508e-6, TEST_TOL6); } + + + + void test_exppow (void) + { + TEST (gsl_cdf_exppow_P, (-1000.0, 0.7, 1.8), 0.0, TEST_TOL6); + TEST (gsl_cdf_exppow_P, (-0.1, 0.7, 1.8), 0.4205349082867515493458053850, TEST_TOL0); + TEST (gsl_cdf_exppow_P, (-1e-32, 0.7, 1.8), 0.4999999999999999999999999999, TEST_TOL0); + + TEST (gsl_cdf_exppow_P, (0.1, 0.7, 1.8), 0.5794650917132484506541946149, TEST_TOL0); + TEST (gsl_cdf_exppow_P, (1e-32, 0.7, 1.8), 0.5, TEST_TOL0); + TEST (gsl_cdf_exppow_P, (1000.0, 0.7, 1.8), 0.9999999999999999999999956212, TEST_TOL6); + + TEST (gsl_cdf_exppow_Q, (-1000.0, 0.7, 1.8), 0.9999999999999999999999956212, TEST_TOL6); + TEST (gsl_cdf_exppow_Q, (-0.1, 0.7, 1.8), 0.5794650917132484506541946149, TEST_TOL0); + TEST (gsl_cdf_exppow_Q, (-1e-32, 0.7, 1.8), 0.5, TEST_TOL0); + + TEST (gsl_cdf_exppow_Q, (0.1, 0.7, 1.8), 0.4205349082867515493458053850, TEST_TOL0); + TEST (gsl_cdf_exppow_Q, (1e-32, 0.7, 1.8), 0.4999999999999999999999999999, TEST_TOL0); + TEST (gsl_cdf_exppow_Q, (1000.0, 0.7, 1.8), 0.0, TEST_TOL6); + } + /* Tests for student's T distribution */ diff -rc2P -x *.info -x *.info-* gsl-1.5/cheb/ChangeLog gsl-1.6/cheb/ChangeLog *** gsl-1.5/cheb/ChangeLog Mon Jun 9 16:30:25 2003 --- gsl-1.6/cheb/ChangeLog Wed Dec 29 16:41:26 2004 *************** *** 1,2 **** --- 1,20 ---- + 2004-12-29 Brian Gough + + * gsl_chebyshev.h: added const to declaration of + gsl_cheb_eval_mode to match definition + + 2004-12-24 Brian Gough + + * eval.c (gsl_cheb_eval_n_err): use eval_order instead of + cs->order for error estimate + + 2004-12-23 Brian Gough + + * eval.c (gsl_cheb_eval_mode): added missing function + + 2004-08-27 Brian Gough + + * test.c (main): make the hard-coded tolerances a variable, ftol + 2003-06-09 Brian Gough diff -rc2P -x *.info -x *.info-* gsl-1.5/cheb/Makefile.am gsl-1.6/cheb/Makefile.am *** gsl-1.5/cheb/Makefile.am Sun Jul 27 10:49:48 2003 --- gsl-1.6/cheb/Makefile.am Sat Sep 11 14:45:30 2004 *************** *** 7,11 **** libgslcheb_la_SOURCES = deriv.c eval.c init.c integ.c ! TESTS = test check_PROGRAMS = test --- 7,11 ---- libgslcheb_la_SOURCES = deriv.c eval.c init.c integ.c ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/cheb/Makefile.in gsl-1.6/cheb/Makefile.in *** gsl-1.5/cheb/Makefile.in Thu Jun 24 11:49:38 2004 --- gsl-1.6/cheb/Makefile.in Fri Dec 31 15:15:22 2004 *************** *** 149,153 **** libgslcheb_la_SOURCES = deriv.c eval.c init.c integ.c ! TESTS = test check_PROGRAMS = test --- 149,153 ---- libgslcheb_la_SOURCES = deriv.c eval.c init.c integ.c ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/cheb/eval.c gsl-1.6/cheb/eval.c *** gsl-1.5/cheb/eval.c Fri Jul 25 16:18:10 2003 --- gsl-1.6/cheb/eval.c Fri Dec 24 20:45:02 2004 *************** *** 133,137 **** /* Estimate cumulative numerical error */ ! for (i = 0; i <= cs->order; i++) { absc += fabs(cs->c[i]); --- 133,137 ---- /* Estimate cumulative numerical error */ ! for (i = 0; i <= eval_order; i++) { absc += fabs(cs->c[i]); *************** *** 140,144 **** /* Combine truncation error and numerical error */ ! *abserr = fabs (cs->c[cs->order]) + absc * GSL_DBL_EPSILON; return GSL_SUCCESS; --- 140,144 ---- /* Combine truncation error and numerical error */ ! *abserr = fabs (cs->c[eval_order]) + absc * GSL_DBL_EPSILON; return GSL_SUCCESS; *************** *** 176,177 **** --- 176,194 ---- return GSL_SUCCESS; } + + double + gsl_cheb_eval_mode (const gsl_cheb_series * cs, + const double x, gsl_mode_t mode) + { + double result, abserr; + int status = gsl_cheb_eval_mode_e (cs, x, mode, &result, &abserr); + + if (status != GSL_SUCCESS) + { + GSL_ERROR_VAL("gsl_cheb_eval_mode", status, result); + }; + + return result; + } + + diff -rc2P -x *.info -x *.info-* gsl-1.5/cheb/gsl_chebyshev.h gsl-1.6/cheb/gsl_chebyshev.h *** gsl-1.5/cheb/gsl_chebyshev.h Fri Jul 25 16:18:17 2003 --- gsl-1.6/cheb/gsl_chebyshev.h Wed Dec 29 16:41:26 2004 *************** *** 106,110 **** * No errors can occur for a struct obtained from gsl_cheb_new(). */ ! double gsl_cheb_eval_mode(const gsl_cheb_series * cs, double x, gsl_mode_t mode); int gsl_cheb_eval_mode_e(const gsl_cheb_series * cs, const double x, gsl_mode_t mode, double * result, double * abserr); --- 106,110 ---- * No errors can occur for a struct obtained from gsl_cheb_new(). */ ! double gsl_cheb_eval_mode(const gsl_cheb_series * cs, const double x, gsl_mode_t mode); int gsl_cheb_eval_mode_e(const gsl_cheb_series * cs, const double x, gsl_mode_t mode, double * result, double * abserr); diff -rc2P -x *.info -x *.info-* gsl-1.5/cheb/test.c gsl-1.6/cheb/test.c *** gsl-1.5/cheb/test.c Fri Jul 25 16:18:10 2003 --- gsl-1.6/cheb/test.c Sat Sep 11 15:10:00 2004 *************** *** 50,53 **** --- 50,54 ---- { double tol = 100.0 * GSL_DBL_EPSILON; + double ftol = 20.0; double x; size_t i; *************** *** 115,119 **** gsl_cheb_eval_err(cs, x, &r, &e); gsl_test_abs(r, sin(x), tol, "gsl_cheb_eval_err, sin(%.3g)", x); ! gsl_test_factor(fabs(r-sin(x)) + GSL_DBL_EPSILON, e, 10.0, "gsl_cheb_eval_err, error sin(%.3g)", x); } --- 116,120 ---- gsl_cheb_eval_err(cs, x, &r, &e); gsl_test_abs(r, sin(x), tol, "gsl_cheb_eval_err, sin(%.3g)", x); ! gsl_test_factor(fabs(r-sin(x)) + GSL_DBL_EPSILON, e, ftol, "gsl_cheb_eval_err, error sin(%.3g)", x); } *************** *** 128,132 **** gsl_cheb_eval_n_err(cs, 25, x, &r, &e); gsl_test_abs(r, sin(x), 100.0 * tol, "gsl_cheb_eval_n_err, deriv sin(%.3g)", x); ! gsl_test_factor(fabs(r-sin(x)) + GSL_DBL_EPSILON, e, 10.0, "gsl_cheb_eval_n_err, error sin(%.3g)", x); } --- 129,133 ---- gsl_cheb_eval_n_err(cs, 25, x, &r, &e); gsl_test_abs(r, sin(x), 100.0 * tol, "gsl_cheb_eval_n_err, deriv sin(%.3g)", x); ! gsl_test_factor(fabs(r-sin(x)) + GSL_DBL_EPSILON, e, ftol, "gsl_cheb_eval_n_err, error sin(%.3g)", x); } *************** *** 146,150 **** gsl_cheb_eval_err(csd, x, &r, &e); gsl_test_abs(r, cos(x), tol, "gsl_cheb_eval_err, deriv sin(%.3g)", x); ! gsl_test_factor(fabs(r-cos(x)) + GSL_DBL_EPSILON, e, 10.0, "gsl_cheb_eval_err, deriv error sin(%.3g)", x); } --- 147,151 ---- gsl_cheb_eval_err(csd, x, &r, &e); gsl_test_abs(r, cos(x), tol, "gsl_cheb_eval_err, deriv sin(%.3g)", x); ! gsl_test_factor(fabs(r-cos(x)) + GSL_DBL_EPSILON, e, ftol, "gsl_cheb_eval_err, deriv error sin(%.3g)", x); } *************** *** 161,165 **** gsl_cheb_eval_n_err(csd, 25, x, &r, &e); gsl_test_abs(r, cos(x), 100.0 * tol, "gsl_cheb_eval_n_err, deriv sin(%.3g)", x); ! gsl_test_factor(fabs(r-cos(x)) + GSL_DBL_EPSILON, e, 10.0, "gsl_cheb_eval_n_err, deriv error sin(%.3g)", x); } --- 162,166 ---- gsl_cheb_eval_n_err(csd, 25, x, &r, &e); gsl_test_abs(r, cos(x), 100.0 * tol, "gsl_cheb_eval_n_err, deriv sin(%.3g)", x); ! gsl_test_factor(fabs(r-cos(x)) + GSL_DBL_EPSILON, e, ftol, "gsl_cheb_eval_n_err, deriv error sin(%.3g)", x); } *************** *** 180,184 **** gsl_cheb_eval_err(csi, x, &r, &e); gsl_test_abs(r, -(1+cos(x)), tol, "gsl_cheb_eval_err, integ sin(%.3g)", x); ! gsl_test_factor(fabs(r-(-1-cos(x))) + GSL_DBL_EPSILON, e, 10.0, "gsl_cheb_eval_err, integ error sin(%.3g)", x); } --- 181,185 ---- gsl_cheb_eval_err(csi, x, &r, &e); gsl_test_abs(r, -(1+cos(x)), tol, "gsl_cheb_eval_err, integ sin(%.3g)", x); ! gsl_test_factor(fabs(r-(-1-cos(x))) + GSL_DBL_EPSILON, e, ftol, "gsl_cheb_eval_err, integ error sin(%.3g)", x); } *************** *** 195,199 **** gsl_cheb_eval_n_err(csi, 25, x, &r, &e); gsl_test_abs(r, -(1+cos(x)), 100.0 * tol, "gsl_cheb_eval_n_err, integ sin(%.3g)", x); ! gsl_test_factor(fabs(r-(-1-cos(x))) + GSL_DBL_EPSILON, e, 10.0, "gsl_cheb_eval_n_err, integ error sin(%.3g)", x); } --- 196,200 ---- gsl_cheb_eval_n_err(csi, 25, x, &r, &e); gsl_test_abs(r, -(1+cos(x)), 100.0 * tol, "gsl_cheb_eval_n_err, integ sin(%.3g)", x); ! gsl_test_factor(fabs(r-(-1-cos(x))) + GSL_DBL_EPSILON, e, ftol, "gsl_cheb_eval_n_err, integ error sin(%.3g)", x); } diff -rc2P -x *.info -x *.info-* gsl-1.5/combination/Makefile.am gsl-1.6/combination/Makefile.am *** gsl-1.5/combination/Makefile.am Sun Jul 27 10:54:19 2003 --- gsl-1.6/combination/Makefile.am Sat Sep 11 14:45:30 2004 *************** *** 9,13 **** noinst_HEADERS = ! TESTS = test check_PROGRAMS = test --- 9,13 ---- noinst_HEADERS = ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/combination/Makefile.in gsl-1.6/combination/Makefile.in *** gsl-1.5/combination/Makefile.in Thu Jun 24 11:49:39 2004 --- gsl-1.6/combination/Makefile.in Fri Dec 31 15:15:22 2004 *************** *** 151,155 **** noinst_HEADERS = ! TESTS = test check_PROGRAMS = test --- 151,155 ---- noinst_HEADERS = ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/complex/Makefile.am gsl-1.6/complex/Makefile.am *** gsl-1.5/complex/Makefile.am Sun Jul 27 10:49:48 2003 --- gsl-1.6/complex/Makefile.am Sat Sep 11 14:45:31 2004 *************** *** 8,12 **** libgslcomplex_la_SOURCES = math.c ! TESTS = test check_PROGRAMS = test --- 8,12 ---- libgslcomplex_la_SOURCES = math.c ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/complex/Makefile.in gsl-1.6/complex/Makefile.in *** gsl-1.5/complex/Makefile.in Thu Jun 24 11:49:40 2004 --- gsl-1.6/complex/Makefile.in Fri Dec 31 15:15:24 2004 *************** *** 150,154 **** libgslcomplex_la_SOURCES = math.c ! TESTS = test check_PROGRAMS = test --- 150,154 ---- libgslcomplex_la_SOURCES = math.c ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/configure gsl-1.6/configure *** gsl-1.5/configure Thu Jun 24 11:50:00 2004 --- gsl-1.6/configure Fri Dec 31 15:15:46 2004 *************** *** 1,5 **** #! /bin/sh # Guess values for system-dependent variables and create Makefiles. ! # Generated by GNU Autoconf 2.59 for gsl 1.5. # # Copyright (C) 2003 Free Software Foundation, Inc. --- 1,5 ---- #! /bin/sh # Guess values for system-dependent variables and create Makefiles. ! # Generated by GNU Autoconf 2.59 for gsl 1.6. # # Copyright (C) 2003 Free Software Foundation, Inc. *************** *** 427,432 **** PACKAGE_NAME='gsl' PACKAGE_TARNAME='gsl' ! PACKAGE_VERSION='1.5' ! PACKAGE_STRING='gsl 1.5' PACKAGE_BUGREPORT='' --- 427,432 ---- PACKAGE_NAME='gsl' PACKAGE_TARNAME='gsl' ! PACKAGE_VERSION='1.6' ! PACKAGE_STRING='gsl 1.6' PACKAGE_BUGREPORT='' *************** *** 938,942 **** # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF ! \`configure' configures gsl 1.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... --- 938,942 ---- # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF ! \`configure' configures gsl 1.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... *************** *** 1004,1008 **** if test -n "$ac_init_help"; then case $ac_init_help in ! short | recursive ) echo "Configuration of gsl 1.5:";; esac cat <<\_ACEOF --- 1004,1008 ---- if test -n "$ac_init_help"; then case $ac_init_help in ! short | recursive ) echo "Configuration of gsl 1.6:";; esac cat <<\_ACEOF *************** *** 1131,1135 **** if $ac_init_version; then cat <<\_ACEOF ! gsl configure 1.5 generated by GNU Autoconf 2.59 --- 1131,1135 ---- if $ac_init_version; then cat <<\_ACEOF ! gsl configure 1.6 generated by GNU Autoconf 2.59 *************** *** 1145,1149 **** running configure, to aid debugging if configure makes a mistake. ! It was created by gsl $as_me 1.5, which was generated by GNU Autoconf 2.59. Invocation command line was --- 1145,1149 ---- running configure, to aid debugging if configure makes a mistake. ! It was created by gsl $as_me 1.6, which was generated by GNU Autoconf 2.59. Invocation command line was *************** *** 1758,1762 **** # Define the identity of the package. PACKAGE='gsl' ! VERSION='1.5' --- 1758,1762 ---- # Define the identity of the package. PACKAGE='gsl' ! VERSION='1.6' *************** *** 1912,1916 **** ! GSL_LT_VERSION="6:0:6" GSL_LT_CBLAS_VERSION="0:0:0" --- 1912,1916 ---- ! GSL_LT_VERSION="7:0:7" GSL_LT_CBLAS_VERSION="0:0:0" *************** *** 10375,10379 **** fi ! ac_config_files="$ac_config_files gsl-config gsl.pc gsl_version.h gsl.spec gsl/Makefile test/Makefile err/Makefile sys/Makefile utils/Makefile const/Makefile min/Makefile multimin/Makefile ieee-utils/Makefile fft/Makefile specfunc/Makefile dht/Makefile fit/Makefile multifit/Makefile statistics/Makefile sum/Makefile roots/Makefile multiroots/Makefile ntuple/Makefile poly/Makefile qrng/Makefile rng/Makefile randist/Makefile siman/Makefile integration/Makefile interpolation/Makefile doc/Makefile block/Makefile vector/Makefile matrix/Makefile histogram/Makefile monte/Makefile ode-initval/Makefile cblas/Makefile blas/Makefile linalg/Makefile eigen/Makefile permutation/Makefile combination/Makefile sort/Makefile complex/Makefile diff/Makefile deriv/Makefile cheb/Makefile cdf/Makefile Makefile" cat >confcache <<\_ACEOF --- 10375,10379 ---- fi ! ac_config_files="$ac_config_files gsl-config gsl.pc gsl_version.h gsl.spec gsl/Makefile test/Makefile err/Makefile sys/Makefile utils/Makefile const/Makefile min/Makefile multimin/Makefile ieee-utils/Makefile fft/Makefile specfunc/Makefile dht/Makefile fit/Makefile multifit/Makefile statistics/Makefile sum/Makefile roots/Makefile multiroots/Makefile ntuple/Makefile poly/Makefile qrng/Makefile rng/Makefile randist/Makefile siman/Makefile integration/Makefile interpolation/Makefile doc/Makefile block/Makefile vector/Makefile matrix/Makefile histogram/Makefile monte/Makefile ode-initval/Makefile cblas/Makefile blas/Makefile linalg/Makefile eigen/Makefile permutation/Makefile combination/Makefile sort/Makefile complex/Makefile diff/Makefile deriv/Makefile cheb/Makefile cdf/Makefile wavelet/Makefile Makefile" cat >confcache <<\_ACEOF *************** *** 10746,10750 **** cat >&5 <<_CSEOF ! This file was extended by gsl $as_me 1.5, which was generated by GNU Autoconf 2.59. Invocation command line was --- 10746,10750 ---- cat >&5 <<_CSEOF ! This file was extended by gsl $as_me 1.6, which was generated by GNU Autoconf 2.59. Invocation command line was *************** *** 10806,10810 **** cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ ! gsl config.status 1.5 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" --- 10806,10810 ---- cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ ! gsl config.status 1.6 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" *************** *** 10958,10961 **** --- 10958,10962 ---- "cheb/Makefile" ) CONFIG_FILES="$CONFIG_FILES cheb/Makefile" ;; "cdf/Makefile" ) CONFIG_FILES="$CONFIG_FILES cdf/Makefile" ;; + "wavelet/Makefile" ) CONFIG_FILES="$CONFIG_FILES wavelet/Makefile" ;; "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; diff -rc2P -x *.info -x *.info-* gsl-1.5/configure.ac gsl-1.6/configure.ac *** gsl-1.5/configure.ac Thu Jun 24 11:19:09 2004 --- gsl-1.6/configure.ac Fri Dec 31 15:14:54 2004 *************** *** 1,5 **** dnl Process this file with autoconf to produce a configure script. ! AC_INIT([gsl],[1.5]) AC_CONFIG_SRCDIR(gsl_math.h) --- 1,5 ---- dnl Process this file with autoconf to produce a configure script. ! AC_INIT([gsl],[1.6]) AC_CONFIG_SRCDIR(gsl_math.h) *************** *** 18,23 **** dnl gsl-1.4 libgsl 5:0:5 libgslcblas 0:0:0 dnl gsl-1.5 libgsl 6:0:6 libgslcblas 0:0:0 ! GSL_LT_VERSION="6:0:6" AC_SUBST(GSL_LT_VERSION) GSL_LT_CBLAS_VERSION="0:0:0" --- 18,24 ---- dnl gsl-1.4 libgsl 5:0:5 libgslcblas 0:0:0 dnl gsl-1.5 libgsl 6:0:6 libgslcblas 0:0:0 + dnl gsl-1.6 libgsl 7:0:7 libgslcblas 0:0:0 ! GSL_LT_VERSION="7:0:7" AC_SUBST(GSL_LT_VERSION) GSL_LT_CBLAS_VERSION="0:0:0" *************** *** 356,359 **** dnl ! AC_CONFIG_FILES([gsl-config gsl.pc gsl_version.h gsl.spec gsl/Makefile test/Makefile err/Makefile sys/Makefile utils/Makefile const/Makefile min/Makefile multimin/Makefile ieee-utils/Makefile fft/Makefile specfunc/Makefile dht/Makefile fit/Makefile multifit/Makefile statistics/Makefile sum/Makefile roots/Makefile multiroots/Makefile ntuple/Makefile poly/Makefile qrng/Makefile rng/Makefile randist/Makefile siman/Makefile integration/Makefile interpolation/Makefile doc/Makefile block/Makefile vector/Makefile matrix/Makefile histogram/Makefile monte/Makefile ode-initval/Makefile cblas/Makefile blas/Makefile linalg/Makefile eigen/Makefile permutation/Makefile combination/Makefile sort/Makefile complex/Makefile diff/Makefile deriv/Makefile cheb/Makefile cdf/Makefile Makefile]) AC_OUTPUT --- 357,360 ---- dnl ! AC_CONFIG_FILES([gsl-config gsl.pc gsl_version.h gsl.spec gsl/Makefile test/Makefile err/Makefile sys/Makefile utils/Makefile const/Makefile min/Makefile multimin/Makefile ieee-utils/Makefile fft/Makefile specfunc/Makefile dht/Makefile fit/Makefile multifit/Makefile statistics/Makefile sum/Makefile roots/Makefile multiroots/Makefile ntuple/Makefile poly/Makefile qrng/Makefile rng/Makefile randist/Makefile siman/Makefile integration/Makefile interpolation/Makefile doc/Makefile block/Makefile vector/Makefile matrix/Makefile histogram/Makefile monte/Makefile ode-initval/Makefile cblas/Makefile blas/Makefile linalg/Makefile eigen/Makefile permutation/Makefile combination/Makefile sort/Makefile complex/Makefile diff/Makefile deriv/Makefile cheb/Makefile cdf/Makefile wavelet/Makefile Makefile]) AC_OUTPUT diff -rc2P -x *.info -x *.info-* gsl-1.5/const/Makefile.am gsl-1.6/const/Makefile.am *** gsl-1.5/const/Makefile.am Thu May 27 13:03:07 2004 --- gsl-1.6/const/Makefile.am Sat Sep 11 14:45:31 2004 *************** *** 3,7 **** INCLUDES= -I$(top_builddir) ! TESTS = test check_PROGRAMS = test --- 3,7 ---- INCLUDES= -I$(top_builddir) ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/const/Makefile.in gsl-1.6/const/Makefile.in *** gsl-1.5/const/Makefile.in Thu Jun 24 11:49:40 2004 --- gsl-1.6/const/Makefile.in Fri Dec 31 15:15:24 2004 *************** *** 145,149 **** INCLUDES = -I$(top_builddir) ! TESTS = test check_PROGRAMS = test --- 145,149 ---- INCLUDES = -I$(top_builddir) ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/const/TODO gsl-1.6/const/TODO *** gsl-1.5/const/TODO Thu Jul 31 14:12:25 2003 --- gsl-1.6/const/TODO Fri Nov 12 17:21:02 2004 *************** *** 1,32 **** ! From: Juho Schultz ! Sender: bug-gsl-bounces+bjg=network-theory.co.uk@gnu.org ! To: bug-gsl@gnu.org ! Subject: [Bug-gsl] Missing constants ! Date: Tue, 29 Jul 2003 16:43:16 +0300 (EEST) ! ! Dear sirs, ! ! Thomson cross section and radiation density constant could be added to ! const/gsl_const_mks.h ! ! #define GSL_CONST_MKS_THOMSON_CROSS_SECTION (6.6524585e-29) /* m^2 */ ! #define GSL_CONTS_MKS_RADIATION_DENSITY_CONSTANT (7.56591e-16) /* J m-3 K-4 */ ! ! feel free to cut-and paste these to the sources. ! ! Juho Schultz ! ! e-mail: juho.schultz@astro.helsinki.fi ! www.astro.helsinki.fi/~jschultz ! Observatory ! P.O. Box 14 ! FIN-00014 University of Helsinki ! FINLAND ! ! ! ! ! _______________________________________________ ! Bug-gsl mailing list ! Bug-gsl@gnu.org ! http://mail.gnu.org/mailman/listinfo/bug-gsl --- 1 ---- ! could add RADIATION_DENSITY_CONSTANT (7.56591e-16) /* J m-3 K-4 */ diff -rc2P -x *.info -x *.info-* gsl-1.5/deriv/Makefile.am gsl-1.6/deriv/Makefile.am *** gsl-1.5/deriv/Makefile.am Sat Mar 20 23:07:20 2004 --- gsl-1.6/deriv/Makefile.am Sat Sep 11 14:45:31 2004 *************** *** 7,11 **** pkginclude_HEADERS = gsl_deriv.h ! TESTS = test check_PROGRAMS = test #demo --- 7,11 ---- pkginclude_HEADERS = gsl_deriv.h ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test #demo diff -rc2P -x *.info -x *.info-* gsl-1.5/deriv/Makefile.in gsl-1.6/deriv/Makefile.in *** gsl-1.5/deriv/Makefile.in Thu Jun 24 11:49:40 2004 --- gsl-1.6/deriv/Makefile.in Fri Dec 31 15:15:25 2004 *************** *** 149,153 **** pkginclude_HEADERS = gsl_deriv.h ! TESTS = test check_PROGRAMS = test #demo --- 149,153 ---- pkginclude_HEADERS = gsl_deriv.h ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test #demo diff -rc2P -x *.info -x *.info-* gsl-1.5/dht/Makefile.am gsl-1.6/dht/Makefile.am *** gsl-1.5/dht/Makefile.am Sun Jul 27 10:49:48 2003 --- gsl-1.6/dht/Makefile.am Sat Sep 11 14:45:31 2004 *************** *** 5,9 **** INCLUDES= -I$(top_builddir) ! TESTS = test check_PROGRAMS = test --- 5,9 ---- INCLUDES= -I$(top_builddir) ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/dht/Makefile.in gsl-1.6/dht/Makefile.in *** gsl-1.5/dht/Makefile.in Thu Jun 24 11:49:41 2004 --- gsl-1.6/dht/Makefile.in Fri Dec 31 15:15:25 2004 *************** *** 147,151 **** INCLUDES = -I$(top_builddir) ! TESTS = test check_PROGRAMS = test --- 147,151 ---- INCLUDES = -I$(top_builddir) ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/diff/Makefile.am gsl-1.6/diff/Makefile.am *** gsl-1.5/diff/Makefile.am Sun Jul 27 10:54:19 2003 --- gsl-1.6/diff/Makefile.am Sat Sep 11 14:45:31 2004 *************** *** 7,11 **** pkginclude_HEADERS = gsl_diff.h ! TESTS = test check_PROGRAMS = test #demo --- 7,11 ---- pkginclude_HEADERS = gsl_diff.h ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test #demo diff -rc2P -x *.info -x *.info-* gsl-1.5/diff/Makefile.in gsl-1.6/diff/Makefile.in *** gsl-1.5/diff/Makefile.in Thu Jun 24 11:49:41 2004 --- gsl-1.6/diff/Makefile.in Fri Dec 31 15:15:26 2004 *************** *** 149,153 **** pkginclude_HEADERS = gsl_diff.h ! TESTS = test check_PROGRAMS = test #demo --- 149,153 ---- pkginclude_HEADERS = gsl_diff.h ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test #demo diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/Makefile.am gsl-1.6/doc/Makefile.am *** gsl-1.5/doc/Makefile.am Sun Aug 10 18:13:23 2003 --- gsl-1.6/doc/Makefile.am Sat Sep 11 14:45:32 2004 *************** *** 3,16 **** info_TEXINFOS = gsl-ref.texi noinst_TEXINFOS = gsl-design.texi ! gsl_ref_TEXINFOS = err.texi cblas.texi blas.texi min.texi fft.texi rng.texi randist.texi roots.texi statistics.texi specfunc.texi specfunc-airy.texi specfunc-bessel.texi specfunc-chebyshev.texi specfunc-clausen.texi specfunc-coulomb.texi specfunc-coupling.texi specfunc-dawson.texi specfunc-debye.texi specfunc-dilog.texi specfunc-elementary.texi specfunc-ellint.texi specfunc-elljac.texi specfunc-erf.texi specfunc-exp.texi specfunc-expint.texi specfunc-fermi-dirac.texi specfunc-gamma.texi specfunc-gegenbauer.texi specfunc-hyperg.texi specfunc-lambert.texi specfunc-laguerre.texi specfunc-legendre.texi specfunc-log.texi specfunc-pow-int.texi specfunc-psi.texi specfunc-synchrotron.texi specfunc-transport.texi specfunc-trig.texi specfunc-zeta.texi siman.texi vectors.texi debug.texi histogram.texi ode-initval.texi integration.texi ieee754.texi montecarlo.texi sum.texi intro.texi usage.texi dht.texi interp.texi poly.texi linalg.texi eigen.texi multiroots.texi sort.texi permutation.texi combination.texi complex.texi math.texi fitting.texi multifit.texi const.texi ntuple.texi diff.texi qrng.texi cheb.texi multimin.texi gpl.texi fdl.texi autoconf.texi freemanuals.texi man_MANS = gsl.3 gsl-config.1 gsl-randist.1 gsl-histogram.1 ! figures = multimin.eps siman-test.eps siman-energy.eps 12-cities.eps initial-route.eps final-route.eps fft-complex-radix2-f.eps fft-complex-radix2-t.eps fft-complex-radix2.eps fft-real-mixedradix.eps roots-bisection.eps roots-false-position.eps roots-newtons-method.eps roots-secant-method.eps histogram.eps histogram2d.eps min-interval.eps fit-wlinear.eps fit-wlinear2.eps fit-exp.eps ntuple.eps qrng.eps cheb.eps vdp.eps interp.eps rand-beta.tex rand-binomial.tex rand-cauchy.tex rand-chisq.tex rand-erlang.tex rand-exponential.tex rand-fdist.tex rand-flat.tex rand-gamma.tex rand-gaussian.tex rand-geometric.tex rand-laplace.tex rand-logarithmic.tex rand-logistic.tex rand-lognormal.tex rand-pareto.tex rand-poisson.tex rand-hypergeometric.tex rand-nbinomial.tex rand-pascal.tex rand-bivariate-gaussian.tex rand-rayleigh.tex rand-rayleigh-tail.tex rand-tdist.tex rand-weibull.tex random-walk.tex randplots.gnp rand-exppow.tex rand-levy.tex rand-levyskew.tex rand-gumbel.tex rand-bernoulli.tex rand-gaussian-tail.tex rand-gumbel1.tex rand-gumbel2.tex landau.dat rand-landau.tex ! examples_src = examples/blas.c examples/block.c examples/cblas.c examples/cdf.c examples/cheb.c examples/combination.c examples/const.c examples/demo_fn.c examples/diff.c examples/eigen.c examples/fft.c examples/fftmr.c examples/fftreal.c examples/fitting.c examples/fitting2.c examples/fitting3.c examples/histogram.c examples/histogram2d.c examples/ieee.c examples/ieeeround.c examples/integration.c examples/interp.c examples/intro.c examples/linalglu.c examples/matrix.c examples/matrixw.c examples/min.c examples/monte.c examples/ntupler.c examples/ntuplew.c examples/ode-initval.c examples/odefixed.c examples/permseq.c examples/permshuffle.c examples/polyroots.c examples/qrng.c examples/randpoisson.c examples/randwalk.c examples/rng.c examples/rngunif.c examples/rootnewt.c examples/roots.c examples/siman.c examples/sortsmall.c examples/specfun.c examples/specfun_e.c examples/stat.c examples/statsort.c examples/sum.c examples/vector.c examples/vectorr.c examples/vectorview.c examples/vectorw.c examples/demo_fn.h ! examples_out = examples/blas.out examples/block.out examples/cblas.out examples/cdf.out examples/combination.out examples/const.out examples/diff.out examples/integration.out examples/intro.out examples/linalglu.out examples/min.out examples/polyroots.out examples/randpoisson.2.out examples/randpoisson.out examples/rng.out examples/rngunif.2.out examples/rngunif.out examples/sortsmall.out examples/specfun.out examples/specfun_e.out examples/stat.out examples/statsort.out examples/sum.out examples/vectorview.out --- 3,16 ---- info_TEXINFOS = gsl-ref.texi noinst_TEXINFOS = gsl-design.texi ! gsl_ref_TEXINFOS = err.texi cblas.texi blas.texi min.texi fft.texi rng.texi randist.texi roots.texi statistics.texi specfunc.texi specfunc-airy.texi specfunc-bessel.texi specfunc-chebyshev.texi specfunc-clausen.texi specfunc-coulomb.texi specfunc-coupling.texi specfunc-dawson.texi specfunc-debye.texi specfunc-dilog.texi specfunc-elementary.texi specfunc-ellint.texi specfunc-elljac.texi specfunc-erf.texi specfunc-exp.texi specfunc-expint.texi specfunc-fermi-dirac.texi specfunc-gamma.texi specfunc-gegenbauer.texi specfunc-hyperg.texi specfunc-lambert.texi specfunc-laguerre.texi specfunc-legendre.texi specfunc-log.texi specfunc-pow-int.texi specfunc-psi.texi specfunc-synchrotron.texi specfunc-transport.texi specfunc-trig.texi specfunc-zeta.texi siman.texi vectors.texi debug.texi histogram.texi ode-initval.texi integration.texi ieee754.texi montecarlo.texi sum.texi intro.texi usage.texi dwt.texi dht.texi interp.texi poly.texi linalg.texi eigen.texi multiroots.texi sort.texi permutation.texi combination.texi complex.texi math.texi fitting.texi multifit.texi const.texi ntuple.texi diff.texi qrng.texi cheb.texi multimin.texi gpl.texi fdl.texi autoconf.texi freemanuals.texi man_MANS = gsl.3 gsl-config.1 gsl-randist.1 gsl-histogram.1 ! figures = multimin.eps siman-test.eps siman-energy.eps 12-cities.eps initial-route.eps final-route.eps fft-complex-radix2-f.eps fft-complex-radix2-t.eps fft-complex-radix2.eps fft-real-mixedradix.eps roots-bisection.eps roots-false-position.eps roots-newtons-method.eps roots-secant-method.eps histogram.eps histogram2d.eps min-interval.eps fit-wlinear.eps fit-wlinear2.eps fit-exp.eps ntuple.eps qrng.eps cheb.eps vdp.eps interp.eps rand-beta.tex rand-binomial.tex rand-cauchy.tex rand-chisq.tex rand-erlang.tex rand-exponential.tex rand-fdist.tex rand-flat.tex rand-gamma.tex rand-gaussian.tex rand-geometric.tex rand-laplace.tex rand-logarithmic.tex rand-logistic.tex rand-lognormal.tex rand-pareto.tex rand-poisson.tex rand-hypergeometric.tex rand-nbinomial.tex rand-pascal.tex rand-bivariate-gaussian.tex rand-rayleigh.tex rand-rayleigh-tail.tex rand-tdist.tex rand-weibull.tex random-walk.tex randplots.gnp rand-exppow.tex rand-levy.tex rand-levyskew.tex rand-gumbel.tex rand-bernoulli.tex rand-gaussian-tail.tex rand-gumbel1.tex rand-gumbel2.tex landau.dat rand-landau.tex dwt-orig.eps dwt-samp.eps ! examples_src = examples/blas.c examples/block.c examples/cblas.c examples/cdf.c examples/cheb.c examples/combination.c examples/const.c examples/demo_fn.c examples/diff.c examples/eigen.c examples/fft.c examples/fftmr.c examples/fftreal.c examples/fitting.c examples/fitting2.c examples/fitting3.c examples/histogram.c examples/histogram2d.c examples/ieee.c examples/ieeeround.c examples/integration.c examples/interp.c examples/intro.c examples/linalglu.c examples/matrix.c examples/matrixw.c examples/min.c examples/monte.c examples/ntupler.c examples/ntuplew.c examples/ode-initval.c examples/odefixed.c examples/permseq.c examples/permshuffle.c examples/polyroots.c examples/qrng.c examples/randpoisson.c examples/randwalk.c examples/rng.c examples/rngunif.c examples/rootnewt.c examples/roots.c examples/siman.c examples/sortsmall.c examples/specfun.c examples/specfun_e.c examples/stat.c examples/statsort.c examples/sum.c examples/vector.c examples/vectorr.c examples/vectorview.c examples/vectorw.c examples/demo_fn.h examples/dwt.c ! examples_out = examples/blas.out examples/block.out examples/cblas.out examples/cdf.out examples/combination.out examples/const.out examples/diff.out examples/integration.out examples/intro.out examples/linalglu.out examples/min.out examples/polyroots.out examples/randpoisson.2.out examples/randpoisson.out examples/rng.out examples/rngunif.2.out examples/rngunif.out examples/sortsmall.out examples/specfun.out examples/specfun_e.out examples/stat.out examples/statsort.out examples/sum.out examples/vectorview.out examples/ecg.dat examples/dwt.dat diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/Makefile.in gsl-1.6/doc/Makefile.in *** gsl-1.5/doc/Makefile.in Thu Jun 24 11:49:42 2004 --- gsl-1.6/doc/Makefile.in Fri Dec 31 15:15:26 2004 *************** *** 144,156 **** info_TEXINFOS = gsl-ref.texi noinst_TEXINFOS = gsl-design.texi ! gsl_ref_TEXINFOS = err.texi cblas.texi blas.texi min.texi fft.texi rng.texi randist.texi roots.texi statistics.texi specfunc.texi specfunc-airy.texi specfunc-bessel.texi specfunc-chebyshev.texi specfunc-clausen.texi specfunc-coulomb.texi specfunc-coupling.texi specfunc-dawson.texi specfunc-debye.texi specfunc-dilog.texi specfunc-elementary.texi specfunc-ellint.texi specfunc-elljac.texi specfunc-erf.texi specfunc-exp.texi specfunc-expint.texi specfunc-fermi-dirac.texi specfunc-gamma.texi specfunc-gegenbauer.texi specfunc-hyperg.texi specfunc-lambert.texi specfunc-laguerre.texi specfunc-legendre.texi specfunc-log.texi specfunc-pow-int.texi specfunc-psi.texi specfunc-synchrotron.texi specfunc-transport.texi specfunc-trig.texi specfunc-zeta.texi siman.texi vectors.texi debug.texi histogram.texi ode-initval.texi integration.texi ieee754.texi montecarlo.texi sum.texi intro.texi usage.texi dht.texi interp.texi poly.texi linalg.texi eigen.texi multiroots.texi sort.texi permutation.texi combination.texi complex.texi math.texi fitting.texi multifit.texi const.texi ntuple.texi diff.texi qrng.texi cheb.texi multimin.texi gpl.texi fdl.texi autoconf.texi freemanuals.texi man_MANS = gsl.3 gsl-config.1 gsl-randist.1 gsl-histogram.1 ! figures = multimin.eps siman-test.eps siman-energy.eps 12-cities.eps initial-route.eps final-route.eps fft-complex-radix2-f.eps fft-complex-radix2-t.eps fft-complex-radix2.eps fft-real-mixedradix.eps roots-bisection.eps roots-false-position.eps roots-newtons-method.eps roots-secant-method.eps histogram.eps histogram2d.eps min-interval.eps fit-wlinear.eps fit-wlinear2.eps fit-exp.eps ntuple.eps qrng.eps cheb.eps vdp.eps interp.eps rand-beta.tex rand-binomial.tex rand-cauchy.tex rand-chisq.tex rand-erlang.tex rand-exponential.tex rand-fdist.tex rand-flat.tex rand-gamma.tex rand-gaussian.tex rand-geometric.tex rand-laplace.tex rand-logarithmic.tex rand-logistic.tex rand-lognormal.tex rand-pareto.tex rand-poisson.tex rand-hypergeometric.tex rand-nbinomial.tex rand-pascal.tex rand-bivariate-gaussian.tex rand-rayleigh.tex rand-rayleigh-tail.tex rand-tdist.tex rand-weibull.tex random-walk.tex randplots.gnp rand-exppow.tex rand-levy.tex rand-levyskew.tex rand-gumbel.tex rand-bernoulli.tex rand-gaussian-tail.tex rand-gumbel1.tex rand-gumbel2.tex landau.dat rand-landau.tex ! examples_src = examples/blas.c examples/block.c examples/cblas.c examples/cdf.c examples/cheb.c examples/combination.c examples/const.c examples/demo_fn.c examples/diff.c examples/eigen.c examples/fft.c examples/fftmr.c examples/fftreal.c examples/fitting.c examples/fitting2.c examples/fitting3.c examples/histogram.c examples/histogram2d.c examples/ieee.c examples/ieeeround.c examples/integration.c examples/interp.c examples/intro.c examples/linalglu.c examples/matrix.c examples/matrixw.c examples/min.c examples/monte.c examples/ntupler.c examples/ntuplew.c examples/ode-initval.c examples/odefixed.c examples/permseq.c examples/permshuffle.c examples/polyroots.c examples/qrng.c examples/randpoisson.c examples/randwalk.c examples/rng.c examples/rngunif.c examples/rootnewt.c examples/roots.c examples/siman.c examples/sortsmall.c examples/specfun.c examples/specfun_e.c examples/stat.c examples/statsort.c examples/sum.c examples/vector.c examples/vectorr.c examples/vectorview.c examples/vectorw.c examples/demo_fn.h ! examples_out = examples/blas.out examples/block.out examples/cblas.out examples/cdf.out examples/combination.out examples/const.out examples/diff.out examples/integration.out examples/intro.out examples/linalglu.out examples/min.out examples/polyroots.out examples/randpoisson.2.out examples/randpoisson.out examples/rng.out examples/rngunif.2.out examples/rngunif.out examples/sortsmall.out examples/specfun.out examples/specfun_e.out examples/stat.out examples/statsort.out examples/sum.out examples/vectorview.out noinst_DATA = $(examples_src) $(examples_out) $(figures) --- 144,156 ---- info_TEXINFOS = gsl-ref.texi noinst_TEXINFOS = gsl-design.texi ! gsl_ref_TEXINFOS = err.texi cblas.texi blas.texi min.texi fft.texi rng.texi randist.texi roots.texi statistics.texi specfunc.texi specfunc-airy.texi specfunc-bessel.texi specfunc-chebyshev.texi specfunc-clausen.texi specfunc-coulomb.texi specfunc-coupling.texi specfunc-dawson.texi specfunc-debye.texi specfunc-dilog.texi specfunc-elementary.texi specfunc-ellint.texi specfunc-elljac.texi specfunc-erf.texi specfunc-exp.texi specfunc-expint.texi specfunc-fermi-dirac.texi specfunc-gamma.texi specfunc-gegenbauer.texi specfunc-hyperg.texi specfunc-lambert.texi specfunc-laguerre.texi specfunc-legendre.texi specfunc-log.texi specfunc-pow-int.texi specfunc-psi.texi specfunc-synchrotron.texi specfunc-transport.texi specfunc-trig.texi specfunc-zeta.texi siman.texi vectors.texi debug.texi histogram.texi ode-initval.texi integration.texi ieee754.texi montecarlo.texi sum.texi intro.texi usage.texi dwt.texi dht.texi interp.texi poly.texi linalg.texi eigen.texi multiroots.texi sort.texi permutation.texi combination.texi complex.texi math.texi fitting.texi multifit.texi const.texi ntuple.texi diff.texi qrng.texi cheb.texi multimin.texi gpl.texi fdl.texi autoconf.texi freemanuals.texi man_MANS = gsl.3 gsl-config.1 gsl-randist.1 gsl-histogram.1 ! figures = multimin.eps siman-test.eps siman-energy.eps 12-cities.eps initial-route.eps final-route.eps fft-complex-radix2-f.eps fft-complex-radix2-t.eps fft-complex-radix2.eps fft-real-mixedradix.eps roots-bisection.eps roots-false-position.eps roots-newtons-method.eps roots-secant-method.eps histogram.eps histogram2d.eps min-interval.eps fit-wlinear.eps fit-wlinear2.eps fit-exp.eps ntuple.eps qrng.eps cheb.eps vdp.eps interp.eps rand-beta.tex rand-binomial.tex rand-cauchy.tex rand-chisq.tex rand-erlang.tex rand-exponential.tex rand-fdist.tex rand-flat.tex rand-gamma.tex rand-gaussian.tex rand-geometric.tex rand-laplace.tex rand-logarithmic.tex rand-logistic.tex rand-lognormal.tex rand-pareto.tex rand-poisson.tex rand-hypergeometric.tex rand-nbinomial.tex rand-pascal.tex rand-bivariate-gaussian.tex rand-rayleigh.tex rand-rayleigh-tail.tex rand-tdist.tex rand-weibull.tex random-walk.tex randplots.gnp rand-exppow.tex rand-levy.tex rand-levyskew.tex rand-gumbel.tex rand-bernoulli.tex rand-gaussian-tail.tex rand-gumbel1.tex rand-gumbel2.tex landau.dat rand-landau.tex dwt-orig.eps dwt-samp.eps ! examples_src = examples/blas.c examples/block.c examples/cblas.c examples/cdf.c examples/cheb.c examples/combination.c examples/const.c examples/demo_fn.c examples/diff.c examples/eigen.c examples/fft.c examples/fftmr.c examples/fftreal.c examples/fitting.c examples/fitting2.c examples/fitting3.c examples/histogram.c examples/histogram2d.c examples/ieee.c examples/ieeeround.c examples/integration.c examples/interp.c examples/intro.c examples/linalglu.c examples/matrix.c examples/matrixw.c examples/min.c examples/monte.c examples/ntupler.c examples/ntuplew.c examples/ode-initval.c examples/odefixed.c examples/permseq.c examples/permshuffle.c examples/polyroots.c examples/qrng.c examples/randpoisson.c examples/randwalk.c examples/rng.c examples/rngunif.c examples/rootnewt.c examples/roots.c examples/siman.c examples/sortsmall.c examples/specfun.c examples/specfun_e.c examples/stat.c examples/statsort.c examples/sum.c examples/vector.c examples/vectorr.c examples/vectorview.c examples/vectorw.c examples/demo_fn.h examples/dwt.c ! examples_out = examples/blas.out examples/block.out examples/cblas.out examples/cdf.out examples/combination.out examples/const.out examples/diff.out examples/integration.out examples/intro.out examples/linalglu.out examples/min.out examples/polyroots.out examples/randpoisson.2.out examples/randpoisson.out examples/rng.out examples/rngunif.2.out examples/rngunif.out examples/sortsmall.out examples/specfun.out examples/specfun_e.out examples/stat.out examples/statsort.out examples/sum.out examples/vectorview.out examples/ecg.dat examples/dwt.dat noinst_DATA = $(examples_src) $(examples_out) $(figures) diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/debug.texi gsl-1.6/doc/debug.texi *** gsl-1.5/doc/debug.texi Thu Jun 24 15:18:54 2004 --- gsl-1.6/doc/debug.texi Fri Nov 12 17:20:42 2004 *************** *** 273,277 **** This turns on a set of warnings for common programming problems. You need @code{-Wall}, but it is not enough on its own. ! @item -O4 Turn on optimization. The warnings for uninitialized variables in @code{-Wall} rely on the optimizer to analyze the code. If there is no --- 273,277 ---- This turns on a set of warnings for common programming problems. You need @code{-Wall}, but it is not enough on its own. ! @item -O2 Turn on optimization. The warnings for uninitialized variables in @code{-Wall} rely on the optimizer to analyze the code. If there is no diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/diff.texi gsl-1.6/doc/diff.texi *** gsl-1.5/doc/diff.texi Thu Jun 24 15:18:54 2004 --- gsl-1.6/doc/diff.texi Fri Nov 12 17:19:53 2004 *************** *** 8,12 **** finite differencing. An adaptive algorithm is used to find the best choice of finite difference and to estimate the error in the derivative. ! These functions are declared in the header file @file{gsl_deriv.h} @menu --- 8,12 ---- finite differencing. An adaptive algorithm is used to find the best choice of finite difference and to estimate the error in the derivative. ! These functions are declared in the header file @file{gsl_deriv.h}. @menu diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/dwt-orig.eps gsl-1.6/doc/dwt-orig.eps *** gsl-1.5/doc/dwt-orig.eps Thu Jan 1 01:00:00 1970 --- gsl-1.6/doc/dwt-orig.eps Fri Jul 23 17:55:12 2004 *************** *** 0 **** --- 1,2657 ---- + %!PS-Adobe-3.0 EPSF-3.0 + %%Creator: GNU libplot drawing library 4.1 + %%Title: PostScript plot + %%CreationDate: Thu Jul 22 17:12:05 2004 + %%DocumentData: Clean7Bit + %%LanguageLevel: 1 + %%Pages: 1 + %%PageOrder: Ascend + %%Orientation: Portrait + %%BoundingBox: 112 210 487 402 + %%DocumentNeededResources: font Helvetica + %%DocumentSuppliedResources: procset GNU_libplot 1.0 0 + %%EndComments + + %%BeginDefaults + %%PageResources: font Helvetica + %%EndDefaults + + %%BeginProlog + %%EndProlog + + %%BeginSetup + %%IncludeResource: font Helvetica + /DrawDict 50 dict def + DrawDict begin + /ISOLatin1Encoding [ + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright + /parenleft/parenright/asterisk/plus/comma/minus/period/slash + /zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon + /less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N + /O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright + /asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m + /n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/dotlessi/grave/acute/circumflex/tilde/macron/breve + /dotaccent/dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut + /ogonek/caron/space/exclamdown/cent/sterling/currency/yen/brokenbar + /section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot + /hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior + /acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine + /guillemotright/onequarter/onehalf/threequarters/questiondown + /Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla + /Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex + /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis + /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute + /Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis + /aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave + /iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex + /otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis + /yacute/thorn/ydieresis + ] def + /reencodeISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse } forall + /Encoding ISOLatin1Encoding def + currentdict end definefont + } def + /Helvetica reencodeISO def + %%BeginResource procset GNU_libplot 1.0 0 + /none null def + /numGraphicParameters 17 def + /stringLimit 65535 def + /arrowHeight 8 def + /eoFillRule true def + + /Begin { save numGraphicParameters dict begin } def + /End { end restore } def + + /SetB { + dup type /nulltype eq { + pop + false /brushRightArrow idef + false /brushLeftArrow idef + true /brushNone idef + } { + /brushDashOffset idef + /brushDashArray idef + 0 ne /brushRightArrow idef + 0 ne /brushLeftArrow idef + /brushWidth idef + false /brushNone idef + } ifelse + } def + + /SetCFg { + /fgblue idef + /fggreen idef + /fgred idef + } def + + /SetCBg { + /bgblue idef + /bggreen idef + /bgred idef + } def + + /SetF { + /printSize idef + /printFont idef + } def + + /SetP { + dup type /nulltype eq { + pop true /patternNone idef + } { + /patternGrayLevel idef + patternGrayLevel -1 eq { + /patternString idef + } if + false /patternNone idef + } ifelse + } def + + /BSpl { + 0 begin + storexyn + newpath + n 1 gt { + 0 0 0 0 0 0 1 1 true subspline + n 2 gt { + 0 0 0 0 1 1 2 2 false subspline + 1 1 n 3 sub { + /i exch def + i 1 sub dup i dup i 1 add dup i 2 add dup false subspline + } for + n 3 sub dup n 2 sub dup n 1 sub dup 2 copy false subspline + } if + n 2 sub dup n 1 sub dup 2 copy 2 copy false subspline + patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if + brushNone not { istroke } if + 0 0 1 1 leftarrow + n 2 sub dup 1 sub dup rightarrow + } if + end + } dup 0 4 dict put def + + /Circ { + newpath + 0 360 arc + closepath + patternNone not { ifill } if + brushNone not { istroke } if + } def + + /CBSpl { + 0 begin + dup 2 gt { + storexyn + newpath + n 1 sub dup 0 0 1 1 2 2 true subspline + 1 1 n 3 sub { + /i exch def + i 1 sub dup i dup i 1 add dup i 2 add dup false subspline + } for + n 3 sub dup n 2 sub dup n 1 sub dup 0 0 false subspline + n 2 sub dup n 1 sub dup 0 0 1 1 false subspline + patternNone not { ifill } if + brushNone not { istroke } if + } { + Poly + } ifelse + end + } dup 0 4 dict put def + + /Elli { + 0 begin + newpath + 4 2 roll + translate + scale + 0 0 1 0 360 arc + closepath + patternNone not { ifill } if + brushNone not { istroke } if + end + } dup 0 1 dict put def + + /Line { + 0 begin + 2 storexyn + newpath + x 0 get y 0 get moveto + x 1 get y 1 get lineto + brushNone not { istroke } if + 0 0 1 1 leftarrow + 0 0 1 1 rightarrow + end + } dup 0 4 dict put def + + /MLine { + 0 begin + storexyn + newpath + n 1 gt { + x 0 get y 0 get moveto + 1 1 n 1 sub { + /i exch def + x i get y i get lineto + } for + patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if + brushNone not { istroke } if + 0 0 1 1 leftarrow + n 2 sub dup n 1 sub dup rightarrow + } if + end + } dup 0 4 dict put def + + /Poly { + 3 1 roll + newpath + moveto + -1 add + { lineto } repeat + closepath + patternNone not { ifill } if + brushNone not { istroke } if + } def + + /Rect { + 0 begin + /t exch def + /r exch def + /b exch def + /l exch def + newpath + l b moveto + l t lineto + r t lineto + r b lineto + closepath + patternNone not { ifill } if + brushNone not { istroke } if + end + } dup 0 4 dict put def + + /Text { + ishow + } def + + /idef { + dup where { pop pop pop } { exch def } ifelse + } def + + /ifill { + 0 begin + gsave + patternGrayLevel -1 ne { + fgred bgred fgred sub patternGrayLevel mul add + fggreen bggreen fggreen sub patternGrayLevel mul add + fgblue bgblue fgblue sub patternGrayLevel mul add setrgbcolor + eoFillRule { eofill } { fill } ifelse + } { + eoFillRule { eoclip } { clip } ifelse + originalCTM setmatrix + pathbbox /t exch def /r exch def /b exch def /l exch def + /w r l sub ceiling cvi def + /h t b sub ceiling cvi def + /imageByteWidth w 8 div ceiling cvi def + /imageHeight h def + bgred bggreen bgblue setrgbcolor + eoFillRule { eofill } { fill } ifelse + fgred fggreen fgblue setrgbcolor + w 0 gt h 0 gt and { + l b translate w h scale + w h true [w 0 0 h neg 0 h] { patternproc } imagemask + } if + } ifelse + grestore + end + } dup 0 8 dict put def + + /istroke { + gsave + brushDashOffset -1 eq { + [] 0 setdash + 1 setgray + } { + brushDashArray brushDashOffset setdash + fgred fggreen fgblue setrgbcolor + } ifelse + brushWidth setlinewidth + originalCTM setmatrix + stroke + grestore + } def + + /ishow { + 0 begin + gsave + fgred fggreen fgblue setrgbcolor + /fontDict printFont findfont printSize scalefont dup setfont def + /descender fontDict begin 0 [FontBBox] 1 get FontMatrix end + transform exch pop def + /vertoffset 1 printSize sub descender sub def { + 0 vertoffset moveto show + /vertoffset vertoffset printSize sub def + } forall + grestore + end + } dup 0 3 dict put def + + /patternproc { + 0 begin + /patternByteLength patternString length def + /patternHeight patternByteLength 8 mul sqrt cvi def + /patternWidth patternHeight def + /patternByteWidth patternWidth 8 idiv def + /imageByteMaxLength imageByteWidth imageHeight mul + stringLimit patternByteWidth sub min def + /imageMaxHeight imageByteMaxLength imageByteWidth idiv patternHeight idiv + patternHeight mul patternHeight max def + /imageHeight imageHeight imageMaxHeight sub store + /imageString imageByteWidth imageMaxHeight mul patternByteWidth add string def + 0 1 imageMaxHeight 1 sub { + /y exch def + /patternRow y patternByteWidth mul patternByteLength mod def + /patternRowString patternString patternRow patternByteWidth getinterval def + /imageRow y imageByteWidth mul def + 0 patternByteWidth imageByteWidth 1 sub { + /x exch def + imageString imageRow x add patternRowString putinterval + } for + } for + imageString + end + } dup 0 12 dict put def + + /min { + dup 3 2 roll dup 4 3 roll lt { exch } if pop + } def + + /max { + dup 3 2 roll dup 4 3 roll gt { exch } if pop + } def + + /midpoint { + 0 begin + /y1 exch def + /x1 exch def + /y0 exch def + /x0 exch def + x0 x1 add 2 div + y0 y1 add 2 div + end + } dup 0 4 dict put def + + /thirdpoint { + 0 begin + /y1 exch def + /x1 exch def + /y0 exch def + /x0 exch def + x0 2 mul x1 add 3 div + y0 2 mul y1 add 3 div + end + } dup 0 4 dict put def + + /subspline { + 0 begin + /movetoNeeded exch def + y exch get /y3 exch def + x exch get /x3 exch def + y exch get /y2 exch def + x exch get /x2 exch def + y exch get /y1 exch def + x exch get /x1 exch def + y exch get /y0 exch def + x exch get /x0 exch def + x1 y1 x2 y2 thirdpoint + /p1y exch def + /p1x exch def + x2 y2 x1 y1 thirdpoint + /p2y exch def + /p2x exch def + x1 y1 x0 y0 thirdpoint + p1x p1y midpoint + /p0y exch def + /p0x exch def + x2 y2 x3 y3 thirdpoint + p2x p2y midpoint + /p3y exch def + /p3x exch def + movetoNeeded { p0x p0y moveto } if + p1x p1y p2x p2y p3x p3y curveto + end + } dup 0 17 dict put def + + /storexyn { + /n exch def + /y n array def + /x n array def + n 1 sub -1 0 { + /i exch def + y i 3 2 roll put + x i 3 2 roll put + } for + } def + + /arrowhead { + 0 begin + transform originalCTM itransform + /taily exch def + /tailx exch def + transform originalCTM itransform + /tipy exch def + /tipx exch def + /dy tipy taily sub def + /dx tipx tailx sub def + /angle dx 0 ne dy 0 ne or { dy dx atan } { 90 } ifelse def + gsave + originalCTM setmatrix + tipx tipy translate + angle rotate + newpath + arrowHeight neg arrowWidth 2 div moveto + 0 0 lineto + arrowHeight neg arrowWidth 2 div neg lineto + patternNone not { + originalCTM setmatrix + /padtip arrowHeight 2 exp 0.25 arrowWidth 2 exp mul add sqrt brushWidth mul + arrowWidth div def + /padtail brushWidth 2 div def + tipx tipy translate + angle rotate + padtip 0 translate + arrowHeight padtip add padtail add arrowHeight div dup scale + arrowheadpath + ifill + } if + brushNone not { + originalCTM setmatrix + tipx tipy translate + angle rotate + arrowheadpath + istroke + } if + grestore + end + } dup 0 9 dict put def + + /arrowheadpath { + newpath + arrowHeight neg arrowWidth 2 div moveto + 0 0 lineto + arrowHeight neg arrowWidth 2 div neg lineto + } def + + /leftarrow { + 0 begin + y exch get /taily exch def + x exch get /tailx exch def + y exch get /tipy exch def + x exch get /tipx exch def + brushLeftArrow { tipx tipy tailx taily arrowhead } if + end + } dup 0 4 dict put def + + /rightarrow { + 0 begin + y exch get /tipy exch def + x exch get /tipx exch def + y exch get /taily exch def + x exch get /tailx exch def + brushRightArrow { tipx tipy tailx taily arrowhead } if + end + } dup 0 4 dict put def + %%EndResource + %%EndSetup + + %%Page: 1 1 + %%PageResources: font Helvetica + %%PageBoundingBox: 112 210 487 402 + %%BeginPageSetup + %I Idraw 8 + + Begin + %I b u + %I cfg u + %I cbg u + %I f u + %I p u + %I t + [ 1 0 0 1 0 0 ] concat + /originalCTM matrix currentmatrix def + /trueoriginalCTM matrix currentmatrix def + %%EndPageSetup + + Begin %I Rect + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I + 2304 2304 9216 5760 Rect + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 130.678 218.1928 ] concat + %I + [ + (0) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 5760 + 2304 5691 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 2304 + 2304 2373 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 171.356 218.1928 ] concat + %I + [ + (32) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 3168 5760 + 3168 5691 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 3168 2304 + 3168 2373 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 214.556 218.1928 ] concat + %I + [ + (64) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 4032 5760 + 4032 5691 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 4032 2304 + 4032 2373 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 257.756 218.1928 ] concat + %I + [ + (96) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 4896 5760 + 4896 5691 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 4896 2304 + 4896 2373 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 298.434 218.1928 ] concat + %I + [ + (128) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 5760 5760 + 5760 5691 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 5760 2304 + 5760 2373 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 341.634 218.1928 ] concat + %I + [ + (160) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 6624 5760 + 6624 5691 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 6624 2304 + 6624 2373 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 384.834 218.1928 ] concat + %I + [ + (192) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 7488 5760 + 7488 5691 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 7488 2304 + 7488 2373 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 428.034 218.1928 ] concat + %I + [ + (224) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 8352 5760 + 8352 5691 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 8352 2304 + 8352 2373 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 471.234 218.1928 ] concat + %I + [ + (256) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 5760 + 9216 5691 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 2304 + 9216 2373 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 112.6999 226.0284 ] concat + %I + [ + (-0.4) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 2304 + 9147 2304 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 2304 + 2373 2304 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 112.6999 245.2284 ] concat + %I + [ + (-0.2) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 2688 + 9147 2688 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 2688 + 2373 2688 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 117.9979 264.4284 ] concat + %I + [ + (0.0) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 3072 + 9147 3072 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 3072 + 2373 3072 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 117.9979 283.6284 ] concat + %I + [ + (0.2) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 3456 + 9147 3456 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 3456 + 2373 3456 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 117.9979 302.8284 ] concat + %I + [ + (0.4) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 3840 + 9147 3840 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 3840 + 2373 3840 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 117.9979 322.0284 ] concat + %I + [ + (0.6) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 4224 + 9147 4224 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 4224 + 2373 4224 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 117.9979 341.2284 ] concat + %I + [ + (0.8) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 4608 + 9147 4608 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 4608 + 2373 4608 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 117.9979 360.4284 ] concat + %I + [ + (1.0) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 4992 + 9147 4992 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 4992 + 2373 4992 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 117.9979 379.6284 ] concat + %I + [ + (1.2) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 5376 + 9147 5376 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 5376 + 2373 5376 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 117.9979 398.8284 ] concat + %I + [ + (1.4) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 5760 + 9147 5760 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 5760 + 2373 5760 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 2304 + 9188 2304 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 2304 + 2332 2304 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 2496 + 9188 2496 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 2496 + 2332 2496 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 2688 + 9188 2688 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 2688 + 2332 2688 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 2880 + 9188 2880 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 2880 + 2332 2880 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 3072 + 9188 3072 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 3072 + 2332 3072 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 3264 + 9188 3264 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 3264 + 2332 3264 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 3456 + 9188 3456 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 3456 + 2332 3456 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 3648 + 9188 3648 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 3648 + 2332 3648 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 3840 + 9188 3840 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 3840 + 2332 3840 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 4032 + 9188 4032 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 4032 + 2332 4032 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 4224 + 9188 4224 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 4224 + 2332 4224 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 4416 + 9188 4416 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 4416 + 2332 4416 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 4608 + 9188 4608 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 4608 + 2332 4608 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 4800 + 9188 4800 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 4800 + 2332 4800 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 4992 + 9188 4992 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 4992 + 2332 4992 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 5184 + 9188 5184 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 5184 + 2332 5184 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 5376 + 9188 5376 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 5376 + 2332 5376 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 5568 + 9188 5568 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 5568 + 2332 5568 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 5760 + 9188 5760 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 5760 + 2332 5760 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 34952 + 1 0 0 [ 1.48 4.43 ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 3072 + 9216 3072 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 256 + 2304 3161 + 2331 3161 + 2358 3170 + 2385 3209 + 2412 3209 + 2439 3199 + 2466 3257 + 2493 3266 + 2520 3295 + 2547 3305 + 2574 3295 + 2601 3276 + 2628 3247 + 2655 3266 + 2682 3257 + 2709 3257 + 2736 3257 + 2763 3247 + 2790 3238 + 2817 3228 + 2844 3238 + 2871 3266 + 2898 3286 + 2925 3295 + 2952 3218 + 2979 3142 + 3006 3142 + 3033 3113 + 3060 3094 + 3087 3055 + 3114 3055 + 3141 3065 + 3168 3084 + 3195 3074 + 3222 3084 + 3249 3065 + 3276 3036 + 3303 3026 + 3330 3036 + 3357 3036 + 3384 3017 + 3411 3026 + 3438 3007 + 3465 3055 + 3492 3046 + 3519 3055 + 3546 3074 + 3573 3026 + 3600 3007 + 3627 3036 + 3654 3055 + 3681 3065 + 3708 3055 + 3735 3017 + 3762 2988 + 3789 2998 + 3816 2959 + 3843 2873 + 3870 2834 + 3897 2777 + 3924 2710 + 3951 2662 + 3978 2719 + 4005 2892 + 4032 3113 + 4059 3382 + 4086 3660 + 4113 4140 + 4140 4630 + 4167 5071 + 4194 5369 + 4221 5494 + 4248 5426 + 4275 5138 + 4302 4630 + 4329 4006 + 4356 3478 + 4383 3170 + 4410 2940 + 4437 2825 + 4464 2777 + 4491 2815 + 4518 2873 + 4545 2940 + 4572 2940 + 4599 2950 + 4626 2940 + 4653 2959 + 4680 2959 + 4707 2959 + 4734 2930 + 4761 2950 + 4788 2950 + 4815 2950 + 4842 2969 + 4869 2930 + 4896 2902 + 4923 2902 + 4950 2921 + 4977 2930 + 5004 2940 + 5031 2911 + 5058 2930 + 5085 2950 + 5112 2969 + 5139 2940 + 5166 2940 + 5193 2911 + 5220 2902 + 5247 2902 + 5274 2940 + 5301 2940 + 5328 2930 + 5355 2911 + 5382 2892 + 5409 2921 + 5436 2902 + 5463 2911 + 5490 2902 + 5517 2892 + 5544 2902 + 5571 2921 + 5598 2921 + 5625 2930 + 5652 2940 + 5679 2911 + 5706 2902 + 5733 2940 + 5760 2940 + 5787 2950 + 5814 2950 + 5841 2902 + 5868 2911 + 5895 2930 + 5922 2940 + 5949 2969 + 5976 2940 + 6003 2930 + 6030 2902 + 6057 2921 + 6084 2940 + 6111 2940 + 6138 2950 + 6165 2911 + 6192 2892 + 6219 2892 + 6246 2921 + 6273 2930 + 6300 2911 + 6327 2892 + 6354 2882 + 6381 2882 + 6408 2902 + 6435 2892 + 6462 2873 + 6489 2882 + 6516 2854 + 6543 2863 + 6570 2863 + 6597 2882 + 6624 2863 + 6651 2825 + 6678 2815 + 6705 2825 + 6732 2854 + 6759 2834 + 6786 2825 + 6813 2815 + 6840 2786 + 6867 2806 + 6894 2815 + 6921 2825 + 6948 2815 + 6975 2786 + 7002 2777 + 7029 2806 + 7056 2825 + 7083 2834 + 7110 2844 + 7137 2854 + 7164 2844 + 7191 2902 + 7218 2930 + 7245 2978 + 7272 2988 + 7299 2998 + 7326 2988 + 7353 3036 + 7380 3065 + 7407 3084 + 7434 3074 + 7461 3055 + 7488 3055 + 7515 3074 + 7542 3094 + 7569 3113 + 7596 3113 + 7623 3074 + 7650 3074 + 7677 3084 + 7704 3103 + 7731 3103 + 7758 3122 + 7785 3074 + 7812 3055 + 7839 3103 + 7866 3094 + 7893 3113 + 7920 3113 + 7947 3074 + 7974 3065 + 8001 3094 + 8028 3103 + 8055 3084 + 8082 3103 + 8109 3084 + 8136 3084 + 8163 3094 + 8190 3122 + 8217 3132 + 8244 3103 + 8271 3094 + 8298 3074 + 8325 3084 + 8352 3113 + 8379 3084 + 8406 3084 + 8433 3084 + 8460 3055 + 8487 3084 + 8514 3074 + 8541 3084 + 8568 3065 + 8595 3046 + 8622 3036 + 8649 3046 + 8676 3046 + 8703 3055 + 8730 3065 + 8757 3026 + 8784 3017 + 8811 3026 + 8838 3046 + 8865 3055 + 8892 3055 + 8919 3026 + 8946 3026 + 8973 3026 + 9000 3074 + 9027 3055 + 9054 3046 + 9081 3036 + 9108 3007 + 9135 3046 + 9162 3055 + 9189 3055 + 256 MLine + End + + %%PageTrailer + End %I eop + showpage + + %%Trailer + end + %%EOF diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/dwt-samp.eps gsl-1.6/doc/dwt-samp.eps *** gsl-1.5/doc/dwt-samp.eps Thu Jan 1 01:00:00 1970 --- gsl-1.6/doc/dwt-samp.eps Fri Jul 23 17:55:12 2004 *************** *** 0 **** --- 1,2657 ---- + %!PS-Adobe-3.0 EPSF-3.0 + %%Creator: GNU libplot drawing library 4.1 + %%Title: PostScript plot + %%CreationDate: Thu Jul 22 17:12:13 2004 + %%DocumentData: Clean7Bit + %%LanguageLevel: 1 + %%Pages: 1 + %%PageOrder: Ascend + %%Orientation: Portrait + %%BoundingBox: 112 210 487 402 + %%DocumentNeededResources: font Helvetica + %%DocumentSuppliedResources: procset GNU_libplot 1.0 0 + %%EndComments + + %%BeginDefaults + %%PageResources: font Helvetica + %%EndDefaults + + %%BeginProlog + %%EndProlog + + %%BeginSetup + %%IncludeResource: font Helvetica + /DrawDict 50 dict def + DrawDict begin + /ISOLatin1Encoding [ + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright + /parenleft/parenright/asterisk/plus/comma/minus/period/slash + /zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon + /less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N + /O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright + /asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m + /n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/dotlessi/grave/acute/circumflex/tilde/macron/breve + /dotaccent/dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut + /ogonek/caron/space/exclamdown/cent/sterling/currency/yen/brokenbar + /section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot + /hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior + /acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine + /guillemotright/onequarter/onehalf/threequarters/questiondown + /Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla + /Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex + /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis + /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute + /Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis + /aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave + /iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex + /otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis + /yacute/thorn/ydieresis + ] def + /reencodeISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse } forall + /Encoding ISOLatin1Encoding def + currentdict end definefont + } def + /Helvetica reencodeISO def + %%BeginResource procset GNU_libplot 1.0 0 + /none null def + /numGraphicParameters 17 def + /stringLimit 65535 def + /arrowHeight 8 def + /eoFillRule true def + + /Begin { save numGraphicParameters dict begin } def + /End { end restore } def + + /SetB { + dup type /nulltype eq { + pop + false /brushRightArrow idef + false /brushLeftArrow idef + true /brushNone idef + } { + /brushDashOffset idef + /brushDashArray idef + 0 ne /brushRightArrow idef + 0 ne /brushLeftArrow idef + /brushWidth idef + false /brushNone idef + } ifelse + } def + + /SetCFg { + /fgblue idef + /fggreen idef + /fgred idef + } def + + /SetCBg { + /bgblue idef + /bggreen idef + /bgred idef + } def + + /SetF { + /printSize idef + /printFont idef + } def + + /SetP { + dup type /nulltype eq { + pop true /patternNone idef + } { + /patternGrayLevel idef + patternGrayLevel -1 eq { + /patternString idef + } if + false /patternNone idef + } ifelse + } def + + /BSpl { + 0 begin + storexyn + newpath + n 1 gt { + 0 0 0 0 0 0 1 1 true subspline + n 2 gt { + 0 0 0 0 1 1 2 2 false subspline + 1 1 n 3 sub { + /i exch def + i 1 sub dup i dup i 1 add dup i 2 add dup false subspline + } for + n 3 sub dup n 2 sub dup n 1 sub dup 2 copy false subspline + } if + n 2 sub dup n 1 sub dup 2 copy 2 copy false subspline + patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if + brushNone not { istroke } if + 0 0 1 1 leftarrow + n 2 sub dup 1 sub dup rightarrow + } if + end + } dup 0 4 dict put def + + /Circ { + newpath + 0 360 arc + closepath + patternNone not { ifill } if + brushNone not { istroke } if + } def + + /CBSpl { + 0 begin + dup 2 gt { + storexyn + newpath + n 1 sub dup 0 0 1 1 2 2 true subspline + 1 1 n 3 sub { + /i exch def + i 1 sub dup i dup i 1 add dup i 2 add dup false subspline + } for + n 3 sub dup n 2 sub dup n 1 sub dup 0 0 false subspline + n 2 sub dup n 1 sub dup 0 0 1 1 false subspline + patternNone not { ifill } if + brushNone not { istroke } if + } { + Poly + } ifelse + end + } dup 0 4 dict put def + + /Elli { + 0 begin + newpath + 4 2 roll + translate + scale + 0 0 1 0 360 arc + closepath + patternNone not { ifill } if + brushNone not { istroke } if + end + } dup 0 1 dict put def + + /Line { + 0 begin + 2 storexyn + newpath + x 0 get y 0 get moveto + x 1 get y 1 get lineto + brushNone not { istroke } if + 0 0 1 1 leftarrow + 0 0 1 1 rightarrow + end + } dup 0 4 dict put def + + /MLine { + 0 begin + storexyn + newpath + n 1 gt { + x 0 get y 0 get moveto + 1 1 n 1 sub { + /i exch def + x i get y i get lineto + } for + patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if + brushNone not { istroke } if + 0 0 1 1 leftarrow + n 2 sub dup n 1 sub dup rightarrow + } if + end + } dup 0 4 dict put def + + /Poly { + 3 1 roll + newpath + moveto + -1 add + { lineto } repeat + closepath + patternNone not { ifill } if + brushNone not { istroke } if + } def + + /Rect { + 0 begin + /t exch def + /r exch def + /b exch def + /l exch def + newpath + l b moveto + l t lineto + r t lineto + r b lineto + closepath + patternNone not { ifill } if + brushNone not { istroke } if + end + } dup 0 4 dict put def + + /Text { + ishow + } def + + /idef { + dup where { pop pop pop } { exch def } ifelse + } def + + /ifill { + 0 begin + gsave + patternGrayLevel -1 ne { + fgred bgred fgred sub patternGrayLevel mul add + fggreen bggreen fggreen sub patternGrayLevel mul add + fgblue bgblue fgblue sub patternGrayLevel mul add setrgbcolor + eoFillRule { eofill } { fill } ifelse + } { + eoFillRule { eoclip } { clip } ifelse + originalCTM setmatrix + pathbbox /t exch def /r exch def /b exch def /l exch def + /w r l sub ceiling cvi def + /h t b sub ceiling cvi def + /imageByteWidth w 8 div ceiling cvi def + /imageHeight h def + bgred bggreen bgblue setrgbcolor + eoFillRule { eofill } { fill } ifelse + fgred fggreen fgblue setrgbcolor + w 0 gt h 0 gt and { + l b translate w h scale + w h true [w 0 0 h neg 0 h] { patternproc } imagemask + } if + } ifelse + grestore + end + } dup 0 8 dict put def + + /istroke { + gsave + brushDashOffset -1 eq { + [] 0 setdash + 1 setgray + } { + brushDashArray brushDashOffset setdash + fgred fggreen fgblue setrgbcolor + } ifelse + brushWidth setlinewidth + originalCTM setmatrix + stroke + grestore + } def + + /ishow { + 0 begin + gsave + fgred fggreen fgblue setrgbcolor + /fontDict printFont findfont printSize scalefont dup setfont def + /descender fontDict begin 0 [FontBBox] 1 get FontMatrix end + transform exch pop def + /vertoffset 1 printSize sub descender sub def { + 0 vertoffset moveto show + /vertoffset vertoffset printSize sub def + } forall + grestore + end + } dup 0 3 dict put def + + /patternproc { + 0 begin + /patternByteLength patternString length def + /patternHeight patternByteLength 8 mul sqrt cvi def + /patternWidth patternHeight def + /patternByteWidth patternWidth 8 idiv def + /imageByteMaxLength imageByteWidth imageHeight mul + stringLimit patternByteWidth sub min def + /imageMaxHeight imageByteMaxLength imageByteWidth idiv patternHeight idiv + patternHeight mul patternHeight max def + /imageHeight imageHeight imageMaxHeight sub store + /imageString imageByteWidth imageMaxHeight mul patternByteWidth add string def + 0 1 imageMaxHeight 1 sub { + /y exch def + /patternRow y patternByteWidth mul patternByteLength mod def + /patternRowString patternString patternRow patternByteWidth getinterval def + /imageRow y imageByteWidth mul def + 0 patternByteWidth imageByteWidth 1 sub { + /x exch def + imageString imageRow x add patternRowString putinterval + } for + } for + imageString + end + } dup 0 12 dict put def + + /min { + dup 3 2 roll dup 4 3 roll lt { exch } if pop + } def + + /max { + dup 3 2 roll dup 4 3 roll gt { exch } if pop + } def + + /midpoint { + 0 begin + /y1 exch def + /x1 exch def + /y0 exch def + /x0 exch def + x0 x1 add 2 div + y0 y1 add 2 div + end + } dup 0 4 dict put def + + /thirdpoint { + 0 begin + /y1 exch def + /x1 exch def + /y0 exch def + /x0 exch def + x0 2 mul x1 add 3 div + y0 2 mul y1 add 3 div + end + } dup 0 4 dict put def + + /subspline { + 0 begin + /movetoNeeded exch def + y exch get /y3 exch def + x exch get /x3 exch def + y exch get /y2 exch def + x exch get /x2 exch def + y exch get /y1 exch def + x exch get /x1 exch def + y exch get /y0 exch def + x exch get /x0 exch def + x1 y1 x2 y2 thirdpoint + /p1y exch def + /p1x exch def + x2 y2 x1 y1 thirdpoint + /p2y exch def + /p2x exch def + x1 y1 x0 y0 thirdpoint + p1x p1y midpoint + /p0y exch def + /p0x exch def + x2 y2 x3 y3 thirdpoint + p2x p2y midpoint + /p3y exch def + /p3x exch def + movetoNeeded { p0x p0y moveto } if + p1x p1y p2x p2y p3x p3y curveto + end + } dup 0 17 dict put def + + /storexyn { + /n exch def + /y n array def + /x n array def + n 1 sub -1 0 { + /i exch def + y i 3 2 roll put + x i 3 2 roll put + } for + } def + + /arrowhead { + 0 begin + transform originalCTM itransform + /taily exch def + /tailx exch def + transform originalCTM itransform + /tipy exch def + /tipx exch def + /dy tipy taily sub def + /dx tipx tailx sub def + /angle dx 0 ne dy 0 ne or { dy dx atan } { 90 } ifelse def + gsave + originalCTM setmatrix + tipx tipy translate + angle rotate + newpath + arrowHeight neg arrowWidth 2 div moveto + 0 0 lineto + arrowHeight neg arrowWidth 2 div neg lineto + patternNone not { + originalCTM setmatrix + /padtip arrowHeight 2 exp 0.25 arrowWidth 2 exp mul add sqrt brushWidth mul + arrowWidth div def + /padtail brushWidth 2 div def + tipx tipy translate + angle rotate + padtip 0 translate + arrowHeight padtip add padtail add arrowHeight div dup scale + arrowheadpath + ifill + } if + brushNone not { + originalCTM setmatrix + tipx tipy translate + angle rotate + arrowheadpath + istroke + } if + grestore + end + } dup 0 9 dict put def + + /arrowheadpath { + newpath + arrowHeight neg arrowWidth 2 div moveto + 0 0 lineto + arrowHeight neg arrowWidth 2 div neg lineto + } def + + /leftarrow { + 0 begin + y exch get /taily exch def + x exch get /tailx exch def + y exch get /tipy exch def + x exch get /tipx exch def + brushLeftArrow { tipx tipy tailx taily arrowhead } if + end + } dup 0 4 dict put def + + /rightarrow { + 0 begin + y exch get /tipy exch def + x exch get /tipx exch def + y exch get /taily exch def + x exch get /tailx exch def + brushRightArrow { tipx tipy tailx taily arrowhead } if + end + } dup 0 4 dict put def + %%EndResource + %%EndSetup + + %%Page: 1 1 + %%PageResources: font Helvetica + %%PageBoundingBox: 112 210 487 402 + %%BeginPageSetup + %I Idraw 8 + + Begin + %I b u + %I cfg u + %I cbg u + %I f u + %I p u + %I t + [ 1 0 0 1 0 0 ] concat + /originalCTM matrix currentmatrix def + /trueoriginalCTM matrix currentmatrix def + %%EndPageSetup + + Begin %I Rect + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I + 2304 2304 9216 5760 Rect + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 130.678 218.1928 ] concat + %I + [ + (0) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 5760 + 2304 5691 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 2304 + 2304 2373 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 171.356 218.1928 ] concat + %I + [ + (32) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 3168 5760 + 3168 5691 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 3168 2304 + 3168 2373 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 214.556 218.1928 ] concat + %I + [ + (64) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 4032 5760 + 4032 5691 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 4032 2304 + 4032 2373 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 257.756 218.1928 ] concat + %I + [ + (96) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 4896 5760 + 4896 5691 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 4896 2304 + 4896 2373 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 298.434 218.1928 ] concat + %I + [ + (128) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 5760 5760 + 5760 5691 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 5760 2304 + 5760 2373 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 341.634 218.1928 ] concat + %I + [ + (160) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 6624 5760 + 6624 5691 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 6624 2304 + 6624 2373 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 384.834 218.1928 ] concat + %I + [ + (192) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 7488 5760 + 7488 5691 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 7488 2304 + 7488 2373 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 428.034 218.1928 ] concat + %I + [ + (224) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 8352 5760 + 8352 5691 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 8352 2304 + 8352 2373 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 471.234 218.1928 ] concat + %I + [ + (256) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 5760 + 9216 5691 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 2304 + 9216 2373 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 112.6999 226.0284 ] concat + %I + [ + (-0.4) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 2304 + 9147 2304 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 2304 + 2373 2304 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 112.6999 245.2284 ] concat + %I + [ + (-0.2) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 2688 + 9147 2688 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 2688 + 2373 2688 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 117.9979 264.4284 ] concat + %I + [ + (0.0) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 3072 + 9147 3072 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 3072 + 2373 3072 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 117.9979 283.6284 ] concat + %I + [ + (0.2) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 3456 + 9147 3456 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 3456 + 2373 3456 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 117.9979 302.8284 ] concat + %I + [ + (0.4) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 3840 + 9147 3840 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 3840 + 2373 3840 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 117.9979 322.0284 ] concat + %I + [ + (0.6) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 4224 + 9147 4224 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 4224 + 2373 4224 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 117.9979 341.2284 ] concat + %I + [ + (0.8) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 4608 + 9147 4608 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 4608 + 2373 4608 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 117.9979 360.4284 ] concat + %I + [ + (1.0) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 4992 + 9147 4992 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 4992 + 2373 4992 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 117.9979 379.6284 ] concat + %I + [ + (1.2) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 5376 + 9147 5376 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 5376 + 2373 5376 + 2 MLine + End + + Begin %I Text + %I cfg Black + 0 0 0 SetCFg + %I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* + /Helvetica 9.072000 SetF + %I t + [ 1 0 0 1 117.9979 398.8284 ] concat + %I + [ + (1.4) + ] Text + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 5760 + 9147 5760 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 5760 + 2373 5760 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 2304 + 9188 2304 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 2304 + 2332 2304 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 2496 + 9188 2496 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 2496 + 2332 2496 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 2688 + 9188 2688 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 2688 + 2332 2688 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 2880 + 9188 2880 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 2880 + 2332 2880 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 3072 + 9188 3072 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 3072 + 2332 3072 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 3264 + 9188 3264 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 3264 + 2332 3264 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 3456 + 9188 3456 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 3456 + 2332 3456 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 3648 + 9188 3648 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 3648 + 2332 3648 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 3840 + 9188 3840 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 3840 + 2332 3840 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 4032 + 9188 4032 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 4032 + 2332 4032 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 4224 + 9188 4224 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 4224 + 2332 4224 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 4416 + 9188 4416 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 4416 + 2332 4416 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 4608 + 9188 4608 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 4608 + 2332 4608 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 4800 + 9188 4800 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 4800 + 2332 4800 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 4992 + 9188 4992 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 4992 + 2332 4992 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 5184 + 9188 5184 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 5184 + 2332 5184 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 5376 + 9188 5376 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 5376 + 2332 5376 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 5568 + 9188 5568 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 5568 + 2332 5568 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 9216 5760 + 9188 5760 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 5760 + 2332 5760 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 34952 + 1 0 0 [ 1.48 4.43 ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 2 + 2304 3072 + 9216 3072 + 2 MLine + End + + Begin %I MLine + [0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM + concatmatrix pop + 0 setlinecap 0 setlinejoin 10.43 setmiterlimit + /eoFillRule true def + %I b 65535 + 1 0 0 [ ] 0 SetB + %I cfg Black + 0 0 0 SetCFg + %I cbg White + 1 1 1 SetCBg + %I p + none SetP + %I t + [0.05 0 0 0.05 18 108 ] concat + %I 256 + 2304 3104 + 2331 3133 + 2358 3151 + 2385 3172 + 2412 3182 + 2439 3195 + 2466 3211 + 2493 3226 + 2520 3230 + 2547 3238 + 2574 3248 + 2601 3257 + 2628 3269 + 2655 3280 + 2682 3291 + 2709 3302 + 2736 3272 + 2763 3253 + 2790 3244 + 2817 3233 + 2844 3233 + 2871 3230 + 2898 3224 + 2925 3219 + 2952 3170 + 2979 3133 + 3006 3107 + 3033 3079 + 3060 3062 + 3087 3042 + 3114 3018 + 3141 2996 + 3168 3041 + 3195 3068 + 3222 3077 + 3249 3091 + 3276 3087 + 3303 3088 + 3330 3093 + 3357 3097 + 3384 3083 + 3411 3074 + 3438 3070 + 3465 3064 + 3492 3064 + 3519 3062 + 3546 3059 + 3573 3056 + 3600 3044 + 3627 3036 + 3654 3029 + 3681 3022 + 3708 3016 + 3735 3011 + 3762 3004 + 3789 2998 + 3816 2918 + 3843 2858 + 3870 2817 + 3897 2771 + 3924 2760 + 3951 2739 + 3978 2709 + 4005 2681 + 4032 3062 + 4059 3334 + 4086 3727 + 4113 4088 + 4140 4611 + 4167 5091 + 4194 5289 + 4221 5563 + 4248 5317 + 4275 5210 + 4302 4533 + 4329 4009 + 4356 3548 + 4383 3070 + 4410 2955 + 4437 2743 + 4464 2875 + 4491 2915 + 4518 2863 + 4545 2836 + 4572 2893 + 4599 2928 + 4626 2940 + 4653 2958 + 4680 2933 + 4707 2920 + 4734 2918 + 4761 2913 + 4788 2920 + 4815 2924 + 4842 2924 + 4869 2925 + 4896 2920 + 4923 2917 + 4950 2916 + 4977 2913 + 5004 2913 + 5031 2912 + 5058 2911 + 5085 2910 + 5112 2910 + 5139 2910 + 5166 2910 + 5193 2910 + 5220 2909 + 5247 2908 + 5274 2908 + 5301 2907 + 5328 2907 + 5355 2907 + 5382 2907 + 5409 2906 + 5436 2906 + 5463 2905 + 5490 2905 + 5517 2905 + 5544 2904 + 5571 2904 + 5598 2903 + 5625 2903 + 5652 2902 + 5679 2902 + 5706 2902 + 5733 2901 + 5760 2901 + 5787 2901 + 5814 2900 + 5841 2900 + 5868 2900 + 5895 2900 + 5922 2899 + 5949 2899 + 5976 2899 + 6003 2898 + 6030 2898 + 6057 2898 + 6084 2897 + 6111 2897 + 6138 2897 + 6165 2896 + 6192 2896 + 6219 2895 + 6246 2895 + 6273 2895 + 6300 2894 + 6327 2894 + 6354 2894 + 6381 2893 + 6408 2893 + 6435 2892 + 6462 2892 + 6489 2892 + 6516 2891 + 6543 2891 + 6570 2891 + 6597 2890 + 6624 2873 + 6651 2860 + 6678 2852 + 6705 2843 + 6732 2838 + 6759 2832 + 6786 2824 + 6813 2817 + 6840 2815 + 6867 2811 + 6894 2806 + 6921 2802 + 6948 2796 + 6975 2791 + 7002 2785 + 7029 2780 + 7056 2839 + 7083 2881 + 7110 2906 + 7137 2935 + 7164 2947 + 7191 2964 + 7218 2985 + 7245 3005 + 7272 3008 + 7299 3015 + 7326 3027 + 7353 3038 + 7380 3053 + 7407 3067 + 7434 3080 + 7461 3093 + 7488 3068 + 7515 3052 + 7542 3048 + 7569 3040 + 7596 3043 + 7623 3043 + 7650 3040 + 7677 3038 + 7704 3046 + 7731 3052 + 7758 3055 + 7785 3058 + 7812 3059 + 7839 3061 + 7866 3063 + 7893 3065 + 7920 3077 + 7947 3087 + 7974 3094 + 8001 3102 + 8028 3106 + 8055 3112 + 8082 3118 + 8109 3125 + 8136 3128 + 8163 3132 + 8190 3137 + 8217 3142 + 8244 3147 + 8271 3152 + 8298 3157 + 8325 3162 + 8352 3139 + 8379 3123 + 8406 3115 + 8433 3105 + 8460 3102 + 8487 3097 + 8514 3091 + 8541 3085 + 8568 3086 + 8595 3086 + 8622 3083 + 8649 3081 + 8676 3077 + 8703 3073 + 8730 3070 + 8757 3067 + 8784 3072 + 8811 3074 + 8838 3075 + 8865 3076 + 8892 3074 + 8919 3074 + 8946 3074 + 8973 3074 + 9000 3072 + 9027 3070 + 9054 3069 + 9081 3068 + 9108 3067 + 9135 3066 + 9162 3065 + 9189 3064 + 256 MLine + End + + %%PageTrailer + End %I eop + showpage + + %%Trailer + end + %%EOF diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/dwt.texi gsl-1.6/doc/dwt.texi *** gsl-1.5/doc/dwt.texi Thu Jan 1 01:00:00 1970 --- gsl-1.6/doc/dwt.texi Fri Jul 23 17:55:12 2004 *************** *** 0 **** --- 1,442 ---- + @cindex Wavelets + @cindex Discrete wavelet transforms, see Wavelets + @cindex DWT, see Wavelets + @cindex Wavelet transforms, discrete, see Wavelets + @cindex transforms, Wavelet, see Wavelets + + This chapter describes functions for performing Discrete Wavelet + Transforms (DWTs). The library includes wavelets for real data in both + one and two dimensions. The wavelet functions are declared in the header + files @file{gsl_wavelet.h} and @file{gsl_wavelet2d.h}. + + @menu + * DWT Definitions:: + * DWT Initialization:: + * DWT Transform Functions:: + * DWT Examples:: + * DWT References:: + @end menu + + @node DWT Definitions + @section Definitions + @cindex DWT, mathematical definition + + The continuous wavelet transform and its inverse are defined by + the relations, + + @tex + \beforedisplay + $$ + w(s, \tau) = \int_{-\infty}^\infty f(t) * \psi^*_{s,\tau}(t) dt + $$ + \afterdisplay + @end tex + @ifinfo + @example + w(s,\tau) = \int f(t) * \psi^*_@{s,\tau@}(t) dt + @end example + @end ifinfo + + @noindent + and, + + @tex + \beforedisplay + $$ + f(t) = \int_0^\infty ds \int_{-\infty}^\infty w(s, \tau) * \psi_{s,\tau}(t) d\tau + $$ + \afterdisplay + @end tex + @ifinfo + @example + f(t) = \int \int_@{-\infty@}^\infty w(s, \tau) * \psi_@{s,\tau@}(t) d\tau ds + @end example + @end ifinfo + @noindent + where the basis functions @c{$\psi_{s,\tau}$} + @math{\psi_@{s,\tau@}} are obtained by scaling + and translation from a single function, referred to as the @dfn{mother + wavelet}. + + The discrete version of the wavelet transform acts on evenly sampled + data, with fixed scaling and translation steps (@math{s}, @math{\tau}). + The frequency and time axes are sampled @dfn{dyadically} on scales of + @math{2^j} through a level parameter @math{j}. + @c The wavelet @math{\psi} + @c can be expressed in terms of a scaling function @math{\varphi}, + @c + @c @tex + @c \beforedisplay + @c $$ + @c \psi(2^{j-1},t) = \sum_{k=0}^{2^j-1} g_j(k) * \bar{\varphi}(2^j t-k) + @c $$ + @c \afterdisplay + @c @end tex + @c @ifinfo + @c @example + @c \psi(2^@{j-1@},t) = \sum_@{k=0@}^@{2^j-1@} g_j(k) * \bar@{\varphi@}(2^j t-k) + @c @end example + @c @end ifinfo + @c @noindent + @c and + @c + @c @tex + @c \beforedisplay + @c $$ + @c \varphi(2^{j-1},t) = \sum_{k=0}^{2^j-1} h_j(k) * \bar{\varphi}(2^j t-k) + @c $$ + @c \afterdisplay + @c @end tex + @c @ifinfo + @c @example + @c \varphi(2^@{j-1@},t) = \sum_@{k=0@}^@{2^j-1@} h_j(k) * \bar@{\varphi@}(2^j t-k) + @c @end example + @c @end ifinfo + @c @noindent + @c The functions @math{\psi} and @math{\varphi} are related through the + @c coefficients + @c @c{$g_{n} = (-1)^n h_{L-1-n}$} + @c @math{g_@{n@} = (-1)^n h_@{L-1-n@}} + @c for @c{$n=0 \dots L-1$} + @c @math{n=0 ... L-1}, + @c where @math{L} is the total number of coefficients. The two sets of + @c coefficients @math{h_j} and @math{g_i} define the scaling function and + @c the wavelet. + The resulting family of functions @c{$\{\psi_{j,n}\}$} + @math{@{\psi_@{j,n@}@}} + constitutes an orthonormal + basis for square-integrable signals. + + The discrete wavelet transform is an @math{O(N)} algorithm, and is also + referred to as the @dfn{fast wavelet transform}. + + @node DWT Initialization + @section Initialization + @cindex DWT initialization + + The @code{gsl_wavelet} structure contains the filter coefficients + defining the wavelet and associated offset parameters (for wavelets with + centered support). + + @deftypefun {gsl_wavelet *} gsl_wavelet_alloc (const gsl_wavelet_type * @var{T}, size_t @var{k}) + This function allocates and initializes a wavelet object of type + @var{T}. The parameter @var{k} selects the specific member of the + wavelet family. A null pointer is returned if insufficient memory is + available or if a unsupported member is selected. + @end deftypefun + + The following wavelet types are implemented: + + @deffn {Wavelet} gsl_wavelet_daubechies + @deffnx {Wavelet} gsl_wavelet_daubechies_centered + @cindex Daubechies wavelets + @cindex maximal phase, Daubechies wavelets + The is the Daubechies wavelet family of maximum phase with @math{k/2} + vanishing moments. The implemented wavelets are + @c{$k=4, 6, \dots, 20$} + @math{k=4, 6, ..., 20}, with @var{k} even. + @end deffn + + @deffn {Wavelet} gsl_wavelet_haar + @deffnx {Wavelet} gsl_wavelet_haar_centered + @cindex Haar wavelets + This is the Haar wavelet. The only valid choice of @math{k} for the + Haar wavelet is @math{k=2}. + @end deffn + + @deffn {Wavelet} gsl_wavelet_bspline + @deffnx {Wavelet} gsl_wavelet_bspline_centered + @cindex biorthogonal wavelets + @cindex B-spline wavelets + This is the biorthogonal B-spline wavelet family of order @math{(i,j)}. + The implemented values of @math{k = 100*i + j} are 103, 105, 202, 204, + 206, 208, 301, 303, 305 307, 309. + @end deffn + + @noindent + The centered forms of the wavelets align the coefficients of the various + sub-bands on edges. Thus the resulting visualization of the + coefficients of the wavelet transform in the phase plane is easier to + understand. + + @deftypefun {const char *} gsl_wavelet_name (const gsl_wavelet * @var{w}) + This function returns a pointer to the name of the wavelet family for + @var{w}. + @end deftypefun + + @c @deftypefun {void} gsl_wavelet_print (const gsl_wavelet * @var{w}) + @c This function prints the filter coefficients (@code{**h1}, @code{**g1}, @code{**h2}, @code{**g2}) of the wavelet object @var{w}. + @c @end deftypefun + + @deftypefun {void} gsl_wavelet_free (gsl_wavelet * @var{w}) + This function frees the wavelet object @var{w}. + @end deftypefun + + The @code{gsl_wavelet_workspace} structure contains scratch space of the + same size as the input data, for holding intermediate results during the + transform. + + @deftypefun {gsl_wavelet_workspace *} gsl_wavelet_workspace_alloc (size_t @var{n}) + This function allocates a workspace for the discrete wavelet transform. + To perform a one-dimensional transform on @var{n} elements, a workspace + of size @var{n} must be provided. For two-dimensional transforms of + @var{n}-by-@var{n} matrices it is sufficient to allocate a workspace of + size @var{n}, since the transform operates on individual rows and + columns. + @end deftypefun + + @deftypefun {void} gsl_wavelet_workspace_free (gsl_wavelet_workspace * @var{workspace}) + This function frees the allocated workspace @var{workspace}. + @end deftypefun + + @node DWT Transform Functions + @section Transform Functions + + This sections describes the actual functions performing the discrete + wavelet transform. Note that the transforms use periodic boundary + conditions. If the signal is not periodic in the sample length then + spurious coefficients will appear at the beginning and end of each level + of the transform. + + @menu + * DWT in one dimension:: + * DWT in two dimension:: + @end menu + + @node DWT in one dimension + @subsection Wavelet transforms in one dimension + @cindex DWT, one dimensional + + @deftypefun int gsl_dwt_transform (const gsl_wavelet * @var{w}, double * @var{data}, size_t @var{stride}, size_t @var{n}, gsl_wavelet_direction @var{dir}, gsl_wavelet_workspace * @var{work}) + @deftypefunx int gsl_dwt_transform_forward (const gsl_wavelet * @var{w}, double * @var{data}, size_t @var{stride}, size_t @var{n}, gsl_wavelet_workspace * @var{work}) + @deftypefunx int gsl_dwt_transform_inverse (const gsl_wavelet * @var{w}, double * @var{data}, size_t @var{stride}, size_t @var{n}, gsl_wavelet_workspace * @var{work}) + + These functions compute in-place forward and inverse discrete wavelet + transforms of length @var{n} with stride @var{stride} on the array + @var{data}. The length of the transform @var{n} is restricted to powers + of two. For the @code{transform} version of the function the argument + @var{dir} can be either @code{forward} (@math{+1}) or @code{backward} + (@math{-1}). A workspace @var{work} of length @var{n} must be provided. + + For the forward transform, the elements of the original array are + replaced by the discrete wavelet + transform @c{$f_i \rightarrow w_{j,k}$} + @math{f_i -> w_@{j,k@}} + in a packed triangular storage layout, + where @var{j} is the index of the level + @c{$j = 0 \dots J-1$} + @math{j = 0 ... J-1} + and + @var{k} is the index of the coefficient within each level, + @c{$k = 0 \dots 2^j - 1$} + @math{k = 0 ... (2^j)-1}. + The total number of levels is @math{J = \log_2(n)}. The output data + has the following form, + + @tex + \beforedisplay + $$ + (s_{-1,0}, d_{0,0}, d_{1,0}, d_{1,1}, d_{2,0},\cdots, d_{j,k},\cdots, d_{J-1,2^{J-1} - 1}) + $$ + \afterdisplay + @end tex + @ifinfo + @example + (s_@{-1,0@}, d_@{0,0@}, d_@{1,0@}, d_@{1,1@}, d_@{2,0@}, ..., + d_@{j,k@}, ..., d_@{J-1,2^@{J-1@}-1@}) + @end example + @end ifinfo + @noindent + where the first element is the smoothing coefficient @math{s_{-1,0}}, + followed by the detail coefficients @math{d_{j,k}} for each level + @math{j}. The backward transform inverts these coefficients to obtain + the original data. + + These functions return a status of @code{GSL_SUCCESS} upon successful + completion. @code{GSL_EINVAL} is returned if @var{n} is not an integer + power of 2 or if insufficient workspace is provided. + @end deftypefun + + @node DWT in two dimension + @subsection Wavelet transforms in two dimension + @cindex DWT, two dimensional + + The library provides functions to perform two-dimensional discrete + wavelet transforms on square matrices. The matrix dimensions must be an + integer power of two. There are two possible orderings of the rows and + columns in the two-dimensional wavelet transform, referred to as the + ``standard'' and ``non-standard'' forms. + + The ``standard'' transform performs a discrete wavelet transform on all + rows of the matrix, followed by a separate discrete wavelet transform on + the columns of the resulting row-transformed matrix. This procedure + uses the same ordering as a two-dimensional fourier transform. + + The ``non-standard'' transform is performed in interleaved passes of the + each level of the transform on the rows and columns of the matrix. The + first level of the transform is carried out on the matrix rows, and then + the columns of the partially row-transformed data. This procedure is + then repeated across the rows and columns of the data for the subsequent + levels of the transform, until the full discrete wavelet transform is + complete. The non-standard form of the discrete wavelet transform is + typically used in image analysis. + + The functions described in this section are declared in the header file + @file{gsl_wavelet2d.h}. + + @deftypefun {int} gsl_wavelet2d_transform (const gsl_wavelet * @var{w}, double * @var{data}, size_t @var{tda}, size_t @var{size1}, size_t @var{size2}, gsl_wavelet_direction @var{dir}, gsl_wavelet_workspace * @var{work}) + @deftypefunx {int} gsl_wavelet2d_transform_forward (const gsl_wavelet * @var{w}, double * @var{data}, size_t @var{tda}, size_t @var{size1}, size_t @var{size2}, gsl_wavelet_workspace * @var{work}) + @deftypefunx {int} gsl_wavelet2d_transform_inverse (const gsl_wavelet * @var{w}, double * @var{data}, size_t @var{tda}, size_t @var{size1}, size_t @var{size2}, gsl_wavelet_workspace * @var{work}) + + These functions compute two-dimensional in-place forward and inverse + discrete wavelet transforms in standard and non-standard forms on the + array @var{data} stored in row-major form with dimensions @var{size1} + and @var{size2} and physical row length @var{tda}. The dimensions must + be equal (square matrix) and are restricted to powers of two. For the + @code{transform} version of the function the argument @var{dir} can be + either @code{forward} (@math{+1}) or @code{backward} (@math{-1}). A + workspace @var{work} of the appropriate size must be provided. On exit, + the appropriate elements of the array @var{data} are replaced by their + two-dimensional wavelet transform. + + The functions return a status of @code{GSL_SUCCESS} upon successful + completion. @code{GSL_EINVAL} is returned if @var{size1} and + @var{size2} are not equal and integer powers of 2, or if insufficient + workspace is provided. + @end deftypefun + + @deftypefun {int} gsl_wavelet2d_transform_matrix (const gsl_wavelet * @var{w}, gsl_matrix * @var{m}, gsl_wavelet_direction @var{dir}, gsl_wavelet_workspace * @var{work}) + @deftypefunx {int} gsl_wavelet2d_transform_matrix_forward (const gsl_wavelet * @var{w}, gsl_matrix * @var{m}, gsl_wavelet_workspace * @var{work}) + @deftypefunx {int} gsl_wavelet2d_transform_matrix_inverse (const gsl_wavelet * @var{w}, gsl_matrix * @var{m}, gsl_wavelet_workspace * @var{work}) + These functions compute the two-dimensional in-place wavelet transform + on a matrix @var{a}. + @end deftypefun + + @deftypefun {int} gsl_wavelet2d_nstransform (const gsl_wavelet * @var{w}, double * @var{data}, size_t @var{tda}, size_t @var{size1}, size_t @var{size2}, gsl_wavelet_direction @var{dir}, gsl_wavelet_workspace * @var{work}) + @deftypefunx {int} gsl_wavelet2d_nstransform_forward (const gsl_wavelet * @var{w}, double * @var{data}, size_t @var{tda}, size_t @var{size1}, size_t @var{size2}, gsl_wavelet_workspace * @var{work}) + @deftypefunx {int} gsl_wavelet2d_nstransform_inverse (const gsl_wavelet * @var{w}, double * @var{data}, size_t @var{tda}, size_t @var{size1}, size_t @var{size2}, gsl_wavelet_workspace * @var{work}) + These functions compute the two-dimensional wavelet transform in + non-standard form. + @end deftypefun + + @deftypefun {int} gsl_wavelet2d_nstransform_matrix (const gsl_wavelet * @var{w}, gsl_matrix * @var{m}, gsl_wavelet_direction @var{dir}, gsl_wavelet_workspace * @var{work}) + @deftypefunx {int} gsl_wavelet2d_nstransform_matrix_forward (const gsl_wavelet * @var{w}, gsl_matrix * @var{m}, gsl_wavelet_workspace * @var{work}) + @deftypefunx {int} gsl_wavelet2d_nstransform_matrix_inverse (const gsl_wavelet * @var{w}, gsl_matrix * @var{m}, gsl_wavelet_workspace * @var{work}) + These functions compute the non-standard form of the two-dimensional + in-place wavelet transform on a matrix @var{a}. + @end deftypefun + + @node DWT Examples + @section Example + + The following program demonstrates the use of the one-dimensional + wavelet transform functions. It computes an approximation to an input + signal (of length 256) using the 20 largest components of the wavelet + transform, while setting the others to zero. + + @example + @verbatiminclude examples/dwt.c + @end example + @noindent + The output can be used with the @sc{gnu} plotutils @code{graph} program, + + @example + $ ./a.out ecg.dat > dwt.dat + $ graph -T ps -x 0 256 32 -h 0.3 -a dwt.dat > dwt.ps + @end example + + @iftex + The graphs below show an original and compressed version of a sample ECG + recording from the MIT-BIH Arrhythmia Database, part of the PhysioNet + archive of public-domain of medical datasets. + + @sp 1 + @center @image{dwt-orig,3.4in} + @center @image{dwt-samp,3.4in} + @display + Original (upper) and wavelet-compressed (lower) ECG signals, using the + 20 largest components of the Daubechies(4) discrete wavelet transform. + @end display + @end iftex + + @node DWT References + @section References and Further Reading + + The mathematical background to wavelet transforms is covered in the + original lectures by Daubechies, + + @itemize @asis + @item + Ingrid Daubechies. + Ten Lectures on Wavelets. + @cite{CBMS-NSF Regional Conference Series in Applied Mathematics} (1992), + SIAM, ISBN 0898712742. + @end itemize + @noindent + An easy to read introduction to the subject with an emphasis on the + application of the wavelet transform in various branches of science is, + + @itemize @asis + @item + Paul S. Addison. @cite{The Illustrated Wavelet Transform Handbook}. + Institute of Physics Publishing (2002), ISBN 0750306920. + @end itemize + @noindent + For extensive coverage of signal analysis by wavelets, wavelet packets + and local cosine bases see, + + @itemize @asis + @item + St@'ephane Mallat. @cite{A wavelet tour of signal processing} (Second + edition). Academic Press (1999), ISBN 012466606X. + @end itemize + @noindent + The concept of multiresolution analysis underlying the wavelet transform + is described in, + + @itemize @asis + @item + S. G. Mallat. + Multiresolution Approximations and Wavelet Orthonormal Bases of L@math{^2}(R). + @cite{Transactions of the American Mathematical Society}, 315(1), 1989, 69--87. + @end itemize + + @itemize @asis + @item + S. G. Mallat. + A Theory for Multiresolution Signal Decomposition --- The Wavelet Representation. + @cite{IEEE Transactions on Pattern Analysis and Machine Intelligence}, 11, 1989, + 674--693. + @end itemize + @noindent + The coefficients for the individual wavelet families implemented by the + library can be found in the following papers, + + @itemize @asis + @item + I. Daubechies. + Orthonormal Bases of Compactly Supported Wavelets. + @cite{Communications on Pure and Applied Mathematics}, 41 (1988) 909--996. + @end itemize + + @itemize @asis + @item + A. Cohen, I. Daubechies, and J.-C. Feauveau. + Biorthogonal Bases of Compactly Supported Wavelets. + @cite{Communications on Pure and Applied Mathematics}, 45 (1992) + 485--560. + @end itemize + + @noindent + The PhysioNet archive of physiological datasets can be found online at + @uref{http://www.physionet.org/} and is described in the following + paper, + + @itemize @asis + @item + Goldberger et al. + PhysioBank, PhysioToolkit, and PhysioNet: Components + of a New Research Resource for Complex Physiologic + Signals. + @cite{Circulation} 101(23):e215-e220 2000. + @end itemize diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/eigen.texi gsl-1.6/doc/eigen.texi *** gsl-1.5/doc/eigen.texi Thu Jun 24 15:18:54 2004 --- gsl-1.6/doc/eigen.texi Fri Nov 12 17:16:43 2004 *************** *** 7,12 **** @cindex LAPACK, recommended for linear algebra ! These routines are intended for "small" systems where simple algorithms are ! acceptable. Anyone interested finding eigenvalues and eigenvectors of large matrices will want to use the sophisticated routines found in @sc{lapack}. The Fortran version of @sc{lapack} is recommended as the --- 7,12 ---- @cindex LAPACK, recommended for linear algebra ! These routines are intended for ``small'' systems where simple algorithms are ! acceptable. Anyone interested in finding eigenvalues and eigenvectors of large matrices will want to use the sophisticated routines found in @sc{lapack}. The Fortran version of @sc{lapack} is recommended as the diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/examples/dwt.c gsl-1.6/doc/examples/dwt.c *** gsl-1.5/doc/examples/dwt.c Thu Jan 1 01:00:00 1970 --- gsl-1.6/doc/examples/dwt.c Fri Jul 23 17:55:12 2004 *************** *** 0 **** --- 1,44 ---- + #include + #include + #include + #include + + int + main (int argc, char **argv) + { + int i, n = 256, nc = 20; + double *data = malloc (n * sizeof (double)); + double *abscoeff = malloc (n * sizeof (double)); + size_t *p = malloc (n * sizeof (size_t)); + + FILE *f = fopen (argv[1], "r"); + for (i = 0; i < n; i++) + { + fscanf (f, "%lg", &data[i]); + } + fclose (f); + + { + gsl_wavelet *w = gsl_wavelet_alloc (gsl_wavelet_daubechies, 4); + gsl_wavelet_workspace *work = gsl_wavelet_workspace_alloc (n); + + gsl_wavelet_transform_forward (w, data, 1, n, work); + + for (i = 0; i < n; i++) + { + abscoeff[i] = fabs (data[i]); + } + + gsl_sort_index (p, abscoeff, 1, n); + + for (i = 0; (i + nc) < n; i++) + data[p[i]] = 0; + + gsl_wavelet_transform_inverse (w, data, 1, n, work); + } + + for (i = 0; i < n; i++) + { + printf ("%g\n", data[i]); + } + } diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/examples/dwt.dat gsl-1.6/doc/examples/dwt.dat *** gsl-1.5/doc/examples/dwt.dat Thu Jan 1 01:00:00 1970 --- gsl-1.6/doc/examples/dwt.dat Fri Jul 23 17:55:12 2004 *************** *** 0 **** --- 1,256 ---- + 0.0167729 + 0.031888 + 0.0412921 + 0.0522264 + 0.0574496 + 0.0642031 + 0.0724869 + 0.0803607 + 0.0825233 + 0.0862162 + 0.0914394 + 0.0962525 + 0.102596 + 0.108529 + 0.114053 + 0.119686 + 0.104007 + 0.094039 + 0.0897813 + 0.0839935 + 0.0839162 + 0.0823088 + 0.0791713 + 0.0764437 + 0.0509741 + 0.0315983 + 0.0183161 + 0.00340114 + -0.00542012 + -0.0158742 + -0.0279611 + -0.0396104 + -0.0160286 + -0.00188697 + 0.00281451 + 0.0100455 + 0.00783627 + 0.00815656 + 0.0110063 + 0.0131783 + 0.00591016 + 0.00117148 + -0.00103772 + -0.00392469 + -0.00428218 + -0.00531744 + -0.00703047 + -0.0085619 + -0.014332 + -0.0189663 + -0.0224649 + -0.0262678 + -0.0289349 + -0.0319064 + -0.0351822 + -0.0383765 + -0.0801973 + -0.111668 + -0.132789 + -0.156683 + -0.162696 + -0.1735 + -0.189095 + -0.203407 + -0.00510083 + 0.136235 + 0.341101 + 0.528945 + 0.801527 + 1.0514 + 1.15485 + 1.29754 + 1.16912 + 1.11335 + 0.760921 + 0.487984 + 0.24772 + -0.00129903 + -0.0610099 + -0.171446 + -0.102442 + -0.081519 + -0.108677 + -0.122951 + -0.0931296 + -0.0751235 + -0.0689329 + -0.0595764 + -0.0723311 + -0.0791611 + -0.0800665 + -0.0825593 + -0.0791275 + -0.0772832 + -0.0770263 + -0.0763442 + -0.078946 + -0.080668 + -0.0815099 + -0.0825877 + -0.0827855 + -0.083219 + -0.0838884 + -0.0844945 + -0.0842208 + -0.0841828 + -0.0843805 + -0.0845151 + -0.0848855 + -0.0851927 + -0.0854368 + -0.0856977 + -0.0858204 + -0.0859801 + -0.0861769 + -0.0863638 + -0.0865877 + -0.0868017 + -0.0870057 + -0.0872124 + -0.0874562 + -0.08769 + -0.0879139 + -0.0881405 + -0.0883571 + -0.0885764 + -0.0887984 + -0.0890196 + -0.0890797 + -0.0891829 + -0.0893293 + -0.0894642 + -0.0896423 + -0.0898087 + -0.0899636 + -0.0901216 + -0.0903228 + -0.0905125 + -0.0906905 + -0.0908717 + -0.0910413 + -0.0912139 + -0.0913897 + -0.0915647 + -0.0917828 + -0.0919894 + -0.0921844 + -0.0923825 + -0.092569 + -0.0927586 + -0.0929514 + -0.0931433 + -0.0933236 + -0.093507 + -0.0936935 + -0.0938792 + -0.094068 + -0.094256 + -0.0944431 + -0.0946305 + -0.103627 + -0.110264 + -0.11454 + -0.119448 + -0.121996 + -0.125177 + -0.12899 + -0.132633 + -0.133916 + -0.135831 + -0.138379 + -0.140758 + -0.143768 + -0.14661 + -0.149282 + -0.151999 + -0.121242 + -0.0994544 + -0.0866362 + -0.0714146 + -0.0651625 + -0.056507 + -0.0454482 + -0.0350333 + -0.033588 + -0.0297392 + -0.0234871 + -0.017879 + -0.00986753 + -0.00250002 + 0.00422351 + 0.0111196 + -0.00226639 + -0.0102178 + -0.0127347 + -0.0167077 + -0.0152462 + -0.0152409 + -0.0166917 + -0.0177524 + -0.0133785 + -0.0104608 + -0.00899926 + -0.00714755 + -0.00675204 + -0.00596633 + -0.00479045 + -0.00371911 + 0.00278678 + 0.00783649 + 0.01143 + 0.0154137 + 0.0179412 + 0.0208589 + 0.0241668 + 0.0273702 + 0.0291173 + 0.0312547 + 0.0337822 + 0.0362052 + 0.0390183 + 0.0417269 + 0.044331 + 0.0469631 + 0.0347545 + 0.0265225 + 0.0222671 + 0.0169461 + 0.0156016 + 0.0131917 + 0.00971622 + 0.00652626 + 0.00731282 + 0.00703387 + 0.00568942 + 0.00463047 + 0.00250601 + 0.000667052 + -0.000886403 + -0.00251636 + -0.000169788 + 0.00111128 + 0.00132683 + 0.00182789 + 0.00126344 + 0.000984496 + 0.000991051 + 0.000921107 + -0.000214344 + -0.00106429 + -0.00162874 + -0.00226969 + -0.00262514 + -0.00305708 + -0.00356553 + -0.00405348 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/examples/ecg.dat gsl-1.6/doc/examples/ecg.dat *** gsl-1.5/doc/examples/ecg.dat Thu Jan 1 01:00:00 1970 --- gsl-1.6/doc/examples/ecg.dat Fri Jul 23 17:55:12 2004 *************** *** 0 **** --- 1,256 ---- + 0.0462458471760794 + 0.0462458471760794 + 0.0512458471760794 + 0.0712458471760795 + 0.0712458471760795 + 0.0662458471760795 + 0.0962458471760795 + 0.101245847176079 + 0.116245847176079 + 0.121245847176079 + 0.116245847176079 + 0.106245847176079 + 0.0912458471760794 + 0.101245847176079 + 0.0962458471760795 + 0.0962458471760795 + 0.0962458471760795 + 0.0912458471760794 + 0.0862458471760795 + 0.0812458471760795 + 0.0862458471760795 + 0.101245847176079 + 0.111245847176079 + 0.116245847176079 + 0.0762458471760795 + 0.0362458471760795 + 0.0362458471760795 + 0.0212458471760795 + 0.0112458471760795 + -0.00875415282392056 + -0.00875415282392056 + -0.00375415282392055 + 0.00624584717607946 + 0.00124584717607945 + 0.00624584717607946 + -0.00375415282392055 + -0.0187541528239206 + -0.0237541528239205 + -0.0187541528239206 + -0.0187541528239206 + -0.0287541528239205 + -0.0237541528239205 + -0.0337541528239205 + -0.00875415282392056 + -0.0137541528239206 + -0.00875415282392056 + 0.00124584717607945 + -0.0237541528239205 + -0.0337541528239205 + -0.0187541528239206 + -0.00875415282392056 + -0.00375415282392055 + -0.00875415282392056 + -0.0287541528239205 + -0.0437541528239205 + -0.0387541528239205 + -0.0587541528239205 + -0.103754152823921 + -0.123754152823921 + -0.153754152823921 + -0.188754152823921 + -0.213754152823921 + -0.183754152823921 + -0.0937541528239205 + 0.0212458471760795 + 0.161245847176079 + 0.306245847176079 + 0.556245847176079 + 0.81124584717608 + 1.04124584717608 + 1.19624584717608 + 1.26124584717608 + 1.22624584717608 + 1.07624584717608 + 0.81124584717608 + 0.486245847176079 + 0.211245847176079 + 0.0512458471760794 + -0.0687541528239206 + -0.128754152823921 + -0.153754152823921 + -0.133754152823921 + -0.103754152823921 + -0.0687541528239206 + -0.0687541528239206 + -0.0637541528239206 + -0.0687541528239206 + -0.0587541528239205 + -0.0587541528239205 + -0.0587541528239205 + -0.0737541528239206 + -0.0637541528239206 + -0.0637541528239206 + -0.0637541528239206 + -0.0537541528239205 + -0.0737541528239206 + -0.0887541528239205 + -0.0887541528239205 + -0.0787541528239206 + -0.0737541528239206 + -0.0687541528239206 + -0.0837541528239206 + -0.0737541528239206 + -0.0637541528239206 + -0.0537541528239205 + -0.0687541528239206 + -0.0687541528239206 + -0.0837541528239206 + -0.0887541528239205 + -0.0887541528239205 + -0.0687541528239206 + -0.0687541528239206 + -0.0737541528239206 + -0.0837541528239206 + -0.0937541528239205 + -0.0787541528239206 + -0.0887541528239205 + -0.0837541528239206 + -0.0887541528239205 + -0.0937541528239205 + -0.0887541528239205 + -0.0787541528239206 + -0.0787541528239206 + -0.0737541528239206 + -0.0687541528239206 + -0.0837541528239206 + -0.0887541528239205 + -0.0687541528239206 + -0.0687541528239206 + -0.0637541528239206 + -0.0637541528239206 + -0.0887541528239205 + -0.0837541528239206 + -0.0737541528239206 + -0.0687541528239206 + -0.0537541528239205 + -0.0687541528239206 + -0.0737541528239206 + -0.0887541528239205 + -0.0787541528239206 + -0.0687541528239206 + -0.0687541528239206 + -0.0637541528239206 + -0.0837541528239206 + -0.0937541528239205 + -0.0937541528239205 + -0.0787541528239206 + -0.0737541528239206 + -0.0837541528239206 + -0.0937541528239205 + -0.0987541528239205 + -0.0987541528239205 + -0.0887541528239205 + -0.0937541528239205 + -0.103754152823921 + -0.0987541528239205 + -0.113754152823921 + -0.108754152823921 + -0.108754152823921 + -0.0987541528239205 + -0.108754152823921 + -0.128754152823921 + -0.133754152823921 + -0.128754152823921 + -0.113754152823921 + -0.123754152823921 + -0.128754152823921 + -0.133754152823921 + -0.148754152823921 + -0.138754152823921 + -0.133754152823921 + -0.128754152823921 + -0.133754152823921 + -0.148754152823921 + -0.153754152823921 + -0.138754152823921 + -0.128754152823921 + -0.123754152823921 + -0.118754152823921 + -0.113754152823921 + -0.118754152823921 + -0.0887541528239205 + -0.0737541528239206 + -0.0487541528239205 + -0.0437541528239205 + -0.0387541528239205 + -0.0437541528239205 + -0.0187541528239206 + -0.00375415282392055 + 0.00624584717607946 + 0.00124584717607945 + -0.00875415282392056 + -0.00875415282392056 + 0.00124584717607945 + 0.0112458471760795 + 0.0212458471760795 + 0.0212458471760795 + 0.00124584717607945 + 0.00124584717607945 + 0.00624584717607946 + 0.0162458471760795 + 0.0162458471760795 + 0.0262458471760795 + 0.00124584717607945 + -0.00875415282392056 + 0.0162458471760795 + 0.0112458471760795 + 0.0212458471760795 + 0.0212458471760795 + 0.00124584717607945 + -0.00375415282392055 + 0.0112458471760795 + 0.0162458471760795 + 0.00624584717607946 + 0.0162458471760795 + 0.00624584717607946 + 0.00624584717607946 + 0.0112458471760795 + 0.0262458471760795 + 0.0312458471760795 + 0.0162458471760795 + 0.0112458471760795 + 0.00124584717607945 + 0.00624584717607946 + 0.0212458471760795 + 0.00624584717607946 + 0.00624584717607946 + 0.00624584717607946 + -0.00875415282392056 + 0.00624584717607946 + 0.00124584717607945 + 0.00624584717607946 + -0.00375415282392055 + -0.0137541528239206 + -0.0187541528239206 + -0.0137541528239206 + -0.0137541528239206 + -0.00875415282392056 + -0.00375415282392055 + -0.0237541528239205 + -0.0287541528239205 + -0.0237541528239205 + -0.0137541528239206 + -0.00875415282392056 + -0.00875415282392056 + -0.0237541528239205 + -0.0237541528239205 + -0.0237541528239205 + 0.00124584717607945 + -0.00875415282392056 + -0.0137541528239206 + -0.0187541528239206 + -0.0337541528239205 + -0.0137541528239206 + -0.00875415282392056 + -0.00875415282392056 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/fft.texi gsl-1.6/doc/fft.texi *** gsl-1.5/doc/fft.texi Thu Jun 24 15:18:54 2004 --- gsl-1.6/doc/fft.texi Mon Nov 29 14:54:51 2004 *************** *** 164,176 **** @noindent A @dfn{stride} parameter allows the user to perform transforms on the elements @code{z[stride*i]} instead of @code{z[i]}. A stride greater than 1 can be used to take an in-place FFT of the column of a matrix. A stride of 1 accesses the array without any additional spacing between ! elements. ! The array indices have the same ordering as those in the definition of ! the DFT --- i.e. there are no index transformations or permutations of ! the data. For physical applications it is important to remember that the index --- 164,186 ---- @noindent + The array indices for the data have the same ordering as those + in the definition of the DFT---i.e. there are no index transformations + or permutations of the data. + A @dfn{stride} parameter allows the user to perform transforms on the elements @code{z[stride*i]} instead of @code{z[i]}. A stride greater than 1 can be used to take an in-place FFT of the column of a matrix. A stride of 1 accesses the array without any additional spacing between ! elements. ! ! To perform an FFT on a vector argument, such as @code{gsl_complex_vector ! * v}, use the following definitions (or their equivalents) when calling ! the functions described in this chapter: ! @example ! gsl_complex_packed_array data = v->data; ! size_t stride = v->stride; ! size_t n = v->size; ! @end example For physical applications it is important to remember that the index *************** *** 204,208 **** @noindent When @math{N} is even the location @math{N/2} contains the most positive ! and negative frequencies @math{+1/(2 \Delta)}, @math{-1/(2 \Delta)}) which are equivalent. If @math{N} is odd then general structure of the table above still applies, but @math{N/2} does not appear. --- 214,218 ---- @noindent When @math{N} is even the location @math{N/2} contains the most positive ! and negative frequencies (@math{+1/(2 \Delta)}, @math{-1/(2 \Delta)}) which are equivalent. If @math{N} is odd then general structure of the table above still applies, but @math{N/2} does not appear. *************** *** 312,316 **** here use the same indexing scheme and basic algorithms as @sc{fftpack}. ! The mixed-radix algorithm is based on sub-transform modules -- highly optimized small length FFTs which are combined to create larger FFTs. There are efficient modules for factors of 2, 3, 4, 5, 6 and 7. The --- 322,326 ---- here use the same indexing scheme and basic algorithms as @sc{fftpack}. ! The mixed-radix algorithm is based on sub-transform modules---highly optimized small length FFTs which are combined to create larger FFTs. There are efficient modules for factors of 2, 3, 4, 5, 6 and 7. The diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/fitting.texi gsl-1.6/doc/fitting.texi *** gsl-1.5/doc/fitting.texi Thu Jun 24 15:18:54 2004 --- gsl-1.6/doc/fitting.texi Fri Nov 12 17:20:42 2004 *************** *** 11,15 **** divided into separate versions for simple one- or two-parameter regression and multiple-parameter fits. The functions are declared in ! the header file @file{gsl_fit.h} @menu --- 11,15 ---- divided into separate versions for simple one- or two-parameter regression and multiple-parameter fits. The functions are declared in ! the header file @file{gsl_fit.h}. @menu *************** *** 397,405 **** A summary of formulas and techniques for least squares fitting can be found in the "Statistics" chapter of the Annual Review of Particle ! Physics prepared by the Particle Data Group. @itemize @asis @item ! @cite{Review of Particle Properties} R.M. Barnett et al., Physical Review D54, 1 (1996) @uref{http://pdg.lbl.gov/} --- 397,405 ---- A summary of formulas and techniques for least squares fitting can be found in the "Statistics" chapter of the Annual Review of Particle ! Physics prepared by the Particle Data Group, @itemize @asis @item ! @cite{Review of Particle Properties}, R.M. Barnett et al., Physical Review D54, 1 (1996) @uref{http://pdg.lbl.gov/} diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/gsl-design.texi gsl-1.6/doc/gsl-design.texi *** gsl-1.5/doc/gsl-design.texi Thu Jun 24 15:18:54 2004 --- gsl-1.6/doc/gsl-design.texi Mon Nov 29 14:54:51 2004 *************** *** 104,112 **** @menu * Motivation:: * Design:: * Copying:: @end menu ! @node Motivation, Design, Top, Top @chapter Motivation @cindex numerical analysis --- 104,113 ---- @menu * Motivation:: + * Contributing:: * Design:: * Copying:: @end menu ! @node Motivation, Contributing, Top, Top @chapter Motivation @cindex numerical analysis *************** *** 216,220 **** numerical experts (or their graduate students) will contribute. ! @node Design, Copying, Motivation, Top @chapter Design --- 217,317 ---- numerical experts (or their graduate students) will contribute. ! @node Contributing, Design, Motivation, Top ! @chapter Contributing ! ! This design document was originally written in 1996. As of 2004, GSL ! itself is essentially feature complete, the developers are not actively ! working on any major new functionality. ! ! The main emphasis is now on ensuring the stability of the existing ! functions, improving consistency, tidying up a few problem areas and ! fixing any bugs that are reported. Potential contributors are ! encouraged to gain familiarity with the library by investigating and ! fixing known problems listed in the @file{BUGS} file in the CVS ! repository. ! ! Adding large amounts of new code is difficult because it leads to ! differences in the maturity of different parts of the library. To ! maintain stability, any new functionality is encouraged as ! @dfn{packages}, built on top of GSL and maintained independently by the ! author, as in other free software projects (such as the Perl CPAN ! archive and TeX CTAN archive, etc). ! ! @menu ! * Packages:: ! @end menu ! ! @node Packages, , Contributing, Contributing ! @section Packages ! ! The design of GSL permits extensions to be used alongside the existing ! library easily by simple linking. For example, additional random number ! generators can be provided in a separate library: ! ! @example ! $ tar xvfz rngextra-0.1.tar.gz ! $ cd rngextra-0.1 ! $ ./configure; make; make check; make install ! $ ... ! $ gcc -Wall main.c -lrngextra -lgsl -lgslcblas -lm ! @end example ! ! The points below summarise the package design guidelines. These are ! intended to ensure that packages are consistent with GSL itself, to make ! life easier for the end-user and make it possible to distribute popular ! well-tested packages as part of the core GSL in future. ! ! @itemize @bullet ! @item Follow the GSL and GNU coding standards described in this document ! ! This means using the standard GNU packaging tools, such as Automake, ! providing documentation in Texinfo format, and a test suite. The test ! suite should run using @samp{make check}, and use the test functions ! provided in GSL to produce the output with @code{PASS:}/@code{FAIL:} ! lines. It is not essential to use libtool since packages are likely to ! be small, a static library is sufficient and simpler to build. ! ! @item Use a new unique prefix for the package (do not use @samp{gsl_} -- this is reserved for internal use). ! ! For example, a package of additional random number generators might use ! the prefix @code{rngextra}. ! ! @example ! #include ! ! gsl_rng * r = gsl_rng_alloc (rngextra_lsfr32); ! @end example ! ! @item Use a meaningful version number which reflects the state of development ! ! Generally, @code{0.x} are alpha versions, which provide no guarantees. ! Following that, @code{0.9.x} are beta versions, which should be essentially ! complete, subject only to minor changes and bug fixes. The first major ! release is @code{1.0}. Any version number of @code{1.0} or higher ! should be suitable for production use with a well-defined API. ! ! The API must not change in a major release and should be ! backwards-compatible in its behavior (excluding actual bug-fixes), so ! that existing code do not have to be modified. Note that the API ! includes all exported definitions, including data-structures defined ! with @code{struct}. If you need to change the API in a package, it ! requires a new major release (e.g. @code{2.0}). ! ! @item Use the GNU General Public License (GPL) ! ! Follow the normal procedures of obtaining a copyright disclaimer if you ! would like to have the package considered for inclusion in GSL itself in ! the future (@pxref{Legal issues}). ! @end itemize ! ! Post announcements of your package releases to ! @email{gsl-discuss@@sources.redhat.com} so that information about them ! can be added to the GSL webpages. ! ! An example package @samp{rngextra} containing two additional random ! number generators can be found at ! @url{http://www.network-theory.co.uk/download/rngextra/}. ! ! @node Design, Copying, Contributing, Top @chapter Design *************** *** 1225,1235 **** Only use code which is explicitly under a free license: GPL or Public Domain. If there is no license on the code then this does not mean it ! is public domain -- an explicit statement is required (see the Debian ! Free Software Guidelines for details). If in doubt check with the ! author. @item I @strong{think} one can reference algorithms from classic books on ! numerical analysis. @end itemize --- 1322,1332 ---- Only use code which is explicitly under a free license: GPL or Public Domain. If there is no license on the code then this does not mean it ! is public domain -- an explicit statement is required. If in doubt check ! with the author. @item I @strong{think} one can reference algorithms from classic books on ! numerical analysis (BJG: yes, provided the code is an independent ! implementation and not copied from any existing software). @end itemize diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/gsl-ref.texi gsl-1.6/doc/gsl-ref.texi *** gsl-1.5/doc/gsl-ref.texi Thu Jun 24 15:18:54 2004 --- gsl-1.6/doc/gsl-ref.texi Mon Dec 27 17:33:55 2004 *************** *** 236,239 **** --- 236,240 ---- * Chebyshev Approximations:: * Series Acceleration:: + * Wavelet Transforms:: * Discrete Hankel Transforms:: * One dimensional Root-Finding:: *************** *** 372,380 **** @include cheb.texi ! @node Series Acceleration, Discrete Hankel Transforms, Chebyshev Approximations, Top @chapter Series Acceleration @include sum.texi ! @node Discrete Hankel Transforms, One dimensional Root-Finding, Series Acceleration, Top @chapter Discrete Hankel Transforms @include dht.texi --- 373,385 ---- @include cheb.texi ! @node Series Acceleration, Wavelet Transforms, Chebyshev Approximations, Top @chapter Series Acceleration @include sum.texi ! @node Wavelet Transforms, Discrete Hankel Transforms, Series Acceleration, Top ! @chapter Wavelet Transforms ! @include dwt.texi ! ! @node Discrete Hankel Transforms, One dimensional Root-Finding, Wavelet Transforms, Top @chapter Discrete Hankel Transforms @include dht.texi *************** *** 479,483 **** --- 484,496 ---- Wrote the major cumulative distribution functions. + @item Ivo Alxneit + Wrote the routines for wavelet transforms. + + @item Tuomo Keskitalo + Improved the implementation of the ODE solvers. + @end table + + Thanks to Nigel Lowry for help in proofreading the manual. @node Autoconf Macros, GSL CBLAS Library, Contributors to GSL, Top diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/histogram.texi gsl-1.6/doc/histogram.texi *** gsl-1.5/doc/histogram.texi Mon Jun 2 16:54:48 2003 --- gsl-1.6/doc/histogram.texi Fri Nov 12 17:19:53 2004 *************** *** 861,865 **** The following functions are used by the access and update routines to ! locate the bin which corresponds to a given @math{(x\,y)} coordinate. @deftypefun int gsl_histogram2d_find (const gsl_histogram2d * @var{h}, double @var{x}, double @var{y}, size_t * @var{i}, size_t * @var{j}) --- 861,865 ---- The following functions are used by the access and update routines to ! locate the bin which corresponds to a given @math{(x,y)} coordinate. @deftypefun int gsl_histogram2d_find (const gsl_histogram2d * @var{h}, double @var{x}, double @var{y}, size_t * @var{i}, size_t * @var{j}) *************** *** 1144,1153 **** @section Example programs for 2D histograms This program demonstrates two features of two-dimensional histograms. ! First a 10 by 10 2d-histogram is created with x and y running from 0 to ! 1. Then a few sample points are added to the histogram, at (0.3,0.3) ! with a height of 1, at (0.8,0.1) with a height of 5 and at (0.7,0.9) ! with a height of 0.5. This histogram with three events is used to ! generate a random sample of 1000 simulated events, which are printed ! out. @example --- 1144,1153 ---- @section Example programs for 2D histograms This program demonstrates two features of two-dimensional histograms. ! First a 10-by-10 two-dimensional histogram is created with x and y running ! from 0 to 1. Then a few sample points are added to the histogram, at ! (0.3,0.3) with a height of 1, at (0.8,0.1) with a height of 5 and at ! (0.7,0.9) with a height of 0.5. This histogram with three events is ! used to generate a random sample of 1000 simulated events, which are ! printed out. @example diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/ieee754.texi gsl-1.6/doc/ieee754.texi *** gsl-1.5/doc/ieee754.texi Thu Jun 24 15:18:54 2004 --- gsl-1.6/doc/ieee754.texi Fri Nov 12 17:20:42 2004 *************** *** 224,228 **** as @code{fpsetround}, which should be used whenever they are available. Unfortunately in the past there has been no universal API for ! controlling their behavior -- each system has had its own low-level way of accessing them. To help you write portable programs GSL allows you to specify modes in a platform-independent way using the environment --- 224,228 ---- as @code{fpsetround}, which should be used whenever they are available. Unfortunately in the past there has been no universal API for ! controlling their behavior---each system has had its own low-level way of accessing them. To help you write portable programs GSL allows you to specify modes in a platform-independent way using the environment *************** *** 394,398 **** @itemize @asis @item ! ANSI/IEEE Std 754-1985, IEEE Standard for Binary Floating-Point Arithmetic @end itemize @noindent --- 394,398 ---- @itemize @asis @item ! ANSI/IEEE Std 754-1985, IEEE Standard for Binary Floating-Point Arithmetic. @end itemize @noindent *************** *** 405,409 **** David Goldberg: What Every Computer Scientist Should Know About Floating-Point Arithmetic. @cite{ACM Computing Surveys}, Vol. 23, No. 1 ! (March 1991), pages 5-48 Corrigendum: @cite{ACM Computing Surveys}, Vol. 23, No. 3 (September --- 405,409 ---- David Goldberg: What Every Computer Scientist Should Know About Floating-Point Arithmetic. @cite{ACM Computing Surveys}, Vol. 23, No. 1 ! (March 1991), pages 5-48. Corrigendum: @cite{ACM Computing Surveys}, Vol. 23, No. 3 (September *************** *** 414,418 **** Surveyor's Forum: ``What Every Computer Scientist Should Know About Floating-Point Arithmetic''. @cite{ACM Computing Surveys}, Vol. 24, ! No. 3 (September 1992), page 319 @end itemize @noindent --- 414,418 ---- Surveyor's Forum: ``What Every Computer Scientist Should Know About Floating-Point Arithmetic''. @cite{ACM Computing Surveys}, Vol. 24, ! No. 3 (September 1992), page 319. @end itemize @noindent diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/intro.texi gsl-1.6/doc/intro.texi *** gsl-1.5/doc/intro.texi Thu Jun 24 15:18:54 2004 --- gsl-1.6/doc/intro.texi Mon Dec 27 17:30:26 2004 *************** *** 115,120 **** to take advantage of additional features in the GNU C compiler and GNU C library. However, the library is fully portable and should compile on ! most systems. Precompiled versions of the library can be purchased from ! commercial redistributors listed on the website. Announcements of new releases, updates and other relevant events are --- 115,120 ---- to take advantage of additional features in the GNU C compiler and GNU C library. However, the library is fully portable and should compile on ! most systems. Precompiled versions of the library and support contracts ! can be purchased from commercial redistributors listed on the website above. Announcements of new releases, updates and other relevant events are *************** *** 189,196 **** @noindent This mailing list can be used to ask questions not covered by this ! manual. ! ! The developers of the library can be reached via the development ! mailing list @code{gsl-discuss@@sources.redhat.com}. @node Conventions used in this manual --- 189,193 ---- @noindent This mailing list can be used to ask questions not covered by this ! manual, and to contact the developers of the library. @node Conventions used in this manual diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/linalg.texi gsl-1.6/doc/linalg.texi *** gsl-1.5/doc/linalg.texi Thu Jun 24 15:18:54 2004 --- gsl-1.6/doc/linalg.texi Fri Nov 12 17:16:43 2004 *************** *** 259,263 **** This function solves the system @math{R x = Q^T b} for @var{x}. It can be used when the @math{QR} decomposition of a matrix is available in ! unpacked form as (@var{Q},@var{R}). @end deftypefun --- 259,263 ---- This function solves the system @math{R x = Q^T b} for @var{x}. It can be used when the @math{QR} decomposition of a matrix is available in ! unpacked form as (@var{Q}, @var{R}). @end deftypefun *************** *** 354,363 **** This function solves the system @math{R P^T x = Q^T b} for @var{x}. It can be used when the @math{QR} decomposition of a matrix is available in ! unpacked form as (@var{Q},@var{R}). @end deftypefun @deftypefun int gsl_linalg_QRPT_update (gsl_matrix * @var{Q}, gsl_matrix * @var{R}, const gsl_permutation * @var{p}, gsl_vector * @var{u}, const gsl_vector * @var{v}) This function performs a rank-1 update @math{w v^T} of the @math{QRP^T} ! decomposition (@var{Q}, @var{R},@var{p}). The update is given by @math{Q'R' = Q R + w v^T} where the output matrices @math{Q'} and @math{R'} are also orthogonal and right triangular. Note that @var{w} is --- 354,363 ---- This function solves the system @math{R P^T x = Q^T b} for @var{x}. It can be used when the @math{QR} decomposition of a matrix is available in ! unpacked form as (@var{Q}, @var{R}). @end deftypefun @deftypefun int gsl_linalg_QRPT_update (gsl_matrix * @var{Q}, gsl_matrix * @var{R}, const gsl_permutation * @var{p}, gsl_vector * @var{u}, const gsl_vector * @var{v}) This function performs a rank-1 update @math{w v^T} of the @math{QRP^T} ! decomposition (@var{Q}, @var{R}, @var{p}). The update is given by @math{Q'R' = Q R + w v^T} where the output matrices @math{Q'} and @math{R'} are also orthogonal and right triangular. Note that @var{w} is diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/montecarlo.texi gsl-1.6/doc/montecarlo.texi *** gsl-1.5/doc/montecarlo.texi Thu Jun 24 15:18:54 2004 --- gsl-1.6/doc/montecarlo.texi Fri Nov 12 17:19:53 2004 *************** *** 78,85 **** @item size_t dim ! the number of dimensions for @var{x} @item void * params ! a pointer to the parameters of the function @end table @end deftp --- 78,85 ---- @item size_t dim ! the number of dimensions for @var{x}. @item void * params ! a pointer to the parameters of the function. @end table @end deftp *************** *** 148,152 **** \beforedisplay $$ ! E(f; N) = V \langle f \rangle = {V \over N} \sum_i^N f(x_i). $$ \afterdisplay --- 148,152 ---- \beforedisplay $$ ! E(f; N) = V \langle f \rangle = {V \over N} \sum_i^N f(x_i) $$ \afterdisplay *************** *** 154,158 **** @ifinfo @example ! E(f; N) = = V = (V / N) \sum_i^N f(x_i). @end example @end ifinfo --- 154,158 ---- @ifinfo @example ! E(f; N) = = V = (V / N) \sum_i^N f(x_i) @end example @end ifinfo *************** *** 165,169 **** \beforedisplay $$ ! \sigma^2 (E; N) = {V \over N } \sum_i^N (f(x_i) - \langle f \rangle)^2 $$ \afterdisplay --- 165,169 ---- \beforedisplay $$ ! \sigma^2 (E; N) = {V \over N } \sum_i^N (f(x_i) - \langle f \rangle)^2. $$ \afterdisplay *************** *** 171,175 **** @ifinfo @example ! \sigma^2 (E; N) = (V / N) \sum_i^N (f(x_i) - )^2 @end example @end ifinfo --- 171,175 ---- @ifinfo @example ! \sigma^2 (E; N) = (V / N) \sum_i^N (f(x_i) - )^2. @end example @end ifinfo *************** *** 237,241 **** \beforedisplay $$ ! Var(f) = {\sigma_a^2(f) \over 4 N_a} + {\sigma_b^2(f) \over 4 N_b} $$ \afterdisplay --- 237,241 ---- \beforedisplay $$ ! Var(f) = {\sigma_a^2(f) \over 4 N_a} + {\sigma_b^2(f) \over 4 N_b}. $$ \afterdisplay *************** *** 243,247 **** @ifinfo @example ! Var(f) = (\sigma_a^2(f) / 4 N_a) + (\sigma_b^2(f) / 4 N_b) @end example @end ifinfo --- 243,247 ---- @ifinfo @example ! Var(f) = (\sigma_a^2(f) / 4 N_a) + (\sigma_b^2(f) / 4 N_b). @end example @end ifinfo *************** *** 253,257 **** \beforedisplay $$ ! {N_a \over N_a+N_b} = {\sigma_a \over \sigma_a + \sigma_b} $$ \afterdisplay --- 253,257 ---- \beforedisplay $$ ! {N_a \over N_a+N_b} = {\sigma_a \over \sigma_a + \sigma_b}. $$ \afterdisplay *************** *** 259,263 **** @ifinfo @example ! N_a / (N_a + N_b) = \sigma_a / (\sigma_a + \sigma_b) @end example @end ifinfo --- 259,263 ---- @ifinfo @example ! N_a / (N_a + N_b) = \sigma_a / (\sigma_a + \sigma_b). @end example @end ifinfo *************** *** 353,357 **** \beforedisplay $$ ! Var(f) = {\sigma_a \over N_a^\alpha} + {\sigma_b \over N_b^\alpha} $$ \afterdisplay --- 353,357 ---- \beforedisplay $$ ! Var(f) = {\sigma_a \over N_a^\alpha} + {\sigma_b \over N_b^\alpha}. $$ \afterdisplay *************** *** 359,363 **** @ifinfo @example ! Var(f) = @{\sigma_a \over N_a^\alpha@} + @{\sigma_b \over N_b^\alpha@} @end example @end ifinfo --- 359,363 ---- @ifinfo @example ! Var(f) = @{\sigma_a \over N_a^\alpha@} + @{\sigma_b \over N_b^\alpha@}. @end example @end ifinfo *************** *** 410,414 **** \beforedisplay $$ ! Var_g(f; N) = Var(f/g; N) $$ \afterdisplay --- 410,414 ---- \beforedisplay $$ ! Var_g(f; N) = Var(f/g; N). $$ \afterdisplay *************** *** 416,420 **** @ifinfo @example ! Var_g(f; N) = Var(f/g; N) @end example @end ifinfo --- 416,420 ---- @ifinfo @example ! Var_g(f; N) = Var(f/g; N). @end example @end ifinfo *************** *** 493,497 **** @sc{vegas} the error estimate is made non-zero by substituting a small value (typically @code{1e-30}). The implementation in GSL differs from ! this and avoids the use of an arbitrary constant -- it either assigns the value a weight which is the average weight of the preceding estimates or discards it according to the following procedure, --- 493,497 ---- @sc{vegas} the error estimate is made non-zero by substituting a small value (typically @code{1e-30}). The implementation in GSL differs from ! this and avoids the use of an arbitrary constant---it either assigns the value a weight which is the average weight of the preceding estimates or discards it according to the following procedure, *************** *** 589,593 **** \int_{-\pi}^{+\pi} {dk_y \over 2\pi} \int_{-\pi}^{+\pi} {dk_z \over 2\pi} ! { 1 \over (1 - \cos(k_x)\cos(k_y)\cos(k_z))} $$ \afterdisplay --- 589,593 ---- \int_{-\pi}^{+\pi} {dk_y \over 2\pi} \int_{-\pi}^{+\pi} {dk_z \over 2\pi} ! { 1 \over (1 - \cos(k_x)\cos(k_y)\cos(k_z))}. $$ \afterdisplay *************** *** 598,602 **** \int_@{-pi@}^@{+pi@} @{dk_y/(2 pi)@} \int_@{-pi@}^@{+pi@} @{dk_z/(2 pi)@} ! 1 / (1 - cos(k_x)cos(k_y)cos(k_z)) @end example @end ifinfo --- 598,602 ---- \int_@{-pi@}^@{+pi@} @{dk_y/(2 pi)@} \int_@{-pi@}^@{+pi@} @{dk_z/(2 pi)@} ! 1 / (1 - cos(k_x)cos(k_y)cos(k_z)). @end example @end ifinfo diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/multifit.texi gsl-1.6/doc/multifit.texi *** gsl-1.5/doc/multifit.texi Thu Jun 24 15:18:54 2004 --- gsl-1.6/doc/multifit.texi Tue Nov 23 17:13:27 2004 *************** *** 152,163 **** @item size_t n the number of functions, i.e. the number of components of the ! vector @var{f} @item size_t p the number of independent variables, i.e. the number of components of ! the vectors @var{x} @item void * params ! a pointer to the parameters of the function @end table @end deftp --- 152,163 ---- @item size_t n the number of functions, i.e. the number of components of the ! vector @var{f}. @item size_t p the number of independent variables, i.e. the number of components of ! the vectors @var{x}. @item void * params ! a pointer to the parameters of the function. @end table @end deftp *************** *** 183,201 **** @item int (* fdf) (const gsl_vector * @var{x}, void * @var{params}, gsl_vector * @var{f}, gsl_matrix * @var{J}) This function should set the values of the @var{f} and @var{J} as above, ! for arguments @var{x} and parameters @var{params}. This function provides ! an optimization of the separate functions for @math{f(x)} and @math{J(x)} -- ! it is always faster to compute the function and its derivative at the ! same time. @item size_t n the number of functions, i.e. the number of components of the ! vector @var{f} @item size_t p the number of independent variables, i.e. the number of components of ! the vectors @var{x} @item void * params ! a pointer to the parameters of the function @end table @end deftp --- 183,201 ---- @item int (* fdf) (const gsl_vector * @var{x}, void * @var{params}, gsl_vector * @var{f}, gsl_matrix * @var{J}) This function should set the values of the @var{f} and @var{J} as above, ! for arguments @var{x} and parameters @var{params}. This function ! provides an optimization of the separate functions for @math{f(x)} and ! @math{J(x)}---it is always faster to compute the function and its ! derivative at the same time. @item size_t n the number of functions, i.e. the number of components of the ! vector @var{f}. @item size_t p the number of independent variables, i.e. the number of components of ! the vectors @var{x}. @item void * params ! a pointer to the parameters of the function. @end table @end deftp *************** *** 219,226 **** @end deftypefun @deftypefun {gsl_vector *} gsl_multifit_fsolver_position (const gsl_multifit_fsolver * @var{s}) @deftypefunx {gsl_vector *} gsl_multifit_fdfsolver_position (const gsl_multifit_fdfsolver * @var{s}) These functions return the current position (i.e. best-fit parameters) ! of the solver @var{s}. @end deftypefun --- 219,245 ---- @end deftypefun + The solver struct @var{s} contains the following entries, which can + be used to track the progress of the solution: + + @table @code + @item gsl_vector * x + The current position. + + @item gsl_vector * f + The function value at the current position. + + @item gsl_vector * dx + The difference between the current position and the previous position, + i.e. the last step, taken as a vector. + + @item gsl_matrix * J + The Jacobian matrix at the current position (for the + @code{gsl_multifit_fdfsolver} struct only) + @end table + @deftypefun {gsl_vector *} gsl_multifit_fsolver_position (const gsl_multifit_fsolver * @var{s}) @deftypefunx {gsl_vector *} gsl_multifit_fdfsolver_position (const gsl_multifit_fdfsolver * @var{s}) These functions return the current position (i.e. best-fit parameters) ! @code{s->x} of the solver @var{s}. @end deftypefun *************** *** 341,345 **** resulting point, @math{x'}. If the step reduces the norm of the function sufficiently, and follows the predicted behavior of the ! function within the trust region. then it is accepted and size of the trust region is increased. If the proposed step fails to improve the solution, or differs significantly from the expected behavior within --- 360,364 ---- resulting point, @math{x'}. If the step reduces the norm of the function sufficiently, and follows the predicted behavior of the ! function within the trust region, then it is accepted and the size of the trust region is increased. If the proposed step fails to improve the solution, or differs significantly from the expected behavior within *************** *** 637,642 **** gsl_multifit_covar (s->J, 0.0, covar); - gsl_matrix_fprintf (stdout, covar, "%g"); - #define FIT(i) gsl_vector_get(s->x, i) #define ERR(i) sqrt(gsl_matrix_get(covar,i,i)) --- 656,659 ---- *************** *** 657,661 **** @} ! int print_state (size_t iter, gsl_multifit_fdfsolver * s) @{ --- 674,678 ---- @} ! void print_state (size_t iter, gsl_multifit_fdfsolver * s) @{ *************** *** 672,676 **** The iteration terminates when the change in x is smaller than 0.0001, as both an absolute and relative change. Here are the results of running ! the program, @smallexample --- 689,693 ---- The iteration terminates when the change in x is smaller than 0.0001, as both an absolute and relative change. Here are the results of running ! the program: @smallexample *************** *** 723,727 **** J.J. Mor@'e, B.S. Garbow, K.E. Hillstrom, "Testing Unconstrained Optimization Software", ACM Transactions on Mathematical Software, Vol ! 7, No 1 (1981), p 17-41 @end itemize --- 740,744 ---- J.J. Mor@'e, B.S. Garbow, K.E. Hillstrom, "Testing Unconstrained Optimization Software", ACM Transactions on Mathematical Software, Vol ! 7, No 1 (1981), p 17-41. @end itemize diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/multimin.texi gsl-1.6/doc/multimin.texi *** gsl-1.5/doc/multimin.texi Thu Jun 24 15:18:54 2004 --- gsl-1.6/doc/multimin.texi Fri Nov 12 17:20:42 2004 *************** *** 186,193 **** @item void (* fdf) (const gsl_vector * @var{x}, void * @var{params}, double * f, gsl_vector * @var{g}) This function should set the values of the @var{f} and @var{g} as above, ! for arguments @var{x} and parameters @var{params}. This function provides ! an optimization of the separate functions for @math{f(x)} and @math{g(x)} -- ! it is always faster to compute the function and its derivative at the ! same time. @item size_t n --- 186,193 ---- @item void (* fdf) (const gsl_vector * @var{x}, void * @var{params}, double * f, gsl_vector * @var{g}) This function should set the values of the @var{f} and @var{g} as above, ! for arguments @var{x} and parameters @var{params}. This function ! provides an optimization of the separate functions for @math{f(x)} and ! @math{g(x)}---it is always faster to compute the function and its ! derivative at the same time. @item size_t n *************** *** 369,373 **** There are several minimization methods available. The best choice of ! algorithm depends on the problem. All of the algorithms uses the value of the function and most of its gradient at each evaluation point, too. --- 369,373 ---- There are several minimization methods available. The best choice of ! algorithm depends on the problem. All of the algorithms use the value of the function and most of its gradient at each evaluation point, too. *************** *** 580,584 **** iterations would be needed for a more complicated function. ! Here is another example using the Nelder Mead Simplex algorithm to minimize the same example object function, as above. --- 580,584 ---- iterations would be needed for a more complicated function. ! Here is another example using the Nelder-Mead Simplex algorithm to minimize the same example object function, as above. diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/multiroots.texi gsl-1.6/doc/multiroots.texi *** gsl-1.5/doc/multiroots.texi Thu Jun 24 15:18:54 2004 --- gsl-1.6/doc/multiroots.texi Fri Nov 12 17:19:53 2004 *************** *** 275,282 **** @item int (* fdf) (const gsl_vector * @var{x}, void * @var{params}, gsl_vector * @var{f}, gsl_matrix * @var{J}) This function should set the values of the @var{f} and @var{J} as above, ! for arguments @var{x} and parameters @var{params}. This function provides ! an optimization of the separate functions for @math{f(x)} and @math{J(x)} -- ! it is always faster to compute the function and its derivative at the ! same time. @item size_t n --- 275,282 ---- @item int (* fdf) (const gsl_vector * @var{x}, void * @var{params}, gsl_vector * @var{f}, gsl_matrix * @var{J}) This function should set the values of the @var{f} and @var{J} as above, ! for arguments @var{x} and parameters @var{params}. This function ! provides an optimization of the separate functions for @math{f(x)} and ! @math{J(x)}---it is always faster to compute the function and its ! derivative at the same time. @item size_t n *************** *** 468,475 **** The root finding algorithms described in this section make use of both the function and its derivative. They require an initial guess for the ! location of the root, but there is no absolute guarantee of convergence ! -- the function must be suitable for this technique and the initial ! guess must be sufficiently close to the root for it to work. When the ! conditions are satisfied then convergence is quadratic. --- 468,475 ---- The root finding algorithms described in this section make use of both the function and its derivative. They require an initial guess for the ! location of the root, but there is no absolute guarantee of ! convergence---the function must be suitable for this technique and the ! initial guess must be sufficiently close to the root for it to work. ! When the conditions are satisfied then convergence is quadratic. *************** *** 499,508 **** the algorithm uses the linear combination of the Newton and gradient directions which is predicted to minimize the norm of the function while ! staying inside the trust region. @tex \beforedisplay $$ ! dx = - \alpha J^{-1} f(x) - \beta \nabla |f(x)|^2 $$ \afterdisplay --- 499,508 ---- the algorithm uses the linear combination of the Newton and gradient directions which is predicted to minimize the norm of the function while ! staying inside the trust region, @tex \beforedisplay $$ ! dx = - \alpha J^{-1} f(x) - \beta \nabla |f(x)|^2. $$ \afterdisplay *************** *** 510,514 **** @ifinfo @example ! dx = - \alpha J^@{-1@} f(x) - \beta \nabla |f(x)|^2 @end example @end ifinfo --- 510,514 ---- @ifinfo @example ! dx = - \alpha J^@{-1@} f(x) - \beta \nabla |f(x)|^2. @end example @end ifinfo diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/ntuple.texi gsl-1.6/doc/ntuple.texi *** gsl-1.5/doc/ntuple.texi Thu Jun 24 15:18:54 2004 --- gsl-1.6/doc/ntuple.texi Fri Nov 12 17:19:53 2004 *************** *** 56,60 **** ntuple struct. Any existing file with the same name is truncated to zero length and overwritten. A pointer to memory for the current ntuple ! row @var{ntuple_data} must be supplied -- this is used to copy ntuples in and out of the file. @end deftypefun --- 56,60 ---- ntuple struct. Any existing file with the same name is truncated to zero length and overwritten. A pointer to memory for the current ntuple ! row @var{ntuple_data} must be supplied---this is used to copy ntuples in and out of the file. @end deftypefun *************** *** 67,71 **** and returns a pointer to a corresponding ntuple struct. The ntuples in the file must have size @var{size}. A pointer to memory for the current ! ntuple row @var{ntuple_data} must be supplied -- this is used to copy ntuples in and out of the file. @end deftypefun --- 67,71 ---- and returns a pointer to a corresponding ntuple struct. The ntuples in the file must have size @var{size}. A pointer to memory for the current ! ntuple row @var{ntuple_data} must be supplied---this is used to copy ntuples in and out of the file. @end deftypefun diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/ode-initval.texi gsl-1.6/doc/ode-initval.texi *** gsl-1.5/doc/ode-initval.texi Thu Jun 24 15:18:54 2004 --- gsl-1.6/doc/ode-initval.texi Fri Nov 12 17:19:53 2004 *************** *** 69,77 **** @code{jacobian} element of the struct can be replaced by a null pointer for those algorithms). However, it is useful to provide the Jacobian to allow ! the solver algorithms to be interchanged -- the best algorithms make use of the Jacobian. @item size_t dimension; ! This is the dimension of the system of equations @item void * params --- 69,77 ---- @code{jacobian} element of the struct can be replaced by a null pointer for those algorithms). However, it is useful to provide the Jacobian to allow ! the solver algorithms to be interchanged---the best algorithms make use of the Jacobian. @item size_t dimension; ! This is the dimension of the system of equations. @item void * params *************** *** 168,176 **** @deffn {Step Type} gsl_odeiv_step_rk2imp ! Implicit 2nd order Runge-Kutta at Gaussian points @end deffn @deffn {Step Type} gsl_odeiv_step_rk4imp ! Implicit 4th order Runge-Kutta at Gaussian points @end deffn --- 168,176 ---- @deffn {Step Type} gsl_odeiv_step_rk2imp ! Implicit 2nd order Runge-Kutta at Gaussian points. @end deffn @deffn {Step Type} gsl_odeiv_step_rk4imp ! Implicit 4th order Runge-Kutta at Gaussian points. @end deffn *************** *** 185,193 **** @deffn {Step Type} gsl_odeiv_step_gear1 @cindex Gear method, differential equations ! M=1 implicit Gear method @end deffn @deffn {Step Type} gsl_odeiv_step_gear2 ! M=2 implicit Gear method @end deffn --- 185,193 ---- @deffn {Step Type} gsl_odeiv_step_gear1 @cindex Gear method, differential equations ! M=1 implicit Gear method. @end deffn @deffn {Step Type} gsl_odeiv_step_gear2 ! M=2 implicit Gear method. @end deffn *************** *** 280,284 **** error on each step within an absolute error of @var{eps_abs} and relative error of @var{eps_rel} with respect to the derivatives of the ! solution @math{y'_i(t)} . This is equivalent to the standard control object with @var{a_y}=0 and @var{a_dydt}=1. @end deftypefun --- 280,284 ---- error on each step within an absolute error of @var{eps_abs} and relative error of @var{eps_rel} with respect to the derivatives of the ! solution @math{y'_i(t)}. This is equivalent to the standard control object with @var{a_y}=0 and @var{a_dydt}=1. @end deftypefun diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/poly.texi gsl-1.6/doc/poly.texi *** gsl-1.5/doc/poly.texi Thu Jun 24 15:18:54 2004 --- gsl-1.6/doc/poly.texi Tue Nov 23 17:13:27 2004 *************** *** 37,41 **** The functions described here manipulate polynomials stored in Newton's divided-difference representation. The use of divided-differences is ! described in Abramowitz & Stegun sections 25.1.4, 25.2.26. @deftypefun int gsl_poly_dd_init (double @var{dd}[], const double @var{xa}[], const double @var{ya}[], size_t @var{size}) --- 37,41 ---- The functions described here manipulate polynomials stored in Newton's divided-difference representation. The use of divided-differences is ! described in Abramowitz & Stegun sections 25.1.4 and 25.2.26. @deftypefun int gsl_poly_dd_init (double @var{dd}[], const double @var{xa}[], const double @var{ya}[], size_t @var{size}) *************** *** 264,268 **** The balanced-QR method and its error analysis are described in the ! following papers. @itemize @asis --- 264,268 ---- The balanced-QR method and its error analysis are described in the ! following papers, @itemize @asis *************** *** 280,282 **** --- 280,291 ---- eigenvalues'', @cite{Mathematics of Computation}, Vol. 64 No. 210 (1995), 763--776. + @end itemize + + @noindent + The formulas for divided difference are given in Abramowitz and Stegun, + + @itemize @asis + @item + Abramowitz and Stegun, @cite{Handbook of Mathematical Functions}, + Sections 25.1.4 and 25.2.26. @end itemize diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/qrng.texi gsl-1.6/doc/qrng.texi *** gsl-1.5/doc/qrng.texi Mon Jun 2 17:07:26 2003 --- gsl-1.6/doc/qrng.texi Fri Nov 12 17:19:53 2004 *************** *** 86,90 **** @deftypefun {gsl_qrng *} gsl_qrng_clone (const gsl_qrng * @var{q}) This function returns a pointer to a newly created generator which is an ! exact copy of the generator @var{r}. @end deftypefun --- 86,90 ---- @deftypefun {gsl_qrng *} gsl_qrng_clone (const gsl_qrng * @var{q}) This function returns a pointer to a newly created generator which is an ! exact copy of the generator @var{q}. @end deftypefun diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-bernoulli.tex gsl-1.6/doc/rand-bernoulli.tex *** gsl-1.5/doc/rand-bernoulli.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-bernoulli.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-bernoulli.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-bernoulli.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-beta.tex gsl-1.6/doc/rand-beta.tex *** gsl-1.5/doc/rand-beta.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-beta.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-beta.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-beta.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-binomial.tex gsl-1.6/doc/rand-binomial.tex *** gsl-1.5/doc/rand-binomial.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-binomial.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-binomial.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-binomial.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-bivariate-gaussian.tex gsl-1.6/doc/rand-bivariate-gaussian.tex *** gsl-1.5/doc/rand-bivariate-gaussian.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-bivariate-gaussian.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-bivariate-gaussian.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-bivariate-gaussian.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-cauchy.tex gsl-1.6/doc/rand-cauchy.tex *** gsl-1.5/doc/rand-cauchy.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-cauchy.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-cauchy.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-cauchy.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-chisq.tex gsl-1.6/doc/rand-chisq.tex *** gsl-1.5/doc/rand-chisq.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-chisq.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-chisq.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-chisq.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-erlang.tex gsl-1.6/doc/rand-erlang.tex *** gsl-1.5/doc/rand-erlang.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-erlang.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-erlang.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-erlang.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-exponential.tex gsl-1.6/doc/rand-exponential.tex *** gsl-1.5/doc/rand-exponential.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-exponential.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-exponential.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-exponential.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-exppow.tex gsl-1.6/doc/rand-exppow.tex *** gsl-1.5/doc/rand-exppow.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-exppow.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-exppow.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-exppow.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 *************** *** 979,983 **** showpage }}% ! \put(3037,1863){\rjust{$a=2, b=0.5$}}% \put(3037,1963){\rjust{$a=1, b=2.5$}}% \put(1950,2226){\cjust{Exponential Power Distribution}}% --- 979,983 ---- showpage }}% ! \put(3037,1863){\rjust{$a=1, b=0.5$}}% \put(3037,1963){\rjust{$a=1, b=2.5$}}% \put(1950,2226){\cjust{Exponential Power Distribution}}% diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-fdist.tex gsl-1.6/doc/rand-fdist.tex *** gsl-1.5/doc/rand-fdist.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-fdist.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-fdist.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-fdist.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 *************** *** 912,916 **** }}% \put(3037,1863){\rjust{$ ! u_1=1, u_2=2$}}% \put(3037,1963){\rjust{$ --- 912,916 ---- }}% \put(3037,1863){\rjust{$ ! u_1=3, u_2=2$}}% \put(3037,1963){\rjust{$ diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-flat.tex gsl-1.6/doc/rand-flat.tex *** gsl-1.5/doc/rand-flat.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-flat.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-flat.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-flat.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-gamma.tex gsl-1.6/doc/rand-gamma.tex *** gsl-1.5/doc/rand-gamma.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-gamma.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-gamma.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-gamma.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-gaussian-tail.tex gsl-1.6/doc/rand-gaussian-tail.tex *** gsl-1.5/doc/rand-gaussian-tail.tex Mon Jul 28 15:49:33 2003 --- gsl-1.6/doc/rand-gaussian-tail.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-gaussian-tail.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:33 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-gaussian-tail.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:28 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-gaussian.tex gsl-1.6/doc/rand-gaussian.tex *** gsl-1.5/doc/rand-gaussian.tex Mon Jul 28 15:49:33 2003 --- gsl-1.6/doc/rand-gaussian.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-gaussian.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:33 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-gaussian.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:28 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-geometric.tex gsl-1.6/doc/rand-geometric.tex *** gsl-1.5/doc/rand-geometric.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-geometric.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-geometric.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-geometric.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-gumbel1.tex gsl-1.6/doc/rand-gumbel1.tex *** gsl-1.5/doc/rand-gumbel1.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-gumbel1.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-gumbel1.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-gumbel1.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-gumbel2.tex gsl-1.6/doc/rand-gumbel2.tex *** gsl-1.5/doc/rand-gumbel2.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-gumbel2.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-gumbel2.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-gumbel2.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-hypergeometric.tex gsl-1.6/doc/rand-hypergeometric.tex *** gsl-1.5/doc/rand-hypergeometric.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-hypergeometric.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-hypergeometric.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-hypergeometric.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-landau.tex gsl-1.6/doc/rand-landau.tex *** gsl-1.5/doc/rand-landau.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-landau.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-landau.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-landau.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-laplace.tex gsl-1.6/doc/rand-laplace.tex *** gsl-1.5/doc/rand-laplace.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-laplace.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-laplace.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-laplace.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-levy.tex gsl-1.6/doc/rand-levy.tex *** gsl-1.5/doc/rand-levy.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-levy.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-levy.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-levy.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-levyskew.tex gsl-1.6/doc/rand-levyskew.tex *** gsl-1.5/doc/rand-levyskew.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-levyskew.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-levyskew.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-levyskew.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-logarithmic.tex gsl-1.6/doc/rand-logarithmic.tex *** gsl-1.5/doc/rand-logarithmic.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-logarithmic.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-logarithmic.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-logarithmic.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-logistic.tex gsl-1.6/doc/rand-logistic.tex *** gsl-1.5/doc/rand-logistic.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-logistic.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-logistic.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-logistic.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-lognormal.tex gsl-1.6/doc/rand-lognormal.tex *** gsl-1.5/doc/rand-lognormal.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-lognormal.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-lognormal.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-lognormal.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-nbinomial.tex gsl-1.6/doc/rand-nbinomial.tex *** gsl-1.5/doc/rand-nbinomial.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-nbinomial.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-nbinomial.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-nbinomial.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-pareto.tex gsl-1.6/doc/rand-pareto.tex *** gsl-1.5/doc/rand-pareto.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-pareto.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-pareto.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-pareto.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-pascal.tex gsl-1.6/doc/rand-pascal.tex *** gsl-1.5/doc/rand-pascal.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-pascal.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-pascal.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-pascal.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-poisson.tex gsl-1.6/doc/rand-poisson.tex *** gsl-1.5/doc/rand-poisson.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-poisson.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-poisson.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-poisson.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-rayleigh-tail.tex gsl-1.6/doc/rand-rayleigh-tail.tex *** gsl-1.5/doc/rand-rayleigh-tail.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-rayleigh-tail.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-rayleigh-tail.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-rayleigh-tail.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-rayleigh.tex gsl-1.6/doc/rand-rayleigh.tex *** gsl-1.5/doc/rand-rayleigh.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-rayleigh.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-rayleigh.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-rayleigh.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-tdist.tex gsl-1.6/doc/rand-tdist.tex *** gsl-1.5/doc/rand-tdist.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-tdist.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-tdist.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-tdist.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rand-weibull.tex gsl-1.6/doc/rand-weibull.tex *** gsl-1.5/doc/rand-weibull.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/rand-weibull.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: rand-weibull.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 360 237 --- 26,30 ---- %%Title: rand-weibull.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 360 237 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/randist.texi gsl-1.6/doc/randist.texi *** gsl-1.5/doc/randist.texi Thu Jun 24 15:18:54 2004 --- gsl-1.6/doc/randist.texi Fri Nov 12 17:19:53 2004 *************** *** 1228,1232 **** due to Robert E. Knop (CACM 13, 326 (1970)), and explained in Knuth, v2, 3rd ed, p136. It uses the surprising fact that the distribution ! projected along any axis is actually uniform (this is only true for 3d). @end deftypefn --- 1228,1233 ---- due to Robert E. Knop (CACM 13, 326 (1970)), and explained in Knuth, v2, 3rd ed, p136. It uses the surprising fact that the distribution ! projected along any axis is actually uniform (this is only true for 3 ! dimensions). @end deftypefn *************** *** 1518,1522 **** This method can be used to speed up some of the discrete random number ! generators below, such as the binomial distribution. To use if for something like the Poisson Distribution, a modification would have to be made, since it only takes a finite set of @math{K} outcomes. --- 1519,1523 ---- This method can be used to speed up some of the discrete random number ! generators below, such as the binomial distribution. To use it for something like the Poisson Distribution, a modification would have to be made, since it only takes a finite set of @math{K} outcomes. *************** *** 1529,1533 **** the probabilities of the discrete events; these array elements must all be positive, but they needn't add up to one (so you can think of them more ! generally as "weights") -- the preprocessor will normalize appropriately. This return value is used as an argument for the @code{gsl_ran_discrete} function below. --- 1530,1534 ---- the probabilities of the discrete events; these array elements must all be positive, but they needn't add up to one (so you can think of them more ! generally as "weights")---the preprocessor will normalize appropriately. This return value is used as an argument for the @code{gsl_ran_discrete} function below. *************** *** 1923,1927 **** The following functions allow the shuffling and sampling of a set of ! objects. The algorithms rely on a random number generator as source of randomness and a poor quality generator can lead to correlations in the output. In particular it is important to avoid generators with a short --- 1924,1928 ---- The following functions allow the shuffling and sampling of a set of ! objects. The algorithms rely on a random number generator as a source of randomness and a poor quality generator can lead to correlations in the output. In particular it is important to avoid generators with a short diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/random-walk.tex gsl-1.6/doc/random-walk.tex *** gsl-1.5/doc/random-walk.tex Mon Jul 28 15:49:34 2003 --- gsl-1.6/doc/random-walk.tex Mon Oct 11 15:35:05 2004 *************** *** 26,30 **** %%Title: random-walk.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Jul 28 15:49:34 2003 %%DocumentFonts: %%BoundingBox: 0 0 251 216 --- 26,30 ---- %%Title: random-walk.tex %%Creator: gnuplot 3.7 patchlevel 2 ! %%CreationDate: Mon Oct 11 13:28:29 2004 %%DocumentFonts: %%BoundingBox: 0 0 251 216 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/randplots.gnp gsl-1.6/doc/randplots.gnp *** gsl-1.5/doc/randplots.gnp Mon Jul 28 15:41:27 2003 --- gsl-1.6/doc/randplots.gnp Mon Oct 11 15:35:05 2004 *************** *** 104,108 **** x**(v1/2.0-1)*(v2+v1*x)**-(v1/2.0+v2/2.0) plot v1=1.0, v2=1.0, p(x) title "$\nu_1=1, \nu_2=1$", \ ! v1=3.0, v2=1.0, p(x) title "$\nu_1=1, \nu_2=2$" set xrange [0:5] --- 104,108 ---- x**(v1/2.0-1)*(v2+v1*x)**-(v1/2.0+v2/2.0) plot v1=1.0, v2=1.0, p(x) title "$\nu_1=1, \nu_2=1$", \ ! v1=3.0, v2=1.0, p(x) title "$\nu_1=3, \nu_2=2$" set xrange [0:5] *************** *** 210,214 **** p(x)=exp(-(abs(x/a))**b)/2/a/gamma(1.0+1.0/b) plot a=1.0, b=2.5, p(x) title "$a=1, b=2.5$", \ ! a=1.0, b=0.5, p(x) title "$a=2, b=0.5$" set xrange [-5:10] --- 210,214 ---- p(x)=exp(-(abs(x/a))**b)/2/a/gamma(1.0+1.0/b) plot a=1.0, b=2.5, p(x) title "$a=1, b=2.5$", \ ! a=1.0, b=0.5, p(x) title "$a=1, b=0.5$" set xrange [-5:10] diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/rng.texi gsl-1.6/doc/rng.texi *** gsl-1.5/doc/rng.texi Thu Jun 24 15:18:54 2004 --- gsl-1.6/doc/rng.texi Fri Nov 12 17:19:53 2004 *************** *** 925,929 **** where @c{$\oplus$} ! @math{^^} denote ``exclusive-or'', defined on 32-bit words. The period of this generator is about @c{$2^{250}$} @math{2^250} and it --- 925,929 ---- where @c{$\oplus$} ! @math{^^} denotes ``exclusive-or'', defined on 32-bit words. The period of this generator is about @c{$2^{250}$} @math{2^250} and it *************** *** 1130,1134 **** @deffn {Generator} gsl_rng_borosh13 ! This is the Borosh, Niederreiter random number generator. It is taken from Knuth's @cite{Seminumerical Algorithms}, 3rd Ed., pages 106-108. Its sequence is, --- 1130,1134 ---- @deffn {Generator} gsl_rng_borosh13 ! This is the Borosh-Niederreiter random number generator. It is taken from Knuth's @cite{Seminumerical Algorithms}, 3rd Ed., pages 106-108. Its sequence is, diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/roots.texi gsl-1.6/doc/roots.texi *** gsl-1.5/doc/roots.texi Thu Jun 24 15:18:54 2004 --- gsl-1.6/doc/roots.texi Fri Nov 12 17:19:53 2004 *************** *** 275,282 **** @c{$f'(x,\hbox{\it params})$} @math{f'(x,params)} ! for argument @var{x} and parameters @var{params}. This function provides ! an optimization of the separate functions for @math{f(x)} and @math{f'(x)} -- ! it is always faster to compute the function and its derivative at the ! same time. @item void * params --- 275,282 ---- @c{$f'(x,\hbox{\it params})$} @math{f'(x,params)} ! for argument @var{x} and parameters @var{params}. This function ! provides an optimization of the separate functions for @math{f(x)} and ! @math{f'(x)}---it is always faster to compute the function and its ! derivative at the same time. @item void * params *************** *** 343,347 **** @noindent The macro stores @math{f(x)} in its @var{y} argument and @math{f'(x)} in ! its @var{dy} argument -- both of these should be pointers to @code{double}. --- 343,347 ---- @noindent The macro stores @math{f(x)} in its @var{y} argument and @math{f'(x)} in ! its @var{dy} argument---both of these should be pointers to @code{double}. *************** *** 529,533 **** The root bracketing algorithms described in this section require an ! initial interval which is guaranteed to contain a root -- if @math{a} and @math{b} are the endpoints of the interval then @math{f(a)} must differ in sign from @math{f(b)}. This ensures that the function crosses --- 529,533 ---- The root bracketing algorithms described in this section require an ! initial interval which is guaranteed to contain a root---if @math{a} and @math{b} are the endpoints of the interval then @math{f(a)} must differ in sign from @math{f(b)}. This ensures that the function crosses *************** *** 634,638 **** The root polishing algorithms described in this section require an initial guess for the location of the root. There is no absolute ! guarantee of convergence -- the function must be suitable for this technique and the initial guess must be sufficiently close to the root for it to work. When these conditions are satisfied then convergence is --- 634,638 ---- The root polishing algorithms described in this section require an initial guess for the location of the root. There is no absolute ! guarantee of convergence---the function must be suitable for this technique and the initial guess must be sufficiently close to the root for it to work. When these conditions are satisfied then convergence is diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/siman.texi gsl-1.6/doc/siman.texi *** gsl-1.5/doc/siman.texi Sun Jul 27 09:42:57 2003 --- gsl-1.6/doc/siman.texi Fri Nov 12 17:19:53 2004 *************** *** 188,201 **** @table @code @item int n_tries ! The number of points to try for each step @item int iters_fixed_T ! The number of iterations at each temperature @item double step_size ! The maximum step size in the random walk @item double k, t_initial, mu_t, t_min ! The parameters of the Boltzmann distribution and cooling schedule @end table @end deftp --- 188,201 ---- @table @code @item int n_tries ! The number of points to try for each step. @item int iters_fixed_T ! The number of iterations at each temperature. @item double step_size ! The maximum step size in the random walk. @item double k, t_initial, mu_t, t_min ! The parameters of the Boltzmann distribution and cooling schedule. @end table @end deftp *************** *** 205,209 **** @section Examples ! The simulated Annealing package is clumsy, and it has to be because it is written in C, for C callers, and tries to be polymorphic at the same time. But here we provide some examples which can be pasted into your --- 205,209 ---- @section Examples ! The simulated annealing package is clumsy, and it has to be because it is written in C, for C callers, and tries to be polymorphic at the same time. But here we provide some examples which can be pasted into your *************** *** 269,273 **** The full code can be found in @file{siman/siman_tsp.c}, but I include ! here some plots generated with in the following way: @example ./siman_tsp > tsp.output --- 269,273 ---- The full code can be found in @file{siman/siman_tsp.c}, but I include ! here some plots generated in the following way: @example ./siman_tsp > tsp.output diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/specfunc-expint.texi gsl-1.6/doc/specfunc-expint.texi *** gsl-1.5/doc/specfunc-expint.texi Thu May 8 19:58:51 2003 --- gsl-1.6/doc/specfunc-expint.texi Fri Nov 12 17:16:43 2004 *************** *** 64,68 **** @deftypefun double gsl_sf_expint_Ei (double @var{x}) @deftypefunx int gsl_sf_expint_Ei_e (double @var{x}, gsl_sf_result * @var{result}) ! These routines compute the exponential integral @math{E_i(x)}, @tex \beforedisplay --- 64,68 ---- @deftypefun double gsl_sf_expint_Ei (double @var{x}) @deftypefunx int gsl_sf_expint_Ei_e (double @var{x}, gsl_sf_result * @var{result}) ! These routines compute the exponential integral @math{Ei(x)}, @tex \beforedisplay diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/specfunc-gamma.texi gsl-1.6/doc/specfunc-gamma.texi *** gsl-1.5/doc/specfunc-gamma.texi Thu May 8 19:58:51 2003 --- gsl-1.6/doc/specfunc-gamma.texi Fri Dec 24 20:44:41 2004 *************** *** 206,210 **** These routines compute the normalized incomplete Gamma Function @c{$Q(a,x) = 1/\Gamma(a) \int_x^\infty dt\, t^{(a-1)} \exp(-t)$} ! @math{Q(a,x) = 1/\Gamma(a) \int_x\infty dt t^@{a-1@} \exp(-t)} for @math{a > 0}, @c{$x \ge 0$} @math{x >= 0}. --- 206,210 ---- These routines compute the normalized incomplete Gamma Function @c{$Q(a,x) = 1/\Gamma(a) \int_x^\infty dt\, t^{(a-1)} \exp(-t)$} ! @math{Q(a,x) = 1/\Gamma(a) \int_x^\infty dt t^@{a-1@} \exp(-t)} for @math{a > 0}, @c{$x \ge 0$} @math{x >= 0}. *************** *** 233,237 **** the normalization factor included in the previously defined functions: @c{$\Gamma(a,x) = \int_x^\infty dt\, t^{(a-1)} \exp(-t)$} ! @math{\Gamma(a,x) = \int_x\infty dt t^@{a-1@} \exp(-t)} for @math{a} real and @c{$x \ge 0$} @math{x >= 0}. --- 233,237 ---- the normalization factor included in the previously defined functions: @c{$\Gamma(a,x) = \int_x^\infty dt\, t^{(a-1)} \exp(-t)$} ! @math{\Gamma(a,x) = \int_x^\infty dt t^@{a-1@} \exp(-t)} for @math{a} real and @c{$x \ge 0$} @math{x >= 0}. diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/specfunc-laguerre.texi gsl-1.6/doc/specfunc-laguerre.texi *** gsl-1.5/doc/specfunc-laguerre.texi Wed Aug 22 15:53:23 2001 --- gsl-1.6/doc/specfunc-laguerre.texi Mon Oct 11 15:34:04 2004 *************** *** 24,28 **** @deftypefun double gsl_sf_laguerre_n (const int @var{n}, const double @var{a}, const double @var{x}) @deftypefunx int gsl_sf_laguerre_n_e (int @var{n}, double @var{a}, double @var{x}, gsl_sf_result * @var{result}) ! Thse routines evaluate the generalized Laguerre polynomials @math{L^a_n(x)} for @math{a > -1}, @c{$n \ge 0$} --- 24,28 ---- @deftypefun double gsl_sf_laguerre_n (const int @var{n}, const double @var{a}, const double @var{x}) @deftypefunx int gsl_sf_laguerre_n_e (int @var{n}, double @var{a}, double @var{x}, gsl_sf_result * @var{result}) ! These routines evaluate the generalized Laguerre polynomials @math{L^a_n(x)} for @math{a > -1}, @c{$n \ge 0$} diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/specfunc-legendre.texi gsl-1.6/doc/specfunc-legendre.texi *** gsl-1.5/doc/specfunc-legendre.texi Thu May 8 19:58:51 2003 --- gsl-1.6/doc/specfunc-legendre.texi Fri Nov 12 17:16:43 2004 *************** *** 224,228 **** In the flat limit this takes the form @c{$L^{H3d}_0(\lambda,\eta) = j_0(\lambda\eta)$} ! @math{L^@{H3d@}_0(\lambda,\eta) = j_0(\lambda\eta)} @comment Exceptional Return Values: GSL_EDOM @end deftypefun --- 224,228 ---- In the flat limit this takes the form @c{$L^{H3d}_0(\lambda,\eta) = j_0(\lambda\eta)$} ! @math{L^@{H3d@}_0(\lambda,\eta) = j_0(\lambda\eta)}. @comment Exceptional Return Values: GSL_EDOM @end deftypefun diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/specfunc.texi gsl-1.6/doc/specfunc.texi *** gsl-1.5/doc/specfunc.texi Thu Jun 24 15:18:54 2004 --- gsl-1.6/doc/specfunc.texi Fri Nov 12 17:16:43 2004 *************** *** 63,67 **** The @dfn{natural form} returns only the value of the function and can be ! used directly in mathematical expressions.. For example, the following function call will compute the value of the Bessel function @math{J_0(x)}, --- 63,67 ---- The @dfn{natural form} returns only the value of the function and can be ! used directly in mathematical expressions. For example, the following function call will compute the value of the Bessel function @math{J_0(x)}, diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/stamp-vti gsl-1.6/doc/stamp-vti *** gsl-1.5/doc/stamp-vti Thu Jun 24 16:42:17 2004 --- gsl-1.6/doc/stamp-vti Fri Dec 31 15:29:51 2004 *************** *** 1,4 **** ! @set UPDATED 24 June 2004 ! @set UPDATED-MONTH June 2004 ! @set EDITION 1.5 ! @set VERSION 1.5 --- 1,4 ---- ! @set UPDATED 27 December 2004 ! @set UPDATED-MONTH December 2004 ! @set EDITION 1.6 ! @set VERSION 1.6 diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/sum.texi gsl-1.6/doc/sum.texi *** gsl-1.5/doc/sum.texi Thu Jun 24 15:18:54 2004 --- gsl-1.6/doc/sum.texi Fri Nov 12 17:19:53 2004 *************** *** 37,44 **** @math{O(N^2)} process, which is expensive in time and memory. A faster but less reliable method which estimates the error from the convergence ! of the extrapolated value is described in the next section For the method described here a full table of intermediate values and derivatives through to @math{O(N)} must be computed and stored, but this ! does give a reliable error estimate. . @deftypefun {gsl_sum_levin_u_workspace *} gsl_sum_levin_u_alloc (size_t @var{n}) --- 37,44 ---- @math{O(N^2)} process, which is expensive in time and memory. A faster but less reliable method which estimates the error from the convergence ! of the extrapolated value is described in the next section. For the method described here a full table of intermediate values and derivatives through to @math{O(N)} must be computed and stored, but this ! does give a reliable error estimate. @deftypefun {gsl_sum_levin_u_workspace *} gsl_sum_levin_u_alloc (size_t @var{n}) *************** *** 172,176 **** D. Levin, Development of Non-Linear Transformations for Improving Convergence of ! Sequences, @cite{Intern. J. Computer Math.} B3:371--388, 1973 @end itemize --- 172,176 ---- D. Levin, Development of Non-Linear Transformations for Improving Convergence of ! Sequences, @cite{Intern. J. Computer Math.} B3:371--388, 1973. @end itemize *************** *** 180,183 **** @item Herbert H. H. Homeier, Scalar Levin-Type Sequence Transformations, ! @uref{http://xxx.lanl.gov/abs/math/0005209} @end itemize --- 180,183 ---- @item Herbert H. H. Homeier, Scalar Levin-Type Sequence Transformations, ! @uref{http://xxx.lanl.gov/abs/math/0005209}. @end itemize diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/usage.texi gsl-1.6/doc/usage.texi *** gsl-1.5/doc/usage.texi Tue Oct 21 21:59:59 2003 --- gsl-1.6/doc/usage.texi Fri Nov 12 17:16:43 2004 *************** *** 365,369 **** shown in the below. For convenience the default header includes the definitions for all the types. To include only the double precision ! header, or any other specific type, file use its individual filename. @example --- 365,369 ---- shown in the below. For convenience the default header includes the definitions for all the types. To include only the double precision ! header file, or any other specific type, use its individual filename. @example diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/vectors.texi gsl-1.6/doc/vectors.texi *** gsl-1.5/doc/vectors.texi Thu Jun 24 15:18:54 2004 --- gsl-1.6/doc/vectors.texi Tue Nov 23 17:13:27 2004 *************** *** 392,396 **** of the view object. A pointer to a vector of type @code{gsl_vector *} or @code{const gsl_vector *} can be obtained by taking the address of ! this component with the @code{&} operator. @deftypefun gsl_vector_view gsl_vector_subvector (gsl_vector *@var{v}, size_t @var{offset}, size_t @var{n}) --- 392,401 ---- of the view object. A pointer to a vector of type @code{gsl_vector *} or @code{const gsl_vector *} can be obtained by taking the address of ! this component with the @code{&} operator. ! ! When using this pointer, it is important to ensure that the view itself ! remains in scope---the simplest way to do so is by always writing the ! pointer as @code{&}@var{view}@code{.vector}, and not storing this value ! in another pointer variable. @deftypefun gsl_vector_view gsl_vector_subvector (gsl_vector *@var{v}, size_t @var{offset}, size_t @var{n}) *************** *** 426,430 **** ! @deftypefun gsl_vector gsl_vector_subvector_with_stride (gsl_vector *@var{v}, size_t @var{offset}, size_t @var{stride}, size_t @var{n}) @deftypefunx {gsl_vector_const_view} gsl_vector_const_subvector_with_stride (const gsl_vector * @var{v}, size_t @var{offset}, size_t @var{stride}, size_t @var{n}) These functions return a vector view of a subvector of another vector --- 431,435 ---- ! @deftypefun gsl_vector_view gsl_vector_subvector_with_stride (gsl_vector *@var{v}, size_t @var{offset}, size_t @var{stride}, size_t @var{n}) @deftypefunx {gsl_vector_const_view} gsl_vector_const_subvector_with_stride (const gsl_vector * @var{v}, size_t @var{offset}, size_t @var{stride}, size_t @var{n}) These functions return a vector view of a subvector of another vector *************** *** 906,910 **** @deftypefun double gsl_matrix_get (const gsl_matrix * @var{m}, size_t @var{i}, size_t @var{j}) ! This function returns the (@var{i},@var{j})th element of a matrix @var{m}. If @var{i} or @var{j} lie outside the allowed range of 0 to @var{n1-1} and 0 to @var{n2-1} then the error handler is invoked and 0 --- 911,915 ---- @deftypefun double gsl_matrix_get (const gsl_matrix * @var{m}, size_t @var{i}, size_t @var{j}) ! This function returns the @math{(i,j)}-th element of a matrix @var{m}. If @var{i} or @var{j} lie outside the allowed range of 0 to @var{n1-1} and 0 to @var{n2-1} then the error handler is invoked and 0 *************** *** 913,917 **** @deftypefun void gsl_matrix_set (gsl_matrix * @var{m}, size_t @var{i}, size_t @var{j}, double @var{x}) ! This function sets the value of the (@var{i},@var{j})th element of a matrix @var{m} to @var{x}. If @var{i} or @var{j} lies outside the allowed range of 0 to @var{n1-1} and 0 to @var{n2-1} then the error --- 918,922 ---- @deftypefun void gsl_matrix_set (gsl_matrix * @var{m}, size_t @var{i}, size_t @var{j}, double @var{x}) ! This function sets the value of the @math{(i,j)}-th element of a matrix @var{m} to @var{x}. If @var{i} or @var{j} lies outside the allowed range of 0 to @var{n1-1} and 0 to @var{n2-1} then the error *************** *** 921,925 **** @deftypefun {double *} gsl_matrix_ptr (gsl_matrix * @var{m}, size_t @var{i}, size_t @var{j}) @deftypefunx {const double *} gsl_matrix_const_ptr (const gsl_matrix * @var{m}, size_t @var{i}, size_t @var{j}) ! These functions return a pointer to the (@var{i},@var{j})th element of a matrix @var{m}. If @var{i} or @var{j} lie outside the allowed range of 0 to @var{n1-1} and 0 to @var{n2-1} then the error handler is invoked --- 926,930 ---- @deftypefun {double *} gsl_matrix_ptr (gsl_matrix * @var{m}, size_t @var{i}, size_t @var{j}) @deftypefunx {const double *} gsl_matrix_const_ptr (const gsl_matrix * @var{m}, size_t @var{i}, size_t @var{j}) ! These functions return a pointer to the @math{(i,j)}-th element of a matrix @var{m}. If @var{i} or @var{j} lie outside the allowed range of 0 to @var{n1-1} and 0 to @var{n2-1} then the error handler is invoked *************** *** 1017,1021 **** rows and @var{n2} columns. The physical number of columns in memory given by @var{tda} is unchanged. Mathematically, the ! (@var{i},@var{j})-th element of the new matrix is given by, @example --- 1022,1026 ---- rows and @var{n2} columns. The physical number of columns in memory given by @var{tda} is unchanged. Mathematically, the ! @math{(i,j)}-th element of the new matrix is given by, @example *************** *** 1049,1053 **** matrix has @var{n1} rows and @var{n2} columns. The physical number of columns in memory is also given by @var{n2}. Mathematically, the ! (@var{i},@var{j})-th element of the new matrix is given by, @example --- 1054,1058 ---- matrix has @var{n1} rows and @var{n2} columns. The physical number of columns in memory is also given by @var{n2}. Mathematically, the ! @math{(i,j)}-th element of the new matrix is given by, @example *************** *** 1073,1080 **** @deftypefunx gsl_matrix_const_view gsl_matrix_const_view_array_with_tda (const double * @var{base}, size_t @var{n1}, size_t @var{n2}, size_t @var{tda}) These functions return a matrix view of the array @var{base} with a ! physical number of columns @var{tda} which may differ from corresponding ! the dimension of the matrix. The matrix has @var{n1} rows and @var{n2} columns, and the physical number of columns in memory is given by ! @var{tda}. Mathematically, the (@var{i},@var{j})-th element of the new matrix is given by, --- 1078,1085 ---- @deftypefunx gsl_matrix_const_view gsl_matrix_const_view_array_with_tda (const double * @var{base}, size_t @var{n1}, size_t @var{n2}, size_t @var{tda}) These functions return a matrix view of the array @var{base} with a ! physical number of columns @var{tda} which may differ from the corresponding ! dimension of the matrix. The matrix has @var{n1} rows and @var{n2} columns, and the physical number of columns in memory is given by ! @var{tda}. Mathematically, the @math{(i,j)}-th element of the new matrix is given by, *************** *** 1102,1106 **** has @var{n1} rows and @var{n2} columns. The vector must have unit stride. The physical number of columns in memory is also given by ! @var{n2}. Mathematically, the (@var{i},@var{j})-th element of the new matrix is given by, --- 1107,1111 ---- has @var{n1} rows and @var{n2} columns. The vector must have unit stride. The physical number of columns in memory is also given by ! @var{n2}. Mathematically, the @math{(i,j)}-th element of the new matrix is given by, *************** *** 1131,1135 **** matrix has @var{n1} rows and @var{n2} columns, and the physical number of columns in memory is given by @var{tda}. Mathematically, the ! (@var{i},@var{j})-th element of the new matrix is given by, @example --- 1136,1140 ---- matrix has @var{n1} rows and @var{n2} columns, and the physical number of columns in memory is given by @var{tda}. Mathematically, the ! @math{(i,j)}-th element of the new matrix is given by, @example diff -rc2P -x *.info -x *.info-* gsl-1.5/doc/version-ref.texi gsl-1.6/doc/version-ref.texi *** gsl-1.5/doc/version-ref.texi Thu Jun 24 16:42:17 2004 --- gsl-1.6/doc/version-ref.texi Fri Dec 31 15:29:51 2004 *************** *** 1,4 **** ! @set UPDATED 24 June 2004 ! @set UPDATED-MONTH June 2004 ! @set EDITION 1.5 ! @set VERSION 1.5 --- 1,4 ---- ! @set UPDATED 27 December 2004 ! @set UPDATED-MONTH December 2004 ! @set EDITION 1.6 ! @set VERSION 1.6 diff -rc2P -x *.info -x *.info-* gsl-1.5/eigen/ChangeLog gsl-1.6/eigen/ChangeLog *** gsl-1.5/eigen/ChangeLog Thu Jan 2 18:20:07 2003 --- gsl-1.6/eigen/ChangeLog Fri Dec 3 20:05:21 2004 *************** *** 1,2 **** --- 1,8 ---- + 2004-12-03 Brian Gough + + * jacobi.c (gsl_eigen_jacobi): use algorithm from Golub and Van + Loan + (gsl_eigen_invert_jacobi): new code + 2003-01-02 Brian Gough diff -rc2P -x *.info -x *.info-* gsl-1.5/eigen/Makefile.am gsl-1.6/eigen/Makefile.am *** gsl-1.5/eigen/Makefile.am Sun Jul 27 10:49:48 2003 --- gsl-1.6/eigen/Makefile.am Sat Sep 11 14:45:45 2004 *************** *** 9,13 **** noinst_HEADERS = qrstep.c ! TESTS = test test_LDADD = libgsleigen.la ../test/libgsltest.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../sys/libgslsys.la ../err/libgslerr.la ../utils/libutils.la --- 9,13 ---- noinst_HEADERS = qrstep.c ! TESTS = $(check_PROGRAMS) test_LDADD = libgsleigen.la ../test/libgsltest.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../sys/libgslsys.la ../err/libgslerr.la ../utils/libutils.la diff -rc2P -x *.info -x *.info-* gsl-1.5/eigen/Makefile.in gsl-1.6/eigen/Makefile.in *** gsl-1.5/eigen/Makefile.in Thu Jun 24 11:49:42 2004 --- gsl-1.6/eigen/Makefile.in Fri Dec 31 15:15:27 2004 *************** *** 151,155 **** noinst_HEADERS = qrstep.c ! TESTS = test test_LDADD = libgsleigen.la ../test/libgsltest.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../sys/libgslsys.la ../err/libgslerr.la ../utils/libutils.la --- 151,155 ---- noinst_HEADERS = qrstep.c ! TESTS = $(check_PROGRAMS) test_LDADD = libgsleigen.la ../test/libgsltest.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../sys/libgslsys.la ../err/libgslerr.la ../utils/libutils.la diff -rc2P -x *.info -x *.info-* gsl-1.5/eigen/jacobi.c gsl-1.6/eigen/jacobi.c *** gsl-1.5/eigen/jacobi.c Fri Jul 25 16:18:10 2003 --- gsl-1.6/eigen/jacobi.c Fri Dec 24 14:01:14 2004 *************** *** 1,5 **** /* eigen/jacobi.c * ! * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman * * This program is free software; you can redistribute it and/or modify --- 1,5 ---- /* eigen/jacobi.c * ! * Copyright (C) 2004 Brian Gough, Gerard Jungman * * This program is free software; you can redistribute it and/or modify *************** *** 18,34 **** */ - /* Author: G. Jungman - */ - /* Simple linear algebra operations, operating directly - * on the gsl_vector and gsl_matrix objects. These are - * meant for "generic" and "small" systems. Anyone - * interested in large systems will want to use more - * sophisticated methods, presumably involving native - * BLAS operations, specialized data representations, - * or other optimizations. - */ #include #include - #include #include #include --- 18,23 ---- *************** *** 36,257 **** #include ! #define REAL double inline static void ! jac_rotate(gsl_matrix * a, ! unsigned int i, unsigned int j, unsigned int k, unsigned int l, ! double * g, double * h, ! double s, double tau) ! { ! *g = gsl_matrix_get(a, i, j); ! *h = gsl_matrix_get(a, k, l); ! gsl_matrix_set(a, i, j, (*g) - s*((*h) + (*g)*tau)); ! gsl_matrix_set(a, k, l, (*h) + s*((*g) - (*h)*tau)); } ! int ! gsl_eigen_jacobi(gsl_matrix * a, ! gsl_vector * eval, ! gsl_matrix * evec, ! unsigned int max_rot, ! unsigned int * nrot) ! { ! if(a->size1 != a->size2) { ! GSL_ERROR ("eigenproblem requires square matrix", GSL_ENOTSQR); ! } ! else if(a->size1 != evec->size1 || a->size1 != evec->size2) { ! GSL_ERROR ("eigenvector matrix must match input matrix", GSL_EBADLEN); ! } ! else if(a->size1 != eval->size) { ! GSL_ERROR ("eigenvalue vector must match input matrix", GSL_EBADLEN); ! } ! else { ! const unsigned int n = a->size1; ! unsigned int i, j, iq, ip; ! double t, s; ! ! REAL * b = (REAL *) malloc(n * sizeof(REAL)); ! REAL * z = (REAL *) malloc(n * sizeof(REAL)); ! if(b == 0 || z == 0) { ! if(b != 0) free(b); ! if(z != 0) free(z); ! GSL_ERROR ("could not allocate memory for workspace", GSL_ENOMEM); ! } ! ! /* Set eigenvectors to coordinate basis. */ ! for(ip=0; ip 4 ! && fabs(d_ip)+g == fabs(d_ip) ! && fabs(d_iq)+g == fabs(d_iq) ! ) { ! gsl_matrix_set(a, ip, iq, 0.0); ! } ! else if(fabs(a_ipiq) > thresh) { ! h = d_iq - d_ip; ! if(fabs(h) + g == fabs(h)) { ! t = a_ipiq/h; ! } ! else { ! REAL theta = 0.5*h/a_ipiq; ! t = 1.0/(fabs(theta) + sqrt(1.0 + theta*theta)); ! if(theta < 0.0) t = -t; ! } ! c = 1.0/sqrt(1.0+t*t); ! s = t*c; ! tau = s/(1.0+c); ! h = t * a_ipiq; ! z[ip] -= h; ! z[iq] += h; ! gsl_vector_set(eval, ip, d_ip - h); ! gsl_vector_set(eval, iq, d_iq + h); ! gsl_matrix_set(a, ip, iq, 0.0); ! for(j=0; jsize1 != a->size2 || ainv->size1 != ainv->size2) { ! return GSL_ENOTSQR; ! } ! else if(a->size1 != ainv->size2) { ! return GSL_EBADLEN; ! } ! else { ! const unsigned int n = a->size1; ! unsigned int nrot; ! unsigned int i,j,k,l; ! ! /* This is annoying because I do not want ! * the error handling in these functions. ! * But there are no "impl"-like versions ! * of these allocators... sigh. ! */ gsl_vector * eval = gsl_vector_alloc(n); gsl_matrix * evec = gsl_matrix_alloc(n, n); ! gsl_matrix * inv_diag = gsl_matrix_alloc(n, n); ! ! if(eval == 0 || evec == 0 || inv_diag == 0) { ! if(eval != 0) gsl_vector_free(eval); ! if(evec != 0) gsl_matrix_free(evec); ! if(inv_diag != 0) gsl_matrix_free(inv_diag); ! return GSL_ENOMEM; ! } ! ! memcpy(ainv->data, a->data, n*n*sizeof(REAL)); ! ! gsl_eigen_jacobi(ainv, eval, evec, max_rot, &nrot); ! ! for(i=0; i ! /* Algorithm 8.4.3 - Cyclic Jacobi. Golub & Van Loan, Matrix Computations */ ! ! static inline double ! symschur2 (gsl_matrix * A, size_t p, size_t q, double *c, double *s) ! { ! double Apq = gsl_matrix_get (A, p, q); ! ! if (Apq != 0.0) ! { ! double App = gsl_matrix_get (A, p, p); ! double Aqq = gsl_matrix_get (A, q, q); ! double tau = (Aqq - App) / (2.0 * Apq); ! double t, c1; ! ! if (tau >= 0.0) ! { ! t = 1.0 / (tau + hypot (1.0, tau)); ! } ! else ! { ! t = -1.0 / (-tau + hypot (1.0, tau)); ! } ! ! c1 = 1.0 / hypot (1.0, t); ! ! *c = c1; ! *s = t * c1; ! } ! else ! { ! *c = 1.0; ! *s = 0.0; ! } ! ! /* reduction in off(A) is 2*(A_pq)^2 */ ! ! return fabs (Apq); ! } inline static void ! apply_jacobi_L (gsl_matrix * A, size_t p, size_t q, double c, double s) ! { ! size_t j; ! const size_t N = A->size2; ! ! /* Apply rotation to matrix A, A' = J^T A */ ! ! for (j = 0; j < N; j++) ! { ! double Apj = gsl_matrix_get (A, p, j); ! double Aqj = gsl_matrix_get (A, q, j); ! gsl_matrix_set (A, p, j, Apj * c - Aqj * s); ! gsl_matrix_set (A, q, j, Apj * s + Aqj * c); ! } } ! inline static void ! apply_jacobi_R (gsl_matrix * A, size_t p, size_t q, double c, double s) ! { ! size_t i; ! const size_t M = A->size1; ! ! /* Apply rotation to matrix A, A' = A J */ ! ! for (i = 0; i < M; i++) ! { ! double Aip = gsl_matrix_get (A, i, p); ! double Aiq = gsl_matrix_get (A, i, q); ! gsl_matrix_set (A, i, p, Aip * c - Aiq * s); ! gsl_matrix_set (A, i, q, Aip * s + Aiq * c); } + } + + inline static double + norm (gsl_matrix * A) + { + size_t i, j, M = A->size1, N = A->size2; + double sum = 0.0, scale = 0.0, ssq = 1.0; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + double Aij = gsl_matrix_get (A, i, j); + + if (Aij != 0.0) + { + double ax = fabs (Aij); + + if (scale < ax) + { + ssq = 1.0 + ssq * (scale / ax) * (scale / ax); + scale = ax; + } + else + { + ssq += (ax / scale) * (ax / scale); + } + } } ! } ! sum = scale * sqrt (ssq); ! return sum; ! } ! int ! gsl_eigen_jacobi (gsl_matrix * a, ! gsl_vector * eval, ! gsl_matrix * evec, unsigned int max_rot, unsigned int *nrot) ! { ! size_t i, p, q; ! const size_t M = a->size1, N = a->size2; ! double red, redsum = 0.0; ! if (M != N) ! { ! GSL_ERROR ("eigenproblem requires square matrix", GSL_ENOTSQR); ! } ! else if (M != evec->size1 || M != evec->size2) ! { ! GSL_ERROR ("eigenvector matrix must match input matrix", GSL_EBADLEN); ! } ! else if (M != eval->size) ! { ! GSL_ERROR ("eigenvalue vector must match input matrix", GSL_EBADLEN); ! } ! ! gsl_vector_set_zero (eval); ! gsl_matrix_set_identity (evec); ! ! for (i = 0; i < max_rot; i++) ! { ! double nrm = norm (a); ! ! if (nrm == 0.0) ! break; ! ! for (p = 0; p < N; p++) ! { ! for (q = p + 1; q < N; q++) ! { ! double c, s; ! ! red = symschur2 (a, p, q, &c, &s); ! redsum += red; ! ! /* Compute A <- J^T A J */ ! apply_jacobi_L (a, p, q, c, s); ! apply_jacobi_R (a, p, q, c, s); ! ! /* Compute V <- V J */ ! apply_jacobi_R (evec, p, q, c, s); } } ! } ! ! *nrot = i; ! ! for (p = 0; p < N; p++) ! { ! double ep = gsl_matrix_get (a, p, p); ! gsl_vector_set (eval, p, ep); ! } ! if (i == max_rot) ! { ! return GSL_EMAXITER; } ! return GSL_SUCCESS; } int ! gsl_eigen_invert_jacobi (const gsl_matrix * a, ! gsl_matrix * ainv, unsigned int max_rot) ! { ! if (a->size1 != a->size2 || ainv->size1 != ainv->size2) ! { ! GSL_ERROR("jacobi method requires square matrix", GSL_ENOTSQR); ! } ! else if (a->size1 != ainv->size2) ! { ! GSL_ERROR ("inverse matrix must match input matrix", GSL_EBADLEN); ! } ! ! { ! const size_t n = a->size2; ! size_t i,j,k; ! size_t nrot = 0; ! int status; ! gsl_vector * eval = gsl_vector_alloc(n); gsl_matrix * evec = gsl_matrix_alloc(n, n); ! gsl_matrix * tmp = gsl_matrix_alloc(n, n); ! gsl_matrix_memcpy (tmp, a); ! status = gsl_eigen_jacobi(tmp, eval, evec, max_rot, &nrot); ! ! for(i=0; i 5.0e-3 ); s += rs; + gsl_test_abs(id_ij, delta_ij, 5e-3, "invert hilbert(10) %d,%d", i,j); } } + gsl_test (s, "gsl_eigen_jacobi_invert hilbert(10)"); + gsl_matrix_free(hm); gsl_matrix_free(hminv); *************** *** 410,417 **** } ! /* gsl_matrix *h5 = create_hilbert_matrix (5); */ ! /* test_eigen_jacobi("hilbert(5)", h5); */ ! /* test_invert_jacobi(); */ ! /* gsl_matrix_free (h5); */ exit (gsl_test_summary()); --- 414,425 ---- } ! #if 0 /* Deprecated functions */ ! { ! gsl_matrix *h5 = create_hilbert_matrix (5); ! test_eigen_jacobi("hilbert(5)", h5); ! test_invert_jacobi(); ! gsl_matrix_free (h5); ! } ! #endif exit (gsl_test_summary()); diff -rc2P -x *.info -x *.info-* gsl-1.5/err/ChangeLog gsl-1.6/err/ChangeLog *** gsl-1.5/err/ChangeLog Tue Jun 17 15:41:56 2003 --- gsl-1.6/err/ChangeLog Sat Sep 11 14:45:45 2004 *************** *** 1,2 **** --- 1,7 ---- + 2004-07-10 Brian Gough + + * error.c (gsl_error): flush stdout/stderr before aborting (needed + to get a useful error message on some platforms) + 2003-06-17 Brian Gough diff -rc2P -x *.info -x *.info-* gsl-1.5/err/Makefile.am gsl-1.6/err/Makefile.am *** gsl-1.5/err/Makefile.am Sun Jul 27 10:49:48 2003 --- gsl-1.6/err/Makefile.am Sat Sep 11 14:45:45 2004 *************** *** 7,11 **** check_PROGRAMS = test ! TESTS = test test_SOURCES = test.c --- 7,11 ---- check_PROGRAMS = test ! TESTS = $(check_PROGRAMS) test_SOURCES = test.c diff -rc2P -x *.info -x *.info-* gsl-1.5/err/Makefile.in gsl-1.6/err/Makefile.in *** gsl-1.5/err/Makefile.in Thu Jun 24 11:49:43 2004 --- gsl-1.6/err/Makefile.in Fri Dec 31 15:15:27 2004 *************** *** 149,153 **** check_PROGRAMS = test ! TESTS = test test_SOURCES = test.c --- 149,153 ---- check_PROGRAMS = test ! TESTS = $(check_PROGRAMS) test_SOURCES = test.c diff -rc2P -x *.info -x *.info-* gsl-1.5/err/error.c gsl-1.6/err/error.c *** gsl-1.5/err/error.c Fri Jul 25 16:18:10 2003 --- gsl-1.6/err/error.c Sat Sep 11 14:45:45 2004 *************** *** 41,45 **** --- 41,48 ---- gsl_stream_printf ("ERROR", file, line, reason); + fflush (stdout); fprintf (stderr, "Default GSL error handler invoked.\n"); + fflush (stderr); + abort (); } diff -rc2P -x *.info -x *.info-* gsl-1.5/fft/Makefile.am gsl-1.6/fft/Makefile.am *** gsl-1.5/fft/Makefile.am Sun Jul 27 10:54:19 2003 --- gsl-1.6/fft/Makefile.am Sat Sep 11 14:45:45 2004 *************** *** 9,13 **** noinst_HEADERS = c_pass.h hc_pass.h real_pass.h signals.h signals_source.c c_main.c c_init.c c_pass_2.c c_pass_3.c c_pass_4.c c_pass_5.c c_pass_6.c c_pass_7.c c_pass_n.c c_radix2.c bitreverse.c bitreverse.h factorize.c factorize.h hc_init.c hc_pass_2.c hc_pass_3.c hc_pass_4.c hc_pass_5.c hc_pass_n.c hc_radix2.c hc_unpack.c real.c real_init.c real_pass_2.c real_pass_3.c real_pass_4.c real_pass_5.c real_pass_n.c real_radix2.c real_unpack.c compare.h compare_source.c dft_source.c hc_main.c real_main.c test_complex_source.c test_real_source.c test_trap_source.c urand.c complex_internal.h ! TESTS = test check_PROGRAMS = test --- 9,13 ---- noinst_HEADERS = c_pass.h hc_pass.h real_pass.h signals.h signals_source.c c_main.c c_init.c c_pass_2.c c_pass_3.c c_pass_4.c c_pass_5.c c_pass_6.c c_pass_7.c c_pass_n.c c_radix2.c bitreverse.c bitreverse.h factorize.c factorize.h hc_init.c hc_pass_2.c hc_pass_3.c hc_pass_4.c hc_pass_5.c hc_pass_n.c hc_radix2.c hc_unpack.c real.c real_init.c real_pass_2.c real_pass_3.c real_pass_4.c real_pass_5.c real_pass_n.c real_radix2.c real_unpack.c compare.h compare_source.c dft_source.c hc_main.c real_main.c test_complex_source.c test_real_source.c test_trap_source.c urand.c complex_internal.h ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/fft/Makefile.in gsl-1.6/fft/Makefile.in *** gsl-1.5/fft/Makefile.in Thu Jun 24 11:49:43 2004 --- gsl-1.6/fft/Makefile.in Fri Dec 31 15:15:27 2004 *************** *** 151,155 **** noinst_HEADERS = c_pass.h hc_pass.h real_pass.h signals.h signals_source.c c_main.c c_init.c c_pass_2.c c_pass_3.c c_pass_4.c c_pass_5.c c_pass_6.c c_pass_7.c c_pass_n.c c_radix2.c bitreverse.c bitreverse.h factorize.c factorize.h hc_init.c hc_pass_2.c hc_pass_3.c hc_pass_4.c hc_pass_5.c hc_pass_n.c hc_radix2.c hc_unpack.c real.c real_init.c real_pass_2.c real_pass_3.c real_pass_4.c real_pass_5.c real_pass_n.c real_radix2.c real_unpack.c compare.h compare_source.c dft_source.c hc_main.c real_main.c test_complex_source.c test_real_source.c test_trap_source.c urand.c complex_internal.h ! TESTS = test check_PROGRAMS = test --- 151,155 ---- noinst_HEADERS = c_pass.h hc_pass.h real_pass.h signals.h signals_source.c c_main.c c_init.c c_pass_2.c c_pass_3.c c_pass_4.c c_pass_5.c c_pass_6.c c_pass_7.c c_pass_n.c c_radix2.c bitreverse.c bitreverse.h factorize.c factorize.h hc_init.c hc_pass_2.c hc_pass_3.c hc_pass_4.c hc_pass_5.c hc_pass_n.c hc_radix2.c hc_unpack.c real.c real_init.c real_pass_2.c real_pass_3.c real_pass_4.c real_pass_5.c real_pass_n.c real_radix2.c real_unpack.c compare.h compare_source.c dft_source.c hc_main.c real_main.c test_complex_source.c test_real_source.c test_trap_source.c urand.c complex_internal.h ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/fft/gsl_fft_complex.h gsl-1.6/fft/gsl_fft_complex.h *** gsl-1.5/fft/gsl_fft_complex.h Fri Jul 25 16:18:18 2003 --- gsl-1.6/fft/gsl_fft_complex.h Fri Dec 24 14:00:56 2004 *************** *** 76,84 **** const gsl_fft_direction sign); - int gsl_fft_complex_bitreverse_order (gsl_complex_packed_array data, - size_t stride, - size_t n, - size_t n_bits); - /* Mixed Radix general-N routines */ --- 76,79 ---- diff -rc2P -x *.info -x *.info-* gsl-1.5/fft/gsl_fft_complex_float.h gsl-1.6/fft/gsl_fft_complex_float.h *** gsl-1.5/fft/gsl_fft_complex_float.h Fri Jul 25 16:18:18 2003 --- gsl-1.6/fft/gsl_fft_complex_float.h Fri Dec 24 14:00:56 2004 *************** *** 76,84 **** const gsl_fft_direction sign); - int gsl_fft_complex_float_bitreverse_order (gsl_complex_packed_array_float data, - size_t stride, - size_t n, - size_t n_bits); - /* Mixed Radix general-N routines */ --- 76,79 ---- diff -rc2P -x *.info -x *.info-* gsl-1.5/fft/test_complex_source.c gsl-1.6/fft/test_complex_source.c *** gsl-1.5/fft/test_complex_source.c Fri Jul 25 16:18:10 2003 --- gsl-1.6/fft/test_complex_source.c Fri Dec 24 14:00:56 2004 *************** *** 273,281 **** status = FUNCTION(compare_complex,results) ("naive bit reverse", reversed_data, ! "gsl_fft_complex_bitreverse_order", data, stride, n, 1e6); ! gsl_test (status, "gsl_fft_complex_bitreverse_order, n = %d", n); free (reversed_data) ; --- 273,281 ---- status = FUNCTION(compare_complex,results) ("naive bit reverse", reversed_data, ! "fft_complex_bitreverse_order", data, stride, n, 1e6); ! gsl_test (status, "fft_complex_bitreverse_order, n = %d", n); free (reversed_data) ; diff -rc2P -x *.info -x *.info-* gsl-1.5/fft/test_real_source.c gsl-1.6/fft/test_real_source.c *** gsl-1.5/fft/test_real_source.c Fri Jul 25 16:18:10 2003 --- gsl-1.6/fft/test_real_source.c Fri Dec 24 14:00:56 2004 *************** *** 155,163 **** status = FUNCTION(compare_real,results) ("naive bit reverse", reversed_data, ! "gsl_fft_complex_bitreverse_order", data, stride, n, 1e6); ! gsl_test (status, NAME(gsl_fft_real) "_bitreverse_order, n = %d", n); free (reversed_data) ; --- 155,163 ---- status = FUNCTION(compare_real,results) ("naive bit reverse", reversed_data, ! "fft_complex_bitreverse_order", data, stride, n, 1e6); ! gsl_test (status, NAME(fft_real) "_bitreverse_order, n = %d", n); free (reversed_data) ; diff -rc2P -x *.info -x *.info-* gsl-1.5/fit/ChangeLog gsl-1.6/fit/ChangeLog *** gsl-1.5/fit/ChangeLog Thu Nov 2 20:15:33 2000 --- gsl-1.6/fit/ChangeLog Fri Dec 24 14:00:38 2004 *************** *** 1,2 **** --- 1,6 ---- + 2004-12-23 Brian Gough + + * gsl_fit.h: remove unused declarations + Tue Sep 19 19:09:46 2000 Brian Gough diff -rc2P -x *.info -x *.info-* gsl-1.5/fit/Makefile.am gsl-1.6/fit/Makefile.am *** gsl-1.5/fit/Makefile.am Sun Jul 27 10:49:48 2003 --- gsl-1.6/fit/Makefile.am Sat Sep 11 14:45:47 2004 *************** *** 9,13 **** check_PROGRAMS = test #demo ! TESTS = test test_SOURCES = test.c --- 9,13 ---- check_PROGRAMS = test #demo ! TESTS = $(check_PROGRAMS) test_SOURCES = test.c diff -rc2P -x *.info -x *.info-* gsl-1.5/fit/Makefile.in gsl-1.6/fit/Makefile.in *** gsl-1.5/fit/Makefile.in Thu Jun 24 11:49:44 2004 --- gsl-1.6/fit/Makefile.in Fri Dec 31 15:15:28 2004 *************** *** 151,155 **** check_PROGRAMS = test #demo ! TESTS = test test_SOURCES = test.c --- 151,155 ---- check_PROGRAMS = test #demo ! TESTS = $(check_PROGRAMS) test_SOURCES = test.c diff -rc2P -x *.info -x *.info-* gsl-1.5/fit/gsl_fit.h gsl-1.6/fit/gsl_fit.h *** gsl-1.5/fit/gsl_fit.h Fri Jul 25 16:18:18 2003 --- gsl-1.6/fit/gsl_fit.h Fri Dec 24 14:00:38 2004 *************** *** 81,104 **** double *y, double *y_err); - - /* choose better names!! */ - - int gsl_fit_poly (const double * x, - const double * w, - const double * y, - size_t n, - double * c, size_t m, - double * chisq); - - int gsl_fit_fns (const double * A, - const double * w, - const double * y, - size_t n, - double * c, size_t m, - double * chisq); - - int gsl_fit_linear_nd (double * m, double * y, double * w); - - __END_DECLS --- 81,84 ---- diff -rc2P -x *.info -x *.info-* gsl-1.5/gsl.spec.in gsl-1.6/gsl.spec.in *** gsl-1.5/gsl.spec.in Tue Feb 24 15:22:36 2004 --- gsl-1.6/gsl.spec.in Sat Sep 11 14:45:08 2004 *************** *** 1,5 **** Name: gsl Summary: GNU Scientific Library (GSL) ! Packager: rosalia@lanl.gov %define version @VERSION@ %define release 0 --- 1,5 ---- Name: gsl Summary: GNU Scientific Library (GSL) ! Packager: jungman@lanl.gov, rosalia@lanl.gov %define version @VERSION@ %define release 0 diff -rc2P -x *.info -x *.info-* gsl-1.5/gsl_version.h gsl-1.6/gsl_version.h *** gsl-1.5/gsl_version.h Fri Jun 25 11:07:12 2004 --- gsl-1.6/gsl_version.h Fri Dec 31 15:16:02 2004 *************** *** 16,20 **** ! #define GSL_VERSION "1.5" GSL_VAR const char * gsl_version; --- 16,20 ---- ! #define GSL_VERSION "1.6" GSL_VAR const char * gsl_version; diff -rc2P -x *.info -x *.info-* gsl-1.5/histogram/ChangeLog gsl-1.6/histogram/ChangeLog *** gsl-1.5/histogram/ChangeLog Tue Aug 27 19:37:14 2002 --- gsl-1.6/histogram/ChangeLog Mon Nov 29 14:57:51 2004 *************** *** 1,2 **** --- 1,10 ---- + 2004-11-28 Brian Gough + + * init2d.c (make_uniform): compute uniform range without + cancellation error. + + * init.c (make_uniform): compute uniform range without + cancellation error. + Tue Aug 27 19:36:43 2002 Brian Gough diff -rc2P -x *.info -x *.info-* gsl-1.5/histogram/Makefile.am gsl-1.6/histogram/Makefile.am *** gsl-1.5/histogram/Makefile.am Sun Jul 27 10:54:19 2003 --- gsl-1.6/histogram/Makefile.am Sat Sep 11 14:45:47 2004 *************** *** 10,14 **** check_PROGRAMS = test ! TESTS = test EXTRA_DIST = urand.c --- 10,14 ---- check_PROGRAMS = test ! TESTS = $(check_PROGRAMS) EXTRA_DIST = urand.c diff -rc2P -x *.info -x *.info-* gsl-1.5/histogram/Makefile.in gsl-1.6/histogram/Makefile.in *** gsl-1.5/histogram/Makefile.in Thu Jun 24 11:49:44 2004 --- gsl-1.6/histogram/Makefile.in Fri Dec 31 15:15:29 2004 *************** *** 152,156 **** check_PROGRAMS = test ! TESTS = test EXTRA_DIST = urand.c --- 152,156 ---- check_PROGRAMS = test ! TESTS = $(check_PROGRAMS) EXTRA_DIST = urand.c diff -rc2P -x *.info -x *.info-* gsl-1.5/histogram/init.c gsl-1.6/histogram/init.c *** gsl-1.5/histogram/init.c Fri Jul 25 16:18:11 2003 --- gsl-1.6/histogram/init.c Mon Nov 29 14:57:51 2004 *************** *** 68,71 **** --- 68,84 ---- } + static void + make_uniform (double range[], size_t n, double xmin, double xmax) + { + size_t i; + + for (i = 0; i <= n; i++) + { + double f1 = ((double) (n-i) / (double) n); + double f2 = ((double) i / (double) n); + range[i] = f1 * xmin + f2 * xmax; + } + } + gsl_histogram * gsl_histogram_calloc_uniform (const size_t n, const double xmin, *************** *** 86,97 **** } ! { ! size_t i; ! ! for (i = 0; i < n + 1; i++) ! { ! h->range[i] = xmin + ((double) i / (double) n) * (xmax - xmin); ! } ! } return h; --- 99,103 ---- } ! make_uniform (h->range, n, xmin, xmax); return h; *************** *** 146,158 **** if (xmin >= xmax) { ! GSL_ERROR_VAL ("xmin must be less than xmax", GSL_EINVAL, 0); } /* initialize ranges */ ! for (i = 0; i <= n; i++) ! { ! h->range[i] = xmin + ((double) i / (double) n) * (xmax - xmin); ! } /* clear contents */ --- 152,161 ---- if (xmin >= xmax) { ! GSL_ERROR ("xmin must be less than xmax", GSL_EINVAL); } /* initialize ranges */ ! make_uniform (h->range, n, xmin, xmax); /* clear contents */ *************** *** 174,179 **** if (size != (n+1)) { ! GSL_ERROR_VAL ("size of range must match size of histogram", ! GSL_EINVAL, 0); } --- 177,181 ---- if (size != (n+1)) { ! GSL_ERROR ("size of range must match size of histogram", GSL_EINVAL); } *************** *** 194,195 **** --- 196,198 ---- return GSL_SUCCESS; } + diff -rc2P -x *.info -x *.info-* gsl-1.5/histogram/init2d.c gsl-1.6/histogram/init2d.c *** gsl-1.5/histogram/init2d.c Fri Jul 25 16:18:11 2003 --- gsl-1.6/histogram/init2d.c Mon Nov 29 14:57:51 2004 *************** *** 88,91 **** --- 88,104 ---- } + static void + make_uniform (double range[], size_t n, double xmin, double xmax) + { + size_t i; + + for (i = 0; i <= n; i++) + { + double f1 = ((double) (n-i) / (double) n); + double f2 = ((double) i / (double) n); + range[i] = f1 * xmin + f2 * xmax; + } + } + gsl_histogram2d * gsl_histogram2d_calloc_uniform (const size_t nx, const size_t ny, *************** *** 112,128 **** } ! { ! size_t i; ! ! for (i = 0; i < nx + 1; i++) ! { ! h->xrange[i] = xmin + ((double) i / (double) nx) * (xmax - xmin); ! } ! ! for (i = 0; i < ny + 1; i++) ! { ! h->yrange[i] = ymin + ((double) i / (double) ny) * (ymax - ymin); ! } ! } return h; --- 125,130 ---- } ! make_uniform (h->xrange, nx, xmin, xmax); ! make_uniform (h->yrange, ny, ymin, ymax); return h; *************** *** 243,255 **** /* initialize ranges */ ! for (i = 0; i <= nx; i++) ! { ! h->xrange[i] = xmin + ((double) i / (double) nx) * (xmax - xmin); ! } ! ! for (i = 0; i <= ny; i++) ! { ! h->yrange[i] = ymin + ((double) i / (double) ny) * (ymax - ymin); ! } /* clear contents */ --- 245,250 ---- /* initialize ranges */ ! make_uniform (h->xrange, nx, xmin, xmax); ! make_uniform (h->yrange, ny, ymin, ymax); /* clear contents */ diff -rc2P -x *.info -x *.info-* gsl-1.5/ieee-utils/Makefile.am gsl-1.6/ieee-utils/Makefile.am *** gsl-1.5/ieee-utils/Makefile.am Sun Jul 27 10:54:19 2003 --- gsl-1.6/ieee-utils/Makefile.am Sat Sep 11 14:45:47 2004 *************** *** 9,13 **** INCLUDES= -I$(top_builddir) ! TESTS = test check_PROGRAMS = test test_LDADD = libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la --- 9,13 ---- INCLUDES= -I$(top_builddir) ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test test_LDADD = libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la diff -rc2P -x *.info -x *.info-* gsl-1.5/ieee-utils/Makefile.in gsl-1.6/ieee-utils/Makefile.in *** gsl-1.5/ieee-utils/Makefile.in Thu Jun 24 11:49:45 2004 --- gsl-1.6/ieee-utils/Makefile.in Fri Dec 31 15:15:29 2004 *************** *** 151,155 **** INCLUDES = -I$(top_builddir) ! TESTS = test check_PROGRAMS = test test_LDADD = libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la --- 151,155 ---- INCLUDES = -I$(top_builddir) ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test test_LDADD = libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la diff -rc2P -x *.info -x *.info-* gsl-1.5/integration/Makefile.am gsl-1.6/integration/Makefile.am *** gsl-1.5/integration/Makefile.am Sun Jul 27 10:49:48 2003 --- gsl-1.6/integration/Makefile.am Sat Sep 11 14:45:48 2004 *************** *** 8,12 **** noinst_HEADERS = qpsrt.c qpsrt2.c qelg.c qc25c.c qc25s.c qc25f.c ptsort.c util.c err.c positivity.c append.c initialise.c set_initial.c reset.c ! TESTS = test check_PROGRAMS = test --- 8,12 ---- noinst_HEADERS = qpsrt.c qpsrt2.c qelg.c qc25c.c qc25s.c qc25f.c ptsort.c util.c err.c positivity.c append.c initialise.c set_initial.c reset.c ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/integration/Makefile.in gsl-1.6/integration/Makefile.in *** gsl-1.5/integration/Makefile.in Thu Jun 24 11:49:45 2004 --- gsl-1.6/integration/Makefile.in Fri Dec 31 15:15:30 2004 *************** *** 150,154 **** noinst_HEADERS = qpsrt.c qpsrt2.c qelg.c qc25c.c qc25s.c qc25f.c ptsort.c util.c err.c positivity.c append.c initialise.c set_initial.c reset.c ! TESTS = test check_PROGRAMS = test --- 150,154 ---- noinst_HEADERS = qpsrt.c qpsrt2.c qelg.c qc25c.c qc25s.c qc25f.c ptsort.c util.c err.c positivity.c append.c initialise.c set_initial.c reset.c ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/interpolation/ChangeLog gsl-1.6/interpolation/ChangeLog *** gsl-1.5/interpolation/ChangeLog Mon Mar 15 17:39:20 2004 --- gsl-1.6/interpolation/ChangeLog Mon Nov 29 14:58:11 2004 *************** *** 1,2 **** --- 1,10 ---- + 2004-11-28 Brian Gough + + * cspline.c (cspline_init): support case of degenerate x[i] values + (cspline_init_periodic): support case of degenerate x[i] values + + * integ_eval.h (integ_eval): improve numerical stability of + integration formula + 2004-03-15 Brian Gough diff -rc2P -x *.info -x *.info-* gsl-1.5/interpolation/Makefile.am gsl-1.6/interpolation/Makefile.am *** gsl-1.5/interpolation/Makefile.am Sun Jul 27 10:49:48 2003 --- gsl-1.6/interpolation/Makefile.am Sat Sep 11 14:45:48 2004 *************** *** 11,15 **** INCLUDES= -I$(top_builddir) ! TESTS = test test_LDADD = libgslinterpolation.la ../poly/libgslpoly.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../cblas/libgslcblas.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la --- 11,15 ---- INCLUDES= -I$(top_builddir) ! TESTS = $(check_PROGRAMS) test_LDADD = libgslinterpolation.la ../poly/libgslpoly.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../cblas/libgslcblas.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la diff -rc2P -x *.info -x *.info-* gsl-1.5/interpolation/Makefile.in gsl-1.6/interpolation/Makefile.in *** gsl-1.5/interpolation/Makefile.in Thu Jun 24 11:49:46 2004 --- gsl-1.6/interpolation/Makefile.in Fri Dec 31 15:15:30 2004 *************** *** 153,157 **** INCLUDES = -I$(top_builddir) ! TESTS = test test_LDADD = libgslinterpolation.la ../poly/libgslpoly.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../cblas/libgslcblas.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la --- 153,157 ---- INCLUDES = -I$(top_builddir) ! TESTS = $(check_PROGRAMS) test_LDADD = libgslinterpolation.la ../poly/libgslpoly.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../cblas/libgslcblas.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la diff -rc2P -x *.info -x *.info-* gsl-1.5/interpolation/cspline.c gsl-1.6/interpolation/cspline.c *** gsl-1.5/interpolation/cspline.c Sun Jun 20 19:41:17 2004 --- gsl-1.6/interpolation/cspline.c Mon Nov 29 14:58:11 2004 *************** *** 113,119 **** const double ydiff_i = ya[i + 1] - ya[i]; const double ydiff_ip1 = ya[i + 2] - ya[i + 1]; state->offdiag[i] = h_ip1; state->diag[i] = 2.0 * (h_ip1 + h_i); ! state->g[i] = 3.0 * (ydiff_ip1 / h_ip1 - ydiff_i / h_i); } --- 113,121 ---- const double ydiff_i = ya[i + 1] - ya[i]; const double ydiff_ip1 = ya[i + 2] - ya[i + 1]; + const double g_i = (h_i != 0.0) ? 1.0 / h_i : 0.0; + const double g_ip1 = (h_ip1 != 0.0) ? 1.0 / h_ip1 : 0.0; state->offdiag[i] = h_ip1; state->diag[i] = 2.0 * (h_ip1 + h_i); ! state->g[i] = 3.0 * (ydiff_ip1 * g_ip1 - ydiff_i * g_i); } *************** *** 180,186 **** const double ydiff_i = ya[i + 1] - ya[i]; const double ydiff_ip1 = ya[i + 2] - ya[i + 1]; state->offdiag[i] = h_ip1; state->diag[i] = 2.0 * (h_ip1 + h_i); ! state->g[i] = 3.0 * (ydiff_ip1 / h_ip1 - ydiff_i / h_i); } --- 182,190 ---- const double ydiff_i = ya[i + 1] - ya[i]; const double ydiff_ip1 = ya[i + 2] - ya[i + 1]; + const double g_i = (h_i != 0.0) ? 1.0 / h_i : 0.0; + const double g_ip1 = (h_ip1 != 0.0) ? 1.0 / h_ip1 : 0.0; state->offdiag[i] = h_ip1; state->diag[i] = 2.0 * (h_ip1 + h_i); ! state->g[i] = 3.0 * (ydiff_ip1 * g_ip1 - ydiff_i * g_i); } *************** *** 192,198 **** const double ydiff_i = ya[i + 1] - ya[i]; const double ydiff_ip1 = ya[1] - ya[0]; state->offdiag[i] = h_ip1; state->diag[i] = 2.0 * (h_ip1 + h_i); ! state->g[i] = 3.0 * (ydiff_ip1 / h_ip1 - ydiff_i / h_i); } --- 196,204 ---- const double ydiff_i = ya[i + 1] - ya[i]; const double ydiff_ip1 = ya[1] - ya[0]; + const double g_i = (h_i != 0.0) ? 1.0 / h_i : 0.0; + const double g_ip1 = (h_ip1 != 0.0) ? 1.0 / h_ip1 : 0.0; state->offdiag[i] = h_ip1; state->diag[i] = 2.0 * (h_ip1 + h_i); ! state->g[i] = 3.0 * (ydiff_ip1 * g_ip1 - ydiff_i * g_i); } diff -rc2P -x *.info -x *.info-* gsl-1.5/interpolation/integ_eval.h gsl-1.6/interpolation/integ_eval.h *** gsl-1.5/interpolation/integ_eval.h Fri Jul 25 16:18:21 2003 --- gsl-1.6/interpolation/integ_eval.h Mon Nov 29 14:57:28 2004 *************** *** 26,36 **** double b) { ! const double t0 = b + a; ! const double t1 = a * a + a * b + b * b; ! const double t2 = a * a * a + a * a * b + b * b * a + b * b * b; ! const double bterm = 0.5 * bi * (t0 - 2.0 * xi); ! const double cterm = ci / 3.0 * (t1 - 3.0 * xi * (t0 - xi)); ! const double dterm = ! di / 4.0 * (t2 - 2.0 * xi * (2.0 * t1 - xi * (3.0 * t0 - 2.0 * xi))); return (b - a) * (ai + bterm + cterm + dterm); } --- 26,36 ---- double b) { ! const double r1 = a - xi; ! const double r2 = b - xi; ! const double r12 = r1 + r2; ! const double bterm = 0.5 * bi * r12; ! const double cterm = (1.0 / 3.0) * ci * (r1 * r1 + r2 * r2 + r1 * r2); ! const double dterm = 0.25 * di * r12 * (r1 * r1 + r2 * r2); ! return (b - a) * (ai + bterm + cterm + dterm); } diff -rc2P -x *.info -x *.info-* gsl-1.5/linalg/ChangeLog gsl-1.6/linalg/ChangeLog *** gsl-1.5/linalg/ChangeLog Sun Jun 6 16:46:57 2004 --- gsl-1.6/linalg/ChangeLog Fri Dec 24 14:00:19 2004 *************** *** 1,2 **** --- 1,14 ---- + 2004-12-23 Brian Gough + + * qr.c (gsl_linalg_R_svx): added missing function + + 2004-09-13 Brian Gough + + * test.c: added tests for LQ, P^TLQ solvers + + * ptlq.c: added support for PA = LQ decompositions + + * lq.c: added support for A = LQ decompositions + 2004-05-30 Brian Gough diff -rc2P -x *.info -x *.info-* gsl-1.5/linalg/Makefile.am gsl-1.6/linalg/Makefile.am *** gsl-1.5/linalg/Makefile.am Sun Jul 27 10:50:25 2003 --- gsl-1.6/linalg/Makefile.am Mon Sep 13 19:17:04 2004 *************** *** 5,13 **** INCLUDES= -I$(top_builddir) ! libgsllinalg_la_SOURCES = multiply.c exponential.c tridiag.c tridiag.h lu.c luc.c hh.c qr.c qrpt.c svd.c householder.c householdercomplex.c cholesky.c symmtd.c hermtd.c bidiag.c balance.c noinst_HEADERS = givens.c apply_givens.c svdstep.c tridiag.h ! TESTS = test check_PROGRAMS = test --- 5,13 ---- INCLUDES= -I$(top_builddir) ! libgsllinalg_la_SOURCES = multiply.c exponential.c tridiag.c tridiag.h lu.c luc.c hh.c qr.c qrpt.c lq.c ptlq.c svd.c householder.c householdercomplex.c cholesky.c symmtd.c hermtd.c bidiag.c balance.c noinst_HEADERS = givens.c apply_givens.c svdstep.c tridiag.h ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/linalg/Makefile.in gsl-1.6/linalg/Makefile.in *** gsl-1.5/linalg/Makefile.in Thu Jun 24 11:49:46 2004 --- gsl-1.6/linalg/Makefile.in Fri Dec 31 15:15:31 2004 *************** *** 147,155 **** INCLUDES = -I$(top_builddir) ! libgsllinalg_la_SOURCES = multiply.c exponential.c tridiag.c tridiag.h lu.c luc.c hh.c qr.c qrpt.c svd.c householder.c householdercomplex.c cholesky.c symmtd.c hermtd.c bidiag.c balance.c noinst_HEADERS = givens.c apply_givens.c svdstep.c tridiag.h ! TESTS = test check_PROGRAMS = test --- 147,155 ---- INCLUDES = -I$(top_builddir) ! libgsllinalg_la_SOURCES = multiply.c exponential.c tridiag.c tridiag.h lu.c luc.c hh.c qr.c qrpt.c lq.c ptlq.c svd.c householder.c householdercomplex.c cholesky.c symmtd.c hermtd.c bidiag.c balance.c noinst_HEADERS = givens.c apply_givens.c svdstep.c tridiag.h ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test *************** *** 168,172 **** libgsllinalg_la_LIBADD = am_libgsllinalg_la_OBJECTS = multiply.lo exponential.lo tridiag.lo lu.lo \ ! luc.lo hh.lo qr.lo qrpt.lo svd.lo householder.lo \ householdercomplex.lo cholesky.lo symmtd.lo hermtd.lo bidiag.lo \ balance.lo --- 168,172 ---- libgsllinalg_la_LIBADD = am_libgsllinalg_la_OBJECTS = multiply.lo exponential.lo tridiag.lo lu.lo \ ! luc.lo hh.lo qr.lo qrpt.lo lq.lo ptlq.lo svd.lo householder.lo \ householdercomplex.lo cholesky.lo symmtd.lo hermtd.lo bidiag.lo \ balance.lo diff -rc2P -x *.info -x *.info-* gsl-1.5/linalg/apply_givens.c gsl-1.6/linalg/apply_givens.c *** gsl-1.5/linalg/apply_givens.c Fri Jul 25 16:18:11 2003 --- gsl-1.6/linalg/apply_givens.c Mon Sep 13 19:17:04 2004 *************** *** 2,5 **** --- 2,6 ---- * * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Gerard Jungman, Brian Gough + * Copyright (C) 2004 Joerg Wensch, modifications for LQ. * * This program is free software; you can redistribute it and/or modify *************** *** 47,50 **** --- 48,79 ---- inline static void + apply_givens_lq (size_t M, size_t N, gsl_matrix * Q, gsl_matrix * L, + size_t i, size_t j, double c, double s) + { + size_t k; + + /* Apply rotation to matrix Q, Q' = G Q */ + + for (k = 0; k < M; k++) + { + double qik = gsl_matrix_get (Q, i, k); + double qjk = gsl_matrix_get (Q, j, k); + gsl_matrix_set (Q, i, k, qik * c - qjk * s); + gsl_matrix_set (Q, j, k, qik * s + qjk * c); + } + + /* Apply rotation to matrix L, L' = L G^T (note: lower triangular so + zero for column > row) */ + + for (k = GSL_MIN (i, j); k < N; k++) + { + double lki = gsl_matrix_get (L, k, i); + double lkj = gsl_matrix_get (L, k, j); + gsl_matrix_set (L, k, i, c * lki - s * lkj); + gsl_matrix_set (L, k, j, s * lki + c * lkj); + } + } + + inline static void apply_givens_vec (gsl_vector * v, size_t i, size_t j, double c, double s) { *************** *** 56,57 **** --- 85,87 ---- gsl_vector_set (v, j, s * vi + c * vj); } + diff -rc2P -x *.info -x *.info-* gsl-1.5/linalg/gsl_linalg.h gsl-1.6/linalg/gsl_linalg.h *** gsl-1.5/linalg/gsl_linalg.h Fri Jul 25 16:18:21 2003 --- gsl-1.6/linalg/gsl_linalg.h Fri Dec 24 13:59:40 2004 *************** *** 314,317 **** --- 314,393 ---- const gsl_vector * v); + /* LQ decomposition */ + + int gsl_linalg_LQ_decomp (gsl_matrix * A, gsl_vector * tau); + + int gsl_linalg_LQ_solve_T (const gsl_matrix * LQ, const gsl_vector * tau, + const gsl_vector * b, gsl_vector * x); + + int gsl_linalg_LQ_svx_T (const gsl_matrix * LQ, const gsl_vector * tau, + gsl_vector * x); + + int gsl_linalg_LQ_lssolve_T (const gsl_matrix * LQ, const gsl_vector * tau, + const gsl_vector * b, gsl_vector * x, + gsl_vector * residual); + + int gsl_linalg_LQ_Lsolve_T (const gsl_matrix * LQ, const gsl_vector * b, + gsl_vector * x); + + int gsl_linalg_LQ_Lsvx_T (const gsl_matrix * LQ, gsl_vector * x); + + int gsl_linalg_L_solve_T (const gsl_matrix * L, const gsl_vector * b, + gsl_vector * x); + + int gsl_linalg_LQ_vecQ (const gsl_matrix * LQ, const gsl_vector * tau, + gsl_vector * v); + + int gsl_linalg_LQ_vecQT (const gsl_matrix * LQ, const gsl_vector * tau, + gsl_vector * v); + + int gsl_linalg_LQ_unpack (const gsl_matrix * LQ, const gsl_vector * tau, + gsl_matrix * Q, gsl_matrix * L); + + int gsl_linalg_LQ_update (gsl_matrix * Q, gsl_matrix * R, + const gsl_vector * v, gsl_vector * w); + int gsl_linalg_LQ_LQsolve (gsl_matrix * Q, gsl_matrix * L, + const gsl_vector * b, gsl_vector * x); + + /* P^T L Q decomposition */ + + int gsl_linalg_PTLQ_decomp (gsl_matrix * A, gsl_vector * tau, + gsl_permutation * p, int *signum, + gsl_vector * norm); + + int gsl_linalg_PTLQ_decomp2 (const gsl_matrix * A, gsl_matrix * q, + gsl_matrix * r, gsl_vector * tau, + gsl_permutation * p, int *signum, + gsl_vector * norm); + + int gsl_linalg_PTLQ_solve_T (const gsl_matrix * QR, + const gsl_vector * tau, + const gsl_permutation * p, + const gsl_vector * b, + gsl_vector * x); + + int gsl_linalg_PTLQ_svx_T (const gsl_matrix * LQ, + const gsl_vector * tau, + const gsl_permutation * p, + gsl_vector * x); + + int gsl_linalg_PTLQ_LQsolve_T (const gsl_matrix * Q, const gsl_matrix * L, + const gsl_permutation * p, + const gsl_vector * b, + gsl_vector * x); + + int gsl_linalg_PTLQ_Lsolve_T (const gsl_matrix * LQ, + const gsl_permutation * p, + const gsl_vector * b, + gsl_vector * x); + + int gsl_linalg_PTLQ_Lsvx_T (const gsl_matrix * LQ, + const gsl_permutation * p, + gsl_vector * x); + + int gsl_linalg_PTLQ_update (gsl_matrix * Q, gsl_matrix * L, + const gsl_permutation * p, + const gsl_vector * v, gsl_vector * w); + /* Cholesky Decomposition */ diff -rc2P -x *.info -x *.info-* gsl-1.5/linalg/lq.c gsl-1.6/linalg/lq.c *** gsl-1.5/linalg/lq.c Thu Jan 1 01:00:00 1970 --- gsl-1.6/linalg/lq.c Sat Sep 18 21:04:04 2004 *************** *** 0 **** --- 1,567 ---- + /* linalg/lq.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman, Brian Gough + * Copyright (C) 2004 Joerg Wensch, modifications for LQ. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + #include + #include + #include + #include + #include + #include + #include + + #include + + #define REAL double + + #include "givens.c" + #include "apply_givens.c" + + /* Note: The standard in numerical linear algebra is to solve A x = b + * resp. ||A x - b||_2 -> min by QR-decompositions where x, b are + * column vectors. + * + * When the matrix A has a large number of rows it is much more + * efficient to work with the transposed matrix A^T and to solve the + * system x^T A = b^T resp. ||x^T A - b^T||_2 -> min. This is caused + * by the row-oriented format in which GSL stores matrices. Therefore + * the QR-decomposition of A has to be replaced by a LQ decomposition + * of A^T + * + * The purpose of this package is to provide the algorithms to compute + * the LQ-decomposition and to solve the linear equations resp. least + * squares problems. The dimensions N, M of the matrix are switched + * because here A will probably be a transposed matrix. We write x^T, + * b^T,... for vectors the comments to emphasize that they are row + * vectors. + * + * It may even be useful to transpose your matrix explicitly (assumed + * that there are no memory restrictions) because this takes O(M x N) + * computing time where the decompostion takes O(M x N^2) computing + * time. */ + + /* Factorise a general N x M matrix A into + * + * A = L Q + * + * where Q is orthogonal (M x M) and L is lower triangular (N x M). + * + * Q is stored as a packed set of Householder transformations in the + * strict upper triangular part of the input matrix. + * + * R is stored in the diagonal and lower triangle of the input matrix. + * + * The full matrix for Q can be obtained as the product + * + * Q = Q_k .. Q_2 Q_1 + * + * where k = MIN(M,N) and + * + * Q_i = (I - tau_i * v_i * v_i') + * + * and where v_i is a Householder vector + * + * v_i = [1, m(i+1,i), m(i+2,i), ... , m(M,i)] + * + * This storage scheme is the same as in LAPACK. */ + + int + gsl_linalg_LQ_decomp (gsl_matrix * A, gsl_vector * tau) + { + const size_t N = A->size1; + const size_t M = A->size2; + + if (tau->size != GSL_MIN (M, N)) + { + GSL_ERROR ("size of tau must be MIN(M,N)", GSL_EBADLEN); + } + else + { + size_t i; + + for (i = 0; i < GSL_MIN (M, N); i++) + { + /* Compute the Householder transformation to reduce the j-th + column of the matrix to a multiple of the j-th unit vector */ + + gsl_vector_view c_full = gsl_matrix_row (A, i); + gsl_vector_view c = gsl_vector_subvector (&(c_full.vector), i, M-i); + + double tau_i = gsl_linalg_householder_transform (&(c.vector)); + + gsl_vector_set (tau, i, tau_i); + + /* Apply the transformation to the remaining columns and + update the norms */ + + if (i + 1 < N) + { + gsl_matrix_view m = gsl_matrix_submatrix (A, i + 1, i, N - (i + 1), M - i ); + gsl_linalg_householder_mh (tau_i, &(c.vector), &(m.matrix)); + } + } + + return GSL_SUCCESS; + } + } + + /* Solves the system x^T A = b^T using the LQ factorisation, + + * x^T L = b^T Q^T + * + * to obtain x. Based on SLATEC code. + */ + + + int + gsl_linalg_LQ_solve_T (const gsl_matrix * LQ, const gsl_vector * tau, const gsl_vector * b, gsl_vector * x) + { + if (LQ->size1 != LQ->size2) + { + GSL_ERROR ("LQ matrix must be square", GSL_ENOTSQR); + } + else if (LQ->size2 != b->size) + { + GSL_ERROR ("matrix size must match b size", GSL_EBADLEN); + } + else if (LQ->size1 != x->size) + { + GSL_ERROR ("matrix size must match solution size", GSL_EBADLEN); + } + else + { + /* Copy x <- b */ + + gsl_vector_memcpy (x, b); + + /* Solve for x */ + + gsl_linalg_LQ_svx_T (LQ, tau, x); + + return GSL_SUCCESS; + } + } + + /* Solves the system x^T A = b^T in place using the LQ factorisation, + * + * x^T L = b^T Q^T + * + * to obtain x. Based on SLATEC code. + */ + + int + gsl_linalg_LQ_svx_T (const gsl_matrix * LQ, const gsl_vector * tau, gsl_vector * x) + { + + if (LQ->size1 != LQ->size2) + { + GSL_ERROR ("LQ matrix must be square", GSL_ENOTSQR); + } + else if (LQ->size1 != x->size) + { + GSL_ERROR ("matrix size must match x/rhs size", GSL_EBADLEN); + } + else + { + /* compute rhs = Q^T b */ + + gsl_linalg_LQ_vecQT (LQ, tau, x); + + /* Solve R x = rhs, storing x in-place */ + + gsl_blas_dtrsv (CblasLower, CblasTrans, CblasNonUnit, LQ, x); + + return GSL_SUCCESS; + } + } + + + /* Find the least squares solution to the overdetermined system + * + * x^T A = b^T + * + * for M >= N using the LQ factorization A = L Q. + */ + + int + gsl_linalg_LQ_lssolve_T (const gsl_matrix * LQ, const gsl_vector * tau, const gsl_vector * b, gsl_vector * x, gsl_vector * residual) + { + const size_t N = LQ->size1; + const size_t M = LQ->size2; + + if (M < N) + { + GSL_ERROR ("LQ matrix must have M>=N", GSL_EBADLEN); + } + else if (M != b->size) + { + GSL_ERROR ("matrix size must match b size", GSL_EBADLEN); + } + else if (N != x->size) + { + GSL_ERROR ("matrix size must match solution size", GSL_EBADLEN); + } + else if (M != residual->size) + { + GSL_ERROR ("matrix size must match residual size", GSL_EBADLEN); + } + else + { + gsl_matrix_const_view L = gsl_matrix_const_submatrix (LQ, 0, 0, N, N); + gsl_vector_view c = gsl_vector_subvector(residual, 0, N); + + gsl_vector_memcpy(residual, b); + + /* compute rhs = b^T Q^T */ + + gsl_linalg_LQ_vecQT (LQ, tau, residual); + + /* Solve x^T L = rhs */ + + gsl_vector_memcpy(x, &(c.vector)); + + gsl_blas_dtrsv (CblasLower, CblasTrans, CblasNonUnit, &(L.matrix), x); + + /* Compute residual = b^T - x^T A = (b^T Q^T - x^T L) Q */ + + gsl_vector_set_zero(&(c.vector)); + + gsl_linalg_LQ_vecQ(LQ, tau, residual); + + return GSL_SUCCESS; + } + } + + + int + gsl_linalg_LQ_Lsolve_T (const gsl_matrix * LQ, const gsl_vector * b, gsl_vector * x) + { + if (LQ->size1 != LQ->size2) + { + GSL_ERROR ("LQ matrix must be square", GSL_ENOTSQR); + } + else if (LQ->size1 != b->size) + { + GSL_ERROR ("matrix size must match b size", GSL_EBADLEN); + } + else if (LQ->size1 != x->size) + { + GSL_ERROR ("matrix size must match x size", GSL_EBADLEN); + } + else + { + /* Copy x <- b */ + + gsl_vector_memcpy (x, b); + + /* Solve R x = b, storing x in-place */ + + gsl_blas_dtrsv (CblasLower, CblasTrans, CblasNonUnit, LQ, x); + + return GSL_SUCCESS; + } + } + + + int + gsl_linalg_LQ_Lsvx_T (const gsl_matrix * LQ, gsl_vector * x) + { + if (LQ->size1 != LQ->size2) + { + GSL_ERROR ("LQ matrix must be square", GSL_ENOTSQR); + } + else if (LQ->size2 != x->size) + { + GSL_ERROR ("matrix size must match rhs size", GSL_EBADLEN); + } + else + { + /* Solve x^T L = b^T, storing x in-place */ + + gsl_blas_dtrsv (CblasLower, CblasTrans, CblasNonUnit, LQ, x); + + return GSL_SUCCESS; + } + } + + int + gsl_linalg_L_solve_T (const gsl_matrix * L, const gsl_vector * b, gsl_vector * x) + { + if (L->size1 != L->size2) + { + GSL_ERROR ("R matrix must be square", GSL_ENOTSQR); + } + else if (L->size2 != b->size) + { + GSL_ERROR ("matrix size must match b size", GSL_EBADLEN); + } + else if (L->size1 != x->size) + { + GSL_ERROR ("matrix size must match solution size", GSL_EBADLEN); + } + else + { + /* Copy x <- b */ + + gsl_vector_memcpy (x, b); + + /* Solve R x = b, storing x inplace in b */ + + gsl_blas_dtrsv (CblasLower, CblasTrans, CblasNonUnit, L, x); + + return GSL_SUCCESS; + } + } + + + + + int + gsl_linalg_LQ_vecQT (const gsl_matrix * LQ, const gsl_vector * tau, gsl_vector * v) + { + const size_t N = LQ->size1; + const size_t M = LQ->size2; + + if (tau->size != GSL_MIN (M, N)) + { + GSL_ERROR ("size of tau must be MIN(M,N)", GSL_EBADLEN); + } + else if (v->size != M) + { + GSL_ERROR ("vector size must be M", GSL_EBADLEN); + } + else + { + size_t i; + + /* compute v Q^T */ + + for (i = 0; i < GSL_MIN (M, N); i++) + { + gsl_vector_const_view c = gsl_matrix_const_row (LQ, i); + gsl_vector_const_view h = gsl_vector_const_subvector (&(c.vector), + i, M - i); + gsl_vector_view w = gsl_vector_subvector (v, i, M - i); + double ti = gsl_vector_get (tau, i); + gsl_linalg_householder_hv (ti, &(h.vector), &(w.vector)); + } + return GSL_SUCCESS; + } + } + + int + gsl_linalg_LQ_vecQ (const gsl_matrix * LQ, const gsl_vector * tau, gsl_vector * v) + { + const size_t N = LQ->size1; + const size_t M = LQ->size2; + + if (tau->size != GSL_MIN (M, N)) + { + GSL_ERROR ("size of tau must be MIN(M,N)", GSL_EBADLEN); + } + else if (v->size != M) + { + GSL_ERROR ("vector size must be M", GSL_EBADLEN); + } + else + { + size_t i; + + /* compute v Q^T */ + + for (i = GSL_MIN (M, N); i > 0 && i--;) + { + gsl_vector_const_view c = gsl_matrix_const_row (LQ, i); + gsl_vector_const_view h = gsl_vector_const_subvector (&(c.vector), + i, M - i); + gsl_vector_view w = gsl_vector_subvector (v, i, M - i); + double ti = gsl_vector_get (tau, i); + gsl_linalg_householder_hv (ti, &(h.vector), &(w.vector)); + } + return GSL_SUCCESS; + } + } + + + /* Form the orthogonal matrix Q from the packed LQ matrix */ + + int + gsl_linalg_LQ_unpack (const gsl_matrix * LQ, const gsl_vector * tau, gsl_matrix * Q, gsl_matrix * L) + { + const size_t N = LQ->size1; + const size_t M = LQ->size2; + + if (Q->size1 != M || Q->size2 != M) + { + GSL_ERROR ("Q matrix must be M x M", GSL_ENOTSQR); + } + else if (L->size1 != N || L->size2 != M) + { + GSL_ERROR ("R matrix must be N x M", GSL_ENOTSQR); + } + else if (tau->size != GSL_MIN (M, N)) + { + GSL_ERROR ("size of tau must be MIN(M,N)", GSL_EBADLEN); + } + else + { + size_t i, j, l_border; + + /* Initialize Q to the identity */ + + gsl_matrix_set_identity (Q); + + for (i = GSL_MIN (M, N); i > 0 && i--;) + { + gsl_vector_const_view c = gsl_matrix_const_row (LQ, i); + gsl_vector_const_view h = gsl_vector_const_subvector (&c.vector, + i, M - i); + gsl_matrix_view m = gsl_matrix_submatrix (Q, i, i, M - i, M - i); + double ti = gsl_vector_get (tau, i); + gsl_linalg_householder_mh (ti, &h.vector, &m.matrix); + } + + /* Form the lower triangular matrix L from a packed LQ matrix */ + + for (i = 0; i < N; i++) + { + l_border=GSL_MIN(i,M-1); + for (j = 0; j <= l_border ; j++) + gsl_matrix_set (L, i, j, gsl_matrix_get (LQ, i, j)); + + for (j = l_border+1; j < M; j++) + gsl_matrix_set (L, i, j, 0.0); + } + + return GSL_SUCCESS; + } + } + + + /* Update a LQ factorisation for A= L Q , A' = A + v u^T, + + * L' Q' = LQ + v u^T + * = (L + v u^T Q^T) Q + * = (L + v w^T) Q + * + * where w = Q u. + * + * Algorithm from Golub and Van Loan, "Matrix Computations", Section + * 12.5 (Updating Matrix Factorizations, Rank-One Changes) + */ + + int + gsl_linalg_LQ_update (gsl_matrix * Q, gsl_matrix * L, + const gsl_vector * v, gsl_vector * w) + { + const size_t N = L->size1; + const size_t M = L->size2; + + if (Q->size1 != M || Q->size2 != M) + { + GSL_ERROR ("Q matrix must be N x N if L is M x N", GSL_ENOTSQR); + } + else if (w->size != M) + { + GSL_ERROR ("w must be length N if L is M x N", GSL_EBADLEN); + } + else if (v->size != N) + { + GSL_ERROR ("v must be length M if L is M x N", GSL_EBADLEN); + } + else + { + size_t j, k; + double w0; + + /* Apply Given's rotations to reduce w to (|w|, 0, 0, ... , 0) + + J_1^T .... J_(n-1)^T w = +/- |w| e_1 + + simultaneously applied to L, H = J_1^T ... J^T_(n-1) L + so that H is upper Hessenberg. (12.5.2) */ + + for (k = M - 1; k > 0; k--) + { + double c, s; + double wk = gsl_vector_get (w, k); + double wkm1 = gsl_vector_get (w, k - 1); + + create_givens (wkm1, wk, &c, &s); + apply_givens_vec (w, k - 1, k, c, s); + apply_givens_lq (M, N, Q, L, k - 1, k, c, s); + } + + w0 = gsl_vector_get (w, 0); + + /* Add in v w^T (Equation 12.5.3) */ + + for (j = 0; j < N; j++) + { + double lj0 = gsl_matrix_get (L, j, 0); + double vj = gsl_vector_get (v, j); + gsl_matrix_set (L, j, 0, lj0 + w0 * vj); + } + + /* Apply Givens transformations L' = G_(n-1)^T ... G_1^T H + Equation 12.5.4 */ + + for (k = 1; k < GSL_MIN(M,N+1); k++) + { + double c, s; + double diag = gsl_matrix_get (L, k - 1, k - 1); + double offdiag = gsl_matrix_get (L, k - 1 , k); + + create_givens (diag, offdiag, &c, &s); + apply_givens_lq (M, N, Q, L, k - 1, k, c, s); + + gsl_matrix_set (L, k - 1, k, 0.0); /* exact zero of G^T */ + } + + return GSL_SUCCESS; + } + } + + int + gsl_linalg_LQ_LQsolve (gsl_matrix * Q, gsl_matrix * L, const gsl_vector * b, gsl_vector * x) + { + const size_t N = L->size1; + const size_t M = L->size2; + + if (M != N) + { + return GSL_ENOTSQR; + } + else if (Q->size1 != M || b->size != M || x->size != M) + { + return GSL_EBADLEN; + } + else + { + /* compute sol = b^T Q^T */ + + gsl_blas_dgemv (CblasNoTrans, 1.0, Q, b, 0.0, x); + + /* Solve x^T L = sol, storing x in-place */ + + gsl_blas_dtrsv (CblasLower, CblasTrans, CblasNonUnit, L, x); + + return GSL_SUCCESS; + } + } diff -rc2P -x *.info -x *.info-* gsl-1.5/linalg/ptlq.c gsl-1.6/linalg/ptlq.c *** gsl-1.5/linalg/ptlq.c Thu Jan 1 01:00:00 1970 --- gsl-1.6/linalg/ptlq.c Mon Sep 13 19:17:04 2004 *************** *** 0 **** --- 1,493 ---- + /* linalg/ptlq.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman, Brian Gough + * Copyright (C) 2004 Joerg Wensch, modifications for LQ. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + #include + #include + #include + #include + #include + #include + #include + #include + #include + + #include "givens.c" + #include "apply_givens.c" + + /* The purpose of this package is to speed up QR-decomposition for + large matrices. Because QR-decomposition is column oriented, but + GSL uses a row-oriented matrix format, there can considerable + speedup obtained by computing the LQ-decomposition of the + transposed matrix instead. This package provides LQ-decomposition + and related algorithms. */ + + /* Factorise a general N x M matrix A into + * + * P A = L Q + * + * where Q is orthogonal (M x M) and L is lower triangular (N x M). + * When A is rank deficient, r = rank(A) < n, then the permutation is + * used to ensure that the lower n - r columns of L are zero and the first + * l rows of Q form an orthonormal basis for the rows of A. + * + * Q is stored as a packed set of Householder transformations in the + * strict upper triangular part of the input matrix. + * + * L is stored in the diagonal and lower triangle of the input matrix. + * + * P: column j of P is column k of the identity matrix, where k = + * permutation->data[j] + * + * The full matrix for Q can be obtained as the product + * + * Q = Q_k .. Q_2 Q_1 + * + * where k = MIN(M,N) and + * + * Q_i = (I - tau_i * v_i * v_i') + * + * and where v_i is a Householder vector + * + * v_i = [1, m(i,i+1), m(i,i+2), ... , m(i,M)] + * + * This storage scheme is the same as in LAPACK. See LAPACK's + * dgeqpf.f for details. + * + */ + + int + gsl_linalg_PTLQ_decomp (gsl_matrix * A, gsl_vector * tau, gsl_permutation * p, int *signum, gsl_vector * norm) + { + const size_t N = A->size1; + const size_t M = A->size2; + + if (tau->size != GSL_MIN (M, N)) + { + GSL_ERROR ("size of tau must be MIN(M,N)", GSL_EBADLEN); + } + else if (p->size != N) + { + GSL_ERROR ("permutation size must be N", GSL_EBADLEN); + } + else if (norm->size != N) + { + GSL_ERROR ("norm size must be N", GSL_EBADLEN); + } + else + { + size_t i; + + *signum = 1; + + gsl_permutation_init (p); /* set to identity */ + + /* Compute column norms and store in workspace */ + + for (i = 0; i < N; i++) + { + gsl_vector_view c = gsl_matrix_row (A, i); + double x = gsl_blas_dnrm2 (&c.vector); + gsl_vector_set (norm, i, x); + } + + for (i = 0; i < GSL_MIN (M, N); i++) + { + /* Bring the column of largest norm into the pivot position */ + + double max_norm = gsl_vector_get(norm, i); + size_t j, kmax = i; + + for (j = i + 1; j < N; j++) + { + double x = gsl_vector_get (norm, j); + + if (x > max_norm) + { + max_norm = x; + kmax = j; + } + } + + if (kmax != i) + { + gsl_matrix_swap_rows (A, i, kmax); + gsl_permutation_swap (p, i, kmax); + gsl_vector_swap_elements(norm,i,kmax); + + (*signum) = -(*signum); + } + + /* Compute the Householder transformation to reduce the j-th + column of the matrix to a multiple of the j-th unit vector */ + + { + gsl_vector_view c_full = gsl_matrix_row (A, i); + gsl_vector_view c = gsl_vector_subvector (&c_full.vector, + i, M - i); + double tau_i = gsl_linalg_householder_transform (&c.vector); + + gsl_vector_set (tau, i, tau_i); + + /* Apply the transformation to the remaining columns */ + + if (i + 1 < N) + { + gsl_matrix_view m = gsl_matrix_submatrix (A, i +1, i, N - (i+1), M - i); + + gsl_linalg_householder_mh (tau_i, &c.vector, &m.matrix); + } + } + + /* Update the norms of the remaining columns too */ + + if (i + 1 < M) + { + for (j = i + 1; j < N; j++) + { + double x = gsl_vector_get (norm, j); + + if (x > 0.0) + { + double y = 0; + double temp= gsl_matrix_get (A, j, i) / x; + + if (fabs (temp) >= 1) + y = 0.0; + else + y = x * sqrt (1 - temp * temp); + + /* recompute norm to prevent loss of accuracy */ + + if (fabs (y / x) < sqrt (20.0) * GSL_SQRT_DBL_EPSILON) + { + gsl_vector_view c_full = gsl_matrix_row (A, j); + gsl_vector_view c = + gsl_vector_subvector(&c_full.vector, + i+1, M - (i+1)); + y = gsl_blas_dnrm2 (&c.vector); + } + + gsl_vector_set (norm, j, y); + } + } + } + } + + return GSL_SUCCESS; + } + } + + int + gsl_linalg_PTLQ_decomp2 (const gsl_matrix * A, gsl_matrix * q, gsl_matrix * r, gsl_vector * tau, gsl_permutation * p, int *signum, gsl_vector * norm) + { + const size_t N = A->size1; + const size_t M = A->size2; + + if (q->size1 != M || q->size2 !=M) + { + GSL_ERROR ("q must be M x M", GSL_EBADLEN); + } + else if (r->size1 != N || r->size2 !=M) + { + GSL_ERROR ("r must be N x M", GSL_EBADLEN); + } + else if (tau->size != GSL_MIN (M, N)) + { + GSL_ERROR ("size of tau must be MIN(M,N)", GSL_EBADLEN); + } + else if (p->size != N) + { + GSL_ERROR ("permutation size must be N", GSL_EBADLEN); + } + else if (norm->size != N) + { + GSL_ERROR ("norm size must be N", GSL_EBADLEN); + } + + gsl_matrix_memcpy (r, A); + + gsl_linalg_PTLQ_decomp (r, tau, p, signum, norm); + + /* FIXME: aliased arguments depends on behavior of unpack routine! */ + + gsl_linalg_LQ_unpack (r, tau, q, r); + + return GSL_SUCCESS; + } + + + /* Solves the system x^T A = b^T using the P^T L Q factorisation, + + z^T L = b^T Q^T + + x = P z; + + to obtain x. Based on SLATEC code. */ + + int + gsl_linalg_PTLQ_solve_T (const gsl_matrix * QR, + const gsl_vector * tau, + const gsl_permutation * p, + const gsl_vector * b, + gsl_vector * x) + { + if (QR->size1 != QR->size2) + { + GSL_ERROR ("QR matrix must be square", GSL_ENOTSQR); + } + else if (QR->size2 != p->size) + { + GSL_ERROR ("matrix size must match permutation size", GSL_EBADLEN); + } + else if (QR->size2 != b->size) + { + GSL_ERROR ("matrix size must match b size", GSL_EBADLEN); + } + else if (QR->size1 != x->size) + { + GSL_ERROR ("matrix size must match solution size", GSL_EBADLEN); + } + else + { + gsl_vector_memcpy (x, b); + + gsl_linalg_PTLQ_svx_T (QR, tau, p, x); + + return GSL_SUCCESS; + } + } + + int + gsl_linalg_PTLQ_svx_T (const gsl_matrix * LQ, + const gsl_vector * tau, + const gsl_permutation * p, + gsl_vector * x) + { + if (LQ->size1 != LQ->size2) + { + GSL_ERROR ("LQ matrix must be square", GSL_ENOTSQR); + } + else if (LQ->size2 != p->size) + { + GSL_ERROR ("matrix size must match permutation size", GSL_EBADLEN); + } + else if (LQ->size1 != x->size) + { + GSL_ERROR ("matrix size must match solution size", GSL_EBADLEN); + } + else + { + /* compute sol = b^T Q^T */ + + gsl_linalg_LQ_vecQT (LQ, tau, x); + + /* Solve L^T x = sol, storing x inplace in sol */ + + gsl_blas_dtrsv (CblasLower, CblasTrans, CblasNonUnit, LQ, x); + + gsl_permute_vector_inverse (p, x); + + return GSL_SUCCESS; + } + } + + + int + gsl_linalg_PTLQ_LQsolve_T (const gsl_matrix * Q, const gsl_matrix * L, + const gsl_permutation * p, + const gsl_vector * b, + gsl_vector * x) + { + if (Q->size1 != Q->size2 || L->size1 != L->size2) + { + return GSL_ENOTSQR; + } + else if (Q->size1 != p->size || Q->size1 != L->size1 + || Q->size1 != b->size) + { + return GSL_EBADLEN; + } + else + { + /* compute b' = Q b */ + + gsl_blas_dgemv (CblasNoTrans, 1.0, Q, b, 0.0, x); + + /* Solve L^T x = b', storing x inplace */ + + gsl_blas_dtrsv (CblasLower, CblasTrans, CblasNonUnit, L, x); + + /* Apply permutation to solution in place */ + + gsl_permute_vector_inverse (p, x); + + return GSL_SUCCESS; + } + } + + int + gsl_linalg_PTLQ_Lsolve_T (const gsl_matrix * LQ, + const gsl_permutation * p, + const gsl_vector * b, + gsl_vector * x) + { + if (LQ->size1 != LQ->size2) + { + GSL_ERROR ("LQ matrix must be square", GSL_ENOTSQR); + } + else if (LQ->size1 != b->size) + { + GSL_ERROR ("matrix size must match b size", GSL_EBADLEN); + } + else if (LQ->size2 != x->size) + { + GSL_ERROR ("matrix size must match x size", GSL_EBADLEN); + } + else if (p->size != x->size) + { + GSL_ERROR ("permutation size must match x size", GSL_EBADLEN); + } + else + { + /* Copy x <- b */ + + gsl_vector_memcpy (x, b); + + /* Solve L^T x = b, storing x inplace */ + + gsl_blas_dtrsv (CblasLower, CblasTrans, CblasNonUnit, LQ, x); + + gsl_permute_vector_inverse (p, x); + + return GSL_SUCCESS; + } + } + + + int + gsl_linalg_PTLQ_Lsvx_T (const gsl_matrix * LQ, + const gsl_permutation * p, + gsl_vector * x) + { + if (LQ->size1 != LQ->size2) + { + GSL_ERROR ("LQ matrix must be square", GSL_ENOTSQR); + } + else if (LQ->size2 != x->size) + { + GSL_ERROR ("matrix size must match x size", GSL_EBADLEN); + } + else if (p->size != x->size) + { + GSL_ERROR ("permutation size must match x size", GSL_EBADLEN); + } + else + { + /* Solve L^T x = b, storing x inplace */ + + gsl_blas_dtrsv (CblasLower, CblasTrans, CblasNonUnit, LQ, x); + + gsl_permute_vector_inverse (p, x); + + return GSL_SUCCESS; + } + } + + + + /* Update a P^T L Q factorisation for P A= L Q , A' = A + v u^T, + PA' = PA + Pv u^T + + * P^T L' Q' = P^T LQ + v u^T + * = P^T (L + (P v) u^T Q^T) Q + * = P^T (L + (P v) w^T) Q + * + * where w = Q^T u. + * + * Algorithm from Golub and Van Loan, "Matrix Computations", Section + * 12.5 (Updating Matrix Factorizations, Rank-One Changes) + */ + + int + gsl_linalg_PTLQ_update (gsl_matrix * Q, gsl_matrix * L, + const gsl_permutation * p, + const gsl_vector * v, gsl_vector * w) + { + if (Q->size1 != Q->size2 || L->size1 != L->size2) + { + return GSL_ENOTSQR; + } + else if (L->size1 != Q->size2 || v->size != Q->size2 || w->size != Q->size2) + { + return GSL_EBADLEN; + } + else + { + size_t j, k; + const size_t N = Q->size1; + const size_t M = Q->size2; + double w0; + + /* Apply Given's rotations to reduce w to (|w|, 0, 0, ... , 0) + + J_1^T .... J_(n-1)^T w = +/- |w| e_1 + + simultaneously applied to L, H = J_1^T ... J^T_(n-1) L + so that H is upper Hessenberg. (12.5.2) */ + + for (k = M - 1; k > 0; k--) + { + double c, s; + double wk = gsl_vector_get (w, k); + double wkm1 = gsl_vector_get (w, k - 1); + + create_givens (wkm1, wk, &c, &s); + apply_givens_vec (w, k - 1, k, c, s); + apply_givens_lq (M, N, Q, L, k - 1, k, c, s); + } + + w0 = gsl_vector_get (w, 0); + + /* Add in v w^T (Equation 12.5.3) */ + + for (j = 0; j < N; j++) + { + double lj0 = gsl_matrix_get (L, j, 0); + size_t p_j = gsl_permutation_get (p, j); + double vj = gsl_vector_get (v, p_j); + gsl_matrix_set (L, j, 0, lj0 + w0 * vj); + } + + /* Apply Givens transformations L' = G_(n-1)^T ... G_1^T H + Equation 12.5.4 */ + + for (k = 1; k < N; k++) + { + double c, s; + double diag = gsl_matrix_get (L, k - 1, k - 1); + double offdiag = gsl_matrix_get (L, k - 1, k ); + + create_givens (diag, offdiag, &c, &s); + apply_givens_lq (M, N, Q, L, k - 1, k, c, s); + } + + return GSL_SUCCESS; + } + } diff -rc2P -x *.info -x *.info-* gsl-1.5/linalg/qr.c gsl-1.6/linalg/qr.c *** gsl-1.5/linalg/qr.c Fri Jul 25 16:18:12 2003 --- gsl-1.6/linalg/qr.c Fri Dec 24 14:00:19 2004 *************** *** 307,310 **** --- 307,332 ---- } + int + gsl_linalg_R_svx (const gsl_matrix * R, gsl_vector * x) + { + if (R->size1 != R->size2) + { + GSL_ERROR ("R matrix must be square", GSL_ENOTSQR); + } + else if (R->size2 != x->size) + { + GSL_ERROR ("matrix size must match solution size", GSL_EBADLEN); + } + else + { + /* Solve R x = b, storing x inplace in b */ + + gsl_blas_dtrsv (CblasUpper, CblasNoTrans, CblasNonUnit, R, x); + + return GSL_SUCCESS; + } + } + + /* Form the product Q^T v from a QR factorized matrix diff -rc2P -x *.info -x *.info-* gsl-1.5/linalg/test.c gsl-1.6/linalg/test.c *** gsl-1.5/linalg/test.c Sun Jun 20 19:41:17 2004 --- gsl-1.6/linalg/test.c Fri Dec 31 14:33:46 2004 *************** *** 61,64 **** --- 61,82 ---- int test_QR_update_dim(const gsl_matrix * m, double eps); int test_QR_update(void); + + int test_LQ_solve_dim(const gsl_matrix * m, const double * actual, double eps); + int test_LQ_solve(void); + int test_LQ_LQsolve_dim(const gsl_matrix * m, const double * actual, double eps); + int test_LQ_LQsolve(void); + int test_LQ_lssolve_dim(const gsl_matrix * m, const double * actual, double eps); + int test_LQ_lssolve(void); + int test_LQ_decomp_dim(const gsl_matrix * m, double eps); + int test_LQ_decomp(void); + int test_PTLQ_solve_dim(const gsl_matrix * m, const double * actual, double eps); + int test_PTLQ_solve(void); + int test_PTLQ_LQsolve_dim(const gsl_matrix * m, const double * actual, double eps); + int test_PTLQ_LQsolve(void); + int test_PTLQ_decomp_dim(const gsl_matrix * m, double eps); + int test_PTLQ_decomp(void); + int test_LQ_update_dim(const gsl_matrix * m, double eps); + int test_LQ_update(void); + int test_SV_solve_dim(const gsl_matrix * m, const double * actual, double eps); int test_SV_solve(void); *************** *** 1342,1345 **** --- 1360,2096 ---- } + int + test_LQ_solve_dim(const gsl_matrix * m, const double * actual, double eps) + { + int s = 0; + size_t i, dim = m->size1; + + gsl_vector * rhs = gsl_vector_alloc(dim); + gsl_matrix * lq = gsl_matrix_alloc(dim,dim); + gsl_vector * d = gsl_vector_alloc(dim); + gsl_vector * x = gsl_vector_alloc(dim); + + gsl_matrix_transpose_memcpy(lq,m); + for(i=0; isize1; + + gsl_vector * rhs = gsl_vector_alloc(dim); + gsl_matrix * lq = gsl_matrix_alloc(dim,dim); + gsl_matrix * q = gsl_matrix_alloc(dim,dim); + gsl_matrix * l = gsl_matrix_alloc(dim,dim); + gsl_vector * d = gsl_vector_alloc(dim); + gsl_vector * x = gsl_vector_alloc(dim); + + gsl_matrix_transpose_memcpy(lq,m); + for(i=0; isize1, N = m->size2; + + gsl_vector * rhs = gsl_vector_alloc(M); + gsl_matrix * lq = gsl_matrix_alloc(N,M); + gsl_vector * d = gsl_vector_alloc(N); + gsl_vector * x = gsl_vector_alloc(N); + gsl_vector * r = gsl_vector_alloc(M); + gsl_vector * res = gsl_vector_alloc(M); + + gsl_matrix_transpose_memcpy(lq,m); + for(i=0; isize1, N = m->size2; + + gsl_matrix * lq = gsl_matrix_alloc(M,N); + gsl_matrix * a = gsl_matrix_alloc(M,N); + gsl_matrix * q = gsl_matrix_alloc(N,N); + gsl_matrix * l = gsl_matrix_alloc(M,N); + gsl_vector * d = gsl_vector_alloc(GSL_MIN(M,N)); + + gsl_matrix_memcpy(lq,m); + + s += gsl_linalg_LQ_decomp(lq, d); + s += gsl_linalg_LQ_unpack(lq, d, q, l); + + /* compute a = q r */ + gsl_blas_dgemm (CblasNoTrans, CblasNoTrans, 1.0, l, q, 0.0, a); + + for(i=0; isize1; + + gsl_permutation * perm = gsl_permutation_alloc(dim); + gsl_vector * rhs = gsl_vector_alloc(dim); + gsl_matrix * lq = gsl_matrix_alloc(dim,dim); + gsl_vector * d = gsl_vector_alloc(dim); + gsl_vector * x = gsl_vector_alloc(dim); + gsl_vector * norm = gsl_vector_alloc(dim); + + gsl_matrix_transpose_memcpy(lq,m); + for(i=0; isize1; + + gsl_permutation * perm = gsl_permutation_alloc(dim); + gsl_vector * rhs = gsl_vector_alloc(dim); + gsl_matrix * lq = gsl_matrix_alloc(dim,dim); + gsl_matrix * q = gsl_matrix_alloc(dim,dim); + gsl_matrix * l = gsl_matrix_alloc(dim,dim); + gsl_vector * d = gsl_vector_alloc(dim); + gsl_vector * x = gsl_vector_alloc(dim); + gsl_vector * norm = gsl_vector_alloc(dim); + + gsl_matrix_transpose_memcpy(lq,m); + for(i=0; isize1, N = m->size2; + + gsl_matrix * lq = gsl_matrix_alloc(N,M); + gsl_matrix * a = gsl_matrix_alloc(N,M); + gsl_matrix * q = gsl_matrix_alloc(M,M); + gsl_matrix * l = gsl_matrix_alloc(N,M); + gsl_vector * d = gsl_vector_alloc(GSL_MIN(M,N)); + gsl_vector * norm = gsl_vector_alloc(N); + + gsl_permutation * perm = gsl_permutation_alloc(N); + + gsl_matrix_transpose_memcpy(lq,m); + + s += gsl_linalg_PTLQ_decomp(lq, d, perm, &signum, norm); + s += gsl_linalg_LQ_unpack(lq, d, q, l); + + /* compute a = l q */ + gsl_blas_dgemm (CblasNoTrans, CblasNoTrans, 1.0, l, q, 0.0, a); + + + /* Compute P LQ by permuting the rows of LQ */ + + for (i = 0; i < M; i++) { + gsl_vector_view col = gsl_matrix_column (a, i); + gsl_permute_vector_inverse (perm, &col.vector); + } + + for(i=0; isize1, N = m->size2; + + gsl_matrix * lq1 = gsl_matrix_alloc(N,M); + gsl_matrix * lq2 = gsl_matrix_alloc(N,M); + gsl_matrix * q1 = gsl_matrix_alloc(M,M); + gsl_matrix * l1 = gsl_matrix_alloc(N,M); + gsl_matrix * q2 = gsl_matrix_alloc(M,M); + gsl_matrix * l2 = gsl_matrix_alloc(N,M); + gsl_vector * d2 = gsl_vector_alloc(GSL_MIN(M,N)); + gsl_vector * u = gsl_vector_alloc(M); + gsl_vector * v = gsl_vector_alloc(N); + gsl_vector * w = gsl_vector_alloc(M); + + gsl_matrix_transpose_memcpy(lq1,m); + gsl_matrix_transpose_memcpy(lq2,m); + for(i=0; i + + * gsl_multifit_nlin.h: removed unused declaration of + gsl_multifit_fdjacobian + 2004-06-14 Brian Gough diff -rc2P -x *.info -x *.info-* gsl-1.5/multifit/Makefile.am gsl-1.6/multifit/Makefile.am *** gsl-1.5/multifit/Makefile.am Sun Jul 27 10:49:48 2003 --- gsl-1.6/multifit/Makefile.am Sat Sep 11 14:45:50 2004 *************** *** 11,15 **** check_PROGRAMS = test #demo ! TESTS = test test_SOURCES = test.c --- 11,15 ---- check_PROGRAMS = test #demo ! TESTS = $(check_PROGRAMS) test_SOURCES = test.c diff -rc2P -x *.info -x *.info-* gsl-1.5/multifit/Makefile.in gsl-1.6/multifit/Makefile.in *** gsl-1.5/multifit/Makefile.in Thu Jun 24 11:49:48 2004 --- gsl-1.6/multifit/Makefile.in Fri Dec 31 15:15:33 2004 *************** *** 153,157 **** check_PROGRAMS = test #demo ! TESTS = test test_SOURCES = test.c --- 153,157 ---- check_PROGRAMS = test #demo ! TESTS = $(check_PROGRAMS) test_SOURCES = test.c diff -rc2P -x *.info -x *.info-* gsl-1.5/multifit/gsl_multifit_nlin.h gsl-1.6/multifit/gsl_multifit_nlin.h *** gsl-1.5/multifit/gsl_multifit_nlin.h Fri Jul 25 16:18:21 2003 --- gsl-1.6/multifit/gsl_multifit_nlin.h Fri Dec 24 13:59:20 2004 *************** *** 59,67 **** #define GSL_MULTIFIT_FN_EVAL(F,x,y) (*((F)->f))(x,(F)->params,(y)) - int gsl_multifit_fdjacobian (gsl_multifit_function * F, - const gsl_vector * x, - const gsl_vector * f, - double epsrel, gsl_matrix * jacobian); - typedef struct { --- 59,62 ---- diff -rc2P -x *.info -x *.info-* gsl-1.5/multimin/Makefile.am gsl-1.6/multimin/Makefile.am *** gsl-1.5/multimin/Makefile.am Sun Jul 27 10:49:48 2003 --- gsl-1.6/multimin/Makefile.am Sat Sep 11 14:45:50 2004 *************** *** 11,15 **** check_PROGRAMS = test #demo ! TESTS = test test_SOURCES = test.c test_funcs.c test_funcs.h --- 11,15 ---- check_PROGRAMS = test #demo ! TESTS = $(check_PROGRAMS) test_SOURCES = test.c test_funcs.c test_funcs.h diff -rc2P -x *.info -x *.info-* gsl-1.5/multimin/Makefile.in gsl-1.6/multimin/Makefile.in *** gsl-1.5/multimin/Makefile.in Thu Jun 24 11:49:49 2004 --- gsl-1.6/multimin/Makefile.in Fri Dec 31 15:15:34 2004 *************** *** 153,157 **** check_PROGRAMS = test #demo ! TESTS = test test_SOURCES = test.c test_funcs.c test_funcs.h --- 153,157 ---- check_PROGRAMS = test #demo ! TESTS = $(check_PROGRAMS) test_SOURCES = test.c test_funcs.c test_funcs.h diff -rc2P -x *.info -x *.info-* gsl-1.5/multiroots/Makefile.am gsl-1.6/multiroots/Makefile.am *** gsl-1.5/multiroots/Makefile.am Sun Jul 27 10:49:48 2003 --- gsl-1.6/multiroots/Makefile.am Sat Sep 11 14:45:50 2004 *************** *** 13,17 **** check_PROGRAMS = test ! TESTS = test test_SOURCES = test.c test_funcs.c test_funcs.h --- 13,17 ---- check_PROGRAMS = test ! TESTS = $(check_PROGRAMS) test_SOURCES = test.c test_funcs.c test_funcs.h diff -rc2P -x *.info -x *.info-* gsl-1.5/multiroots/Makefile.in gsl-1.6/multiroots/Makefile.in *** gsl-1.5/multiroots/Makefile.in Thu Jun 24 11:49:49 2004 --- gsl-1.6/multiroots/Makefile.in Fri Dec 31 15:15:34 2004 *************** *** 156,160 **** check_PROGRAMS = test ! TESTS = test test_SOURCES = test.c test_funcs.c test_funcs.h --- 156,160 ---- check_PROGRAMS = test ! TESTS = $(check_PROGRAMS) test_SOURCES = test.c test_funcs.c test_funcs.h diff -rc2P -x *.info -x *.info-* gsl-1.5/ntuple/Makefile.am gsl-1.6/ntuple/Makefile.am *** gsl-1.5/ntuple/Makefile.am Sun Jul 27 10:54:19 2003 --- gsl-1.6/ntuple/Makefile.am Sat Sep 11 14:45:51 2004 *************** *** 7,11 **** libgslntuple_la_SOURCES = ntuple.c ! TESTS = test check_PROGRAMS = test #demo demo1 --- 7,11 ---- libgslntuple_la_SOURCES = ntuple.c ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test #demo demo1 diff -rc2P -x *.info -x *.info-* gsl-1.5/ntuple/Makefile.in gsl-1.6/ntuple/Makefile.in *** gsl-1.5/ntuple/Makefile.in Thu Jun 24 11:49:50 2004 --- gsl-1.6/ntuple/Makefile.in Fri Dec 31 15:15:35 2004 *************** *** 149,153 **** libgslntuple_la_SOURCES = ntuple.c ! TESTS = test check_PROGRAMS = test #demo demo1 --- 149,153 ---- libgslntuple_la_SOURCES = ntuple.c ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test #demo demo1 diff -rc2P -x *.info -x *.info-* gsl-1.5/ode-initval/ChangeLog gsl-1.6/ode-initval/ChangeLog *** gsl-1.5/ode-initval/ChangeLog Sun Jun 6 16:46:17 2004 --- gsl-1.6/ode-initval/ChangeLog Wed Dec 29 16:41:26 2004 *************** *** 1,2 **** --- 1,63 ---- + 2004-12-29 Brian Gough + + * test.c (test_compare_vanderpol): avoid variable size array + (test_compare_oregonator): as above + + 2004-12-23 Brian Gough + + * test.c (test_evolve_xsin): changed description from "failures" + to "errors" + + 2004-12-22 Brian Gough + + * rk2simp.c (rk2simp_step): added missing static declaration + + * gear1.c (gear1_step): added missing static declaration + + * gear2.c (gear2_step): added missing static declaration + + * rk4imp.c (rk4imp_step): added missing static declaration + + * rk4.c (rk4_step): added missing static declaration + + * rk2imp.c (rk2imp_step): added missing static declaration + + 2004-12-01 Brian Gough + + * updated all solvers to ensure correct handling of error codes + from user defined functions + + * test.c (rhs_xsin): added a test which includes failures of the + function itself and jacobian + + 2004-11-25 Brian Gough + + * gear2.c (gear2_alloc): added check for non-allocation of primer, + and two-step error estimation + + 2004-11-23 Brian Gough + + * gear1.c (gear1_apply): use 90% error bound + + * rk2imp.c (rk2imp_apply): use 90% error bound + + * rk2simp.c (rk2simp_apply): use 90% error bound + + 2004-11-18 Brian Gough + + * test.c: new test program (Tuomo Keskitalo) + + 2004-11-12 Brian Gough + + * evolve.c (gsl_odeiv_evolve_apply): check for internal stepper + failure (Tuomo Keskitalo) + + * bsimp.c: gives exact dydt_out (Tuomo Keskitalo) + + * rk2simp.c: new semi-implicit solver (Tuomo Keskitalo) + + * gear1.c rkf45.c rkck.c rk8pd.c rk4imp.c rk2imp.c rk2.c rk4.c: + fix error estimate, exact derivatives on output (Tuomo Keskitalo) + 2004-05-28 Brian Gough diff -rc2P -x *.info -x *.info-* gsl-1.5/ode-initval/Makefile.am gsl-1.6/ode-initval/Makefile.am *** gsl-1.5/ode-initval/Makefile.am Sun Jul 27 10:49:48 2003 --- gsl-1.6/ode-initval/Makefile.am Fri Nov 12 17:22:08 2004 *************** *** 5,9 **** INCLUDES= -I$(top_builddir) ! libgslodeiv_la_SOURCES = control.c cstd.c cscal.c evolve.c step.c rk2.c rk2imp.c rk4.c rk4imp.c rkf45.c rk8pd.c rkck.c bsimp.c gear1.c gear2.c noinst_HEADERS = odeiv_util.h --- 5,9 ---- INCLUDES= -I$(top_builddir) ! libgslodeiv_la_SOURCES = control.c cstd.c cscal.c evolve.c step.c rk2.c rk2imp.c rk2simp.c rk4.c rk4imp.c rkf45.c rk8pd.c rkck.c bsimp.c gear1.c gear2.c noinst_HEADERS = odeiv_util.h *************** *** 11,15 **** check_PROGRAMS = test ! TESTS = test test_LDADD = libgslodeiv.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../linalg/libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../permutation/libgslpermutation.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../utils/libutils.la --- 11,15 ---- check_PROGRAMS = test ! TESTS = $(check_PROGRAMS) test_LDADD = libgslodeiv.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../linalg/libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../permutation/libgslpermutation.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../utils/libutils.la diff -rc2P -x *.info -x *.info-* gsl-1.5/ode-initval/Makefile.in gsl-1.6/ode-initval/Makefile.in *** gsl-1.5/ode-initval/Makefile.in Thu Jun 24 11:49:50 2004 --- gsl-1.6/ode-initval/Makefile.in Fri Dec 31 15:15:35 2004 *************** *** 147,151 **** INCLUDES = -I$(top_builddir) ! libgslodeiv_la_SOURCES = control.c cstd.c cscal.c evolve.c step.c rk2.c rk2imp.c rk4.c rk4imp.c rkf45.c rk8pd.c rkck.c bsimp.c gear1.c gear2.c noinst_HEADERS = odeiv_util.h --- 147,151 ---- INCLUDES = -I$(top_builddir) ! libgslodeiv_la_SOURCES = control.c cstd.c cscal.c evolve.c step.c rk2.c rk2imp.c rk2simp.c rk4.c rk4imp.c rkf45.c rk8pd.c rkck.c bsimp.c gear1.c gear2.c noinst_HEADERS = odeiv_util.h *************** *** 153,157 **** check_PROGRAMS = test ! TESTS = test test_LDADD = libgslodeiv.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../linalg/libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../permutation/libgslpermutation.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../utils/libutils.la --- 153,157 ---- check_PROGRAMS = test ! TESTS = $(check_PROGRAMS) test_LDADD = libgslodeiv.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../linalg/libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../permutation/libgslpermutation.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../utils/libutils.la *************** *** 168,173 **** libgslodeiv_la_LIBADD = am_libgslodeiv_la_OBJECTS = control.lo cstd.lo cscal.lo evolve.lo \ ! step.lo rk2.lo rk2imp.lo rk4.lo rk4imp.lo rkf45.lo rk8pd.lo \ ! rkck.lo bsimp.lo gear1.lo gear2.lo libgslodeiv_la_OBJECTS = $(am_libgslodeiv_la_OBJECTS) check_PROGRAMS = test$(EXEEXT) --- 168,173 ---- libgslodeiv_la_LIBADD = am_libgslodeiv_la_OBJECTS = control.lo cstd.lo cscal.lo evolve.lo \ ! step.lo rk2.lo rk2imp.lo rk2simp.lo rk4.lo rk4imp.lo rkf45.lo \ ! rk8pd.lo rkck.lo bsimp.lo gear1.lo gear2.lo libgslodeiv_la_OBJECTS = $(am_libgslodeiv_la_OBJECTS) check_PROGRAMS = test$(EXEEXT) diff -rc2P -x *.info -x *.info-* gsl-1.5/ode-initval/TODO gsl-1.6/ode-initval/TODO *** gsl-1.5/ode-initval/TODO Thu May 27 13:03:50 2004 --- gsl-1.6/ode-initval/TODO Thu Dec 2 21:54:01 2004 *************** *** 15,16 **** --- 15,78 ---- step-size being made arbitrarily small + * The entry below has been downgraded from a bug. We use the + coefficients given in the original paper by Prince and Dormand, and it + is true that these are inexact (the values in the paper are said to be + accurate 18 figures). If somebody publishes exact versions we will + use them, but at present it is better to stick with the published + versions of the coefficients them use our own. + ---------------------------------------------------------------------- + BUG#8 -- inexact coefficients in rk8pd.c + + From: Luc Maisonobe + To: gsl-discuss@sources.redhat.com + Subject: further thoughts about Dormand-Prince 8 (RK8PD) + Date: Wed, 14 Aug 2002 10:50:49 +0200 + + I was looking for some references concerning Runge-Kutta methods when I + noticed GSL had an high order one. I also found a question in the list + archive (April 2002) about the references of this method which is + implemented in rk8pd.c. It was said the coefficients were taken from the + "Numerical Algorithms with C" book by Engeln-Mullges and Uhlig. + + I have checked the coefficients somewhat with a little java tool I have + developped (see http://www.spaceroots.org/archive.htm#RKCheckSoftware) + and found they were not exact. I think this method is really the method + that is already in rksuite (http://www.netlib.org/ode/rksuite/) were the + coefficients are given as real values with 30 decimal digits. The + coefficients have probably been approximated as fractions later on. + However, these approximations are not perfect, they are good only for + the first 16 or 18 digits depending on the coefficient. + + This has no consequence for practical purposes since they are stored in + double variables, but give a false impression of beeing exact + expressions. Well, there are even some coefficients that should really + be rational numbers but for which wrong numerators and denominators are + given. As an example, the first and fourth elements of the b7 array are + given as 29443841.0 / 614563906.0 and 77736538.0 / 692538347, hence the + sum off all elements of the b7 array (which should theoretically be + equal to ah[5]) only approximate this. For these two coefficients, this + could have been avoided using 215595617.0 / 4500000000.0 and + 202047683.0 / 1800000000.0, which also looks more coherent with the + other coefficients. + + The rksuite comments say this method is described in this paper : + + High Order Embedded Runge-Kutta Formulae + P.J. Prince and J.R. Dormand + J. Comp. Appl. Math.,7, pp. 67-75, 1981 + + It also says the method is an 8(7) method (i.e. the coefficients set + used to advance integration is order 8 and error estimation is order 7). + If I use my tool to check the order, I am forced to check the order + conditions numerically with a tolerance since I do not have an exact + expression of the coefficients. Since even if some conditions are not + mathematically met, the residuals are small and could be below the + tolerance. There are tolerance values for which such numerical test + dedeuce the method is of order 9, as is said in GSL. However, I am not + convinced, there are to few parameters for the large number of order + conditions needed at order 9. + + I would suggest to correct the coefficients in rk8pd.c (just put the + literal constants of rksuite) and to add the reference to the article. + + ---------------------------------------------------------------------- diff -rc2P -x *.info -x *.info-* gsl-1.5/ode-initval/bsimp.c gsl-1.6/ode-initval/bsimp.c *** gsl-1.5/ode-initval/bsimp.c Sun Jun 20 19:41:17 2004 --- gsl-1.6/ode-initval/bsimp.c Thu Dec 2 21:54:19 2004 *************** *** 58,61 **** --- 58,63 ---- /* workspace for extrapolation step */ double *yp; + double *y_save; + double *yerr_save; double *y_extrap_save; double *y_extrap_sequence; *************** *** 230,234 **** const double max_sum = 100.0 * dim; ! int signum; size_t i, j; size_t n_inter; --- 232,236 ---- const double max_sum = 100.0 * dim; ! int signum, status; size_t i, j; size_t n_inter; *************** *** 278,282 **** /* Intermediate steps. */ ! GSL_ODEIV_FN_EVAL (sys, t, y_temp, y_out); for (n_inter = 1; n_inter < n_step; n_inter++) --- 280,289 ---- /* Intermediate steps. */ ! status = GSL_ODEIV_FN_EVAL (sys, t, y_temp, y_out); ! ! if (status) ! { ! return GSL_EBADFUNC; ! } for (n_inter = 1; n_inter < n_step; n_inter++) *************** *** 305,309 **** t += h; ! GSL_ODEIV_FN_EVAL (sys, t, y_temp, y_out); } --- 312,321 ---- t += h; ! status = GSL_ODEIV_FN_EVAL (sys, t, y_temp, y_out); ! ! if (status) ! { ! return GSL_EBADFUNC; ! } } *************** *** 345,348 **** --- 357,362 ---- state->yp = (double *) malloc (dim * sizeof (double)); + state->y_save = (double *) malloc (dim * sizeof (double)); + state->yerr_save = (double *) malloc (dim * sizeof (double)); state->y_extrap_save = (double *) malloc (dim * sizeof (double)); state->y_extrap_sequence = (double *) malloc (dim * sizeof (double)); *************** *** 388,391 **** --- 402,407 ---- double *const x = state->x; double *const yp = state->yp; + double *const y_save = state->y_save; + double *const yerr_save = state->yerr_save; double *const y_extrap_sequence = state->y_extrap_sequence; double *const y_extrap_save = state->y_extrap_save; *************** *** 396,400 **** const double t_local = t; - size_t i, k; --- 412,415 ---- *************** *** 405,408 **** --- 420,427 ---- DBL_MEMCPY (y_extrap_save, y, dim); + + /* Save inputs */ + DBL_MEMCPY (y_save, y, dim); + DBL_MEMCPY (yerr_save, yerr, dim); /* Evaluate the derivative. */ *************** *** 413,421 **** else { ! GSL_ODEIV_FN_EVAL (sys, t_local, y, yp); } /* Evaluate the Jacobian for the system. */ ! GSL_ODEIV_JA_EVAL (sys, t_local, y, dfdy->data, dfdt); /* Make a series of refined extrapolations, --- 432,452 ---- else { ! int s = GSL_ODEIV_FN_EVAL (sys, t_local, y, yp); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } /* Evaluate the Jacobian for the system. */ ! { ! int s = GSL_ODEIV_JA_EVAL (sys, t_local, y, dfdy->data, dfdt); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } ! } /* Make a series of refined extrapolations, *************** *** 436,440 **** sys); ! if (status != GSL_SUCCESS) { /* If the local step fails, set the error to infinity in --- 467,476 ---- sys); ! if (status == GSL_EBADFUNC) ! { ! return GSL_EBADFUNC; ! } ! ! if (status == GSL_EFAILED) { /* If the local step fails, set the error to infinity in *************** *** 458,462 **** if (dydt_out != NULL) { ! GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); } --- 494,505 ---- if (dydt_out != NULL) { ! int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); ! ! if (s != GSL_SUCCESS) ! { ! DBL_MEMCPY (y, y_save, dim); ! DBL_MEMCPY (yerr, yerr_save, dim); ! return GSL_EBADFUNC; ! } } *************** *** 501,504 **** --- 544,549 ---- free (state->y_extrap_sequence); free (state->y_extrap_save); + free (state->y_save); + free (state->yerr_save); free (state->yp); *************** *** 512,516 **** "bsimp", /* name */ 1, /* can use dydt_in */ ! 0, /* gives exact dydt_out */ &bsimp_alloc, &bsimp_apply, --- 557,561 ---- "bsimp", /* name */ 1, /* can use dydt_in */ ! 1, /* gives exact dydt_out */ &bsimp_alloc, &bsimp_apply, diff -rc2P -x *.info -x *.info-* gsl-1.5/ode-initval/evolve.c gsl-1.6/ode-initval/evolve.c *** gsl-1.5/ode-initval/evolve.c Fri Jul 25 16:18:13 2003 --- gsl-1.6/ode-initval/evolve.c Thu Dec 2 21:54:19 2004 *************** *** 144,148 **** if (step->type->can_use_dydt_in) { ! GSL_ODEIV_FN_EVAL (dydt, t0, y, e->dydt_in); } --- 144,153 ---- if (step->type->can_use_dydt_in) { ! int status = GSL_ODEIV_FN_EVAL (dydt, t0, y, e->dydt_in); ! ! if (status) ! { ! return GSL_EBADFUNC; ! } } *************** *** 170,173 **** --- 175,185 ---- gsl_odeiv_step_apply (step, t0, h0, y, e->yerr, NULL, e->dydt_out, dydt); + } + + /* Check for stepper internal failure */ + + if (step_status != GSL_SUCCESS) + { + return step_status; } diff -rc2P -x *.info -x *.info-* gsl-1.5/ode-initval/gear1.c gsl-1.6/ode-initval/gear1.c *** gsl-1.5/ode-initval/gear1.c Fri Jul 25 16:18:13 2003 --- gsl-1.6/ode-initval/gear1.c Fri Dec 24 13:59:01 2004 *************** *** 18,25 **** */ ! /* Gear 1 */ /* Author: G. Jungman */ #include #include --- 18,32 ---- */ ! /* Gear 1. This is the implicit Euler a.k.a backward Euler method. */ /* Author: G. Jungman */ + + /* Error estimation by step doubling, see eg. Ascher, U.M., Petzold, + L.R., Computer methods for ordinary differential and + differential-algebraic equations, SIAM, Philadelphia, 1998. + The method is also described in eg. this reference. + */ + #include #include *************** *** 35,38 **** --- 42,47 ---- double *k; double *y0; + double *y0_orig; + double *y_onestep; } gear1_state_t; *************** *** 65,72 **** --- 74,147 ---- } + state->y0_orig = (double *) malloc (dim * sizeof (double)); + + if (state->y0_orig == 0) + { + free (state->y0); + free (state->k); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y0_orig", GSL_ENOMEM); + } + + state->y_onestep = (double *) malloc (dim * sizeof (double)); + + if (state->y_onestep == 0) + { + free (state->y0_orig); + free (state->y0); + free (state->k); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y_onestep", GSL_ENOMEM); + } + return state; } static int + gear1_step (double *y, gear1_state_t *state, + const double h, const double t, + const size_t dim, const gsl_odeiv_system *sys) + { + /* Makes an implicit Euler advance with step size h. + y0 is the initial values of variables y. + + The implicit matrix equations to solve are: + + k = y0 + h * f(t + h, k) + + y = y0 + h * f(t + h, k) + */ + + const int iter_steps = 3; + int nu; + size_t i; + double *y0 = state->y0; + double *k = state->k; + + /* Iterative solution of k = y0 + h * f(t + h, k) + + Note: This method does not check for convergence of the + iterative solution! + */ + + for (nu = 0; nu < iter_steps; nu++) + { + int s = GSL_ODEIV_FN_EVAL(sys, t + h, y, k); + + if (s != GSL_SUCCESS) + { + return GSL_EBADFUNC; + } + + for (i=0; ik; ! double * const y0 = state->y0; ! ! DISCARD_POINTER(dydt_in); /* prevent warning about unused parameter */ DBL_MEMCPY(y0, y, dim); ! /* iterative solution */ ! for(nu=0; nuy0; ! double *y0_orig = state->y0_orig; ! double *y_onestep = state->y_onestep; + /* initialization */ DBL_MEMCPY(y0, y, dim); ! /* Save initial values for possible failures */ ! DBL_MEMCPY (y0_orig, y, dim); ! /* First traverse h with one step (save to y_onestep) */ ! DBL_MEMCPY (y_onestep, y, dim); ! ! { ! int s = gear1_step (y_onestep, state, h, t, dim, sys); ! ! if (s != GSL_SUCCESS) ! { ! return s; ! } ! } ! ! /* Then with two steps with half step length (save to y) */ ! { ! int s = gear1_step (y, state, h / 2.0, t, dim, sys); ! ! if (s != GSL_SUCCESS) ! { ! /* Restore original y vector */ ! DBL_MEMCPY (y, y0_orig, dim); ! return s; ! } } ! DBL_MEMCPY (y0, y, dim); ! ! { ! int s = gear1_step (y, state, h / 2.0, t + h / 2.0, dim, sys); ! ! if (s != GSL_SUCCESS) ! { ! /* Restore original y vector */ ! DBL_MEMCPY (y, y0_orig, dim); ! return s; ! } } + + /* Cleanup update */ + + if (dydt_out != NULL) + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); + + if (s != GSL_SUCCESS) + { + /* Restore original y vector */ + DBL_MEMCPY (y, y0_orig, dim); + return s; + } + } + + /* Error estimation */ + + for (i = 0; i < dim; i++) + { + yerr[i] = 4.0 * (y[i] - y_onestep[i]); + } ! return GSL_SUCCESS; } *************** *** 119,125 **** gear1_state_t *state = (gear1_state_t *) vstate; ! DBL_ZERO_MEMSET (state->k, dim); DBL_ZERO_MEMSET (state->y0, dim); ! return GSL_SUCCESS; } --- 234,241 ---- gear1_state_t *state = (gear1_state_t *) vstate; ! DBL_ZERO_MEMSET (state->y_onestep, dim); ! DBL_ZERO_MEMSET (state->y0_orig, dim); DBL_ZERO_MEMSET (state->y0, dim); ! DBL_ZERO_MEMSET (state->k, dim); return GSL_SUCCESS; } *************** *** 130,134 **** gear1_state_t *state = (gear1_state_t *) vstate; state = 0; /* prevent warnings about unused parameters */ ! return 2; } --- 246,250 ---- gear1_state_t *state = (gear1_state_t *) vstate; state = 0; /* prevent warnings about unused parameters */ ! return 1; } *************** *** 137,148 **** { gear1_state_t *state = (gear1_state_t *) vstate; ! free (state->k); free (state->y0); free (state); } static const gsl_odeiv_step_type gear1_type = { "gear1", /* name */ ! 1, /* can use dydt_in */ ! 0, /* gives exact dydt_out */ &gear1_alloc, &gear1_apply, --- 253,266 ---- { gear1_state_t *state = (gear1_state_t *) vstate; ! free (state->y_onestep); ! free (state->y0_orig); free (state->y0); + free (state->k); free (state); } static const gsl_odeiv_step_type gear1_type = { "gear1", /* name */ ! 0, /* can use dydt_in? */ ! 1, /* gives exact dydt_out? */ &gear1_alloc, &gear1_apply, diff -rc2P -x *.info -x *.info-* gsl-1.5/ode-initval/gear2.c gsl-1.6/ode-initval/gear2.c *** gsl-1.5/ode-initval/gear2.c Fri Jul 25 16:18:13 2003 --- gsl-1.6/ode-initval/gear2.c Fri Dec 24 13:59:01 2004 *************** *** 32,43 **** /* gear2 state object */ ! typedef struct { ! int primed; /* flag indicating that yim1 is ready */ ! double t_primed; /* system was primed for this value of t */ ! double last_h; /* last step size */ ! gsl_odeiv_step * primer; /* stepper to use for priming */ ! double * yim1; /* y_{i-1} */ ! double * k; /* work space */ ! double * y0; /* work space */ int stutter; } --- 32,46 ---- /* gear2 state object */ ! typedef struct ! { ! int primed; /* flag indicating that yim1 is ready */ ! double t_primed; /* system was primed for this value of t */ ! double last_h; /* last step size */ ! gsl_odeiv_step *primer; /* stepper to use for priming */ ! double *yim1; /* y_{i-1} */ ! double *k; /* work space */ ! double *y0; /* work space */ ! double *y0_orig; ! double *y_onestep; int stutter; } *************** *** 81,86 **** --- 84,124 ---- } + state->y0_orig = (double *) malloc (dim * sizeof (double)); + + if (state->y0_orig == 0) + { + free (state->y0); + free (state->k); + free (state->yim1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y0_orig", GSL_ENOMEM); + } + + state->y_onestep = (double *) malloc (dim * sizeof (double)); + + if (state->y_onestep == 0) + { + free (state->y0_orig); + free (state->y0); + free (state->k); + free (state->yim1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y0_orig", GSL_ENOMEM); + } + state->primed = 0; state->primer = gsl_odeiv_step_alloc (gsl_odeiv_step_rk4imp, dim); + + if (state->primer == 0) + { + free (state->y_onestep); + free (state->y0_orig); + free (state->y0); + free (state->k); + free (state->yim1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for primer", GSL_ENOMEM); + } + state->last_h = 0.0; *************** *** 89,101 **** static int ! gear2_apply(void * vstate, ! size_t dim, ! double t, ! double h, ! double y[], ! double yerr[], ! const double dydt_in[], ! double dydt_out[], ! const gsl_odeiv_system * sys) { gear2_state_t *state = (gear2_state_t *) vstate; --- 127,180 ---- static int ! gear2_step (double *y, gear2_state_t * state, ! const double h, const double t, ! const size_t dim, const gsl_odeiv_system * sys) ! { ! /* Makes a Gear2 advance with step size h. ! y0 is the initial values of variables y. ! The implicit matrix equations to solve are: ! k = y0 + h * f(t + h, k) ! y = y0 + h * f(t + h, k) ! */ ! ! const int iter_steps = 3; ! int nu; ! size_t i; ! double *y0 = state->y0; ! double *yim1 = state->yim1; ! double *k = state->k; ! ! /* Iterative solution of k = y0 + h * f(t + h, k) ! Note: This method does not check for convergence of the ! iterative solution! ! */ ! ! for (nu = 0; nu < iter_steps; nu++) ! { ! int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, k); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } ! ! for (i = 0; i < dim; i++) ! { ! y[i] = ((4.0 * y0[i] - yim1[i]) + 2.0 * h * k[i]) / 3.0; ! } ! } ! ! return GSL_SUCCESS; ! } ! ! static int ! gear2_apply (void *vstate, ! size_t dim, ! double t, ! double h, ! double y[], ! double yerr[], ! const double dydt_in[], ! double dydt_out[], const gsl_odeiv_system * sys) { gear2_state_t *state = (gear2_state_t *) vstate; *************** *** 103,174 **** state->stutter = 0; ! if(state->primed == 0 || t == state->t_primed || h != state->last_h) { ! /* Execute a single-step method to prime the process. Note that ! * we do this if the step size changes, so frequent step size ! * changes will cause the method to stutter. ! * ! * Note that we reuse this method if the time has not changed, ! * which can occur when the adaptive driver is attempting to find ! * an appropriate step-size on its first iteration */ ! int status; ! DBL_MEMCPY(state->yim1, y, dim); ! ! status = gsl_odeiv_step_apply(state->primer, t, h, y, yerr, dydt_in, dydt_out, sys); ! /* Make note of step size and indicate readiness for a Gear step. */ ! state->primed = 1; ! state->t_primed = t; ! state->last_h = h; ! state->stutter = 1; ! return status; ! } else { ! /* We have a previous y value in the buffer, and the step ! * sizes match, so we go ahead with the Gear step. ! */ ! double * const k = state->k; ! double * const y0 = state->y0; ! double * const yim1 = state->yim1; ! const int iter_steps = 3; ! int status = 0; ! int nu; ! size_t i; ! DBL_MEMCPY(y0, y, dim); ! /* iterative solution */ ! if(dydt_out != NULL) { ! DBL_MEMCPY(k, dydt_out, dim); ! } ! for(nu=0; nulast_h = h; ! return status; ! } } static int ! gear2_reset(void * vstate, size_t dim) { gear2_state_t *state = (gear2_state_t *) vstate; --- 182,299 ---- state->stutter = 0; ! if (state->primed == 0 || t == state->t_primed || h != state->last_h) ! { ! /* Execute a single-step method to prime the process. Note that ! * we do this if the step size changes, so frequent step size ! * changes will cause the method to stutter. ! * ! * Note that we reuse this method if the time has not changed, ! * which can occur when the adaptive driver is attempting to find ! * an appropriate step-size on its first iteration */ ! ! int status; ! DBL_MEMCPY (state->yim1, y, dim); ! ! status = ! gsl_odeiv_step_apply (state->primer, t, h, y, yerr, dydt_in, dydt_out, ! sys); ! ! /* Make note of step size and indicate readiness for a Gear step. */ ! ! state->primed = 1; ! state->t_primed = t; ! state->last_h = h; ! state->stutter = 1; ! return status; ! } ! else ! { ! /* We have a previous y value in the buffer, and the step ! * sizes match, so we go ahead with the Gear step. ! */ ! double *const k = state->k; ! double *const y0 = state->y0; ! double *const y0_orig = state->y0_orig; ! double *const yim1 = state->yim1; ! double *y_onestep = state->y_onestep; ! int s; ! size_t i; ! DBL_MEMCPY (y0, y, dim); ! /* iterative solution */ ! if (dydt_out != NULL) ! { ! DBL_MEMCPY (k, dydt_out, dim); ! } ! /* First traverse h with one step (save to y_onestep) */ ! DBL_MEMCPY (y_onestep, y, dim); ! s = gear2_step (y_onestep, state, h, t, dim, sys); ! if (s != GSL_SUCCESS) ! { ! return s; ! } ! /* Then with two steps with half step length (save to y) */ ! s = gear2_step (y, state, h / 2.0, t, dim, sys); ! ! if (s != GSL_SUCCESS) ! { ! /* Restore original y vector */ ! DBL_MEMCPY (y, y0_orig, dim); ! return s; ! } ! ! DBL_MEMCPY (y0, y, dim); ! ! s = gear2_step (y, state, h / 2.0, t + h / 2.0, dim, sys); ! ! if (s != GSL_SUCCESS) ! { ! /* Restore original y vector */ ! DBL_MEMCPY (y, y0_orig, dim); ! return s; ! } ! /* Cleanup update */ ! if (dydt_out != NULL) ! { ! s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); ! ! if (s != GSL_SUCCESS) ! { ! /* Restore original y vector */ ! DBL_MEMCPY (y, y0_orig, dim); ! return GSL_EBADFUNC; ! } ! } ! ! /* Estimate error and update the state buffer. */ ! ! for (i = 0; i < dim; i++) ! { ! yerr[i] = 4.0 * (y[i] - y_onestep[i]); ! yim1[i] = y0[i]; ! } ! ! /* Make note of step size. */ ! state->last_h = h; ! ! return 0; ! } } static int ! gear2_reset (void *vstate, size_t dim) { gear2_state_t *state = (gear2_state_t *) vstate; *************** *** 187,205 **** { gear2_state_t *state = (gear2_state_t *) vstate; ! state = 0; /* prevent warnings about unused parameters */ return 3; } static void ! gear2_free(void *vstate) { gear2_state_t *state = (gear2_state_t *) vstate; ! free(state->yim1); ! free(state->k); ! free(state->y0); ! gsl_odeiv_step_free(state->primer); ! free(state); } --- 312,332 ---- { gear2_state_t *state = (gear2_state_t *) vstate; ! state = 0; /* prevent warnings about unused parameters */ return 3; } static void ! gear2_free (void *vstate) { gear2_state_t *state = (gear2_state_t *) vstate; ! free (state->yim1); ! free (state->k); ! free (state->y0); ! free (state->y0_orig); ! free (state->y_onestep); ! gsl_odeiv_step_free (state->primer); ! free (state); } diff -rc2P -x *.info -x *.info-* gsl-1.5/ode-initval/gsl_odeiv.h gsl-1.6/ode-initval/gsl_odeiv.h *** gsl-1.5/ode-initval/gsl_odeiv.h Fri Jul 25 16:18:21 2003 --- gsl-1.6/ode-initval/gsl_odeiv.h Fri Nov 12 17:22:08 2004 *************** *** 115,118 **** --- 115,119 ---- GSL_VAR const gsl_odeiv_step_type *gsl_odeiv_step_rk8pd; GSL_VAR const gsl_odeiv_step_type *gsl_odeiv_step_rk2imp; + GSL_VAR const gsl_odeiv_step_type *gsl_odeiv_step_rk2simp; GSL_VAR const gsl_odeiv_step_type *gsl_odeiv_step_rk4imp; GSL_VAR const gsl_odeiv_step_type *gsl_odeiv_step_bsimp; diff -rc2P -x *.info -x *.info-* gsl-1.5/ode-initval/rk2.c gsl-1.6/ode-initval/rk2.c *** gsl-1.5/ode-initval/rk2.c Fri Jul 25 16:18:13 2003 --- gsl-1.6/ode-initval/rk2.c Thu Dec 2 21:54:19 2004 *************** *** 22,25 **** --- 22,29 ---- /* Author: G. Jungman */ + + /* Reference: Abramowitz & Stegun, section 25.5. Runge-Kutta 2nd (25.5.7) + and 3rd (25.5.8) order methods */ + #include #include *************** *** 67,71 **** state->k3 = (double *) malloc (dim * sizeof (double)); ! if (state->k3 == 0) { --- 71,75 ---- state->k3 = (double *) malloc (dim * sizeof (double)); ! if (state->k3 == 0) { *************** *** 105,109 **** size_t i; - int status = 0; double *const k1 = state->k1; --- 109,112 ---- *************** *** 113,116 **** --- 116,120 ---- /* k1 step */ + /* k1 = f(t,y) */ if (dydt_in != NULL) *************** *** 121,127 **** { int s = GSL_ODEIV_FN_EVAL (sys, t, y, k1); ! GSL_STATUS_UPDATE (&status, s); } for (i = 0; i < dim; i++) { --- 125,138 ---- { int s = GSL_ODEIV_FN_EVAL (sys, t, y, k1); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } + /* k2 step */ + /* k2 = f(t + 0.5*h, y + 0.5*k1) */ + for (i = 0; i < dim; i++) { *************** *** 129,138 **** } - /* k2 step */ { int s = GSL_ODEIV_FN_EVAL (sys, t + 0.5 * h, ytmp, k2); ! GSL_STATUS_UPDATE (&status, s); } for (i = 0; i < dim; i++) { --- 140,156 ---- } { int s = GSL_ODEIV_FN_EVAL (sys, t + 0.5 * h, ytmp, k2); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } + /* k3 step */ + /* for 3rd order estimates, is used for error estimation + k3 = f(t + h, y - k1 + 2*k2) */ + for (i = 0; i < dim; i++) { *************** *** 140,161 **** } - /* k3 step */ - { int s = GSL_ODEIV_FN_EVAL (sys, t + h, ytmp, k3); ! GSL_STATUS_UPDATE (&status, s); } ! /* final sum and error estimate */ for (i = 0; i < dim; i++) { const double ksum3 = (k1[i] + 4.0 * k2[i] + k3[i]) / 6.0; - y[i] += h * ksum3; yerr[i] = h * (k2[i] - ksum3); - if (dydt_out) - dydt_out[i] = ksum3; } ! ! return status; } --- 158,207 ---- } { int s = GSL_ODEIV_FN_EVAL (sys, t + h, ytmp, k3); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } ! /* final sum */ ! ! for (i = 0; i < dim; i++) ! { ! /* Save original values if derivative evaluation below fails */ ! ytmp[i] = y[i]; ! ! { ! const double ksum3 = (k1[i] + 4.0 * k2[i] + k3[i]) / 6.0; ! y[i] += h * ksum3; ! } ! } ! ! /* Derivatives at output */ ! ! if (dydt_out != NULL) ! { ! int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); ! ! if (s != GSL_SUCCESS) ! { ! /* Restore original values */ ! DBL_MEMCPY (y, ytmp, dim); ! ! return GSL_EBADFUNC; ! } ! } ! ! /* Error estimation */ ! for (i = 0; i < dim; i++) { const double ksum3 = (k1[i] + 4.0 * k2[i] + k3[i]) / 6.0; yerr[i] = h * (k2[i] - ksum3); } ! ! return GSL_SUCCESS; } *************** *** 193,198 **** static const gsl_odeiv_step_type rk2_type = { "rk2", /* name */ ! 1, /* can use dydt_in */ ! 0, /* gives exact dydt_out */ &rk2_alloc, &rk2_apply, --- 239,244 ---- static const gsl_odeiv_step_type rk2_type = { "rk2", /* name */ ! 1, /* can use dydt_in */ ! 1, /* gives exact dydt_out */ &rk2_alloc, &rk2_apply, diff -rc2P -x *.info -x *.info-* gsl-1.5/ode-initval/rk2imp.c gsl-1.6/ode-initval/rk2imp.c *** gsl-1.5/ode-initval/rk2imp.c Fri Jul 25 16:18:13 2003 --- gsl-1.6/ode-initval/rk2imp.c Fri Dec 24 13:59:01 2004 *************** *** 18,25 **** */ ! /* Runge-Kutta 2, Gaussian implicit */ - /* Author: G. Jungman - */ #include #include --- 18,32 ---- */ ! /* Runge-Kutta 2, Gaussian implicit. Also known as the implicit ! midpoint rule. */ ! ! /* Author: G. Jungman */ ! ! /* Error estimation by step doubling, see eg. Ascher, U.M., Petzold, ! L.R., Computer methods for ordinary differential and ! differential-algebraic equations, SIAM, Philadelphia, 1998. ! The method is also described in eg. this reference. ! */ #include #include *************** *** 33,38 **** typedef struct { ! double *knu; double *ytmp; } rk2imp_state_t; --- 40,48 ---- typedef struct { ! double *Y1; ! double *y0; double *ytmp; + double *y_onestep; + double *y0_orig; } rk2imp_state_t; *************** *** 49,58 **** } ! state->knu = (double *) malloc (dim * sizeof (double)); ! if (state->knu == 0) { free (state); ! GSL_ERROR_NULL ("failed to allocate space for knu", GSL_ENOMEM); } --- 59,68 ---- } ! state->Y1 = (double *) malloc (dim * sizeof (double)); ! if (state->Y1 == 0) { free (state); ! GSL_ERROR_NULL ("failed to allocate space for Y1", GSL_ENOMEM); } *************** *** 61,72 **** if (state->ytmp == 0) { ! free (state->knu); free (state); GSL_ERROR_NULL ("failed to allocate space for ytmp", GSL_ENOMEM); } return state; } static int --- 71,170 ---- if (state->ytmp == 0) { ! free (state->Y1); free (state); GSL_ERROR_NULL ("failed to allocate space for ytmp", GSL_ENOMEM); } + state->y0 = (double *) malloc (dim * sizeof (double)); + + if (state->y0 == 0) + { + free (state->Y1); + free (state->ytmp); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y0", GSL_ENOMEM); + } + + state->y_onestep = (double *) malloc (dim * sizeof (double)); + + if (state->y_onestep == 0) + { + free (state->Y1); + free (state->ytmp); + free (state->y0); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y_onestep", GSL_ENOMEM); + } + + state->y0_orig = (double *) malloc (dim * sizeof (double)); + + if (state->y0_orig == 0) + { + free (state->y_onestep); + free (state->Y1); + free (state->ytmp); + free (state->y0); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y0_orig", GSL_ENOMEM); + } + return state; } + static int + rk2imp_step (double *y, rk2imp_state_t *state, + const double h, const double t, + const size_t dim, const gsl_odeiv_system *sys) + { + /* Makes a Runge-Kutta 2nd order implicit advance with step size h. + y0 is initial values of variables y. + + The implicit matrix equations to solve are: + + Y1 = y0 + h/2 * f(t + h/2, Y1) + + y = y0 + h * f(t + h/2, Y1) + */ + + const double *y0 = state->y0; + double *Y1 = state->Y1; + double *ytmp = state->ytmp; + int max_iter=3; + int nu; + size_t i; + + /* iterative solution of Y1 = y0 + h/2 * f(t + h/2, Y1) + Y1 should include initial values at call. + + Note: This method does not check for convergence of the + iterative solution! + */ + + for (nu = 0; nu < max_iter; nu++) + { + for (i = 0; i < dim; i++) + { + ytmp[i] = y0[i] + 0.5 * h * Y1[i]; + } + + { + int s = GSL_ODEIV_FN_EVAL (sys, t + 0.5 * h, ytmp, Y1); + + if (s != GSL_SUCCESS) + { + return GSL_EBADFUNC; + } + } + } + + /* assignment */ + + for (i = 0; i < dim; i++) + { + y[i] = y0[i] + h * Y1[i]; + } + + return GSL_SUCCESS; + } static int *************** *** 82,130 **** rk2imp_state_t *state = (rk2imp_state_t *) vstate; - const int iter_steps = 3; - int status = 0; - int nu; size_t i; ! double *const knu = state->knu; ! double *const ytmp = state->ytmp; /* initialization step */ if (dydt_in != NULL) { ! DBL_MEMCPY (knu, dydt_in, dim); } else { ! int s = GSL_ODEIV_FN_EVAL (sys, t, y, knu); ! GSL_STATUS_UPDATE (&status, s); } ! /* iterative solution */ ! for (nu = 0; nu < iter_steps; nu++) ! { ! for (i = 0; i < dim; i++) ! { ! ytmp[i] = y[i] + 0.5 * h * knu[i]; ! } { ! int s = GSL_ODEIV_FN_EVAL (sys, t + 0.5 * h, ytmp, knu); ! GSL_STATUS_UPDATE (&status, s); } } ! /* assignment */ ! for (i = 0; i < dim; i++) { ! y[i] += h * knu[i]; ! yerr[i] = h * h * knu[i]; ! if (dydt_out != NULL) ! dydt_out[i] = knu[i]; } ! return status; } - static int rk2imp_reset (void *vstate, size_t dim) --- 180,292 ---- rk2imp_state_t *state = (rk2imp_state_t *) vstate; size_t i; ! double *Y1 = state->Y1; ! double *y0 = state->y0; ! double *y_onestep = state->y_onestep; ! double *y0_orig = state->y0_orig; ! ! /* Error estimation is done by step doubling procedure */ /* initialization step */ + + DBL_MEMCPY (y0, y, dim); + + /* Save initial values for possible failures */ + DBL_MEMCPY (y0_orig, y, dim); + if (dydt_in != NULL) { ! DBL_MEMCPY (Y1, dydt_in, dim); } + else { ! int s = GSL_ODEIV_FN_EVAL (sys, t, y, Y1); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } ! /* First traverse h with one step (save to y_onestep) */ ! ! DBL_MEMCPY (y_onestep, y, dim); ! ! { ! int s = rk2imp_step (y_onestep, state, h, t, dim, sys); ! ! if (s != GSL_SUCCESS) { ! return s; } + } + + /* Then with two steps with half step length (save to y) */ + + { + int s = rk2imp_step (y, state, h / 2.0, t, dim, sys); + + if (s != GSL_SUCCESS) + { + /* Restore original y vector */ + DBL_MEMCPY (y, y0_orig, dim); + + return s; + } + } + + DBL_MEMCPY (y0, y, dim); + + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h / 2.0, y, Y1); + + if (s != GSL_SUCCESS) + { + /* Restore original y vector */ + DBL_MEMCPY (y, y0_orig, dim); + + return GSL_EBADFUNC; + } + } + + { + int s = rk2imp_step (y, state, h / 2.0, t + h / 2.0, dim, sys); + + if (s != GSL_SUCCESS) + { + /* Restore original y vector */ + DBL_MEMCPY (y, y0_orig, dim); + + return s; + } + } + + /* Derivatives at output */ + + if (dydt_out != NULL) + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); + + if (s != GSL_SUCCESS) + { + /* Restore original y vector */ + DBL_MEMCPY (y, y0_orig, dim); + + return GSL_EBADFUNC; + } } + + /* Error estimation */ ! for (i = 0; i < dim; i++) { ! yerr[i] = 4.0 * (y[i] - y_onestep[i]) / 3.0; } ! return GSL_SUCCESS; } static int rk2imp_reset (void *vstate, size_t dim) *************** *** 132,138 **** rk2imp_state_t *state = (rk2imp_state_t *) vstate; ! DBL_ZERO_MEMSET (state->knu, dim); DBL_ZERO_MEMSET (state->ytmp, dim); ! return GSL_SUCCESS; } --- 294,303 ---- rk2imp_state_t *state = (rk2imp_state_t *) vstate; ! DBL_ZERO_MEMSET (state->Y1, dim); DBL_ZERO_MEMSET (state->ytmp, dim); ! DBL_ZERO_MEMSET (state->y0, dim); ! DBL_ZERO_MEMSET (state->y_onestep, dim); ! DBL_ZERO_MEMSET (state->y0_orig, dim); ! return GSL_SUCCESS; } *************** *** 150,155 **** { rk2imp_state_t *state = (rk2imp_state_t *) vstate; ! free (state->knu); free (state->ytmp); free (state); } --- 315,324 ---- { rk2imp_state_t *state = (rk2imp_state_t *) vstate; ! ! free (state->Y1); free (state->ytmp); + free (state->y0); + free (state->y_onestep); + free (state->y0_orig); free (state); } *************** *** 157,161 **** static const gsl_odeiv_step_type rk2imp_type = { "rk2imp", /* name */ 1, /* can use dydt_in */ ! 0, /* gives exact dydt_out */ &rk2imp_alloc, &rk2imp_apply, --- 326,330 ---- static const gsl_odeiv_step_type rk2imp_type = { "rk2imp", /* name */ 1, /* can use dydt_in */ ! 1, /* gives exact dydt_out */ &rk2imp_alloc, &rk2imp_apply, diff -rc2P -x *.info -x *.info-* gsl-1.5/ode-initval/rk2simp.c gsl-1.6/ode-initval/rk2simp.c *** gsl-1.5/ode-initval/rk2simp.c Thu Jan 1 01:00:00 1970 --- gsl-1.6/ode-initval/rk2simp.c Fri Dec 24 13:59:01 2004 *************** *** 0 **** --- 1,382 ---- + /* ode-initval/rk2simp.c + * + * Copyright (C) 2004 Tuomo Keskitalo + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + /* Runge-Kutta 2, Gaussian implicit. Also known as implicit midpoint rule. + + Non-linear equations solved by linearization, LU-decomposition + and matrix inversion. For reference, see eg. + + Ascher, U.M., Petzold, L.R., Computer methods for ordinary + differential and differential-algebraic equations, SIAM, + Philadelphia, 1998. + */ + + #include + #include + #include + #include + #include + #include + #include + + #include "odeiv_util.h" + + typedef struct + { + double *Y1; + double *y0; + double *y0_orig; + double *ytmp; + double *dfdy; /* Jacobian */ + double *dfdt; /* time derivatives, not used */ + double *y_onestep; + gsl_permutation *p; + } + rk2simp_state_t; + + static void * + rk2simp_alloc (size_t dim) + { + rk2simp_state_t *state = + (rk2simp_state_t *) malloc (sizeof (rk2simp_state_t)); + + if (state == 0) + { + GSL_ERROR_NULL ("failed to allocate space for rk2simp_state", + GSL_ENOMEM); + } + + state->Y1 = (double *) malloc (dim * sizeof (double)); + + if (state->Y1 == 0) + { + free (state); + GSL_ERROR_NULL ("failed to allocate space for Y1", GSL_ENOMEM); + } + + state->y0 = (double *) malloc (dim * sizeof (double)); + + if (state->y0 == 0) + { + free (state->Y1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y0", GSL_ENOMEM); + } + + state->y0_orig = (double *) malloc (dim * sizeof (double)); + + if (state->y0_orig == 0) + { + free (state->Y1); + free (state->y0); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y0_orig", GSL_ENOMEM); + } + + state->ytmp = (double *) malloc (dim * sizeof (double)); + + if (state->ytmp == 0) + { + free (state->Y1); + free (state->y0); + free (state->y0_orig); + free (state); + GSL_ERROR_NULL ("failed to allocate space for ytmp", GSL_ENOMEM); + } + + state->dfdy = (double *) malloc (dim * dim * sizeof (double)); + + if (state->dfdy == 0) + { + free (state->Y1); + free (state->y0); + free (state->y0_orig); + free (state->ytmp); + free (state); + GSL_ERROR_NULL ("failed to allocate space for dfdy", GSL_ENOMEM); + } + + state->dfdt = (double *) malloc (dim * sizeof (double)); + + if (state->dfdt == 0) + { + free (state->Y1); + free (state->y0); + free (state->y0_orig); + free (state->ytmp); + free (state->dfdy); + free (state); + GSL_ERROR_NULL ("failed to allocate space for dfdt", GSL_ENOMEM); + } + + state->y_onestep = (double *) malloc (dim * sizeof (double)); + + if (state->y_onestep == 0) + { + free (state->Y1); + free (state->y0); + free (state->y0_orig); + free (state->ytmp); + free (state->dfdy); + free (state->dfdt); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y_onestep", GSL_ENOMEM); + } + + state->p = gsl_permutation_alloc (dim); + + if (state->p == 0) + { + free (state->Y1); + free (state->y0); + free (state->y0_orig); + free (state->ytmp); + free (state->dfdy); + free (state->dfdt); + free (state); + GSL_ERROR_NULL ("failed to allocate space for p", GSL_ENOMEM); + } + + return state; + } + + + static int + rk2simp_step (double *y, rk2simp_state_t * state, + const double h, const double t, + const size_t dim, const gsl_odeiv_system * sys) + { + /* Makes a Runge-Kutta 2nd order semi-implicit advance with step size h. + y0 is initial values of variables y. + + The linearized semi-implicit equations to calculate are: + + Y1 = y0 + h/2 * (1 - h/2 * df/dy)^(-1) * f(t + h/2, y0) + + y = y0 + h * f(t + h/2, Y1) + */ + + const double *y0 = state->y0; + double *Y1 = state->Y1; + double *ytmp = state->ytmp; + + size_t i; + int s, ps; + + gsl_matrix_view J = gsl_matrix_view_array (state->dfdy, dim, dim); + + /* First solve Y1. + Calculate the inverse matrix (1 - h/2 * df/dy)^-1 + */ + + /* Create matrix to J */ + + s = GSL_ODEIV_JA_EVAL (sys, t, y0, state->dfdy, state->dfdt); + + if (s != GSL_SUCCESS) + { + return GSL_EBADFUNC; + } + + gsl_matrix_scale (&J.matrix, -h / 2.0); + gsl_matrix_add_diagonal(&J.matrix, 1.0); + + /* Invert it by LU-decomposition to invmat */ + + s += gsl_linalg_LU_decomp (&J.matrix, state->p, &ps); + + if (s != GSL_SUCCESS) + { + return GSL_EFAILED; + } + + /* Evaluate f(t + h/2, y0) */ + + s = GSL_ODEIV_FN_EVAL (sys, t + 0.5 * h, y0, ytmp); + + if (s != GSL_SUCCESS) + { + return GSL_EBADFUNC; + } + + /* Calculate Y1 = y0 + h/2 * ((1-h/2 * df/dy)^-1) ytmp */ + + { + gsl_vector_const_view y0_view = gsl_vector_const_view_array(y0, dim); + gsl_vector_view ytmp_view = gsl_vector_view_array(ytmp, dim); + gsl_vector_view Y1_view = gsl_vector_view_array(Y1, dim); + + s = gsl_linalg_LU_solve (&J.matrix, state->p, + &ytmp_view.vector, &Y1_view.vector); + + gsl_vector_scale (&Y1_view.vector, 0.5 * h); + gsl_vector_add (&Y1_view.vector, &y0_view.vector); + } + + /* And finally evaluation of f(t + h/2, Y1) and calculation of y */ + + s = GSL_ODEIV_FN_EVAL (sys, t + 0.5 * h, Y1, ytmp); + + if (s != GSL_SUCCESS) + { + return GSL_EBADFUNC; + } + + for (i = 0; i < dim; i++) + { + y[i] = y0[i] + h * ytmp[i]; + } + + return s; + } + + static int + rk2simp_apply (void *vstate, size_t dim, double t, double h, + double y[], double yerr[], const double dydt_in[], + double dydt_out[], const gsl_odeiv_system * sys) + { + rk2simp_state_t *state = (rk2simp_state_t *) vstate; + + size_t i; + + double *y0 = state->y0; + double *y0_orig = state->y0_orig; + double *y_onestep = state->y_onestep; + + /* Error estimation is done by step doubling procedure */ + + DBL_MEMCPY (y0, y, dim); + + /* Save initial values in case of failure */ + DBL_MEMCPY (y0_orig, y, dim); + + /* First traverse h with one step (save to y_onestep) */ + DBL_MEMCPY (y_onestep, y, dim); + + { + int s = rk2simp_step (y_onestep, state, h, t, dim, sys); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* Then with two steps with half step length (save to y) */ + + { + int s = rk2simp_step (y, state, h / 2.0, t, dim, sys); + + if (s != GSL_SUCCESS) + { + /* Restore original y vector */ + DBL_MEMCPY (y, y0_orig, dim); + return s; + } + } + + DBL_MEMCPY (y0, y, dim); + + { + int s = rk2simp_step (y, state, h / 2.0, t + h / 2.0, dim, sys); + + if (s != GSL_SUCCESS) + { + /* Restore original y vector */ + DBL_MEMCPY (y, y0_orig, dim); + return s; + } + } + + /* Derivatives at output */ + + if (dydt_out != NULL) + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); + + if (s != GSL_SUCCESS) + { + /* Restore original y vector */ + DBL_MEMCPY (y, y0_orig, dim); + return GSL_EBADFUNC; + } + } + + /* Error estimation */ + + for (i = 0; i < dim; i++) + { + yerr[i] = 4.0 * (y[i] - y_onestep[i]) / 3.0; + } + + return GSL_SUCCESS; + } + + + static int + rk2simp_reset (void *vstate, size_t dim) + { + rk2simp_state_t *state = (rk2simp_state_t *) vstate; + + DBL_ZERO_MEMSET (state->Y1, dim); + DBL_ZERO_MEMSET (state->y0, dim); + DBL_ZERO_MEMSET (state->y0_orig, dim); + DBL_ZERO_MEMSET (state->ytmp, dim); + DBL_ZERO_MEMSET (state->dfdt, dim * dim); + DBL_ZERO_MEMSET (state->dfdt, dim); + DBL_ZERO_MEMSET (state->y_onestep, dim); + + return GSL_SUCCESS; + } + + static unsigned int + rk2simp_order (void *vstate) + { + rk2simp_state_t *state = (rk2simp_state_t *) vstate; + state = 0; /* prevent warnings about unused parameters */ + return 2; + } + + static void + rk2simp_free (void *vstate) + { + rk2simp_state_t *state = (rk2simp_state_t *) vstate; + free (state->Y1); + free (state->y0); + free (state->y0_orig); + free (state->ytmp); + free (state->dfdy); + free (state->dfdt); + free (state->y_onestep); + gsl_permutation_free (state->p); + free (state); + } + + static const gsl_odeiv_step_type rk2simp_type = { + "rk2simp", /* name */ + 0, /* can use dydt_in? */ + 1, /* gives exact dydt_out? */ + &rk2simp_alloc, + &rk2simp_apply, + &rk2simp_reset, + &rk2simp_order, + &rk2simp_free + }; + + const gsl_odeiv_step_type *gsl_odeiv_step_rk2simp = &rk2simp_type; diff -rc2P -x *.info -x *.info-* gsl-1.5/ode-initval/rk4.c gsl-1.6/ode-initval/rk4.c *** gsl-1.5/ode-initval/rk4.c Fri Jul 25 16:18:13 2003 --- gsl-1.6/ode-initval/rk4.c Fri Dec 24 13:59:01 2004 *************** *** 18,25 **** */ ! /* Runge-Kutta 4, Classical */ /* Author: G. Jungman */ #include #include --- 18,33 ---- */ ! /* Runge-Kutta 4th order, Classical */ /* Author: G. Jungman */ + + /* Reference: Abramowitz & Stegun, section 25.5. equation 25.5.10 + + Error estimation by step doubling, see eg. Ascher, U.M., Petzold, + L.R., Computer methods for ordinary differential and + differential-algebraic equations, SIAM, Philadelphia, 1998. + */ + #include #include *************** *** 33,38 **** --- 41,48 ---- { double *k; + double *k1; double *y0; double *ytmp; + double *y_onestep; } rk4_state_t; *************** *** 56,59 **** --- 66,78 ---- } + state->k1 = (double *) malloc (dim * sizeof (double)); + + if (state->k1 == 0) + { + free (state); + free (state->k); + GSL_ERROR_NULL ("failed to allocate space for k1", GSL_ENOMEM); + } + state->y0 = (double *) malloc (dim * sizeof (double)); *************** *** 61,64 **** --- 80,84 ---- { free (state->k); + free (state->k1); free (state); GSL_ERROR_NULL ("failed to allocate space for y0", GSL_ENOMEM); *************** *** 71,74 **** --- 91,107 ---- free (state->y0); free (state->k); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for ytmp", GSL_ENOMEM); + } + + state->y_onestep = (double *) malloc (dim * sizeof (double)); + + if (state->y_onestep == 0) + { + free (state->ytmp); + free (state->y0); + free (state->k); + free (state->k1); free (state); GSL_ERROR_NULL ("failed to allocate space for ytmp", GSL_ENOMEM); *************** *** 78,81 **** --- 111,192 ---- } + static int + rk4_step (double *y, const rk4_state_t *state, + const double h, const double t, const size_t dim, + const gsl_odeiv_system *sys) + { + /* Makes a Runge-Kutta 4th order advance with step size h. */ + + /* initial values of variables y. */ + const double *y0 = state->y0; + + /* work space */ + double *ytmp = state->ytmp; + + /* Runge-Kutta coefficients. Contains values of coefficient k1 + in the beginning + */ + double *k = state->k; + + size_t i; + + /* k1 step */ + + for (i = 0; i < dim; i++) + { + y[i] += h / 6.0 * k[i]; + ytmp[i] = y0[i] + 0.5 * h * k[i]; + } + + /* k2 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + 0.5 * h, ytmp, k); + + if (s != GSL_SUCCESS) + { + return GSL_EBADFUNC; + } + } + + for (i = 0; i < dim; i++) + { + y[i] += h / 3.0 * k[i]; + ytmp[i] = y0[i] + 0.5 * h * k[i]; + } + + /* k3 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + 0.5 * h, ytmp, k); + + if (s != GSL_SUCCESS) + { + return GSL_EBADFUNC; + } + } + + for (i = 0; i < dim; i++) + { + y[i] += h / 3.0 * k[i]; + ytmp[i] = y0[i] + h * k[i]; + } + + /* k4 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, ytmp, k); + + if (s != GSL_SUCCESS) + { + return GSL_EBADFUNC; + } + } + + for (i = 0; i < dim; i++) + { + y[i] += h / 6.0 * k[i]; + } + + return GSL_SUCCESS; + } + static int *************** *** 93,107 **** size_t i; - int status = 0; double *const k = state->k; double *const y0 = state->y0; ! double *const ytmp = state->ytmp; ! ! ! /* Copy the starting value. We will write over ! * the y[] vector, using it for scratch and ! * then filling it with the final result. ! */ DBL_MEMCPY (y0, y, dim); --- 204,212 ---- size_t i; double *const k = state->k; + double *const k1 = state->k1; double *const y0 = state->y0; ! double *const y_onestep = state->y_onestep; DBL_MEMCPY (y0, y, dim); *************** *** 114,166 **** { int s = GSL_ODEIV_FN_EVAL (sys, t, y0, k); - GSL_STATUS_UPDATE (&status, s); - } ! for (i = 0; i < dim; i++) ! { ! y[i] = h / 6.0 * k[i]; /* use y[] to store delta_y */ ! ytmp[i] = y0[i] + 0.5 * h * k[i]; } ! /* k2 step */ { ! int s = GSL_ODEIV_FN_EVAL (sys, t + 0.5 * h, ytmp, k); ! GSL_STATUS_UPDATE (&status, s); } ! for (i = 0; i < dim; i++) ! { ! y[i] += h / 3.0 * k[i]; ! ytmp[i] = y0[i] + 0.5 * h * k[i]; } ! /* k3 step */ { ! int s = GSL_ODEIV_FN_EVAL (sys, t + 0.5 * h, ytmp, k); ! GSL_STATUS_UPDATE (&status, s); } ! for (i = 0; i < dim; i++) ! { ! y[i] += h / 3.0 * k[i]; ! ytmp[i] = y0[i] + h * k[i]; ! } - /* k4 step, error estimate, and final sum */ { ! int s = GSL_ODEIV_FN_EVAL (sys, t + h, ytmp, k); ! GSL_STATUS_UPDATE (&status, s); } for (i = 0; i < dim; i++) { ! y[i] += h / 6.0 * k[i]; ! yerr[i] = h * y[i]; ! y[i] += y0[i]; ! if (dydt_out != NULL) ! dydt_out[i] = k[i]; } ! return status; } --- 219,320 ---- { int s = GSL_ODEIV_FN_EVAL (sys, t, y0, k); ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } ! /* Error estimation is done by step doubling procedure */ ! ! /* Save first point derivatives*/ ! ! DBL_MEMCPY (k1, k, dim); ! ! /* First traverse h with one step (save to y_onestep) */ ! ! DBL_MEMCPY (y_onestep, y, dim); ! { ! int s = rk4_step (y_onestep, state, h, t, dim, sys); ! ! if (s != GSL_SUCCESS) ! { ! return s; ! } } ! /* Then with two steps with half step length (save to y) */ ! ! DBL_MEMCPY (k, k1, dim); ! ! { ! int s = rk4_step (y, state, h/2.0, t, dim, sys); ! ! if (s != GSL_SUCCESS) ! { ! /* Restore original values */ ! DBL_MEMCPY (y, y0, dim); ! return s; } + } ! /* Update before second step */ { ! int s = GSL_ODEIV_FN_EVAL (sys, t + h/2.0, y, k); ! ! if (s != GSL_SUCCESS) ! { ! /* Restore original values */ ! DBL_MEMCPY (y, y0, dim); ! return GSL_EBADFUNC; ! } } + + /* Save original y0 to k1 for possible failures */ + DBL_MEMCPY (k1, y0, dim); ! /* Update y0 for second step */ ! DBL_MEMCPY (y0, y, dim); { ! int s = rk4_step (y, state, h/2.0, t + h/2.0, dim, sys); ! ! if (s != GSL_SUCCESS) ! { ! /* Restore original values */ ! DBL_MEMCPY (y, k1, dim); ! return s; ! } } + /* Derivatives at output */ + + if (dydt_out != NULL) { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); + + if (s != GSL_SUCCESS) + { + /* Restore original values */ + DBL_MEMCPY (y, k1, dim); + return GSL_EBADFUNC; + } + } + + /* Error estimation + + yerr = C * 0.5 * | y(onestep) - y(twosteps) | / (2^order - 1) + + constant C is approximately 8.0 to ensure 90% of samples lie within + the error (assuming a gaussian distribution with prior p(sigma)=1/sigma.) + + */ + for (i = 0; i < dim; i++) { ! yerr[i] = 4.0 * (y[i] - y_onestep[i]) / 15.0; } ! return GSL_SUCCESS; } *************** *** 171,176 **** --- 325,332 ---- DBL_ZERO_MEMSET (state->k, dim); + DBL_ZERO_MEMSET (state->k1, dim); DBL_ZERO_MEMSET (state->y0, dim); DBL_ZERO_MEMSET (state->ytmp, dim); + DBL_ZERO_MEMSET (state->y_onestep, dim); return GSL_SUCCESS; *************** *** 190,195 **** --- 346,353 ---- rk4_state_t *state = (rk4_state_t *) vstate; free (state->k); + free (state->k1); free (state->y0); free (state->ytmp); + free (state->y_onestep); free (state); } *************** *** 197,201 **** static const gsl_odeiv_step_type rk4_type = { "rk4", /* name */ 1, /* can use dydt_in */ ! 0, /* gives exact dydt_out */ &rk4_alloc, &rk4_apply, --- 355,359 ---- static const gsl_odeiv_step_type rk4_type = { "rk4", /* name */ 1, /* can use dydt_in */ ! 1, /* gives exact dydt_out */ &rk4_alloc, &rk4_apply, diff -rc2P -x *.info -x *.info-* gsl-1.5/ode-initval/rk4imp.c gsl-1.6/ode-initval/rk4imp.c *** gsl-1.5/ode-initval/rk4imp.c Fri Jul 25 16:18:13 2003 --- gsl-1.6/ode-initval/rk4imp.c Fri Dec 24 13:59:01 2004 *************** *** 20,24 **** /* Runge-Kutta 4, Gaussian implicit */ ! /* Author: G. Jungman */ #include --- 20,31 ---- /* Runge-Kutta 4, Gaussian implicit */ ! /* Author: G. Jungman ! */ ! ! /* Error estimation by step doubling, see eg. Ascher, U.M., Petzold, ! L.R., Computer methods for ordinary differential and ! differential-algebraic equations, SIAM, Philadelphia, 1998. ! Method coefficients can also be found in it. ! */ #include *************** *** 37,40 **** --- 44,50 ---- double *ytmp1; double *ytmp2; + double *y0; + double *y0_orig; + double *y_onestep; } rk4imp_state_t; *************** *** 89,112 **** } return state; } - static int ! rk4imp_apply (void *vstate, ! size_t dim, ! double t, ! double h, ! double y[], ! double yerr[], ! const double dydt_in[], ! double dydt_out[], ! const gsl_odeiv_system * sys) { ! rk4imp_state_t *state = (rk4imp_state_t *) vstate; const double ir3 = 1.0 / M_SQRT3; const int iter_steps = 3; - int status = 0; int nu; size_t i; --- 99,166 ---- } + state->y0 = (double *) malloc (dim * sizeof (double)); + + if (state->y0 == 0) + { + free (state->ytmp2); + free (state->ytmp1); + free (state->k2nu); + free (state->k1nu); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y0", GSL_ENOMEM); + } + + state->y0_orig = (double *) malloc (dim * sizeof (double)); + + if (state->y0_orig == 0) + { + free (state->y0); + free (state->ytmp2); + free (state->ytmp1); + free (state->k2nu); + free (state->k1nu); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y0_orig", GSL_ENOMEM); + } + + state->y_onestep = (double *) malloc (dim * sizeof (double)); + + if (state->y_onestep == 0) + { + free (state->y0_orig); + free (state->y0); + free (state->ytmp2); + free (state->ytmp1); + free (state->k2nu); + free (state->k1nu); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y_onestep", GSL_ENOMEM); + } + return state; } static int ! rk4imp_step (double *y, rk4imp_state_t *state, ! const double h, const double t, ! const size_t dim, const gsl_odeiv_system *sys) { ! /* Makes a Runge-Kutta 4th order implicit advance with step size h. ! y0 is initial values of variables y. ! ! The implicit matrix equations to solve are: ! ! Y1 = y0 + h * a11 * f(t + h * c1, Y1) + h * a12 * f(t + h * c2, Y2) ! Y2 = y0 + h * a21 * f(t + h * c1, Y1) + h * a22 * f(t + h * c2, Y2) ! ! y = y0 + h * b1 * f(t + h * c1, Y1) + h * b2 * f(t + h * c2, Y2) ! ! with constant coefficients a, b and c. For this method ! they are: b=[0.5 0.5] c=[(3-sqrt(3))/6 (3+sqrt(3))/6] ! a11=1/4, a12=(3-2*sqrt(3))/12, a21=(3+2*sqrt(3))/12 and a22=1/4 ! */ const double ir3 = 1.0 / M_SQRT3; const int iter_steps = 3; int nu; size_t i; *************** *** 117,134 **** double *const ytmp2 = state->ytmp2; ! /* initialization step */ ! if (dydt_in != 0) ! { ! DBL_MEMCPY (k1nu, dydt_in, dim); ! } ! else ! { ! int s = GSL_ODEIV_FN_EVAL (sys, t, y, k1nu); ! GSL_STATUS_UPDATE (&status, s); ! } ! DBL_MEMCPY (k2nu, k1nu, dim); - /* iterative solution */ for (nu = 0; nu < iter_steps; nu++) { --- 171,180 ---- double *const ytmp2 = state->ytmp2; ! /* iterative solution of Y1 and Y2. ! Note: This method does not check for convergence of the ! iterative solution! ! */ for (nu = 0; nu < iter_steps; nu++) { *************** *** 142,166 **** { int s = ! GSL_ODEIV_FN_EVAL (sys, t + 0.5 * h * (1.0 - ir3), ytmp1, k1nu); ! GSL_STATUS_UPDATE (&status, s); } { int s = ! GSL_ODEIV_FN_EVAL (sys, t + 0.5 * h * (1.0 + ir3), ytmp2, k2nu); ! GSL_STATUS_UPDATE (&status, s); } } /* assignment */ for (i = 0; i < dim; i++) { const double d_i = 0.5 * (k1nu[i] + k2nu[i]); - if (dydt_out != NULL) - dydt_out[i] = d_i; y[i] += h * d_i; - yerr[i] = h * h * d_i; /* FIXME: is this an overestimate ? */ } ! return status; } --- 188,340 ---- { int s = ! GSL_ODEIV_FN_EVAL (sys, t + 0.5 * h * (1.0 - ir3), ytmp1, k1nu); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } { int s = ! GSL_ODEIV_FN_EVAL (sys, t + 0.5 * h * (1.0 + ir3), ytmp2, k2nu); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } } /* assignment */ + for (i = 0; i < dim; i++) { const double d_i = 0.5 * (k1nu[i] + k2nu[i]); y[i] += h * d_i; } ! return GSL_SUCCESS; ! } ! ! static int ! rk4imp_apply (void *vstate, ! size_t dim, ! double t, ! double h, ! double y[], ! double yerr[], ! const double dydt_in[], ! double dydt_out[], ! const gsl_odeiv_system * sys) ! { ! rk4imp_state_t *state = (rk4imp_state_t *) vstate; ! ! size_t i; ! ! double *y0 = state->y0; ! double *y0_orig = state->y0_orig; ! double *y_onestep = state->y_onestep; ! double *k1nu = state->k1nu; ! double *k2nu = state->k2nu; ! ! /* Initialization step */ ! DBL_MEMCPY (y0, y, dim); ! ! /* Save initial values in case of failure */ ! DBL_MEMCPY (y0_orig, y, dim); ! ! if (dydt_in != 0) ! { ! DBL_MEMCPY (k1nu, dydt_in, dim); ! } ! else ! { ! int s = GSL_ODEIV_FN_EVAL (sys, t, y, k1nu); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } ! } ! ! DBL_MEMCPY (k2nu, k1nu, dim); ! ! /* First traverse h with one step (save to y_onestep) */ ! ! DBL_MEMCPY (y_onestep, y, dim); ! ! { ! int s = rk4imp_step (y_onestep, state, h, t, dim, sys); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } ! } ! ! /* Then with two steps with half step length (save to y) */ ! ! { ! int s = rk4imp_step (y, state, h/2.0, t, dim, sys); ! ! if (s != GSL_SUCCESS) ! { ! /* Restore original y vector */ ! DBL_MEMCPY (y, y0_orig, dim); ! return GSL_EBADFUNC; ! } ! } ! ! DBL_MEMCPY (y0, y, dim); ! ! { ! int s = GSL_ODEIV_FN_EVAL (sys, t + h/2.0, y, k1nu); ! ! if (s != GSL_SUCCESS) ! { ! /* Restore original y vector */ ! DBL_MEMCPY (y, y0_orig, dim); ! return GSL_EBADFUNC; ! } ! } ! ! DBL_MEMCPY (k2nu, k1nu, dim); ! ! { ! int s = rk4imp_step (y, state, h/2.0, t + h/2.0, dim, sys); ! ! if (s != GSL_SUCCESS) ! { ! /* Restore original y vector */ ! DBL_MEMCPY (y, y0_orig, dim); ! return GSL_EBADFUNC; ! } ! } ! ! /* Derivatives at output */ ! ! if (dydt_out != NULL) ! { ! int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); ! ! if (s != GSL_SUCCESS) { ! /* Restore original y vector */ ! DBL_MEMCPY (y, y0_orig, dim); ! return GSL_EBADFUNC; ! } ! } ! ! /* Error estimation */ ! ! /* Denominator in step doubling error equation ! * yerr = 0.5 * | y(onestep) - y(twosteps) | / (2^order - 1) ! */ ! ! for (i = 0; i < dim; i++) ! { ! yerr[i] = 8.0 * 0.5 * (y[i] - y_onestep[i]) / 15.0; ! } ! ! return GSL_SUCCESS; } *************** *** 170,173 **** --- 344,350 ---- rk4imp_state_t *state = (rk4imp_state_t *) vstate; + DBL_ZERO_MEMSET (state->y_onestep, dim); + DBL_ZERO_MEMSET (state->y0_orig, dim); + DBL_ZERO_MEMSET (state->y0, dim); DBL_ZERO_MEMSET (state->k1nu, dim); DBL_ZERO_MEMSET (state->k2nu, dim); *************** *** 190,193 **** --- 367,374 ---- { rk4imp_state_t *state = (rk4imp_state_t *) vstate; + + free (state->y_onestep); + free (state->y0_orig); + free (state->y0); free (state->k1nu); free (state->k2nu); *************** *** 198,203 **** static const gsl_odeiv_step_type rk4imp_type = { "rk4imp", /* name */ ! 1, /* can use dydt_in */ ! 0, /* gives exact dydt_out */ &rk4imp_alloc, &rk4imp_apply, --- 379,384 ---- static const gsl_odeiv_step_type rk4imp_type = { "rk4imp", /* name */ ! 1, /* can use dydt_in? */ ! 1, /* gives exact dydt_out? */ &rk4imp_alloc, &rk4imp_apply, diff -rc2P -x *.info -x *.info-* gsl-1.5/ode-initval/rk8pd.c gsl-1.6/ode-initval/rk8pd.c *** gsl-1.5/ode-initval/rk8pd.c Fri Jul 25 16:18:13 2003 --- gsl-1.6/ode-initval/rk8pd.c Thu Dec 2 21:54:19 2004 *************** *** 18,22 **** */ ! /* Runge-Kutta 8(9), Prince-Dormand */ /* Author: G. Jungman --- 18,27 ---- */ ! /* Runge-Kutta 8(9), Prince-Dormand ! * ! * High Order Embedded Runge-Kutta Formulae ! * P.J. Prince and J.R. Dormand ! * J. Comp. Appl. Math.,7, pp. 67-75, 1981 ! */ /* Author: G. Jungman *************** *** 163,166 **** --- 168,172 ---- double *k[13]; double *ytmp; + double *y0; } rk8pd_state_t; *************** *** 185,188 **** --- 191,203 ---- } + state->y0 = (double *) malloc (dim * sizeof (double)); + + if (state->y0 == 0) + { + free (state->ytmp); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y0", GSL_ENOMEM); + } + for (i = 0; i < 13; i++) { *************** *** 195,198 **** --- 210,214 ---- free (state->k[j]); } + free (state->y0); free (state->ytmp); free (state); *************** *** 218,224 **** size_t i; - int status = 0; double *const ytmp = state->ytmp; /* Note that k1 is stored in state->k[0] due to zero-based indexing */ double *const k1 = state->k[0]; --- 234,240 ---- size_t i; double *const ytmp = state->ytmp; + double *const y0 = state->y0; /* Note that k1 is stored in state->k[0] due to zero-based indexing */ double *const k1 = state->k[0]; *************** *** 236,239 **** --- 252,257 ---- double *const k13 = state->k[12]; + DBL_MEMCPY (y0, y, dim); + /* k1 step */ if (dydt_in != NULL) *************** *** 244,248 **** { int s = GSL_ODEIV_FN_EVAL (sys, t, y, k1); ! GSL_STATUS_UPDATE (&status, s); } --- 262,270 ---- { int s = GSL_ODEIV_FN_EVAL (sys, t, y, k1); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } *************** *** 253,258 **** { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[0] * h, ytmp, k2); ! GSL_STATUS_UPDATE (&status, s); } for (i = 0; i < dim; i++) ytmp[i] = y[i] + h * (b3[0] * k1[i] + b3[1] * k2[i]); --- 275,285 ---- { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[0] * h, ytmp, k2); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } + for (i = 0; i < dim; i++) ytmp[i] = y[i] + h * (b3[0] * k1[i] + b3[1] * k2[i]); *************** *** 261,266 **** { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[1] * h, ytmp, k3); ! GSL_STATUS_UPDATE (&status, s); } for (i = 0; i < dim; i++) ytmp[i] = y[i] + h * (b4[0] * k1[i] + b4[2] * k3[i]); --- 288,298 ---- { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[1] * h, ytmp, k3); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } + for (i = 0; i < dim; i++) ytmp[i] = y[i] + h * (b4[0] * k1[i] + b4[2] * k3[i]); *************** *** 269,274 **** { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[2] * h, ytmp, k4); ! GSL_STATUS_UPDATE (&status, s); } for (i = 0; i < dim; i++) ytmp[i] = y[i] + h * (b5[0] * k1[i] + b5[2] * k3[i] + b5[3] * k4[i]); --- 301,311 ---- { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[2] * h, ytmp, k4); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } + for (i = 0; i < dim; i++) ytmp[i] = y[i] + h * (b5[0] * k1[i] + b5[2] * k3[i] + b5[3] * k4[i]); *************** *** 277,282 **** { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[3] * h, ytmp, k5); ! GSL_STATUS_UPDATE (&status, s); } for (i = 0; i < dim; i++) ytmp[i] = y[i] + h * (b6[0] * k1[i] + b6[3] * k4[i] + b6[4] * k5[i]); --- 314,324 ---- { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[3] * h, ytmp, k5); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } + for (i = 0; i < dim; i++) ytmp[i] = y[i] + h * (b6[0] * k1[i] + b6[3] * k4[i] + b6[4] * k5[i]); *************** *** 285,290 **** { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[4] * h, ytmp, k6); ! GSL_STATUS_UPDATE (&status, s); } for (i = 0; i < dim; i++) ytmp[i] = --- 327,337 ---- { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[4] * h, ytmp, k6); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } + for (i = 0; i < dim; i++) ytmp[i] = *************** *** 295,300 **** { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[5] * h, ytmp, k7); ! GSL_STATUS_UPDATE (&status, s); } for (i = 0; i < dim; i++) ytmp[i] = --- 342,352 ---- { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[5] * h, ytmp, k7); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } + for (i = 0; i < dim; i++) ytmp[i] = *************** *** 305,310 **** { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[6] * h, ytmp, k8); ! GSL_STATUS_UPDATE (&status, s); } for (i = 0; i < dim; i++) ytmp[i] = --- 357,367 ---- { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[6] * h, ytmp, k8); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } + for (i = 0; i < dim; i++) ytmp[i] = *************** *** 315,320 **** { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[7] * h, ytmp, k9); ! GSL_STATUS_UPDATE (&status, s); } for (i = 0; i < dim; i++) ytmp[i] = --- 372,382 ---- { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[7] * h, ytmp, k9); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } + for (i = 0; i < dim; i++) ytmp[i] = *************** *** 326,331 **** { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[8] * h, ytmp, k10); ! GSL_STATUS_UPDATE (&status, s); } for (i = 0; i < dim; i++) ytmp[i] = --- 388,398 ---- { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[8] * h, ytmp, k10); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } + for (i = 0; i < dim; i++) ytmp[i] = *************** *** 337,342 **** { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[9] * h, ytmp, k11); ! GSL_STATUS_UPDATE (&status, s); } for (i = 0; i < dim; i++) ytmp[i] = --- 404,414 ---- { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[9] * h, ytmp, k11); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } + for (i = 0; i < dim; i++) ytmp[i] = *************** *** 348,353 **** { int s = GSL_ODEIV_FN_EVAL (sys, t + h, ytmp, k12); ! GSL_STATUS_UPDATE (&status, s); } for (i = 0; i < dim; i++) ytmp[i] = --- 420,430 ---- { int s = GSL_ODEIV_FN_EVAL (sys, t + h, ytmp, k12); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } + for (i = 0; i < dim; i++) ytmp[i] = *************** *** 360,367 **** { int s = GSL_ODEIV_FN_EVAL (sys, t + h, ytmp, k13); ! GSL_STATUS_UPDATE (&status, s); } ! /* final sum and error estimate */ for (i = 0; i < dim; i++) { --- 437,472 ---- { int s = GSL_ODEIV_FN_EVAL (sys, t + h, ytmp, k13); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } ! /* final sum */ ! for (i = 0; i < dim; i++) ! { ! const double ksum8 = ! Abar[0] * k1[i] + Abar[5] * k6[i] + Abar[6] * k7[i] + ! Abar[7] * k8[i] + Abar[8] * k9[i] + Abar[9] * k10[i] + ! Abar[10] * k11[i] + Abar[11] * k12[i] + Abar[12] * k13[i]; ! y[i] += h * ksum8; ! } ! ! /* Evaluate dydt_out[]. */ ! ! if (dydt_out != NULL) ! { ! int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); ! ! if (s != GSL_SUCCESS) ! { ! /* Restore initial values */ ! DBL_MEMCPY (y, y0, dim); ! return GSL_EBADFUNC; ! } ! } ! ! /* error estimate */ for (i = 0; i < dim; i++) { *************** *** 373,383 **** A[0] * k1[i] + A[5] * k6[i] + A[6] * k7[i] + A[7] * k8[i] + A[8] * k9[i] + A[9] * k10[i] + A[10] * k11[i] + A[11] * k12[i]; - y[i] += h * ksum8; yerr[i] = h * (ksum7 - ksum8); - if (dydt_out != NULL) - dydt_out[i] = ksum8; } ! return status; } --- 478,485 ---- A[0] * k1[i] + A[5] * k6[i] + A[6] * k7[i] + A[7] * k8[i] + A[8] * k9[i] + A[9] * k10[i] + A[10] * k11[i] + A[11] * k12[i]; yerr[i] = h * (ksum7 - ksum8); } ! return GSL_SUCCESS; } *************** *** 394,397 **** --- 496,500 ---- } + DBL_ZERO_MEMSET (state->y0, dim); DBL_ZERO_MEMSET (state->ytmp, dim); *************** *** 417,420 **** --- 520,524 ---- free (state->k[i]); } + free (state->y0); free (state->ytmp); free (state); *************** *** 423,427 **** static const gsl_odeiv_step_type rk8pd_type = { "rk8pd", /* name */ 1, /* can use dydt_in */ ! 0, /* gives exact dydt_out */ &rk8pd_alloc, &rk8pd_apply, --- 527,531 ---- static const gsl_odeiv_step_type rk8pd_type = { "rk8pd", /* name */ 1, /* can use dydt_in */ ! 1, /* gives exact dydt_out */ &rk8pd_alloc, &rk8pd_apply, diff -rc2P -x *.info -x *.info-* gsl-1.5/ode-initval/rkck.c gsl-1.6/ode-initval/rkck.c *** gsl-1.5/ode-initval/rkck.c Fri Jul 25 16:18:13 2003 --- gsl-1.6/ode-initval/rkck.c Thu Dec 2 21:54:19 2004 *************** *** 20,23 **** --- 20,26 ---- /* Runge-Kutta 4(5), Cash-Karp */ + /* Reference: Cash, J.R., Karp, A.H., ACM Transactions of Mathematical + Software, vol. 16 (1990) 201-222. */ + /* Author: G. Jungman */ *************** *** 43,56 **** static const double c4 = 125.0 / 594.0; static const double c6 = 512.0 / 1771.0; static const double ec[] = { 0.0, - /* the first value is the same as c1, above */ 37.0 / 378.0 - 2825.0 / 27648.0, 0.0, - /* the first value is the same as c3, above */ 250.0 / 621.0 - 18575.0 / 48384.0, - /* the first value is the same as c4, above */ 125.0 / 594.0 - 13525.0 / 55296.0, ! -277.00 / 14336.0, ! /* the first value is the same as c6, above */ 512.0 / 1771.0 - 0.25 }; --- 46,59 ---- static const double c4 = 125.0 / 594.0; static const double c6 = 512.0 / 1771.0; + + /* These are the differences of fifth and fourth order coefficients + for error estimation */ + static const double ec[] = { 0.0, 37.0 / 378.0 - 2825.0 / 27648.0, 0.0, 250.0 / 621.0 - 18575.0 / 48384.0, 125.0 / 594.0 - 13525.0 / 55296.0, ! -277.0 / 14336.0, 512.0 / 1771.0 - 0.25 }; *************** *** 188,192 **** size_t i; - int status = 0; double *const k1 = state->k1; --- 191,194 ---- *************** *** 197,200 **** --- 199,205 ---- double *const k6 = state->k6; double *const ytmp = state->ytmp; + double *const y0 = state->y0; + + DBL_MEMCPY (y0, y, dim); /* k1 step */ *************** *** 206,210 **** { int s = GSL_ODEIV_FN_EVAL (sys, t, y, k1); ! GSL_STATUS_UPDATE (&status, s); } --- 211,219 ---- { int s = GSL_ODEIV_FN_EVAL (sys, t, y, k1); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } *************** *** 215,220 **** { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[0] * h, ytmp, k2); ! GSL_STATUS_UPDATE (&status, s); } for (i = 0; i < dim; i++) ytmp[i] = y[i] + h * (b3[0] * k1[i] + b3[1] * k2[i]); --- 224,234 ---- { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[0] * h, ytmp, k2); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } + for (i = 0; i < dim; i++) ytmp[i] = y[i] + h * (b3[0] * k1[i] + b3[1] * k2[i]); *************** *** 223,228 **** { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[1] * h, ytmp, k3); ! GSL_STATUS_UPDATE (&status, s); } for (i = 0; i < dim; i++) ytmp[i] = y[i] + h * (b4[0] * k1[i] + b4[1] * k2[i] + b4[2] * k3[i]); --- 237,247 ---- { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[1] * h, ytmp, k3); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } + for (i = 0; i < dim; i++) ytmp[i] = y[i] + h * (b4[0] * k1[i] + b4[1] * k2[i] + b4[2] * k3[i]); *************** *** 231,236 **** { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[2] * h, ytmp, k4); ! GSL_STATUS_UPDATE (&status, s); } for (i = 0; i < dim; i++) ytmp[i] = --- 250,260 ---- { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[2] * h, ytmp, k4); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } + for (i = 0; i < dim; i++) ytmp[i] = *************** *** 241,246 **** { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[3] * h, ytmp, k5); ! GSL_STATUS_UPDATE (&status, s); } for (i = 0; i < dim; i++) ytmp[i] = --- 265,275 ---- { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[3] * h, ytmp, k5); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } + for (i = 0; i < dim; i++) ytmp[i] = *************** *** 251,255 **** { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[4] * h, ytmp, k6); ! GSL_STATUS_UPDATE (&status, s); } --- 280,288 ---- { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[4] * h, ytmp, k6); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } *************** *** 258,272 **** const double d_i = c1 * k1[i] + c3 * k3[i] + c4 * k4[i] + c6 * k6[i]; y[i] += h * d_i; ! if (dydt_out != NULL) ! dydt_out[i] = d_i; } /* difference between 4th and 5th order */ for (i = 0; i < dim; i++) ! yerr[i] = ! h * (ec[1] * k1[i] + ec[3] * k3[i] + ec[4] * k4[i] + ec[5] * k5[i] + ! ec[6] * k6[i]); ! return status; } --- 291,318 ---- const double d_i = c1 * k1[i] + c3 * k3[i] + c4 * k4[i] + c6 * k6[i]; y[i] += h * d_i; ! } ! ! /* Evaluate dydt_out[]. */ ! ! if (dydt_out != NULL) ! { ! int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); ! ! if (s != GSL_SUCCESS) ! { ! /* Restore initial values */ ! DBL_MEMCPY (y, y0, dim); ! return GSL_EBADFUNC; ! } } /* difference between 4th and 5th order */ for (i = 0; i < dim; i++) ! { ! yerr[i] = h * (ec[1] * k1[i] + ec[3] * k3[i] + ec[4] * k4[i] ! + ec[5] * k5[i] + ec[6] * k6[i]); ! } ! return GSL_SUCCESS; } *************** *** 284,287 **** --- 330,334 ---- DBL_ZERO_MEMSET (state->k6, dim); DBL_ZERO_MEMSET (state->ytmp, dim); + DBL_ZERO_MEMSET (state->y0, dim); return GSL_SUCCESS; *************** *** 293,297 **** rkck_state_t *state = (rkck_state_t *) vstate; state = 0; /* prevent warnings about unused parameters */ ! return 5; } --- 340,344 ---- rkck_state_t *state = (rkck_state_t *) vstate; state = 0; /* prevent warnings about unused parameters */ ! return 5; /* FIXME: should this be 4? */ } *************** *** 314,318 **** static const gsl_odeiv_step_type rkck_type = { "rkck", /* name */ 1, /* can use dydt_in */ ! 0, /* gives exact dydt_out */ &rkck_alloc, &rkck_apply, --- 361,365 ---- static const gsl_odeiv_step_type rkck_type = { "rkck", /* name */ 1, /* can use dydt_in */ ! 1, /* gives exact dydt_out */ &rkck_alloc, &rkck_apply, diff -rc2P -x *.info -x *.info-* gsl-1.5/ode-initval/rkf45.c gsl-1.6/ode-initval/rkf45.c *** gsl-1.5/ode-initval/rkf45.c Sun Jun 20 19:41:17 2004 --- gsl-1.6/ode-initval/rkf45.c Thu Dec 2 21:54:19 2004 *************** *** 20,23 **** --- 20,28 ---- /* Runge-Kutta-Fehlberg 4(5)*/ + /* Reference eg. Hairer, E., Norsett S.P., Wanner, G. Solving ordinary + differential equations I, Nonstiff Problems, 2nd revised edition, + Springer, 2000. + */ + #include #include *************** *** 28,40 **** #include "odeiv_util.h" ! /* Runge-Kutta-Fehlberg constants */ ! static const double ah[] = { 1.0/4.0, 3.0/8.0, 12.0/13.0, 1.0, 1.0/2.0 }; static const double b3[] = { 3.0/32.0, 9.0/32.0 }; - static const double b4[] = { 1932.0/2197.0, -7200.0/2197.0, 7296.0/2197.0}; - static const double b5[] = { 8341.0/4104.0, -32832.0/4104.0, 29440.0/4104.0, -845.0/4104.0}; - static const double b6[] = { -6080.0/20520.0, 41040.0/20520.0, -28352.0/20520.0, 9295.0/20520.0, -5643.0/20520.0}; --- 33,42 ---- #include "odeiv_util.h" ! /* Runge-Kutta-Fehlberg coefficients. Zero elements left out */ + static const double ah[] = { 1.0/4.0, 3.0/8.0, 12.0/13.0, 1.0, 1.0/2.0 }; static const double b3[] = { 3.0/32.0, 9.0/32.0 }; static const double b4[] = { 1932.0/2197.0, -7200.0/2197.0, 7296.0/2197.0}; static const double b5[] = { 8341.0/4104.0, -32832.0/4104.0, 29440.0/4104.0, -845.0/4104.0}; static const double b6[] = { -6080.0/20520.0, 41040.0/20520.0, -28352.0/20520.0, 9295.0/20520.0, -5643.0/20520.0}; *************** *** 45,48 **** --- 47,52 ---- static const double c6 = 277020.0/7618050.0; + /* These are the differences of fifth and fourth order coefficients + for error estimation */ static const double ec[] = { 0.0, *************** *** 187,191 **** size_t i; - int status = 0; double *const k1 = state->k1; --- 191,194 ---- *************** *** 196,199 **** --- 199,205 ---- double *const k6 = state->k6; double *const ytmp = state->ytmp; + double *const y0 = state->y0; + + DBL_MEMCPY (y0, y, dim); /* k1 step */ *************** *** 205,211 **** { int s = GSL_ODEIV_FN_EVAL (sys, t, y, k1); ! GSL_STATUS_UPDATE (&status, s); } ! for (i = 0; i < dim; i++) ytmp[i] = y[i] + ah[0] * h * k1[i]; --- 211,221 ---- { int s = GSL_ODEIV_FN_EVAL (sys, t, y, k1); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } ! for (i = 0; i < dim; i++) ytmp[i] = y[i] + ah[0] * h * k1[i]; *************** *** 214,219 **** { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[0] * h, ytmp, k2); ! GSL_STATUS_UPDATE (&status, s); } for (i = 0; i < dim; i++) ytmp[i] = y[i] + h * (b3[0] * k1[i] + b3[1] * k2[i]); --- 224,234 ---- { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[0] * h, ytmp, k2); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } + for (i = 0; i < dim; i++) ytmp[i] = y[i] + h * (b3[0] * k1[i] + b3[1] * k2[i]); *************** *** 222,227 **** { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[1] * h, ytmp, k3); ! GSL_STATUS_UPDATE (&status, s); } for (i = 0; i < dim; i++) ytmp[i] = y[i] + h * (b4[0] * k1[i] + b4[1] * k2[i] + b4[2] * k3[i]); --- 237,247 ---- { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[1] * h, ytmp, k3); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } + for (i = 0; i < dim; i++) ytmp[i] = y[i] + h * (b4[0] * k1[i] + b4[1] * k2[i] + b4[2] * k3[i]); *************** *** 230,235 **** { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[2] * h, ytmp, k4); ! GSL_STATUS_UPDATE (&status, s); } for (i = 0; i < dim; i++) ytmp[i] = --- 250,260 ---- { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[2] * h, ytmp, k4); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } + for (i = 0; i < dim; i++) ytmp[i] = *************** *** 240,245 **** { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[3] * h, ytmp, k5); ! GSL_STATUS_UPDATE (&status, s); } for (i = 0; i < dim; i++) ytmp[i] = --- 265,275 ---- { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[3] * h, ytmp, k5); ! ! if (s != GSL_SUCCESS) ! { ! return GSL_EBADFUNC; ! } } + for (i = 0; i < dim; i++) ytmp[i] = *************** *** 250,272 **** { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[4] * h, ytmp, k6); - GSL_STATUS_UPDATE (&status, s); - } for (i = 0; i < dim; i++) { const double d_i = c1 * k1[i] + c3 * k3[i] + c4 * k4[i] + c5 * k5[i] + c6 * k6[i]; y[i] += h * d_i; - if (dydt_out != NULL) - dydt_out[i] = d_i; } /* difference between 4th and 5th order */ for (i = 0; i < dim; i++) ! yerr[i] = ! h * (ec[1] * k1[i] + ec[3] * k3[i] + ec[4] * k4[i] + ec[5] * k5[i] + ! ec[6] * k6[i]); ! ! return status; } --- 280,319 ---- { int s = GSL_ODEIV_FN_EVAL (sys, t + ah[4] * h, ytmp, k6); + if (s != GSL_SUCCESS) + { + return GSL_EBADFUNC; + } + } + for (i = 0; i < dim; i++) { const double d_i = c1 * k1[i] + c3 * k3[i] + c4 * k4[i] + c5 * k5[i] + c6 * k6[i]; y[i] += h * d_i; } + /* Derivatives at output */ + + if (dydt_out != NULL) + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); + + if (s != GSL_SUCCESS) + { + /* Restore initial values */ + DBL_MEMCPY (y, y0, dim); + + return GSL_EBADFUNC; + } + } + /* difference between 4th and 5th order */ for (i = 0; i < dim; i++) ! { ! yerr[i] = h * (ec[1] * k1[i] + ec[3] * k3[i] + ec[4] * k4[i] ! + ec[5] * k5[i] + ec[6] * k6[i]); ! } ! return GSL_SUCCESS; } *************** *** 284,287 **** --- 331,335 ---- DBL_ZERO_MEMSET (state->k6, dim); DBL_ZERO_MEMSET (state->ytmp, dim); + DBL_ZERO_MEMSET (state->y0, dim); return GSL_SUCCESS; diff -rc2P -x *.info -x *.info-* gsl-1.5/ode-initval/test.c gsl-1.6/ode-initval/test.c *** gsl-1.5/ode-initval/test.c Sun Jun 20 19:41:17 2004 --- gsl-1.6/ode-initval/test.c Wed Dec 29 16:41:26 2004 *************** *** 1,5 **** /* ode-initval/test_odeiv.c * ! * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman * * This program is free software; you can redistribute it and/or modify --- 1,5 ---- /* ode-initval/test_odeiv.c * ! * Copyright (C) 2004 Tuomo Keskitalo * * This program is free software; you can redistribute it and/or modify *************** *** 18,26 **** */ ! /* Author: G. Jungman ! */ #include #include #include #include #include --- 18,28 ---- */ ! /* Some functions and tests based on test.c by G. Jungman. ! */ ! #include #include #include + #include #include #include *************** *** 31,76 **** #include #include ! int rhs_linear (double t, const double y[], double f[], void *params); ! int jac_linear (double t, const double y[], double *dfdy, double dfdt[], ! void *params); ! int rhs_sin (double t, const double y[], double f[], void *params); ! int jac_sin (double t, const double y[], double *dfdy, double dfdt[], ! void *params); ! int rhs_exp (double t, const double y[], double f[], void *params); ! int jac_exp (double t, const double y[], double *dfdy, double dfdt[], ! void *params); ! int rhs_stiff (double t, const double y[], double f[], void *params); ! int jac_stiff (double t, const double y[], double *dfdy, double dfdt[], ! void *params); ! void test_stepper_linear (const gsl_odeiv_step_type * T, double h, ! double base_prec); ! void test_stepper_sin (const gsl_odeiv_step_type * T, double h, double base_prec); ! void test_stepper_exp (const gsl_odeiv_step_type * T, double h, double base_prec); ! void test_stepper_stiff (const gsl_odeiv_step_type * T, double h, double base_prec); ! void test_evolve_system_flat (gsl_odeiv_step * step, ! const gsl_odeiv_system * sys, ! double t0, double t1, double hstart, ! double y[], double yfin[], ! double err_target, const char *desc); ! ! void test_evolve_system (const gsl_odeiv_step_type * T, ! const gsl_odeiv_system * sys, ! double t0, double t1, double hstart, ! double y[], double yfin[], ! double err_target, const char *desc); ! ! void test_evolve_exp (const gsl_odeiv_step_type * T, double h, double err); ! void test_evolve_sin (const gsl_odeiv_step_type * T, double h, double err); ! void test_evolve_stiff1 (const gsl_odeiv_step_type * T, double h, double err); ! void test_evolve_stiff5 (const gsl_odeiv_step_type * T, double h, double err); ! /* RHS for a + b t */ int rhs_linear (double t, const double y[], double f[], void *params) { ! f[0] = 0.0; ! f[1] = y[0]; return GSL_SUCCESS; } --- 33,48 ---- #include #include + #include "odeiv_util.h" ! /* Maximum number of ODE equations */ ! #define MAXEQ 4 ! /* RHS for f=2. Solution y = 2 * t + t0 */ int rhs_linear (double t, const double y[], double f[], void *params) { ! f[0] = 2.0; ! return GSL_SUCCESS; } *************** *** 80,95 **** void *params) { ! gsl_matrix dfdy_mat; ! dfdy_mat.size1 = 2; ! dfdy_mat.size2 = 2; ! dfdy_mat.tda = 2; ! dfdy_mat.data = dfdy; ! dfdy_mat.block = 0; ! gsl_matrix_set (&dfdy_mat, 0, 0, 0.0); ! gsl_matrix_set (&dfdy_mat, 0, 1, 0.0); ! gsl_matrix_set (&dfdy_mat, 1, 0, 1.0); ! gsl_matrix_set (&dfdy_mat, 1, 1, 0.0); dfdt[0] = 0.0; ! dfdt[1] = 0.0; return GSL_SUCCESS; } --- 52,58 ---- void *params) { ! dfdy[0] = 0.0; dfdt[0] = 0.0; ! return GSL_SUCCESS; } *************** *** 98,107 **** rhs_linear, jac_linear, ! 2, 0 }; ! /* RHS for sin(t),cos(t) */ int --- 61,98 ---- rhs_linear, jac_linear, ! 1, 0 }; + /* RHS for f=y. Equals y=exp(t) with initial value y(0)=1.0 */ + + int + rhs_exp (double t, const double y[], double f[], void *params) + { + f[0] = y[0]; + + return GSL_SUCCESS; + } + + int + jac_exp (double t, const double y[], double *dfdy, double dfdt[], + void *params) + { + dfdy[0] = y[0]; + dfdt[0] = 0.0; + + return GSL_SUCCESS; + } ! gsl_odeiv_system rhs_func_exp = { ! rhs_exp, ! jac_exp, ! 1, ! 0 ! }; ! ! /* RHS for f0 = -y1, f1 = y0 ! equals y = [cos(t), sin(t)] with initial values [1, 0] ! */ int *************** *** 110,113 **** --- 101,105 ---- f[0] = -y[1]; f[1] = y[0]; + return GSL_SUCCESS; } *************** *** 117,132 **** void *params) { ! gsl_matrix dfdy_mat; ! dfdy_mat.data = dfdy; ! dfdy_mat.size1 = 2; ! dfdy_mat.size2 = 2; ! dfdy_mat.tda = 2; ! dfdy_mat.block = 0; ! gsl_matrix_set (&dfdy_mat, 0, 0, 0.0); ! gsl_matrix_set (&dfdy_mat, 0, 1, -1.0); ! gsl_matrix_set (&dfdy_mat, 1, 0, 1.0); ! gsl_matrix_set (&dfdy_mat, 1, 1, 0.0); dfdt[0] = 0.0; dfdt[1] = 0.0; return GSL_SUCCESS; } --- 109,120 ---- void *params) { ! dfdy[0] = 0.0; ! dfdy[1] = -1.0; ! dfdy[2] = 1.0; ! dfdy[3] = 0.0; ! dfdt[0] = 0.0; dfdt[1] = 0.0; + return GSL_SUCCESS; } *************** *** 139,175 **** }; ! ! /* RHS for a exp(t)+ b exp(-t) */ int ! rhs_exp (double t, const double y[], double f[], void *params) { ! f[0] = y[1]; f[1] = y[0]; return GSL_SUCCESS; } int ! jac_exp (double t, const double y[], double *dfdy, double dfdt[], void *params) { ! gsl_matrix dfdy_mat; ! dfdy_mat.data = dfdy; ! dfdy_mat.size1 = 2; ! dfdy_mat.size2 = 2; ! dfdy_mat.tda = 2; ! dfdy_mat.block = 0; ! gsl_matrix_set (&dfdy_mat, 0, 0, 0.0); ! gsl_matrix_set (&dfdy_mat, 0, 1, 1.0); ! gsl_matrix_set (&dfdy_mat, 1, 0, 1.0); ! gsl_matrix_set (&dfdy_mat, 1, 1, 0.0); dfdt[0] = 0.0; dfdt[1] = 0.0; return GSL_SUCCESS; } ! gsl_odeiv_system rhs_func_exp = { ! rhs_exp, ! jac_exp, 2, 0 --- 127,184 ---- }; ! /* Sine/cosine with random failures */ int ! rhs_xsin (double t, const double y[], double f[], void *params) { ! static int n = 0; ! ! n++; ! ! if (n > 40 && n < 65) { ! f[0] = GSL_NAN; ! f[1] = GSL_NAN; ! return GSL_EFAILED; ! } ! ! f[0] = -y[1]; f[1] = y[0]; + return GSL_SUCCESS; } int ! jac_xsin (double t, const double y[], double *dfdy, double dfdt[], void *params) { ! static int n = 0; ! ! n++; ! ! if (n > 50 && n < 55) { ! dfdy[0] = GSL_NAN; ! dfdy[1] = GSL_NAN; ! dfdy[2] = GSL_NAN; ! dfdy[3] = GSL_NAN; ! ! dfdt[0] = GSL_NAN; ! dfdt[1] = GSL_NAN; ! return GSL_EFAILED; ! } ! ! dfdy[0] = 0.0; ! dfdy[1] = -1.0; ! dfdy[2] = 1.0; ! dfdy[3] = 0.0; ! dfdt[0] = 0.0; dfdt[1] = 0.0; + return GSL_SUCCESS; } ! gsl_odeiv_system rhs_func_xsin = { ! rhs_xsin, ! jac_xsin, 2, 0 *************** *** 177,181 **** ! /* RHS for stiff example */ int --- 186,197 ---- ! /* RHS for classic stiff example ! dy0 / dt = 998 * y0 + 1998 * y1 y0(0) = 1.0 ! dy1 / dt = -999 * y0 - 1999 * y1 y1(0) = 0.0 ! ! solution is ! y0 = 2 * exp(-t) - exp(-1000 * t) ! y1 = - exp(-t) + exp(-1000 * t) ! */ int *************** *** 184,187 **** --- 200,204 ---- f[0] = 998.0 * y[0] + 1998.0 * y[1]; f[1] = -999.0 * y[0] - 1999.0 * y[1]; + return GSL_SUCCESS; } *************** *** 191,206 **** void *params) { ! gsl_matrix dfdy_mat; ! dfdy_mat.data = dfdy; ! dfdy_mat.size1 = 2; ! dfdy_mat.size2 = 2; ! dfdy_mat.tda = 2; ! dfdy_mat.block = 0; ! gsl_matrix_set (&dfdy_mat, 0, 0, 998.0); ! gsl_matrix_set (&dfdy_mat, 0, 1, 1998.0); ! gsl_matrix_set (&dfdy_mat, 1, 0, -999.0); ! gsl_matrix_set (&dfdy_mat, 1, 1, -1999.0); dfdt[0] = 0.0; dfdt[1] = 0.0; return GSL_SUCCESS; } --- 208,219 ---- void *params) { ! dfdy[0] = 998.0; ! dfdy[1] = 1998.0; ! dfdy[2] = -999.0; ! dfdy[3] = -1999.0; ! dfdt[0] = 0.0; dfdt[1] = 0.0; + return GSL_SUCCESS; } *************** *** 213,515 **** }; ! void ! test_stepper_linear (const gsl_odeiv_step_type * T, double h, ! double base_prec) { ! int s = 0; ! double y[2]; ! double yerr[2]; ! double t; ! double del; ! double delmax = 0.0; ! int count = 0; ! gsl_odeiv_step *stepper = gsl_odeiv_step_alloc (T, 2); ! y[0] = 1.0; ! y[1] = 0.0; ! for (t = 0.0; t < 4.0; t += h) ! { ! gsl_odeiv_step_apply (stepper, t, h, y, yerr, 0, 0, &rhs_func_lin); ! del = fabs ((y[1] - (t + h)) / y[1]); ! delmax = GSL_MAX_DBL (del, delmax); ! if (del > (count + 1.0) * base_prec) ! { ! printf (" LINEAR(%20.17g) %20.17g %20.17g %8.4g\n", t + h, y[1], ! t + h, del); ! s++; ! } ! count++; ! } ! gsl_test (s, "%s, linear [0,4], max relative error = %g", ! gsl_odeiv_step_name (stepper), delmax); ! gsl_odeiv_step_free (stepper); } ! void ! test_stepper_sin (const gsl_odeiv_step_type * T, double h, double base_prec) { ! int s = 0; ! double y[2]; ! double yerr[2]; ! double t; ! double del; ! double delmax = 0.0; ! int count = 0; ! gsl_odeiv_step *stepper = gsl_odeiv_step_alloc (T, 2); ! y[0] = 1.0; ! y[1] = 0.0; ! for (t = 0.0; t < M_PI; t += h) ! { ! int stat; ! double sin_th = sin (t + h); ! gsl_odeiv_step_apply (stepper, t, h, y, yerr, 0, 0, &rhs_func_sin); ! del = fabs ((y[1] - sin_th) / sin_th); ! delmax = GSL_MAX_DBL (del, delmax); ! { ! if (t < 0.5 * M_PI) ! { ! stat = (del > (count + 1.0) * base_prec); ! } ! else if (t < 0.7 * M_PI) ! { ! stat = (del > 1.0e+04 * base_prec); ! } ! else if (t < 0.9 * M_PI) ! { ! stat = (del > 1.0e+06 * base_prec); ! } ! else ! { ! stat = (del > 1.0e+09 * base_prec); ! } ! if (stat != 0) ! { ! printf (" SIN(%22.18g) %22.18g %22.18g %10.6g\n", t + h, y[1], ! sin_th, del); ! } ! s += stat; ! } ! count++; ! } ! if (delmax > 1.0e+09 * base_prec) ! { ! s++; ! printf (" SIN(0 .. M_PI) delmax = %g\n", delmax); ! } ! gsl_test (s, "%s, sine [0,pi], max relative error = %g", ! gsl_odeiv_step_name (stepper), delmax); ! delmax = 0.0; ! for (; t < 100.5 * M_PI; t += h) ! { ! gsl_odeiv_step_apply (stepper, t, h, y, yerr, 0, 0, &rhs_func_sin); ! del = fabs (y[1] - sin (t)); ! delmax = GSL_MAX_DBL (del, delmax); ! count++; ! } ! if (del > count * 2.0 * base_prec) ! { ! s++; ! printf (" SIN(%22.18g) %22.18g %22.18g %10.6g\n", t + h, y[1], ! sin (t), del); ! } ! gsl_test (s, "%s, sine [pi,100.5*pi], max absolute error = %g", ! gsl_odeiv_step_name (stepper), delmax); ! gsl_odeiv_step_free (stepper); ! } ! void ! test_stepper_exp (const gsl_odeiv_step_type * T, double h, double base_prec) { ! int s = 0; ! double y[2]; ! double yerr[2]; ! double t; ! double del, delmax = 0.0; ! int count = 0; ! gsl_odeiv_step *stepper = gsl_odeiv_step_alloc (T, 2); ! y[0] = 1.0; ! y[1] = 1.0; ! for (t = 0.0; t < 20.0; t += h) ! { ! double ex = exp (t + h); ! gsl_odeiv_step_apply (stepper, t, h, y, yerr, 0, 0, &rhs_func_exp); ! del = fabs ((y[1] - ex) / y[1]); ! delmax = GSL_MAX_DBL (del, delmax); ! if (del > (count + 1.0) * 2.0 * base_prec) ! { ! printf (" EXP(%20.17g) %20.17g %20.17g %8.4g\n", t + h, y[1], ! ex, del); ! s++; ! } ! count++; ! } ! gsl_test (s, "%s, exponential [0,20], max relative error = %g", ! gsl_odeiv_step_name (stepper), delmax); ! gsl_odeiv_step_free (stepper); } ! void ! test_stepper_stiff (const gsl_odeiv_step_type * T, double h, double base_prec) { ! int s = 0; ! double y[2]; ! double yerr[2]; ! double t; ! double del, delmax = 0.0; ! int count = 0; ! gsl_odeiv_step *stepper = gsl_odeiv_step_alloc (T, 2); ! y[0] = 1.0; ! y[1] = 0.0; ! for (t = 0.0; t < 20.0; t += h) ! { ! gsl_odeiv_step_apply (stepper, t, h, y, yerr, NULL, NULL, ! &rhs_func_stiff); ! if (t > 0.04) ! { ! double arg = t + h; ! double e1 = exp (-arg); ! double e2 = exp (-1000.0 * arg); ! double u = 2.0 * e1 - e2; ! /* double v = -e1 + e2; */ ! del = fabs ((y[0] - u) / y[0]); ! delmax = GSL_MAX_DBL (del, delmax); ! if (del > (count + 1.0) * 100.0 * base_prec) ! { ! printf (" STIFF(%20.17g) %20.17g %20.17g %8.4g\n", arg, ! y[0], u, del); ! s++; ! } ! } ! count++; ! } ! gsl_test (s, "%s, stiff [0,20], max relative error = %g", ! gsl_odeiv_step_name (stepper), delmax); ! gsl_odeiv_step_free (stepper); } void ! test_stepper_err (const gsl_odeiv_step_type * T, double h, double base_prec) { ! int s = 0; ! double y[2]; ! double yerr[2]; ! double t; ! double del; ! double delmax = 0.0, errmax = 0.0; ! int count = 0; ! gsl_odeiv_step *stepper = gsl_odeiv_step_alloc (T, 2); ! y[0] = 1.0; ! y[1] = 0.0; ! for (t = 0.0; t < M_PI; t += h) ! { ! /* int stat; */ ! double y1_t = y[1]; ! /* double sin_th = sin(t+h); */ ! /* next line gives dy_exp = sin(t+h) - sin(t) */ ! double dy_exp = cos(t)*sin(h)-2*sin(t)*pow(sin(h/2),2.0); ! double dy_t; ! gsl_odeiv_step_apply (stepper, t, h, y, yerr, 0, 0, &rhs_func_sin); ! dy_t = y[1] - y1_t; ! del = fabs (dy_t - dy_exp); ! ! if (t > 0.1 && t < 0.2) { ! int stat = (del > 10.0*fabs(yerr[1]) + GSL_DBL_EPSILON*fabs(y[1])); ! ! if (stat != 0) ! { ! delmax = del; ! errmax = fabs(yerr[1]); ! ! printf ("SIN(%.18e) %.5e %.5e %e %e %e\n", t + h, y[1], ! dy_t, dy_exp, del, yerr[1]); ! ! s += stat; ! break; ! } } ! count++; } ! gsl_test (s, "%s, sine [0,pi], accurary of estimate error = %g vs %g", ! gsl_odeiv_step_name (stepper), delmax, errmax); ! ! gsl_odeiv_step_free (stepper); } void ! test_evolve_system_flat (gsl_odeiv_step * step, ! const gsl_odeiv_system * sys, ! double t0, double t1, double hstart, ! double y[], double yfin[], ! double err_target, const char *desc) { ! int s = 0; ! double frac; double t = t0; double h = hstart; gsl_odeiv_evolve *e = gsl_odeiv_evolve_alloc (sys->dimension); while (t < t1) { ! gsl_odeiv_evolve_apply (e, NULL, step, sys, &t, t1, &h, y); } ! frac = fabs ((y[1] - yfin[1]) / yfin[1]) + fabs ((y[0] - yfin[0]) / yfin[0]); ! if (frac > 2.0 * e->count * err_target) { ! printf ("FLAT t = %.5e y0 = %g y1= %g\n", t, y[0], y[1]); ! s++; } - gsl_test (s, "%s, %s, evolve, no control, max relative error = %g", - gsl_odeiv_step_name (step), desc, frac); - gsl_odeiv_evolve_free (e); } ! ! void ! test_evolve_system (const gsl_odeiv_step_type * T, ! const gsl_odeiv_system * sys, ! double t0, double t1, double hstart, ! double y[], double yfin[], ! double err_target, const char *desc) { int s = 0; ! double frac; double t = t0; --- 226,641 ---- }; + /* van Der Pol oscillator: + f0 = y1 y0(0) = 1.0 + f1 = -y0 + mu * y1 * (1 - y0^2) y1(0) = 0.0 + */ ! int ! rhs_vanderpol (double t, const double y[], double f[], void *params) { ! const double mu = 10.0; ! f[0] = y[1]; ! f[1] = -y[0] + mu * y[1] * (1.0 - y[0]*y[0]); ! return GSL_SUCCESS; ! } ! int ! jac_vanderpol (double t, const double y[], double *dfdy, double dfdt[], ! void *params) ! { ! const double mu = 10.0; ! dfdy[0] = 0.0; ! dfdy[1] = 1.0; ! dfdy[2] = -2.0 * mu * y[0] * y[1] - 1.0; ! dfdy[3] = mu * (1.0 - y[0] * y[0]); ! dfdt[0] = 0.0; ! dfdt[1] = 0.0; ! ! return GSL_SUCCESS; } + gsl_odeiv_system rhs_func_vanderpol = { + rhs_vanderpol, + jac_vanderpol, + 2, + 0 + }; ! /* The Oregonator - chemical Belusov-Zhabotinskii reaction ! y0(0) = 1.0, y1(0) = 2.0, y2(0) = 3.0 ! */ ! ! int ! rhs_oregonator (double t, const double y[], double f[], void *params) { ! const double c1=77.27; ! const double c2=8.375e-6; ! const double c3=0.161; ! ! f[0] = c1 * (y[1] + y[0] * (1 - c2 * y[0] - y[1])); ! f[1] = 1/c1 * (y[2] - y[1] * (1 + y[0])); ! f[2] = c3 * (y[0] - y[2]); ! return GSL_SUCCESS; ! } ! int ! jac_oregonator (double t, const double y[], double *dfdy, double dfdt[], ! void *params) ! { ! const double c1=77.27; ! const double c2=8.375e-6; ! const double c3=0.161; ! ! dfdy[0] = c1 * (1 - 2 * c2 * y[0] - y[1]); ! dfdy[1] = c1 * (1 - y[0]); ! dfdy[2] = 0.0; ! ! dfdy[3] = 1/c1 * (-y[1]); ! dfdy[4] = 1/c1 * (-1 - y[0]); ! dfdy[5] = 1/c1; ! ! dfdy[6] = c3; ! dfdy[7] = 0.0; ! dfdy[8] = -c3; ! dfdt[0] = 0.0; ! dfdt[1] = 0.0; ! dfdt[2] = 0.0; ! return GSL_SUCCESS; ! } ! gsl_odeiv_system rhs_func_oregonator = { ! rhs_oregonator, ! jac_oregonator, ! 3, ! 0 ! }; ! /* Volterra-Lotka predator-prey model ! f0 = (a - b * y1) * y0 y0(0) = 3.0 ! f1 = (-c + d * y0) * y1 y1(0) = 1.0 ! */ ! int ! rhs_vl (double t, const double y[], double f[], void *params) ! { ! const double a = 1.0; ! const double b = 1.0; ! const double c = 1.0; ! const double d = 1.0; ! ! f[0] = (a - b * y[1]) * y[0]; ! f[1] = (-c + d * y[0]) * y[1]; + return GSL_SUCCESS; + } ! int ! jac_vl (double t, const double y[], double *dfdy, double dfdt[], ! void *params) { ! const double a = 1.0; ! const double b = 1.0; ! const double c = 1.0; ! const double d = 1.0; ! ! dfdy[0] = a - b * y[1]; ! dfdy[1] = -b * y[0]; ! dfdy[2] = d * y[1]; ! dfdy[3] = -c + d * y[0]; ! dfdt[0] = 0.0; ! dfdt[1] = 0.0; ! return GSL_SUCCESS; ! } ! gsl_odeiv_system rhs_func_vl = { ! rhs_vl, ! jac_vl, ! 2, ! 0 ! }; ! ! /* Stiff trigonometric example ! f0 = -50 * (y0 - cos(t)) y0(0) = 0.0 ! */ ! ! int ! rhs_stifftrig (double t, const double y[], double f[], void *params) ! { ! f[0] = -50 * (y[0] - cos(t)); ! return GSL_SUCCESS; } ! int ! jac_stifftrig (double t, const double y[], double *dfdy, double dfdt[], ! void *params) { ! dfdy[0] = -50; ! dfdt[0] = -50 * sin(t); ! return GSL_SUCCESS; ! } ! gsl_odeiv_system rhs_func_stifftrig = { ! rhs_stifftrig, ! jac_stifftrig, ! 1, ! 0 ! }; ! /* E5 - a stiff badly scaled chemical problem by Enright, Hull & ! Lindberg (1975): Comparing numerical methods for stiff systems of ! ODEs. BIT, vol. 15, pp. 10-48. ! ! f0 = -a * y0 - b * y0 * y2 y0(0) = 1.76e-3 ! f1 = a * y0 - m * c * y1 * y2 y1(0) = 0.0 ! f2 = a * y0 - b * y0 * y2 - m * c * y1 * y2 + c * y3 y2(0) = 0.0 ! f3 = b * y0 * y2 - c * y3 y3(0) = 0.0 ! */ ! int ! rhs_e5 (double t, const double y[], double f[], void *params) ! { ! const double a = 7.89e-10; ! const double b = 1.1e7; ! const double c = 1.13e3; ! const double m = 1.0e6; ! ! f[0] = -a * y[0] - b * y[0] * y[2]; ! f[1] = a * y[0] - m * c * y[1] * y[2]; ! f[3] = b * y[0] * y[2] - c * y[3]; ! f[2] = f[1] - f[3]; ! return GSL_SUCCESS; ! } ! ! int ! jac_e5 (double t, const double y[], double *dfdy, double dfdt[], ! void *params) ! { ! const double a = 7.89e-10; ! const double b = 1.1e7; ! const double c = 1.13e3; ! const double m = 1.0e6; ! ! dfdy[0] = -a - b * y[2]; ! dfdy[1] = 0.0; ! dfdy[2] = -b * y[0]; ! dfdy[3] = 0.0; ! ! dfdy[4] = a; ! dfdy[5] = -m * c * y[2]; ! dfdy[6] = -m * c * y[1]; ! dfdy[7] = 0.0; ! ! dfdy[8] = a - b * y[2]; ! dfdy[9] = -m * c * y[2]; ! dfdy[10] = -b * y[0] - m * c * y[1]; ! dfdy[11] = c; ! ! dfdy[12] = b * y[2]; ! dfdy[13] = 0.0; ! dfdy[14] = b * y[0]; ! dfdy[15] = -c; ! dfdt[0] = 0.0; ! dfdt[1] = 0.0; ! dfdt[2] = 0.0; ! dfdt[3] = 0.0; ! ! return GSL_SUCCESS; } + gsl_odeiv_system rhs_func_e5 = { + rhs_e5, + jac_e5, + 4, + 0 + }; + void ! test_odeiv_stepper (const gsl_odeiv_step_type *T, const gsl_odeiv_system *sys, ! const double h, const double t, const char desc[], ! const double y0[], const double yfin[], ! const double relerr) { ! /* tests stepper T with one fixed length step advance of system sys ! and compares with given values yfin ! */ ! ! double y[MAXEQ] = {0.0}; ! double yerr[MAXEQ] = {0.0}; ! size_t ne = sys->dimension; ! size_t i; ! gsl_odeiv_step *step = gsl_odeiv_step_alloc (T, ne); ! DBL_MEMCPY (y, y0, MAXEQ); ! { ! int s = gsl_odeiv_step_apply (step, t, h, y, yerr, 0, 0, sys); ! if (s != GSL_SUCCESS) ! { ! gsl_test(s, "test_odeiv_stepper: %s step_apply returned %d", desc, s); } ! } ! ! for (i = 0; i < ne; i++) ! { ! gsl_test_rel (y[i], yfin[i], relerr, ! "%s %s step(%d)", ! gsl_odeiv_step_name (step), desc,i); } ! gsl_odeiv_step_free (step); } + void + test_stepper (const gsl_odeiv_step_type *T) + { + /* Tests stepper T with a step of selected systems */ + + double y[MAXEQ] = {0.0}; + double yfin[MAXEQ] = {0.0}; + + /* Step length */ + double h; + + /* Required tolerance */ + double err_target; + + /* linear */ + h = 1e-1; + err_target = 1e-10; + y[0] = 0.58; + yfin[0] = y[0] + 2 * h; + test_odeiv_stepper (T, &rhs_func_lin, h, 0.0, "linear", + y, yfin, err_target); + + /* exponential */ + h = 1e-4; + err_target = 1e-8; + y[0] = exp(2.7); + yfin[0] = exp(2.7 + h); + test_odeiv_stepper (T, &rhs_func_exp, h, 2.7, "exponential", + y, yfin, err_target); + /* cosine-sine */ + h = 1e-3; + err_target = 1e-6; + y[0] = cos(1.2); + y[1] = sin(1.2); + yfin[0] = cos(1.2 + h); + yfin[1] = sin(1.2 + h); + test_odeiv_stepper (T, &rhs_func_sin, h, 1.2, "cosine-sine", + y, yfin, err_target); + + /* classic stiff */ + h = 1e-7; + err_target = 1e-4; + y[0] = 1.0; + y[1] = 0.0; + + { + const double e1 = exp (-h); + const double e2 = exp (-1000.0 * h); + yfin[0] = 2.0 * e1 - e2; + yfin[1] = -e1 + e2; + } + + test_odeiv_stepper (T, &rhs_func_stiff, h, 0.0, "classic_stiff", + y, yfin, err_target); + } void ! test_evolve_system (const gsl_odeiv_step_type * T, ! const gsl_odeiv_system * sys, ! double t0, double t1, double hstart, ! double y[], double yfin[], ! double err_target, const char *desc) { ! /* Tests system sys with stepper T. Step length is controlled by ! error estimation from the stepper. ! */ ! ! int steps = 0; ! size_t i; double t = t0; double h = hstart; + /* Tolerance factor in testing errors */ + const double factor = 10; + + gsl_odeiv_step * step = gsl_odeiv_step_alloc (T, sys->dimension); + + gsl_odeiv_control *c = + gsl_odeiv_control_standard_new (err_target, err_target, 1.0, 0.0); + gsl_odeiv_evolve *e = gsl_odeiv_evolve_alloc (sys->dimension); while (t < t1) { ! int s = gsl_odeiv_evolve_apply (e, c, step, sys, &t, t1, &h, y); ! ! if (s != GSL_SUCCESS && sys != &rhs_func_xsin) ! { ! gsl_test(s, "%s evolve_apply returned %d", ! gsl_odeiv_step_name (step), s); ! break; ! } ! ! if (steps > 100000) ! { ! gsl_test(GSL_EFAILED, ! "%s evolve_apply reached maxiter", ! gsl_odeiv_step_name (step)); ! break; ! } ! ! steps++; } ! /* err_target is target error of one step. Test if stepper has made ! larger error than (tolerance factor times) the number of steps ! times the err_target */ ! for (i = 0; i < sys->dimension; i++) { ! gsl_test_abs (y[i], yfin[i], factor * e->count * err_target, ! "%s %s evolve(%d)", ! gsl_odeiv_step_name (step), desc, i); } gsl_odeiv_evolve_free (e); + gsl_odeiv_control_free (c); + gsl_odeiv_step_free (step); } ! int ! sys_driver (const gsl_odeiv_step_type * T, ! const gsl_odeiv_system * sys, ! double t0, double t1, double hstart, ! double y[], double epsabs, double epsrel, ! const char desc[]) { + /* This function evolves a system sys with stepper T from t0 to t1. + Step length is varied via error control with possibly different + absolute and relative error tolerances. + */ + int s = 0; ! int steps = 0; double t = t0; *************** *** 519,563 **** gsl_odeiv_control *c = ! gsl_odeiv_control_standard_new (0.0, err_target, 1.0, 1.0); gsl_odeiv_evolve *e = gsl_odeiv_evolve_alloc (sys->dimension); while (t < t1) { ! gsl_odeiv_evolve_apply (e, c, step, sys, &t, t1, &h, y); ! /* printf ("SYS t = %.18e h = %g y0 = %g y1= %g\n", t, h, y[0], y[1]); */ ! } ! frac = fabs ((y[1] - yfin[1]) / yfin[1]) + fabs ((y[0] - yfin[0]) / yfin[0]); ! if (frac > 2.0 * e->count * err_target) ! { ! printf ("SYS t = %.5e h = %g y0 = %g y1= %g\n", t, h, y[0], y[1]); ! s++; } ! gsl_test (s, "%s, %s, evolve, standard control, relative error = %g", ! gsl_odeiv_step_name (step), desc, frac); gsl_odeiv_evolve_free (e); gsl_odeiv_control_free (c); gsl_odeiv_step_free (step); } void test_evolve_exp (const gsl_odeiv_step_type * T, double h, double err) { double y[2]; double yfin[2]; y[0] = 1.0; ! y[1] = 1.0; ! yfin[0] = exp (10.0); ! yfin[1] = yfin[0]; ! test_evolve_system (T, &rhs_func_exp, 0.0, 10.0, h, y, yfin, err, "exp [0,10]"); } void ! test_evolve_sin (const gsl_odeiv_step_type * T, double h, double err) { double y[2]; --- 645,922 ---- gsl_odeiv_control *c = ! gsl_odeiv_control_standard_new (epsabs, epsrel, 1.0, 0.0); gsl_odeiv_evolve *e = gsl_odeiv_evolve_alloc (sys->dimension); while (t < t1) { ! s = gsl_odeiv_evolve_apply (e, c, step, sys, &t, t1, &h, y); ! if (s != GSL_SUCCESS) ! { ! gsl_test(s, "sys_driver: %s evolve_apply returned %d", ! gsl_odeiv_step_name (step), s); ! break; ! } ! ! if (steps > 1e7) ! { ! gsl_test(GSL_EMAXITER, ! "sys_driver: %s evolve_apply reached maxiter at t=%g", ! gsl_odeiv_step_name (step), t); ! s = GSL_EMAXITER; ! break; ! } ! steps++; } ! gsl_test(s, "%s %s [%g,%g], %d steps completed", ! gsl_odeiv_step_name (step), desc, t0, t1, steps); gsl_odeiv_evolve_free (e); gsl_odeiv_control_free (c); gsl_odeiv_step_free (step); + + return s; } + void + test_compare_vanderpol (void) + { + /* Compares output of van Der Pol oscillator with several steppers */ + + /* system dimension */ + const size_t sd = 2; + + const gsl_odeiv_step_type *steppers[20]; + const gsl_odeiv_step_type **T; + + /* Required error tolerance for each stepper. */ + double err_target[20]; + + /* number of ODE solvers */ + const size_t ns = 11; + + /* initial values for each ode-solver */ + double y[11][2]; + double *yp = &y[0][0]; + + size_t i, j, k; + int status = 0; + + /* Parameters for the problem and stepper */ + const double start = 0.0; + const double end = 100.0; + const double epsabs = 1e-8; + const double epsrel = 1e-8; + const double initstepsize = 1e-5; + + /* Initialize */ + + steppers[0] = gsl_odeiv_step_rk2; + err_target[0] = 1e-6; + steppers[1] = gsl_odeiv_step_rk4; + err_target[1] = 1e-6; + steppers[2] = gsl_odeiv_step_rkf45; + err_target[2] = 1e-6; + steppers[3] = gsl_odeiv_step_rkck; + err_target[3] = 1e-6; + steppers[4] = gsl_odeiv_step_rk8pd; + err_target[4] = 1e-6; + steppers[5] = gsl_odeiv_step_rk2imp; + err_target[5] = 1e-5; + steppers[6] = gsl_odeiv_step_rk2simp; + err_target[6] = 1e-5; + steppers[7] = gsl_odeiv_step_rk4imp; + err_target[7] = 1e-6; + steppers[8] = gsl_odeiv_step_bsimp; + err_target[8] = 1e-7; + steppers[9] = gsl_odeiv_step_gear1; + err_target[9] = 1e-2; + steppers[10] = gsl_odeiv_step_gear2; + err_target[10] = 1e-6; + steppers[11] = 0; + + T = steppers; + + for (i = 0; i < ns; i++) + { + y[i][0] = 1.0; + y[i][1] = 0.0; + } + + /* Call each solver for the problem */ + + i = 0; + while (*T != 0) + { + { + int s = sys_driver (*T, &rhs_func_vanderpol, + start, end, initstepsize, &yp[i], + epsabs, epsrel, "vanderpol"); + if (s != GSL_SUCCESS) + { + status++; + } + } + + T++; + i += sd; + } + + if (status != GSL_SUCCESS) + { + return; + } + + /* Compare results */ + + T = steppers; + + for (i = 0; i < ns; i++) + for (j = i+1; j < ns; j++) + for (k = 0; k < sd; k++) + { + const double val1 = yp[sd * i + k]; + const double val2 = yp[sd * j + k]; + gsl_test_abs (val1, val2, + ( GSL_MAX(err_target[i], err_target[j]) ), + "%s/%s vanderpol", + T[i]->name, T[j]->name); + } + + } + + void + test_compare_oregonator (void) + { + /* Compares output of the Oregonator with several steppers */ + + /* system dimension */ + const size_t sd = 3; + + const gsl_odeiv_step_type *steppers[20]; + const gsl_odeiv_step_type **T; + + /* Required error tolerance for each stepper. */ + double err_target[20]; + + /* number of ODE solvers */ + const size_t ns = 2; + + /* initial values for each ode-solver */ + double y[2][3]; + double *yp = &y[0][0]; + + size_t i, j, k; + int status = 0; + + /* Parameters for the problem and stepper */ + const double start = 0.0; + const double end = 360.0; + const double epsabs = 1e-8; + const double epsrel = 1e-8; + const double initstepsize = 1e-5; + + /* Initialize */ + + steppers[0] = gsl_odeiv_step_rk2simp; + err_target[0] = 1e-6; + steppers[1] = gsl_odeiv_step_bsimp; + err_target[1] = 1e-6; + steppers[2] = 0; + + T = steppers; + + for (i = 0; i < ns; i++) + { + y[i][0] = 1.0; + y[i][1] = 2.0; + y[i][2] = 3.0; + } + + /* Call each solver for the problem */ + + i = 0; + while (*T != 0) + { + { + int s = sys_driver (*T, &rhs_func_oregonator, + start, end, initstepsize, &yp[i], + epsabs, epsrel, "oregonator"); + + if (s != GSL_SUCCESS) + { + status++; + } + } + + T++; + i += sd; + } + + if (status != GSL_SUCCESS) + { + return; + } + + /* Compare results */ + + T = steppers; + + for (i = 0; i < ns; i++) + for (j = i+1; j < ns; j++) + for (k = 0; k < sd; k++) + { + const double val1 = yp[sd * i + k]; + const double val2 = yp[sd * j + k]; + gsl_test_rel (val1, val2, + ( GSL_MAX(err_target[i], err_target[j]) ), + "%s/%s oregonator", + T[i]->name, T[j]->name); + } + + } + + void + test_evolve_linear (const gsl_odeiv_step_type * T, double h, double err) + { + double y[1]; + double yfin[1]; + + y[0] = 1.0; + yfin[0] = 9.0; + test_evolve_system (T, &rhs_func_lin, 0.0, 4.0, h, y, yfin, err, + "linear[0,4]"); + } void test_evolve_exp (const gsl_odeiv_step_type * T, double h, double err) { + double y[1]; + double yfin[1]; + + y[0] = 1.0; + yfin[0] = exp (2.0); + test_evolve_system (T, &rhs_func_exp, 0.0, 2.0, h, y, yfin, err, + "exp[0,2]"); + } + + void + test_evolve_sin (const gsl_odeiv_step_type * T, double h, double err) + { double y[2]; double yfin[2]; y[0] = 1.0; ! y[1] = 0.0; ! yfin[0] = cos (2.0); ! yfin[1] = sin (2.0); ! test_evolve_system (T, &rhs_func_sin, 0.0, 2.0, h, y, yfin, err, ! "sine[0,2]"); } void ! test_evolve_xsin (const gsl_odeiv_step_type * T, double h, double err) { double y[2]; *************** *** 568,574 **** yfin[0] = cos (2.0); yfin[1] = sin (2.0); ! test_evolve_system (T, &rhs_func_sin, 0.0, 2.0, h, y, yfin, err, "sine [0,2]"); } void test_evolve_stiff1 (const gsl_odeiv_step_type * T, double h, double err) --- 927,935 ---- yfin[0] = cos (2.0); yfin[1] = sin (2.0); ! test_evolve_system (T, &rhs_func_xsin, 0.0, 2.0, h, y, yfin, err, ! "sine[0,2] w/errors"); } + void test_evolve_stiff1 (const gsl_odeiv_step_type * T, double h, double err) *************** *** 587,591 **** } test_evolve_system (T, &rhs_func_stiff, 0.0, 1.0, h, y, yfin, err, ! "stiff [0,1]"); } --- 948,952 ---- } test_evolve_system (T, &rhs_func_stiff, 0.0, 1.0, h, y, yfin, err, ! "stiff[0,1]"); } *************** *** 606,614 **** } test_evolve_system (T, &rhs_func_stiff, 0.0, 5.0, h, y, yfin, err, ! "stiff [0,5]"); } - int main (void) --- 967,974 ---- } test_evolve_system (T, &rhs_func_stiff, 0.0, 5.0, h, y, yfin, err, ! "stiff[0,5]"); } int main (void) *************** *** 624,647 **** p[0].type = gsl_odeiv_step_rk2; ! p[0].h = 1.0e-03; ! p[1].type = gsl_odeiv_step_rk2imp; ! p[1].h = 1.0e-03; ! p[2].type = gsl_odeiv_step_rk4; ! p[2].h = 1.0e-03; ! p[3].type = gsl_odeiv_step_rk4imp; ! p[3].h = 1.0e-03; ! p[4].type = gsl_odeiv_step_rkf45; ! p[4].h = 1.0e-03; ! p[5].type = gsl_odeiv_step_rk8pd; ! p[5].h = 1.0e-03; ! p[6].type = gsl_odeiv_step_rkck; ! p[6].h = 1.0e-03; ! p[7].type = gsl_odeiv_step_bsimp; ! p[7].h = 0.1; ! p[8].type = gsl_odeiv_step_gear1; ! p[8].h = 1.0e-03; ! p[9].type = gsl_odeiv_step_gear2; ! p[9].h = 1.0e-03; ! p[10].type = 0; gsl_ieee_env_setup (); --- 984,1009 ---- p[0].type = gsl_odeiv_step_rk2; ! p[0].h = 1.0e-3; ! p[1].type = gsl_odeiv_step_rk4; ! p[1].h = 1.0e-3; ! p[2].type = gsl_odeiv_step_rkf45; ! p[2].h = 1.0e-3; ! p[3].type = gsl_odeiv_step_rkck; ! p[3].h = 1.0e-3; ! p[4].type = gsl_odeiv_step_rk8pd; ! p[4].h = 1.0e-3; ! p[5].type = gsl_odeiv_step_rk2imp; ! p[5].h = 1.0e-3; ! p[6].type = gsl_odeiv_step_rk2simp; ! p[6].h = 1.0e-3; ! p[7].type = gsl_odeiv_step_rk4imp; ! p[7].h = 1.0e-3; ! p[8].type = gsl_odeiv_step_bsimp; ! p[8].h = 1.0e-3; ! p[9].type = gsl_odeiv_step_gear1; ! p[9].h = 1.0e-3; ! p[10].type = gsl_odeiv_step_gear2; ! p[10].h = 1.0e-3; ! p[11].type = 0; gsl_ieee_env_setup (); *************** *** 649,671 **** for (i = 0; p[i].type != 0; i++) { ! test_stepper_err (p[i].type, p[i].h, GSL_SQRT_DBL_EPSILON); } - for (i = 0; p[i].type != 0; i++) { ! test_stepper_linear (p[i].type, p[i].h, GSL_SQRT_DBL_EPSILON); ! test_stepper_sin (p[i].type, p[i].h / 10.0, GSL_SQRT_DBL_EPSILON); ! test_stepper_exp (p[i].type, p[i].h / 10.0, GSL_SQRT_DBL_EPSILON); ! test_stepper_stiff (p[i].type, p[i].h / 10.0, GSL_SQRT_DBL_EPSILON); } ! for (i = 0; p[i].type != 0; i++) ! { ! test_evolve_exp (p[i].type, p[i].h, GSL_SQRT_DBL_EPSILON); ! test_evolve_sin (p[i].type, p[i].h, GSL_SQRT_DBL_EPSILON); ! test_evolve_stiff1 (p[i].type, p[i].h, 1e-5); ! test_evolve_stiff5 (p[i].type, p[i].h, 1e-5); ! } exit (gsl_test_summary ()); --- 1011,1029 ---- for (i = 0; p[i].type != 0; i++) { ! test_stepper(p[i].type); } for (i = 0; p[i].type != 0; i++) { ! test_evolve_linear (p[i].type, p[i].h, 1e-10); ! test_evolve_exp (p[i].type, p[i].h, 1e-6); ! test_evolve_sin (p[i].type, p[i].h, 1e-8); ! test_evolve_xsin (p[i].type, p[i].h, 1e-8); ! test_evolve_stiff1 (p[i].type, p[i].h, 1e-7); ! test_evolve_stiff5 (p[i].type, p[i].h, 1e-7); } ! test_compare_vanderpol(); ! test_compare_oregonator(); exit (gsl_test_summary ()); diff -rc2P -x *.info -x *.info-* gsl-1.5/permutation/Makefile.am gsl-1.6/permutation/Makefile.am *** gsl-1.5/permutation/Makefile.am Sun Jul 27 10:54:19 2003 --- gsl-1.6/permutation/Makefile.am Sat Sep 11 14:45:51 2004 *************** *** 9,13 **** noinst_HEADERS = permute_source.c ! TESTS = test check_PROGRAMS = test --- 9,13 ---- noinst_HEADERS = permute_source.c ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/permutation/Makefile.in gsl-1.6/permutation/Makefile.in *** gsl-1.5/permutation/Makefile.in Thu Jun 24 11:49:51 2004 --- gsl-1.6/permutation/Makefile.in Fri Dec 31 15:15:36 2004 *************** *** 151,155 **** noinst_HEADERS = permute_source.c ! TESTS = test check_PROGRAMS = test --- 151,155 ---- noinst_HEADERS = permute_source.c ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/poly/Makefile.am gsl-1.6/poly/Makefile.am *** gsl-1.5/poly/Makefile.am Sun Jul 27 10:54:19 2003 --- gsl-1.6/poly/Makefile.am Sat Sep 11 14:45:52 2004 *************** *** 9,13 **** noinst_HEADERS = balance.c companion.c norm.c qr.c ! TESTS = test check_PROGRAMS = test --- 9,13 ---- noinst_HEADERS = balance.c companion.c norm.c qr.c ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/poly/Makefile.in gsl-1.6/poly/Makefile.in *** gsl-1.5/poly/Makefile.in Thu Jun 24 11:49:51 2004 --- gsl-1.6/poly/Makefile.in Fri Dec 31 15:15:36 2004 *************** *** 151,155 **** noinst_HEADERS = balance.c companion.c norm.c qr.c ! TESTS = test check_PROGRAMS = test --- 151,155 ---- noinst_HEADERS = balance.c companion.c norm.c qr.c ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/qrng/Makefile.am gsl-1.6/qrng/Makefile.am *** gsl-1.5/qrng/Makefile.am Sun Jul 27 10:54:19 2003 --- gsl-1.6/qrng/Makefile.am Sat Sep 11 14:45:52 2004 *************** *** 7,11 **** libgslqrng_la_SOURCES = gsl_qrng.h qrng.c niederreiter-2.c sobol.c ! TESTS = test check_PROGRAMS = test --- 7,11 ---- libgslqrng_la_SOURCES = gsl_qrng.h qrng.c niederreiter-2.c sobol.c ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/qrng/Makefile.in gsl-1.6/qrng/Makefile.in *** gsl-1.5/qrng/Makefile.in Thu Jun 24 11:49:52 2004 --- gsl-1.6/qrng/Makefile.in Fri Dec 31 15:15:37 2004 *************** *** 149,153 **** libgslqrng_la_SOURCES = gsl_qrng.h qrng.c niederreiter-2.c sobol.c ! TESTS = test check_PROGRAMS = test --- 149,153 ---- libgslqrng_la_SOURCES = gsl_qrng.h qrng.c niederreiter-2.c sobol.c ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/randist/Makefile.am gsl-1.6/randist/Makefile.am *** gsl-1.5/randist/Makefile.am Sun Jul 27 10:49:48 2003 --- gsl-1.6/randist/Makefile.am Sat Sep 11 14:45:52 2004 *************** *** 7,11 **** libgslrandist_la_SOURCES = bernoulli.c beta.c bigauss.c binomial.c cauchy.c chisq.c dirichlet.c discrete.c erlang.c exponential.c exppow.c fdist.c flat.c gamma.c gauss.c gausstail.c geometric.c gumbel.c hyperg.c laplace.c levy.c logarithmic.c logistic.c lognormal.c multinomial.c nbinomial.c pareto.c pascal.c poisson.c rayleigh.c shuffle.c sphere.c tdist.c weibull.c landau.c binomial_tpe.c ! TESTS = test check_PROGRAMS = test --- 7,11 ---- libgslrandist_la_SOURCES = bernoulli.c beta.c bigauss.c binomial.c cauchy.c chisq.c dirichlet.c discrete.c erlang.c exponential.c exppow.c fdist.c flat.c gamma.c gauss.c gausstail.c geometric.c gumbel.c hyperg.c laplace.c levy.c logarithmic.c logistic.c lognormal.c multinomial.c nbinomial.c pareto.c pascal.c poisson.c rayleigh.c shuffle.c sphere.c tdist.c weibull.c landau.c binomial_tpe.c ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/randist/Makefile.in gsl-1.6/randist/Makefile.in *** gsl-1.5/randist/Makefile.in Thu Jun 24 11:49:52 2004 --- gsl-1.6/randist/Makefile.in Fri Dec 31 15:15:37 2004 *************** *** 149,153 **** libgslrandist_la_SOURCES = bernoulli.c beta.c bigauss.c binomial.c cauchy.c chisq.c dirichlet.c discrete.c erlang.c exponential.c exppow.c fdist.c flat.c gamma.c gauss.c gausstail.c geometric.c gumbel.c hyperg.c laplace.c levy.c logarithmic.c logistic.c lognormal.c multinomial.c nbinomial.c pareto.c pascal.c poisson.c rayleigh.c shuffle.c sphere.c tdist.c weibull.c landau.c binomial_tpe.c ! TESTS = test check_PROGRAMS = test --- 149,153 ---- libgslrandist_la_SOURCES = bernoulli.c beta.c bigauss.c binomial.c cauchy.c chisq.c dirichlet.c discrete.c erlang.c exponential.c exppow.c fdist.c flat.c gamma.c gauss.c gausstail.c geometric.c gumbel.c hyperg.c laplace.c levy.c logarithmic.c logistic.c lognormal.c multinomial.c nbinomial.c pareto.c pascal.c poisson.c rayleigh.c shuffle.c sphere.c tdist.c weibull.c landau.c binomial_tpe.c ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/randist/TODO gsl-1.6/randist/TODO *** gsl-1.5/randist/TODO Tue Jun 4 22:59:02 2002 --- gsl-1.6/randist/TODO Mon Oct 11 15:34:23 2004 *************** *** 41,44 **** --- 41,45 ---- parameters (e.g. negative variance etc). Not sure what to do though, since returning an error code is not possible. Maybe just return zero. + We should return NAN in this case, and for the CDFs. * Add the triangular distribution. diff -rc2P -x *.info -x *.info-* gsl-1.5/rng/Makefile.am gsl-1.6/rng/Makefile.am *** gsl-1.5/rng/Makefile.am Sun Jul 27 10:54:19 2003 --- gsl-1.6/rng/Makefile.am Sat Sep 11 14:45:53 2004 *************** *** 14,18 **** test_LDADD = libgslrng.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ! TESTS = test check_PROGRAMS = test --- 14,18 ---- test_LDADD = libgslrng.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/rng/Makefile.in gsl-1.6/rng/Makefile.in *** gsl-1.5/rng/Makefile.in Thu Jun 24 11:49:53 2004 --- gsl-1.6/rng/Makefile.in Fri Dec 31 15:15:38 2004 *************** *** 156,160 **** test_LDADD = libgslrng.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ! TESTS = test check_PROGRAMS = test subdir = rng --- 156,160 ---- test_LDADD = libgslrng.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test subdir = rng diff -rc2P -x *.info -x *.info-* gsl-1.5/roots/Makefile.am gsl-1.6/roots/Makefile.am *** gsl-1.5/roots/Makefile.am Sun Jul 27 10:49:48 2003 --- gsl-1.6/roots/Makefile.am Sat Sep 11 14:45:54 2004 *************** *** 13,17 **** check_PROGRAMS = test ! TESTS = test test_SOURCES = test.c test_funcs.c test.h --- 13,17 ---- check_PROGRAMS = test ! TESTS = $(check_PROGRAMS) test_SOURCES = test.c test_funcs.c test.h diff -rc2P -x *.info -x *.info-* gsl-1.5/roots/Makefile.in gsl-1.6/roots/Makefile.in *** gsl-1.5/roots/Makefile.in Thu Jun 24 11:49:53 2004 --- gsl-1.6/roots/Makefile.in Fri Dec 31 15:15:38 2004 *************** *** 156,160 **** check_PROGRAMS = test ! TESTS = test test_SOURCES = test.c test_funcs.c test.h --- 156,160 ---- check_PROGRAMS = test ! TESTS = $(check_PROGRAMS) test_SOURCES = test.c test_funcs.c test.h diff -rc2P -x *.info -x *.info-* gsl-1.5/siman/Makefile.am gsl-1.6/siman/Makefile.am *** gsl-1.5/siman/Makefile.am Sun Jul 27 10:54:19 2003 --- gsl-1.6/siman/Makefile.am Sat Sep 11 14:45:55 2004 *************** *** 1,8 **** ## Process this file with automake to produce Makefile.in ! check_PROGRAMS = test siman_tsp noinst_LTLIBRARIES = libgslsiman.la ! TESTS = test EXTRA_DIST = siman_test_driver.sh --- 1,9 ---- ## Process this file with automake to produce Makefile.in ! check_PROGRAMS = test ! noinst_PROGRAMS = siman_tsp noinst_LTLIBRARIES = libgslsiman.la ! TESTS = $(check_PROGRAMS) EXTRA_DIST = siman_test_driver.sh *************** *** 16,23 **** libgslsiman_la_SOURCES = siman.c - pkginclude_HEADERS = gsl_siman.h INCLUDES= -I$(top_builddir) - check_INCLUDES = -I. -I../rng -I../err --- 17,22 ---- diff -rc2P -x *.info -x *.info-* gsl-1.5/siman/Makefile.in gsl-1.6/siman/Makefile.in *** gsl-1.5/siman/Makefile.in Thu Jun 24 11:49:54 2004 --- gsl-1.6/siman/Makefile.in Fri Dec 31 15:15:39 2004 *************** *** 142,149 **** target_alias = @target_alias@ ! check_PROGRAMS = test siman_tsp noinst_LTLIBRARIES = libgslsiman.la ! TESTS = test EXTRA_DIST = siman_test_driver.sh --- 142,150 ---- target_alias = @target_alias@ ! check_PROGRAMS = test ! noinst_PROGRAMS = siman_tsp noinst_LTLIBRARIES = libgslsiman.la ! TESTS = $(check_PROGRAMS) EXTRA_DIST = siman_test_driver.sh *************** *** 157,165 **** libgslsiman_la_SOURCES = siman.c - pkginclude_HEADERS = gsl_siman.h INCLUDES = -I$(top_builddir) - check_INCLUDES = -I. -I../rng -I../err subdir = siman --- 158,164 ---- *************** *** 174,178 **** am_libgslsiman_la_OBJECTS = siman.lo libgslsiman_la_OBJECTS = $(am_libgslsiman_la_OBJECTS) ! check_PROGRAMS = test$(EXEEXT) siman_tsp$(EXEEXT) am_siman_tsp_OBJECTS = siman_tsp.$(OBJEXT) siman_tsp_OBJECTS = $(am_siman_tsp_OBJECTS) --- 173,180 ---- am_libgslsiman_la_OBJECTS = siman.lo libgslsiman_la_OBJECTS = $(am_libgslsiman_la_OBJECTS) ! check_PROGRAMS = test$(EXEEXT) ! noinst_PROGRAMS = siman_tsp$(EXEEXT) ! PROGRAMS = $(noinst_PROGRAMS) ! am_siman_tsp_OBJECTS = siman_tsp.$(OBJEXT) siman_tsp_OBJECTS = $(am_siman_tsp_OBJECTS) *************** *** 233,236 **** --- 235,245 ---- rm -f $$p $$f ; \ done + + clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done siman_tsp$(EXEEXT): $(siman_tsp_OBJECTS) $(siman_tsp_DEPENDENCIES) @rm -f siman_tsp$(EXEEXT) *************** *** 445,449 **** $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am ! all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: --- 454,458 ---- $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am ! all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) installdirs: *************** *** 477,481 **** clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ ! clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am --- 486,490 ---- clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ ! clean-noinstLTLIBRARIES clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am *************** *** 523,535 **** .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool \ ! clean-noinstLTLIBRARIES ctags distclean distclean-compile \ ! distclean-generic distclean-libtool distclean-tags distdir dvi \ ! dvi-am info info-am install install-am install-data \ ! install-data-am install-exec install-exec-am install-info \ ! install-info-am install-man install-pkgincludeHEADERS \ ! install-strip installcheck installcheck-am installdirs \ ! maintainer-clean maintainer-clean-generic mostlyclean \ ! mostlyclean-compile mostlyclean-generic mostlyclean-libtool pdf \ ! pdf-am ps ps-am tags uninstall uninstall-am uninstall-info-am \ uninstall-pkgincludeHEADERS --- 532,545 ---- .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool \ ! clean-noinstLTLIBRARIES clean-noinstPROGRAMS ctags distclean \ ! distclean-compile distclean-generic distclean-libtool \ ! distclean-tags distdir dvi dvi-am info info-am install \ ! install-am install-data install-data-am install-exec \ ! install-exec-am install-info install-info-am install-man \ ! install-pkgincludeHEADERS install-strip installcheck \ ! installcheck-am installdirs maintainer-clean \ ! maintainer-clean-generic mostlyclean mostlyclean-compile \ ! mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ ! tags uninstall uninstall-am uninstall-info-am \ uninstall-pkgincludeHEADERS diff -rc2P -x *.info -x *.info-* gsl-1.5/sort/Makefile.am gsl-1.6/sort/Makefile.am *** gsl-1.5/sort/Makefile.am Sun Jul 27 10:54:19 2003 --- gsl-1.6/sort/Makefile.am Sat Sep 11 14:45:55 2004 *************** *** 8,12 **** noinst_HEADERS = sortvec_source.c sortvecind_source.c subset_source.c subsetind_source.c test_source.c test_heapsort.c ! TESTS = test check_PROGRAMS = test --- 8,12 ---- noinst_HEADERS = sortvec_source.c sortvecind_source.c subset_source.c subsetind_source.c test_source.c test_heapsort.c ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/sort/Makefile.in gsl-1.6/sort/Makefile.in *** gsl-1.5/sort/Makefile.in Thu Jun 24 11:49:55 2004 --- gsl-1.6/sort/Makefile.in Fri Dec 31 15:15:39 2004 *************** *** 150,154 **** noinst_HEADERS = sortvec_source.c sortvecind_source.c subset_source.c subsetind_source.c test_source.c test_heapsort.c ! TESTS = test check_PROGRAMS = test --- 150,154 ---- noinst_HEADERS = sortvec_source.c sortvecind_source.c subset_source.c subsetind_source.c test_source.c test_heapsort.c ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/specfunc/ChangeLog gsl-1.6/specfunc/ChangeLog *** gsl-1.5/specfunc/ChangeLog Sun Jun 6 16:47:36 2004 --- gsl-1.6/specfunc/ChangeLog Wed Dec 29 16:41:26 2004 *************** *** 1,2 **** --- 1,30 ---- + 2004-12-29 Brian Gough + + * dilog.c (gsl_sf_complex_dilog_e): use const consistently in + arguments of declaration and definition + (gsl_sf_complex_dilog_xy_e): as above + + 2004-12-26 Brian Gough + + * gamma_inc.c (gamma_inc_D): improve error estimate for case of + u=x/a to include cancellation errors and only use it when x < 0.5*a + since the cancellation errors are significant for x/a ~ 1 + + 2004-12-23 Brian Gough + + * gsl_sf_coupling.h: fixed declaration to + gsl_sf_coupling_6j_INCORRECT instead of + gsl_sf_coupling_INCORRECT_6j + + 2004-11-12 Brian Gough + + * psi.c (gsl_sf_psi_1): added missing function definition + gsl_sf_psi_1 + + 2004-10-11 Brian Gough + + * expint.c (gsl_sf_expint_Ei_scaled): fixed call to incorrect + function gsl_sf_expint_Ei_e + 2004-06-03 Brian Gough diff -rc2P -x *.info -x *.info-* gsl-1.5/specfunc/Makefile.am gsl-1.6/specfunc/Makefile.am *** gsl-1.5/specfunc/Makefile.am Sun Jul 27 10:49:48 2003 --- gsl-1.6/specfunc/Makefile.am Sat Sep 11 14:45:56 2004 *************** *** 9,13 **** libgslspecfunc_la_SOURCES = airy.c airy_der.c airy_zero.c atanint.c bessel.c bessel.h bessel_I0.c bessel_I1.c bessel_In.c bessel_Inu.c bessel_J0.c bessel_J1.c bessel_Jn.c bessel_Jnu.c bessel_K0.c bessel_K1.c bessel_Kn.c bessel_Knu.c bessel_Y0.c bessel_Y1.c bessel_Yn.c bessel_Ynu.c bessel_amp_phase.c bessel_amp_phase.h bessel_i.c bessel_j.c bessel_k.c bessel_olver.c bessel_temme.c bessel_y.c bessel_zero.c bessel_sequence.c beta.c beta_inc.c clausen.c coulomb.c coupling.c coulomb_bound.c dawson.c debye.c dilog.c elementary.c ellint.c elljac.c erfc.c exp.c expint.c expint3.c fermi_dirac.c gegenbauer.c gamma.c gamma_inc.c hyperg_0F1.c hyperg_2F0.c hyperg_1F1.c hyperg_2F1.c hyperg_U.c hyperg.c laguerre.c lambert.c legendre_H3d.c legendre_Qn.c legendre_con.c legendre_poly.c log.c poch.c pow_int.c psi.c recurse.h result.c shint.c sinint.c synchrotron.c transport.c trig.c zeta.c ! TESTS = test check_PROGRAMS = test --- 9,13 ---- libgslspecfunc_la_SOURCES = airy.c airy_der.c airy_zero.c atanint.c bessel.c bessel.h bessel_I0.c bessel_I1.c bessel_In.c bessel_Inu.c bessel_J0.c bessel_J1.c bessel_Jn.c bessel_Jnu.c bessel_K0.c bessel_K1.c bessel_Kn.c bessel_Knu.c bessel_Y0.c bessel_Y1.c bessel_Yn.c bessel_Ynu.c bessel_amp_phase.c bessel_amp_phase.h bessel_i.c bessel_j.c bessel_k.c bessel_olver.c bessel_temme.c bessel_y.c bessel_zero.c bessel_sequence.c beta.c beta_inc.c clausen.c coulomb.c coupling.c coulomb_bound.c dawson.c debye.c dilog.c elementary.c ellint.c elljac.c erfc.c exp.c expint.c expint3.c fermi_dirac.c gegenbauer.c gamma.c gamma_inc.c hyperg_0F1.c hyperg_2F0.c hyperg_1F1.c hyperg_2F1.c hyperg_U.c hyperg.c laguerre.c lambert.c legendre_H3d.c legendre_Qn.c legendre_con.c legendre_poly.c log.c poch.c pow_int.c psi.c recurse.h result.c shint.c sinint.c synchrotron.c transport.c trig.c zeta.c ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/specfunc/Makefile.in gsl-1.6/specfunc/Makefile.in *** gsl-1.5/specfunc/Makefile.in Thu Jun 24 11:49:55 2004 --- gsl-1.6/specfunc/Makefile.in Fri Dec 31 15:15:40 2004 *************** *** 151,155 **** libgslspecfunc_la_SOURCES = airy.c airy_der.c airy_zero.c atanint.c bessel.c bessel.h bessel_I0.c bessel_I1.c bessel_In.c bessel_Inu.c bessel_J0.c bessel_J1.c bessel_Jn.c bessel_Jnu.c bessel_K0.c bessel_K1.c bessel_Kn.c bessel_Knu.c bessel_Y0.c bessel_Y1.c bessel_Yn.c bessel_Ynu.c bessel_amp_phase.c bessel_amp_phase.h bessel_i.c bessel_j.c bessel_k.c bessel_olver.c bessel_temme.c bessel_y.c bessel_zero.c bessel_sequence.c beta.c beta_inc.c clausen.c coulomb.c coupling.c coulomb_bound.c dawson.c debye.c dilog.c elementary.c ellint.c elljac.c erfc.c exp.c expint.c expint3.c fermi_dirac.c gegenbauer.c gamma.c gamma_inc.c hyperg_0F1.c hyperg_2F0.c hyperg_1F1.c hyperg_2F1.c hyperg_U.c hyperg.c laguerre.c lambert.c legendre_H3d.c legendre_Qn.c legendre_con.c legendre_poly.c log.c poch.c pow_int.c psi.c recurse.h result.c shint.c sinint.c synchrotron.c transport.c trig.c zeta.c ! TESTS = test check_PROGRAMS = test --- 151,155 ---- libgslspecfunc_la_SOURCES = airy.c airy_der.c airy_zero.c atanint.c bessel.c bessel.h bessel_I0.c bessel_I1.c bessel_In.c bessel_Inu.c bessel_J0.c bessel_J1.c bessel_Jn.c bessel_Jnu.c bessel_K0.c bessel_K1.c bessel_Kn.c bessel_Knu.c bessel_Y0.c bessel_Y1.c bessel_Yn.c bessel_Ynu.c bessel_amp_phase.c bessel_amp_phase.h bessel_i.c bessel_j.c bessel_k.c bessel_olver.c bessel_temme.c bessel_y.c bessel_zero.c bessel_sequence.c beta.c beta_inc.c clausen.c coulomb.c coupling.c coulomb_bound.c dawson.c debye.c dilog.c elementary.c ellint.c elljac.c erfc.c exp.c expint.c expint3.c fermi_dirac.c gegenbauer.c gamma.c gamma_inc.c hyperg_0F1.c hyperg_2F0.c hyperg_1F1.c hyperg_2F1.c hyperg_U.c hyperg.c laguerre.c lambert.c legendre_H3d.c legendre_Qn.c legendre_con.c legendre_poly.c log.c poch.c pow_int.c psi.c recurse.h result.c shint.c sinint.c synchrotron.c transport.c trig.c zeta.c ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/specfunc/dilog.c gsl-1.6/specfunc/dilog.c *** gsl-1.5/specfunc/dilog.c Fri Jul 25 16:18:15 2003 --- gsl-1.6/specfunc/dilog.c Wed Dec 29 16:41:26 2004 *************** *** 1,5 **** /* specfunc/dilog.c * ! * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman * * This program is free software; you can redistribute it and/or modify --- 1,5 ---- /* specfunc/dilog.c * ! * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman * * This program is free software; you can redistribute it and/or modify *************** *** 36,40 **** static int ! dilog_series(const double x, gsl_sf_result * result) { const int kmax = 1000; --- 36,40 ---- static int ! dilog_series_1(const double x, gsl_sf_result * result) { const int kmax = 1000; *************** *** 43,47 **** int k; for(k=2; k= 0.0 */ static --- 61,134 ---- ! /* Compute the associated series ! * ! * sum_{k=1}{infty} r^k / (k^2 (k+1)) ! * ! * This is a series which appears in the one-step accelerated ! * method, which splits out one elementary function from the ! * full definition of Li_2(x). See below. ! */ ! static int ! series_2(double r, gsl_sf_result * result) ! { ! static const int kmax = 100; ! double rk = r; ! double sum = 0.5 * r; ! int k; ! for(k=2; k<10; k++) ! { ! double ds; ! rk *= r; ! ds = rk/(k*k*(k+1.0)); ! sum += ds; ! } ! for(; kval = sum; ! result->err = 2.0 * kmax * GSL_DBL_EPSILON * fabs(sum); ! ! return GSL_SUCCESS; ! } ! ! ! /* Compute Li_2(x) using the accelerated series representation. ! * ! * Li_2(x) = 1 + (1-x)ln(1-x)/x + series_2(x) ! * ! * assumes: -1 < x < 1 ! */ ! static int ! dilog_series_2(double x, gsl_sf_result * result) ! { ! const int stat_s3 = series_2(x, result); ! double t; ! if(x > 0.01) ! t = (1.0 - x) * log(1.0-x) / x; ! else ! { ! static const double c3 = 1.0/3.0; ! static const double c4 = 1.0/4.0; ! static const double c5 = 1.0/5.0; ! static const double c6 = 1.0/6.0; ! static const double c7 = 1.0/7.0; ! static const double c8 = 1.0/8.0; ! const double t68 = c6 + x*(c7 + x*c8); ! const double t38 = c3 + x *(c4 + x *(c5 + x * t68)); ! t = (x - 1.0) * (1.0 + x*(0.5 + x*t38)); ! } ! result->val += 1.0 + t; ! result->err += 2.0 * GSL_DBL_EPSILON * fabs(t); ! return stat_s3; ! } ! ! ! /* Calculates Li_2(x) for real x. Assumes x >= 0.0. */ static *************** *** 68,77 **** { if(x > 2.0) { - const double log_x = log(x); gsl_sf_result ser; ! int stat_ser = dilog_series(1.0/x, &ser); ! double t1 = M_PI*M_PI/3.0; ! double t2 = ser.val; ! double t3 = 0.5*log_x*log_x; result->val = t1 - t2 - t3; result->err = GSL_DBL_EPSILON * fabs(log_x) + ser.err; --- 137,146 ---- { if(x > 2.0) { gsl_sf_result ser; ! const int stat_ser = dilog_series_2(1.0/x, &ser); ! const double log_x = log(x); ! const double t1 = M_PI*M_PI/3.0; ! const double t2 = ser.val; ! const double t3 = 0.5*log_x*log_x; result->val = t1 - t2 - t3; result->err = GSL_DBL_EPSILON * fabs(log_x) + ser.err; *************** *** 81,91 **** } else if(x > 1.01) { const double log_x = log(x); const double log_term = log_x * (log(1.0-1.0/x) + 0.5*log_x); ! gsl_sf_result ser; ! int stat_ser = dilog_series(1.0 - 1.0/x, &ser); ! double t1 = M_PI*M_PI/6.0; ! double t2 = ser.val; ! double t3 = log_term; result->val = t1 + t2 - t3; result->err = GSL_DBL_EPSILON * fabs(log_x) + ser.err; --- 150,160 ---- } else if(x > 1.01) { + gsl_sf_result ser; + const int stat_ser = dilog_series_2(1.0 - 1.0/x, &ser); const double log_x = log(x); const double log_term = log_x * (log(1.0-1.0/x) + 0.5*log_x); ! const double t1 = M_PI*M_PI/6.0; ! const double t2 = ser.val; ! const double t3 = log_term; result->val = t1 + t2 - t3; result->err = GSL_DBL_EPSILON * fabs(log_x) + ser.err; *************** *** 117,126 **** } else if(x > 0.5) { - const double log_x = log(x); gsl_sf_result ser; ! int stat_ser = dilog_series(1.0-x, &ser); ! double t1 = M_PI*M_PI/6.0; ! double t2 = ser.val; ! double t3 = log_x*log(1.0-x); result->val = t1 - t2 - t3; result->err = GSL_DBL_EPSILON * fabs(log_x) + ser.err; --- 186,195 ---- } else if(x > 0.5) { gsl_sf_result ser; ! const int stat_ser = dilog_series_2(1.0-x, &ser); ! const double log_x = log(x); ! const double t1 = M_PI*M_PI/6.0; ! const double t2 = ser.val; ! const double t3 = log_x*log(1.0-x); result->val = t1 - t2 - t3; result->err = GSL_DBL_EPSILON * fabs(log_x) + ser.err; *************** *** 129,134 **** return stat_ser; } else if(x > 0.0) { ! return dilog_series(x, result); } else { --- 198,206 ---- return stat_ser; } + else if(x > 0.25) { + return dilog_series_2(x, result); + } else if(x > 0.0) { ! return dilog_series_1(x, result); } else { *************** *** 147,159 **** * arg(z) = theta * ! * Assumes 0 < r < 1. */ static int ! dilogc_series_1(double r, double cos_theta, double sin_theta, ! gsl_sf_result * real_result, gsl_sf_result * imag_result) { ! double alpha = 1.0 - cos_theta; ! double beta = sin_theta; double ck = cos_theta; double sk = sin_theta; --- 219,239 ---- * arg(z) = theta * ! * Assumes 0 < r < 1. ! * It is used only for small r. */ static int ! dilogc_series_1( ! const double r, ! const double x, ! const double y, ! gsl_sf_result * real_result, ! gsl_sf_result * imag_result ! ) { ! const double cos_theta = x/r; ! const double sin_theta = y/r; ! const double alpha = 1.0 - cos_theta; ! const double beta = sin_theta; double ck = cos_theta; double sk = sin_theta; *************** *** 161,173 **** double real_sum = r*ck; double imag_sum = r*sk; ! int kmax = 50 + (int)(22.0/(-log(r))); /* tuned for double-precision */ int k; for(k=2; kval = real_sum; + sum_re->err = 2.0 * kmax * GSL_DBL_EPSILON * fabs(real_sum); + sum_im->val = imag_sum; + sum_im->err = 2.0 * kmax * GSL_DBL_EPSILON * fabs(imag_sum); + + return GSL_SUCCESS; + } + + + /* Compute Li_2(z) using the one-step accelerated series. + * + * Li_2(z) = 1 + (1-z)ln(1-z)/z + series_2_c(z) + * + * z = r exp(i theta) + * assumes: r < 1 + * assumes: r > epsilon, so that we take no special care with log(1-z) + */ + static + int + dilogc_series_2( + const double r, + const double x, + const double y, + gsl_sf_result * real_dl, + gsl_sf_result * imag_dl + ) + { + if(r == 0.0) + { + real_dl->val = 0.0; + imag_dl->val = 0.0; + real_dl->err = 0.0; + imag_dl->err = 0.0; + return GSL_SUCCESS; + } + else + { + gsl_sf_result sum_re; + gsl_sf_result sum_im; + const int stat_s3 = series_2_c(r, x, y, &sum_re, &sum_im); + + /* t = ln(1-z)/z */ + gsl_sf_result ln_omz_r; + gsl_sf_result ln_omz_theta; + const int stat_log = gsl_sf_complex_log_e(1.0-x, -y, &ln_omz_r, &ln_omz_theta); + const double t_x = ( ln_omz_r.val * x + ln_omz_theta.val * y)/(r*r); + const double t_y = (-ln_omz_r.val * y + ln_omz_theta.val * x)/(r*r); + + /* r = (1-z) ln(1-z)/z */ + const double r_x = (1.0 - x) * t_x + y * t_y; + const double r_y = (1.0 - x) * t_y - y * t_x; + + real_dl->val = sum_re.val + r_x + 1.0; + imag_dl->val = sum_im.val + r_y; + real_dl->err = sum_re.err + 2.0*GSL_DBL_EPSILON*(fabs(real_dl->val) + fabs(r_x)); + imag_dl->err = sum_im.err + 2.0*GSL_DBL_EPSILON*(fabs(imag_dl->val) + fabs(r_y)); + return GSL_ERROR_SELECT_2(stat_s3, stat_log); + } + } + + /* Evaluate a series for Li_2(z) when |z| is near 1. * This is uniformly good away from z=1. *************** *** 197,210 **** * H_5(t) = 1/2 (2 + c)/(1-c)^2 * H_6(t) = I/2 s/(1-c)^5 (8(1-c) - s^2 (3 + c)) - * - * assumes: 0 <= theta <= 2Pi */ static int ! dilogc_series_2(double r, double theta, double cos_theta, double sin_theta, ! gsl_sf_result * real_result, gsl_sf_result * imag_result) { ! double a = log(r); ! double omc = 1.0 - cos_theta; double H_re[7]; double H_im[7]; --- 384,404 ---- * H_5(t) = 1/2 (2 + c)/(1-c)^2 * H_6(t) = I/2 s/(1-c)^5 (8(1-c) - s^2 (3 + c)) */ static int ! dilogc_series_3( ! const double r, ! const double x, ! const double y, ! gsl_sf_result * real_result, ! gsl_sf_result * imag_result ! ) { ! const double theta = atan2(y, x); ! const double cos_theta = x/r; ! const double sin_theta = y/r; ! const double a = log(r); ! const double omc = 1.0 - cos_theta; ! const double omc2 = omc*omc; double H_re[7]; double H_im[7]; *************** *** 228,239 **** H_re[4] = 0.0; ! H_im[4] = -0.5*sin_theta/(omc*omc); ! H_re[5] = 0.5 * (2.0 + cos_theta)/(omc*omc); H_im[5] = 0.0; H_re[6] = 0.0; ! H_im[6] = 0.5 * sin_theta/(omc*omc*omc*omc*omc) ! * (8*omc - sin_theta*sin_theta*(3 + cos_theta)); sum_re = H_re[0]; --- 422,432 ---- H_re[4] = 0.0; ! H_im[4] = -0.5*sin_theta/omc2; ! H_re[5] = 0.5 * (2.0 + cos_theta)/omc2; H_im[5] = 0.0; H_re[6] = 0.0; ! H_im[6] = 0.5 * sin_theta/(omc2*omc2*omc) * (8.0*omc - sin_theta*sin_theta*(3.0 + cos_theta)); sum_re = H_re[0]; *************** *** 259,349 **** ! /* complex dilogarithm in the unit disk ! * assumes: r < 1 and 0 <= theta <= 2Pi */ static int ! dilogc_unitdisk(double r, double theta, gsl_sf_result * real_dl, gsl_sf_result * imag_dl) { ! const double zeta2 = M_PI*M_PI/6.0; ! int stat_dilog; ! gsl_sf_result cos_theta; ! gsl_sf_result sin_theta; ! int stat_cos = gsl_sf_cos_e(theta, &cos_theta); ! int stat_sin = gsl_sf_sin_e(theta, &sin_theta); ! gsl_sf_result x; ! gsl_sf_result y; ! gsl_sf_result x_tmp, y_tmp, r_tmp; ! gsl_sf_result result_re_tmp, result_im_tmp; ! double cos_theta_tmp; ! double sin_theta_tmp; ! x.val = r * cos_theta.val; ! x.err = r * cos_theta.err; ! y.val = r * sin_theta.val; ! y.err = r * sin_theta.err; ! ! /* Reflect away from z = 1 if ! * we are too close. ! */ ! if(x.val > 0.5) { ! x_tmp.val = 1.0 - x.val; ! x_tmp.err = GSL_DBL_EPSILON * (1.0 + fabs(x.val)) + x.err; ! y_tmp.val = -y.val; ! y_tmp.err = y.err; ! r_tmp.val = sqrt(x_tmp.val*x_tmp.val + y_tmp.val*y_tmp.val); ! r_tmp.err = (x_tmp.err*fabs(x_tmp.val) + y_tmp.err*fabs(y_tmp.val))/fabs(r_tmp.val); ! } ! else { ! x_tmp.val = x.val; ! x_tmp.err = x.err; ! y_tmp.val = y.val; ! y_tmp.err = y.err; ! r_tmp.val = r; ! r_tmp.err = r * GSL_DBL_EPSILON; ! } ! ! cos_theta_tmp = x_tmp.val / r_tmp.val; ! sin_theta_tmp = y_tmp.val / r_tmp.val; ! ! /* Calculate dilog of the transformed variable. ! */ ! if(r_tmp.val < 0.98) { ! stat_dilog = dilogc_series_1(r_tmp.val, cos_theta_tmp, sin_theta_tmp, ! &result_re_tmp, &result_im_tmp ! ); ! } ! else { ! double theta_tmp = atan2(y_tmp.val, x_tmp.val); ! stat_dilog = dilogc_series_2(r_tmp.val, theta_tmp, cos_theta_tmp, sin_theta_tmp, ! &result_re_tmp, &result_im_tmp ! ); ! } ! /* Unwind reflection if necessary. ! * ! * Li2(z) = -Li2(1-z) + zeta(2) - ln(z) ln(1-z) ! */ ! if(x.val > 0.5) { ! double lnz = log(r); /* log(|z|) */ ! double lnomz = log(r_tmp.val); /* log(|1-z|) */ ! double argz = theta; /* arg(z) */ ! double argomz = atan2(y_tmp.val, x_tmp.val); /* arg(1-z) */ real_dl->val = -result_re_tmp.val + zeta2 - lnz*lnomz + argz*argomz; real_dl->err = result_re_tmp.err; ! real_dl->err += GSL_DBL_EPSILON * (zeta2 + fabs(lnz*lnomz) + fabs(argz*argomz)); ! real_dl->err += 2.0 * GSL_DBL_EPSILON * fabs(real_dl->val); imag_dl->val = -result_im_tmp.val - argz*lnomz - argomz*lnz; imag_dl->err = result_im_tmp.err; ! imag_dl->err += GSL_DBL_EPSILON * (fabs(argz*lnomz) + fabs(argomz*lnz)); ! imag_dl->err += 2.0 * GSL_DBL_EPSILON * fabs(imag_dl->val); } ! else { ! real_dl->val = result_re_tmp.val; ! real_dl->err = result_re_tmp.err; ! imag_dl->val = result_im_tmp.val; ! imag_dl->err = result_im_tmp.err; } - - return GSL_ERROR_SELECT_3(stat_dilog, stat_sin, stat_cos); } --- 452,528 ---- ! /* Calculate complex dilogarithm Li_2(z) in the fundamental region, ! * which we take to be the intersection of the unit disk with the ! * half-space x < MAGIC_SPLIT_VALUE. It turns out that 0.732 is a ! * nice choice for MAGIC_SPLIT_VALUE since then points mapped out ! * of the x > MAGIC_SPLIT_VALUE region and into another part of the ! * unit disk are bounded in radius by MAGIC_SPLIT_VALUE itself. ! * ! * If |z| < 0.98 we use a direct series summation. Otherwise z is very ! * near the unit circle, and the series_2 expansion is used; see above. ! * Because the fundamental region is bounded away from z = 1, this ! * works well. */ static int ! dilogc_fundamental(double r, double x, double y, gsl_sf_result * real_dl, gsl_sf_result * imag_dl) { ! if(r > 0.98) ! return dilogc_series_3(r, x, y, real_dl, imag_dl); ! else if(r > 0.25) ! return dilogc_series_2(r, x, y, real_dl, imag_dl); ! else ! return dilogc_series_1(r, x, y, real_dl, imag_dl); ! } ! ! /* Compute Li_2(z) for z in the unit disk, |z| < 1. If z is outside ! * the fundamental region, which means that it is too close to z = 1, ! * then it is reflected into the fundamental region using the identity ! * ! * Li2(z) = -Li2(1-z) + zeta(2) - ln(z) ln(1-z). ! */ ! static ! int ! dilogc_unitdisk(double x, double y, gsl_sf_result * real_dl, gsl_sf_result * imag_dl) ! { ! static const double MAGIC_SPLIT_VALUE = 0.732; ! static const double zeta2 = M_PI*M_PI/6.0; ! const double r = sqrt(x*x + y*y); ! ! if(x > MAGIC_SPLIT_VALUE) ! { ! /* Reflect away from z = 1 if we are too close. The magic value ! * insures that the reflected value of the radius satisfies the ! * related inequality r_tmp < MAGIC_SPLIT_VALUE. ! */ ! const double x_tmp = 1.0 - x; ! const double y_tmp = - y; ! const double r_tmp = sqrt(x_tmp*x_tmp + y_tmp*y_tmp); ! /* const double cos_theta_tmp = x_tmp/r_tmp; */ ! /* const double sin_theta_tmp = y_tmp/r_tmp; */ ! ! gsl_sf_result result_re_tmp; ! gsl_sf_result result_im_tmp; ! ! const int stat_dilog = dilogc_fundamental(r_tmp, x_tmp, y_tmp, &result_re_tmp, &result_im_tmp); ! ! const double lnz = log(r); /* log(|z|) */ ! const double lnomz = log(r_tmp); /* log(|1-z|) */ ! const double argz = atan2(y, x); /* arg(z) assuming principal branch */ ! const double argomz = atan2(y_tmp, x_tmp); /* arg(1-z) */ real_dl->val = -result_re_tmp.val + zeta2 - lnz*lnomz + argz*argomz; real_dl->err = result_re_tmp.err; ! real_dl->err += 2.0 * GSL_DBL_EPSILON * (zeta2 + fabs(lnz*lnomz) + fabs(argz*argomz)); imag_dl->val = -result_im_tmp.val - argz*lnomz - argomz*lnz; imag_dl->err = result_im_tmp.err; ! imag_dl->err += 2.0 * GSL_DBL_EPSILON * (fabs(argz*lnomz) + fabs(argomz*lnz)); ! ! return stat_dilog; } ! else ! { ! return dilogc_fundamental(r, x, y, real_dl, imag_dl); } } *************** *** 356,361 **** gsl_sf_dilog_e(const double x, gsl_sf_result * result) { - /* CHECK_POINTER(result) */ - if(x >= 0.0) { return dilog_xge0(x, result); --- 535,538 ---- *************** *** 374,503 **** int ! gsl_sf_complex_dilog_e(const double r, double theta, ! gsl_sf_result * real_dl, gsl_sf_result * imag_dl) { ! /* CHECK_POINTER(real_dl) */ ! /* CHECK_POINTER(imag_dl) */ ! if(r == 0.0) { ! real_dl->val = 0.0; ! real_dl->err = 0.0; ! imag_dl->val = 0.0; ! imag_dl->err = 0.0; ! return GSL_SUCCESS; } ! /* ! if(theta < 0.0 || theta > 2.0*M_PI) { ! gsl_sf_angle_restrict_pos_e(&theta); ! } ! */ ! ! /* Trap cases of real-valued argument. ! */ ! if(theta == 0.0) { ! int stat_d; ! imag_dl->val = ( r > 1.0 ? -M_PI * log(r) : 0.0 ); ! imag_dl->err = 2.0 * GSL_DBL_EPSILON * fabs(imag_dl->val); ! stat_d = gsl_sf_dilog_e(r, real_dl); ! return stat_d; } ! if(theta == M_PI) { ! int stat_d; ! imag_dl->val = 0.0; ! imag_dl->err = 0.0; ! stat_d = gsl_sf_dilog_e(-r, real_dl); ! return stat_d; ! } ! ! /* Trap unit circle case. ! */ ! if(r == 1.0) { ! gsl_sf_result theta_restrict; ! int stat_r = gsl_sf_angle_restrict_pos_err_e(theta, &theta_restrict); ! int stat_c; ! const double term1 = theta_restrict.val*theta_restrict.val; ! const double term2 = 2.0*M_PI*fabs(theta_restrict.val); ! const double term1_err = 2.0 * fabs(theta_restrict.val * theta_restrict.err); ! const double term2_err = 2.0*M_PI*fabs(theta_restrict.err); ! real_dl->val = M_PI*M_PI/6.0 + 0.25*(term1 - term2); ! real_dl->err = 2.0 * GSL_DBL_EPSILON * (M_PI*M_PI/6.0 + 0.25 * (fabs(term1) + fabs(term2))); ! real_dl->err += 0.25 * (term1_err + term2_err); ! real_dl->err += 2.0 * GSL_DBL_EPSILON * fabs(real_dl->val); ! stat_c = gsl_sf_clausen_e(theta, imag_dl); ! stat_r = 0; /* discard restrict status */ ! return stat_c; } ! ! /* Generic case. ! */ { ! int stat_dilog; ! double r_tmp, theta_tmp; gsl_sf_result result_re_tmp, result_im_tmp; ! /* Reduce argument to unit disk. ! */ ! if(r > 1.0) { ! r_tmp = 1.0 / r; ! theta_tmp = /* 2.0*M_PI */ - theta; ! } ! else { ! r_tmp = r; ! theta_tmp = theta; ! } ! /* Calculate in the unit disk. ! */ ! stat_dilog = dilogc_unitdisk(r_tmp, theta_tmp, ! &result_re_tmp, &result_im_tmp ! ); ! ! /* Unwind the inversion if necessary. We calculate ! * the imaginary part explicitly if using the inversion ! * because there is no simple relationship between ! * arg(1-z) and arg(1 - 1/z), which is the "omega" ! * term in [Lewin A.2.5 (1)]. */ ! if(r > 1.0) { ! const double zeta2 = M_PI*M_PI/6.0; ! double x = r * cos(theta); ! double y = r * sin(theta); ! double omega = atan2(y, 1.0-x); ! double lnr = log(r); ! double pmt = M_PI - theta; ! gsl_sf_result Cl_a, Cl_b, Cl_c; ! double r1, r2, r3, r4, r5; ! int stat_c1 = gsl_sf_clausen_e(2.0*omega, &Cl_a); ! int stat_c2 = gsl_sf_clausen_e(2.0*theta, &Cl_b); ! int stat_c3 = gsl_sf_clausen_e(2.0*(omega+theta), &Cl_c); ! int stat_c = GSL_ERROR_SELECT_3(stat_c1, stat_c2, stat_c3); ! r1 = -result_re_tmp.val; ! r2 = -0.5*lnr*lnr; ! r3 = 0.5*pmt*pmt; ! r4 = -zeta2; ! r5 = omega*lnr; ! real_dl->val = r1 + r2 + r3 + r4; ! real_dl->err = result_re_tmp.err; ! real_dl->err += GSL_DBL_EPSILON * (fabs(r1) + fabs(r2) + fabs(r3) + fabs(r4)); ! real_dl->err += 2.0 * GSL_DBL_EPSILON * fabs(real_dl->val); ! imag_dl->val = r5 + 0.5*(Cl_a.val + Cl_b.val - Cl_c.val); ! imag_dl->err = GSL_DBL_EPSILON * fabs(r5); ! imag_dl->err += GSL_DBL_EPSILON * 0.5*(fabs(Cl_a.val) + fabs(Cl_b.val) + fabs(Cl_c.val)); ! imag_dl->err += 0.5*(Cl_a.err + Cl_b.err + Cl_c.err); ! imag_dl->err += 2.0*GSL_DBL_EPSILON * fabs(imag_dl->val); ! return GSL_ERROR_SELECT_2(stat_dilog, stat_c); ! } ! else { ! real_dl->val = result_re_tmp.val; ! real_dl->err = result_re_tmp.err; ! imag_dl->val = result_im_tmp.val; ! imag_dl->err = result_im_tmp.err; ! return stat_dilog; ! } } } /*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ --- 551,656 ---- int ! gsl_sf_complex_dilog_xy_e( ! const double x, ! const double y, ! gsl_sf_result * real_dl, ! gsl_sf_result * imag_dl ! ) { ! const double zeta2 = M_PI*M_PI/6.0; ! const double r2 = x*x + y*y; ! if(y == 0.0) ! { ! if(x >= 1.0) ! { ! imag_dl->val = -M_PI * log(x); ! imag_dl->err = 2.0 * GSL_DBL_EPSILON * fabs(imag_dl->val); ! } ! else ! { ! imag_dl->val = 0.0; ! imag_dl->err = 0.0; ! } ! return gsl_sf_dilog_e(x, real_dl); } + else if(fabs(r2 - 1.0) < GSL_DBL_EPSILON) + { + /* Lewin A.2.4.1 and A.2.4.2 */ ! const double theta = atan2(y, x); ! const double term1 = theta*theta/4.0; ! const double term2 = M_PI*fabs(theta)/2.0; ! real_dl->val = zeta2 + term1 - term2; ! real_dl->err = 2.0 * GSL_DBL_EPSILON * (zeta2 + term1 + term2); ! return gsl_sf_clausen_e(theta, imag_dl); } ! else if(r2 < 1.0) ! { ! return dilogc_unitdisk(x, y, real_dl, imag_dl); } ! else { ! /* Reduce argument to unit disk. */ ! const double r = sqrt(r2); ! const double x_tmp = x/r2; ! const double y_tmp = -y/r2; ! /* const double r_tmp = 1.0/r; */ gsl_sf_result result_re_tmp, result_im_tmp; ! const int stat_dilog = ! dilogc_unitdisk(x_tmp, y_tmp, &result_re_tmp, &result_im_tmp); ! /* Unwind the inversion. ! * ! * Li_2(z) + Li_2(1/z) = -zeta(2) - 1/2 ln(-z)^2 */ ! const double theta = atan2(y, x); ! const double theta_abs = fabs(theta); ! const double theta_sgn = ( theta < 0.0 ? -1.0 : 1.0 ); ! const double ln_minusz_re = log(r); ! const double ln_minusz_im = theta_sgn * (theta_abs - M_PI); ! const double lmz2_re = ln_minusz_re*ln_minusz_re - ln_minusz_im*ln_minusz_im; ! const double lmz2_im = 2.0*ln_minusz_re*ln_minusz_im; ! real_dl->val = -result_re_tmp.val - 0.5 * lmz2_re - zeta2; ! real_dl->err = result_re_tmp.err + 2.0*GSL_DBL_EPSILON*(0.5 * fabs(lmz2_re) + zeta2); ! imag_dl->val = -result_im_tmp.val - 0.5 * lmz2_im; ! imag_dl->err = result_im_tmp.err + 2.0*GSL_DBL_EPSILON*fabs(lmz2_im); ! return stat_dilog; } } + int + gsl_sf_complex_dilog_e( + const double r, + const double theta, + gsl_sf_result * real_dl, + gsl_sf_result * imag_dl + ) + { + const double cos_theta = cos(theta); + const double sin_theta = sin(theta); + const double x = r * cos_theta; + const double y = r * sin_theta; + return gsl_sf_complex_dilog_xy_e(x, y, real_dl, imag_dl); + } + + + int + gsl_sf_complex_spence_xy_e( + const double x, + const double y, + gsl_sf_result * real_sp, + gsl_sf_result * imag_sp + ) + { + const double oms_x = 1.0 - x; + const double oms_y = - y; + return gsl_sf_complex_dilog_xy_e(oms_x, oms_y, real_sp, imag_sp); + } + + + /*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ *************** *** 508,510 **** EVAL_RESULT(gsl_sf_dilog_e(x, &result)); } - --- 661,662 ---- diff -rc2P -x *.info -x *.info-* gsl-1.5/specfunc/expint.c gsl-1.6/specfunc/expint.c *** gsl-1.5/specfunc/expint.c Fri Jul 25 16:18:15 2003 --- gsl-1.6/specfunc/expint.c Mon Oct 11 15:34:44 2004 *************** *** 511,514 **** double gsl_sf_expint_Ei_scaled(const double x) { ! EVAL_RESULT(gsl_sf_expint_Ei_e(x, &result)); } --- 511,514 ---- double gsl_sf_expint_Ei_scaled(const double x) { ! EVAL_RESULT(gsl_sf_expint_Ei_scaled_e(x, &result)); } diff -rc2P -x *.info -x *.info-* gsl-1.5/specfunc/gamma_inc.c gsl-1.6/specfunc/gamma_inc.c *** gsl-1.5/specfunc/gamma_inc.c Fri Jul 25 16:18:15 2003 --- gsl-1.6/specfunc/gamma_inc.c Sun Dec 26 18:22:13 2004 *************** *** 1,16 **** /* specfunc/gamma_inc.c ! * * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman ! * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. ! * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. ! * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software --- 1,16 ---- /* specfunc/gamma_inc.c ! * * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman ! * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. ! * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. ! * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software *************** *** 51,58 **** gsl_sf_result ln_term; double term1; ! if (x < a) { ! double u = x/a; ! ln_term.val = log(u) - u + 1.0; ! ln_term.err = ln_term.val * GSL_DBL_EPSILON; } else { double mu = (x-a)/a; --- 51,59 ---- gsl_sf_result ln_term; double term1; ! if (x < 0.5*a) { ! double u = x/a; ! double ln_u = log(u); ! ln_term.val = ln_u - u + 1.0; ! ln_term.err = (fabs(ln_u) + fabs(u) + 1.0) * GSL_DBL_EPSILON; } else { double mu = (x-a)/a; *************** *** 66,70 **** return GSL_SUCCESS; } ! } --- 67,71 ---- return GSL_SUCCESS; } ! } *************** *** 137,141 **** /* Uniform asymptotic for x near a, a and x large. * See [Temme, p. 285] - * FIXME: need c1 coefficient */ static --- 138,141 ---- *************** *** 155,169 **** double c0, c1; ! gsl_sf_erfc_e(eta*M_SQRT2*rta, &erfc); if(fabs(eps) < GSL_ROOT5_DBL_EPSILON) { c0 = -1.0/3.0 + eps*(1.0/12.0 - eps*(23.0/540.0 - eps*(353.0/12960.0 - eps*589.0/30240.0))); ! c1 = 0.0; } else { ! double rt_term; ! rt_term = sqrt(-2.0 * ln_term.val/(eps*eps)); c0 = (1.0 - 1.0/rt_term)/eps; ! c1 = 0.0; } --- 155,173 ---- double c0, c1; ! /* This used to say erfc(eta*M_SQRT2*rta), which is wrong. ! * The sqrt(2) is in the denominator. Oops. ! * Fixed: [GJ] Mon Nov 15 13:25:32 MST 2004 ! */ ! gsl_sf_erfc_e(eta*rta/M_SQRT2, &erfc); if(fabs(eps) < GSL_ROOT5_DBL_EPSILON) { c0 = -1.0/3.0 + eps*(1.0/12.0 - eps*(23.0/540.0 - eps*(353.0/12960.0 - eps*589.0/30240.0))); ! c1 = -1.0/540.0 - eps/288.0; } else { ! const double rt_term = sqrt(-2.0 * ln_term.val/(eps*eps)); ! const double lam = x/a; c0 = (1.0 - 1.0/rt_term)/eps; ! c1 = -(eta*eta*eta * (lam*lam + 10.0*lam + 1.0) - 12.0 * eps*eps*eps) / (12.0 * eta*eta*eta*eps*eps*eps); } *************** *** 202,206 **** int n; ! /* n == 1 has a_1, b_1, b_0 independent of a,x, so that has been done by hand */ for ( n = 2 ; n < nmax ; n++ ) --- 206,210 ---- int n; ! /* n == 1 has a_1, b_1, b_0 independent of a,x, so that has been done by hand */ for ( n = 2 ; n < nmax ; n++ ) *************** *** 243,247 **** * Hans E. Plesser, 2002-01-22 (hans dot plesser at itf dot nlh dot no): * ! * Since the Gautschi equivalent series method for CF evaluation may lead * to singularities, I have replaced it with the modified Lentz algorithm * given in --- 247,251 ---- * Hans E. Plesser, 2002-01-22 (hans dot plesser at itf dot nlh dot no): * ! * Since the Gautschi equivalent series method for CF evaluation may lead * to singularities, I have replaced it with the modified Lentz algorithm * given in *************** *** 251,256 **** * J Computational Physics 64:490-509 (1986) * ! * In consequence, gamma_inc_Q_CF_protected() is now obsolete and has been ! * removed. * * Identification of terms between the above equation for F(a, x) and --- 255,260 ---- * J Computational Physics 64:490-509 (1986) * ! * In consequence, gamma_inc_Q_CF_protected() is now obsolete and has been ! * removed. * * Identification of terms between the above equation for F(a, x) and *************** *** 373,377 **** if(fabs(t/sum) < GSL_DBL_EPSILON) break; } ! if(n == nmax) stat_sum = GSL_EMAXITER; --- 377,381 ---- if(fabs(t/sum) < GSL_DBL_EPSILON) break; } ! if(n == nmax) stat_sum = GSL_EMAXITER; *************** *** 492,496 **** * the function is rapidly decreasing for * x large and x > a, and it will just ! * underflow in that region anyway. We * catch that case in the standard * large-x method. --- 496,500 ---- * the function is rapidly decreasing for * x large and x > a, and it will just ! * underflow in that region anyway. We * catch that case in the standard * large-x method. *************** *** 503,507 **** } else { ! if(a < 0.8*x) { /* Continued fraction again. The convergence * is a little slower here, but that is fine. --- 507,511 ---- } else { ! if(0.8*a < x) { /* Continued fraction again. The convergence * is a little slower here, but that is fine. *************** *** 591,595 **** int gsl_sf_gamma_inc_e(const double a, const double x, gsl_sf_result * result) ! { if(x < 0.0) { DOMAIN_ERROR(result); --- 595,599 ---- int gsl_sf_gamma_inc_e(const double a, const double x, gsl_sf_result * result) ! { if(x < 0.0) { DOMAIN_ERROR(result); diff -rc2P -x *.info -x *.info-* gsl-1.5/specfunc/gsl_sf_coupling.h gsl-1.6/specfunc/gsl_sf_coupling.h *** gsl-1.5/specfunc/gsl_sf_coupling.h Fri Jul 25 16:18:22 2003 --- gsl-1.6/specfunc/gsl_sf_coupling.h Fri Dec 24 13:58:24 2004 *************** *** 115,119 **** gsl_sf_result * result ); ! double gsl_sf_coupling_INCORRECT_6j(int two_ja, int two_jb, int two_jc, int two_jd, int two_je, int two_jf ); --- 115,119 ---- gsl_sf_result * result ); ! double gsl_sf_coupling_6j_INCORRECT(int two_ja, int two_jb, int two_jc, int two_jd, int two_je, int two_jf ); diff -rc2P -x *.info -x *.info-* gsl-1.5/specfunc/gsl_sf_dilog.h gsl-1.6/specfunc/gsl_sf_dilog.h *** gsl-1.5/specfunc/gsl_sf_dilog.h Fri Jul 25 16:18:22 2003 --- gsl-1.6/specfunc/gsl_sf_dilog.h Wed Dec 29 16:41:26 2004 *************** *** 1,5 **** /* specfunc/gsl_sf_dilog.h * ! * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman * * This program is free software; you can redistribute it and/or modify --- 1,5 ---- /* specfunc/gsl_sf_dilog.h * ! * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman * * This program is free software; you can redistribute it and/or modify *************** *** 43,55 **** * Li_2(x) = - Re[ Integrate[ Log[1-s] / s, {s, 0, x}] ] * ! * Note that Im[Li_2(x)] = { 0 for x <= 1, -Pi*log(x) for x > 1 } */ int gsl_sf_dilog_e(const double x, gsl_sf_result * result); ! double gsl_sf_dilog(const double x); /* DiLogarithm(z), for complex argument z = r Exp[i theta]. */ ! int gsl_sf_complex_dilog_e(const double r, double theta, gsl_sf_result * result_re, gsl_sf_result * result_im); --- 43,127 ---- * Li_2(x) = - Re[ Integrate[ Log[1-s] / s, {s, 0, x}] ] * ! * The function in the complex plane has a branch point ! * at z = 1; we place the cut in the conventional way, ! * on [1, +infty). This means that the value for real x > 1 ! * is a matter of definition; however, this choice does not ! * affect the real part and so is not relevant to the ! * interpretation of this implemented function. */ int gsl_sf_dilog_e(const double x, gsl_sf_result * result); ! double gsl_sf_dilog(const double x); ! ! ! /* DiLogarithm(z), for complex argument z = x + i y. ! * Computes the principal branch. ! * ! * Recall that the branch cut is on the real axis with x > 1. ! * The imaginary part of the computed value on the cut is given ! * by -Pi*log(x), which is the limiting value taken approaching ! * from y < 0. This is a conventional choice, though there is no ! * true standardized choice. ! * ! * Note that there is no canonical way to lift the defining ! * contour to the full Riemann surface because of the appearance ! * of a "hidden branch point" at z = 0 on non-principal sheets. ! * Experts will know the simple algebraic prescription for ! * obtaining the sheet they want; non-experts will not want ! * to know anything about it. This is why GSL chooses to compute ! * only on the principal branch. ! */ ! int ! gsl_sf_complex_dilog_xy_e( ! const double x, ! const double y, ! gsl_sf_result * result_re, ! gsl_sf_result * result_im ! ); ! /* DiLogarithm(z), for complex argument z = r Exp[i theta]. + * Computes the principal branch, thereby assuming an + * implicit reduction of theta to the range (-2 pi, 2 pi). + * + * If theta is identically zero, the imaginary part is computed + * as if approaching from y > 0. For other values of theta no + * special consideration is given, since it is assumed that + * no other machine representations of multiples of pi will + * produce y = 0 precisely. This assumption depends on some + * subtle properties of the machine arithmetic, such as + * correct rounding and monotonicity of the underlying + * implementation of sin() and cos(). + * + * This function is ok, but the interface is confusing since + * it makes it appear that the branch structure is resolved. + * Furthermore the handling of values close to the branch + * cut is subtle. Perhap this interface should be deprecated. + */ + int + gsl_sf_complex_dilog_e( + const double r, + const double theta, + gsl_sf_result * result_re, + gsl_sf_result * result_im + ); + + + + /* Spence integral; spence(s) := Li_2(1-s) + * + * This function has a branch point at 0; we place the + * cut on (-infty,0). Because of our choice for the value + * of Li_2(z) on the cut, spence(s) is continuous as + * s approaches the cut from above. In other words, + * we define spence(x) = spence(x + i 0+). */ ! int ! gsl_sf_complex_spence_xy_e( ! const double x, ! const double y, ! gsl_sf_result * real_sp, ! gsl_sf_result * imag_sp ! ); diff -rc2P -x *.info -x *.info-* gsl-1.5/specfunc/legendre_poly.c gsl-1.6/specfunc/legendre_poly.c *** gsl-1.5/specfunc/legendre_poly.c Fri Jul 25 16:18:15 2003 --- gsl-1.6/specfunc/legendre_poly.c Sat Sep 11 14:46:02 2004 *************** *** 120,124 **** else if(l == 2) { result->val = 0.5 * (3.0*x*x - 1.0); ! result->err = 3.0 * GSL_DBL_EPSILON * fabs(result->val); return GSL_SUCCESS; } --- 120,127 ---- else if(l == 2) { result->val = 0.5 * (3.0*x*x - 1.0); ! result->err = GSL_DBL_EPSILON * (fabs(3.0*x*x) + 1.0); ! /*result->err = 3.0 * GSL_DBL_EPSILON * fabs(result->val); ! removed this old bogus estimate [GJ] ! */ return GSL_SUCCESS; } *************** *** 287,295 **** * measures the normalization of this thing. */ ! double dif = l-m; ! double sum = l+m; ! double exp_check = 0.5 * log(2.0*l+1.0) ! + 0.5 * dif * (log(dif)-1.0) ! - 0.5 * sum * (log(sum)-1.0); /* CHECK_POINTER(result) */ --- 290,298 ---- * measures the normalization of this thing. */ ! const double dif = l-m; ! const double sum = l+m; ! const double t_d = ( dif == 0.0 ? 0.0 : 0.5 * dif * (log(dif)-1.0) ); ! const double t_s = ( dif == 0.0 ? 0.0 : 0.5 * sum * (log(sum)-1.0) ); ! const double exp_check = 0.5 * log(2.0*l+1.0) + t_d - t_s; /* CHECK_POINTER(result) */ *************** *** 354,362 **** * measures the normalization of this thing. */ ! double dif = lmax-m; ! double sum = lmax+m; ! double exp_check = 0.5 * log(2.0*lmax+1.0) ! + 0.5 * dif * (log(dif)-1.0) ! - 0.5 * sum * (log(sum)-1.0); /* CHECK_POINTER(result_array) */ --- 357,365 ---- * measures the normalization of this thing. */ ! const double dif = lmax-m; ! const double sum = lmax+m; ! const double t_d = ( dif == 0.0 ? 0.0 : 0.5 * dif * (log(dif)-1.0) ); ! const double t_s = ( dif == 0.0 ? 0.0 : 0.5 * sum * (log(sum)-1.0) ); ! const double exp_check = 0.5 * log(2.0*lmax+1.0) + t_d - t_s; /* CHECK_POINTER(result_array) */ diff -rc2P -x *.info -x *.info-* gsl-1.5/specfunc/psi.c gsl-1.6/specfunc/psi.c *** gsl-1.5/specfunc/psi.c Sun Jun 20 19:41:17 2004 --- gsl-1.6/specfunc/psi.c Fri Nov 12 17:21:45 2004 *************** *** 718,721 **** --- 718,726 ---- } + double gsl_sf_psi_1(const double x) + { + EVAL_RESULT(gsl_sf_psi_1_e(x, &result)); + } + double gsl_sf_psi_n(const int n, const double x) { diff -rc2P -x *.info -x *.info-* gsl-1.5/specfunc/test_dilog.c gsl-1.6/specfunc/test_dilog.c *** gsl-1.5/specfunc/test_dilog.c Fri Jul 25 16:18:15 2003 --- gsl-1.6/specfunc/test_dilog.c Sun Dec 26 18:22:41 2004 *************** *** 1,5 **** /* specfunc/test_dilog.c * ! * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman * * This program is free software; you can redistribute it and/or modify --- 1,5 ---- /* specfunc/test_dilog.c * ! * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman * * This program is free software; you can redistribute it and/or modify *************** *** 47,51 **** TEST_SF(s, gsl_sf_dilog_e, (12.595, &r), 0.00003314826006436236810, TEST_TOL5, GSL_SUCCESS); TEST_SF(s, gsl_sf_dilog_e, (13.0, &r), -0.07806971248458575855, TEST_TOL2, GSL_SUCCESS); ! TEST_SF(s, gsl_sf_dilog_e, (20.0, &r), -1.2479770861745251168, TEST_TOL0, GSL_SUCCESS); TEST_SF(s, gsl_sf_dilog_e, (150.0, &r), -9.270042702348657270, TEST_TOL0, GSL_SUCCESS); TEST_SF(s, gsl_sf_dilog_e, (1100.0, &r), -21.232504073931749553, TEST_TOL0, GSL_SUCCESS); --- 47,51 ---- TEST_SF(s, gsl_sf_dilog_e, (12.595, &r), 0.00003314826006436236810, TEST_TOL5, GSL_SUCCESS); TEST_SF(s, gsl_sf_dilog_e, (13.0, &r), -0.07806971248458575855, TEST_TOL2, GSL_SUCCESS); ! TEST_SF(s, gsl_sf_dilog_e, (20.0, &r), -1.2479770861745251168, TEST_TOL2, GSL_SUCCESS); TEST_SF(s, gsl_sf_dilog_e, (150.0, &r), -9.270042702348657270, TEST_TOL0, GSL_SUCCESS); TEST_SF(s, gsl_sf_dilog_e, (1100.0, &r), -21.232504073931749553, TEST_TOL0, GSL_SUCCESS); *************** *** 53,65 **** /* complex dilog */ - /* FIXME: probably need more tests here... - * also need to work on accuracy for r->1; need to - * adjust the switch-over point I suppose. - */ - - TEST_SF_2(s, gsl_sf_complex_dilog_e, (1.00001, M_PI/2.0, &r1, &r2), - -0.20562022409960237363, TEST_TOL1, - 0.91597344814458309320, TEST_TOL1, - GSL_SUCCESS); TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.99999, M_PI/2.0, &r1, &r2), --- 53,56 ---- *************** *** 78,81 **** --- 69,77 ---- GSL_SUCCESS); + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.98, -M_PI/2.0, &r1, &r2), + -0.19871638377785918403, TEST_TOL2, + -0.90020045882981847610, TEST_TOL2, + GSL_SUCCESS); + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.95, M_PI/2.0, &r1, &r2), -0.18848636456893572091, TEST_TOL1, *************** *** 88,95 **** GSL_SUCCESS); TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.5, M_PI/2.0, &r1, &r2), ! -0.05897507442156586346, TEST_TOL0, ! 0.48722235829452235710, TEST_TOL0, GSL_SUCCESS); --- 84,100 ---- GSL_SUCCESS); + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.8, -M_PI/2.0, &r1, &r2), + -0.13980800855429037810, TEST_TOL0, + -0.75310609092419884460, TEST_TOL0, + GSL_SUCCESS); TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.5, M_PI/2.0, &r1, &r2), ! -0.05897507442156586346, TEST_TOL1, ! 0.48722235829452235710, TEST_TOL1, ! GSL_SUCCESS); ! ! TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.5, -M_PI/2.0, &r1, &r2), ! -0.05897507442156586346, TEST_TOL1, ! -0.48722235829452235710, TEST_TOL1, GSL_SUCCESS); *************** *** 99,102 **** --- 104,170 ---- GSL_SUCCESS); + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.01, -M_PI/2.0, &r1, &r2), + -0.000024999375027776215378, TEST_TOL3, + -0.009999888892888684820, TEST_TOL3, + GSL_SUCCESS); + + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.99, M_PI/4.0, &r1, &r2), + 0.56273366219795547757, TEST_TOL3, + 0.97009284079274560384, TEST_TOL3, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.99, -M_PI/4.0, &r1, &r2), + 0.56273366219795547757, TEST_TOL3, + -0.97009284079274560384, TEST_TOL3, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.99, 3.0*M_PI/4.0, &r1, &r2), + -0.66210902664245926235, TEST_TOL1, + 0.51995305609998319025, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.99, 5.0*M_PI/4.0, &r1, &r2), + -0.66210902664245926235, TEST_TOL1, + -0.51995305609998319025, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.99, 3.0*M_PI/2.0, &r1, &r2), + -0.20215874509123277909, TEST_TOL1, + -0.90809733095648731408, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.25, 3.0*M_PI/2.0, &r1, &r2), + -0.01538741178141053563, TEST_TOL1, + -0.24830175098230686908, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.25, 15.0/8.0*M_PI, &r1, &r2), + 0.24266162342377302235, TEST_TOL1, + -0.10860883369274445067, TEST_TOL1, + GSL_SUCCESS); + + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.99, M_PI/8.0, &r1, &r2), + 1.0571539648820244720, TEST_TOL0, + 0.7469145254610851318, TEST_TOL0, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.99, M_PI/64.0, &r1, &r2), + 1.5381800285902999666, TEST_TOL0, + 0.1825271634987756651, TEST_TOL0, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.99, -M_PI/8.0, &r1, &r2), + 1.05715396488202447202, TEST_TOL1, + -0.74691452546108513176, TEST_TOL1, + GSL_SUCCESS); + + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (1.00001, M_PI/2.0, &r1, &r2), + -0.20562022409960237363, TEST_TOL1, + 0.91597344814458309320, TEST_TOL1, + GSL_SUCCESS); + TEST_SF_2(s, gsl_sf_complex_dilog_e, (10.0, M_PI/2.0, &r1, &r2), -3.0596887943287347304, TEST_TOL0, *************** *** 109,126 **** GSL_SUCCESS); ! TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.99, M_PI/8.0, &r1, &r2), 1.0571539648820244720, TEST_TOL0, 0.7469145254610851318, TEST_TOL0, GSL_SUCCESS); ! TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.99, M_PI/64.0, &r1, &r2), ! 1.5381800285902999666, TEST_TOL0, ! 0.1825271634987756651, TEST_TOL0, GSL_SUCCESS); ! TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.9, 3.0*M_PI/4.0, &r1, &r2), ! -0.6062840301356530985, TEST_TOL1, ! 0.4836632833122775721, TEST_TOL1, GSL_SUCCESS); return s; --- 177,309 ---- GSL_SUCCESS); ! ! /** tests brought up by Jim McElwaine bug report */ ! ! TEST_SF_2(s, gsl_sf_complex_dilog_e, (1.1, -M_PI/2.0, &r1, &r2), ! -0.24099184177382733037, TEST_TOL1, ! -0.99309132538137822631, TEST_TOL1, ! GSL_SUCCESS); ! ! TEST_SF_2(s, gsl_sf_complex_dilog_e, (1.1, 3.0*M_PI/2.0, &r1, &r2), ! -0.24099184177382733037, TEST_TOL1, ! -0.99309132538137822631, TEST_TOL1, ! GSL_SUCCESS); ! ! TEST_SF_2(s, gsl_sf_complex_dilog_e, (1.1, -3.0*M_PI/2.0, &r1, &r2), ! -0.24099184177382733037, TEST_TOL1, ! 0.99309132538137822631, TEST_TOL1, ! GSL_SUCCESS); ! ! TEST_SF_2(s, gsl_sf_complex_dilog_e, (1.1, -M_PI - 0.25*M_PI, &r1, &r2), ! -0.72908565537087935118, TEST_TOL1, ! 0.56225783937234862649, TEST_TOL1, ! GSL_SUCCESS); ! ! TEST_SF_2(s, gsl_sf_complex_dilog_e, (1.1, M_PI + 0.25*M_PI, &r1, &r2), ! -0.72908565537087935118, TEST_TOL1, ! -0.56225783937234862649, TEST_TOL1, ! GSL_SUCCESS); ! ! TEST_SF_2(s, gsl_sf_complex_dilog_e, (1.1, -M_PI/128.0, &r1, &r2), ! 1.8881719454909716580, TEST_TOL1, ! -0.3556738764969238976, TEST_TOL1, ! GSL_SUCCESS); ! ! TEST_SF_2(s, gsl_sf_complex_dilog_e, (1.1, M_PI/128.0, &r1, &r2), ! 1.8881719454909716580, TEST_TOL1, ! 0.3556738764969238976, TEST_TOL1, ! GSL_SUCCESS); ! ! TEST_SF_2(s, gsl_sf_complex_dilog_e, (1.5, M_PI/8.0, &r1, &r2), ! 1.3498525763442498343, TEST_TOL1, ! 1.4976532712229749493, TEST_TOL1, ! GSL_SUCCESS); ! ! TEST_SF_2(s, gsl_sf_complex_dilog_e, (1.5, -M_PI/8.0, &r1, &r2), ! 1.3498525763442498343, TEST_TOL1, ! -1.4976532712229749493, TEST_TOL1, ! GSL_SUCCESS); ! ! TEST_SF_2(s, gsl_sf_complex_dilog_e, (1.5, 2.0*M_PI + M_PI/8.0, &r1, &r2), ! 1.3498525763442498343, TEST_TOL1, ! 1.4976532712229749493, TEST_TOL1, ! GSL_SUCCESS); ! ! TEST_SF_2(s, gsl_sf_complex_dilog_e, (1.5, 2.0*M_PI - M_PI/8.0, &r1, &r2), ! 1.3498525763442498343, TEST_TOL1, ! -1.4976532712229749493, TEST_TOL1, ! GSL_SUCCESS); ! ! ! /* tests of the (x,y) function, which is now the underlying implementation */ ! ! TEST_SF_2(s, gsl_sf_complex_dilog_xy_e, (0.0, 0.5, &r1, &r2), ! -0.05897507442156586346, TEST_TOL1, ! 0.48722235829452235710, TEST_TOL1, ! GSL_SUCCESS); ! ! TEST_SF_2(s, gsl_sf_complex_dilog_xy_e, (0.0, -0.5, &r1, &r2), ! -0.05897507442156586346, TEST_TOL1, ! -0.48722235829452235710, TEST_TOL1, ! GSL_SUCCESS); ! ! TEST_SF_2(s, gsl_sf_complex_dilog_xy_e, (0.91464073718617389108, 0.37885659804143889673, &r1, &r2), 1.0571539648820244720, TEST_TOL0, 0.7469145254610851318, TEST_TOL0, GSL_SUCCESS); ! TEST_SF_2(s, gsl_sf_complex_dilog_xy_e, (0.91464073718617389108, -0.37885659804143889673, &r1, &r2), ! 1.05715396488202447202, TEST_TOL1, ! -0.74691452546108513176, TEST_TOL1, GSL_SUCCESS); ! TEST_SF_2(s, gsl_sf_complex_dilog_xy_e, (-1.5, 0.0, &r1, &r2), ! -1.1473806603755707541, TEST_TOL1, ! 0.0, TEST_TOL1, GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_xy_e, (0.5, 0.0, &r1, &r2), + 0.58224052646501250590, TEST_TOL1, + 0.0, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_xy_e, (1.5, 0.0, &r1, &r2), + 2.3743952702724802007, TEST_TOL1, + -1.2738062049196005309, TEST_TOL1, + GSL_SUCCESS); + + + /* small set of spence tests, mostly to check the value on the cut */ + + TEST_SF_2(s, gsl_sf_complex_spence_xy_e, (1.5, 0.0, &r1, &r2), + -0.44841420692364620244, TEST_TOL1, + 0.0, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_spence_xy_e, (0.5, 0.0, &r1, &r2), + 0.58224052646501250590, TEST_TOL1, + 0.0, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_spence_xy_e, (0.0, 0.0, &r1, &r2), + 1.6449340668482264365, TEST_TOL1, + 0.0, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_spence_xy_e, (-0.5, 0.0, &r1, &r2), + 2.3743952702724802007, TEST_TOL1, + -1.2738062049196005309, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_spence_xy_e, (-0.5, 1.0/1024.0, &r1, &r2), + 2.3723507455234125018, TEST_TOL1, + -1.2742581376517839070, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_spence_xy_e, (-0.5, -1.0/1024.0, &r1, &r2), + 2.3723507455234125018, TEST_TOL1, + 1.2742581376517839070, TEST_TOL1, + GSL_SUCCESS); + return s; diff -rc2P -x *.info -x *.info-* gsl-1.5/specfunc/test_gamma.c gsl-1.6/specfunc/test_gamma.c *** gsl-1.5/specfunc/test_gamma.c Sun Jul 27 09:46:39 2003 --- gsl-1.6/specfunc/test_gamma.c Sun Dec 26 18:22:41 2004 *************** *** 218,221 **** --- 218,229 ---- + /* test suggested by Michel Lespinasse [gsl-discuss Sat, 13 Nov 2004] */ + TEST_SF(s, gsl_sf_gamma_inc_Q_e, (1.0e+06-1.0, 1.0e+06-2.0, &r), 0.50026596175224547004, TEST_TOL3, GSL_SUCCESS); + + /* tests in asymptotic regime related to Lespinasse test */ + TEST_SF(s, gsl_sf_gamma_inc_Q_e, (1.0e+06+2.0, 1.0e+06+1.0, &r), 0.50026596135330304336, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_Q_e, (1.0e+06, 1.0e+06-2.0, &r), 0.50066490399940144811, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_Q_e, (1.0e+07, 1.0e+07-2.0, &r), 0.50021026104978614908, TEST_TOL2, GSL_SUCCESS); + /* non-normalized "Q" function */ TEST_SF(s, gsl_sf_gamma_inc_e, (-1.0/1048576.0, 1.0/1048576.0, &r), 13.285819596290624271, TEST_TOL0, GSL_SUCCESS); diff -rc2P -x *.info -x *.info-* gsl-1.5/statistics/Makefile.am gsl-1.6/statistics/Makefile.am *** gsl-1.5/statistics/Makefile.am Sun Jul 27 10:54:19 2003 --- gsl-1.6/statistics/Makefile.am Sat Sep 11 14:46:03 2004 *************** *** 12,16 **** check_PROGRAMS = test ! TESTS = test test_SOURCES = test.c test_nist.c --- 12,16 ---- check_PROGRAMS = test ! TESTS = $(check_PROGRAMS) test_SOURCES = test.c test_nist.c diff -rc2P -x *.info -x *.info-* gsl-1.5/statistics/Makefile.in gsl-1.6/statistics/Makefile.in *** gsl-1.5/statistics/Makefile.in Thu Jun 24 11:49:56 2004 --- gsl-1.6/statistics/Makefile.in Fri Dec 31 15:15:40 2004 *************** *** 153,157 **** check_PROGRAMS = test ! TESTS = test test_SOURCES = test.c test_nist.c --- 153,157 ---- check_PROGRAMS = test ! TESTS = $(check_PROGRAMS) test_SOURCES = test.c test_nist.c diff -rc2P -x *.info -x *.info-* gsl-1.5/statistics/TODO gsl-1.6/statistics/TODO *** gsl-1.5/statistics/TODO Mon May 8 11:40:23 2000 --- gsl-1.6/statistics/TODO Fri Dec 24 13:55:17 2004 *************** *** 1,2 **** --- 1,73 ---- + * From: James Theiler + To: John Lamb + Cc: gsl-discuss@sources.redhat.com + Subject: Re: Collecting statistics for time dependent data? + Date: Thu, 9 Dec 2004 14:18:36 -0700 (MST) + + On Thu, 9 Dec 2004, John Lamb wrote: + + ] Raimondo Giammanco wrote: + ] > Hello, + ] > + ] > I was wondering if there is a way to compute "running" statistics with + ] > gsl. + ] > + ] Yes you can do it, but there's nothing in GSL that does it and its eay + ] enough that you don't need GSL. Something like (untested) + ] + ] double update_mean( double* mean, int* n, double x ){ + ] if( *n == 1 ) + ] *mean = x; + ] else + ] *mean = (1 - (double)1 / *n ) * *mean + x / n; + ] } + ] + ] will work and you can derive a similar method for updating the variance + ] using the usual textbook formula. + ] + ] var[x] = (1/n) sum x^2_i - mean(x)^2 + ] + ] I don't know if there is a method that avoids the rounding errors. I + ] don't know why so many textbooks repeat this formula without the + ] slightest warning that it can go so badly wrong. + ] + ] + + Stably updating mean and variance is remarkably nontrivial. There was + a series of papers in Comm ACM that discussed the issue; the final one + (that I know of) refers back to the earlier ones, and it can be found + in D.H.D. West, Updating mean and variance estimates: an improved + method, Comm ACM 22:9, 532 (1979) [* I see Luke Stras just sent this + reference! *]. I'll just copy out the pseudocode since the paper is + old enough that it might not be easy to find. This, by the way, is + generalized for weighted data, so it assumes that you get a weight and + a data value (W_i and X_i) that you use to update the estimates XBAR + and S2: + + SUMW = W_1 + M = X_1 + T = 0 + For i=2,3,...,n + { + Q = X_i - M + TEMP = SUM + W_i // typo: He meant SUMW + R = Q*W_i/TEMP + M = M + R + T = T + R*SUMW*Q + SUMW = TEMP + } + XBAR = M + S2 = T*n/((n-1)*SUMW) + + + + jt + + -- + James Theiler Space and Remote Sensing Sciences + MS-B244, ISR-2, LANL Los Alamos National Laboratory + Los Alamos, NM 87545 http://nis-www.lanl.gov/~jt + + * Look at STARPAC ftp://ftp.ucar.edu/starpac/ and Statlib http://lib.stat.cmu.edu/ for more ideas diff -rc2P -x *.info -x *.info-* gsl-1.5/sum/Makefile.am gsl-1.6/sum/Makefile.am *** gsl-1.5/sum/Makefile.am Sun Jul 27 10:49:48 2003 --- gsl-1.6/sum/Makefile.am Sat Sep 11 14:46:04 2004 *************** *** 7,11 **** libgslsum_la_SOURCES = levin_u.c levin_utrunc.c work_u.c work_utrunc.c ! TESTS = test check_PROGRAMS = test --- 7,11 ---- libgslsum_la_SOURCES = levin_u.c levin_utrunc.c work_u.c work_utrunc.c ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/sum/Makefile.in gsl-1.6/sum/Makefile.in *** gsl-1.5/sum/Makefile.in Thu Jun 24 11:49:56 2004 --- gsl-1.6/sum/Makefile.in Fri Dec 31 15:15:41 2004 *************** *** 149,153 **** libgslsum_la_SOURCES = levin_u.c levin_utrunc.c work_u.c work_utrunc.c ! TESTS = test check_PROGRAMS = test --- 149,153 ---- libgslsum_la_SOURCES = levin_u.c levin_utrunc.c work_u.c work_utrunc.c ! TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -rc2P -x *.info -x *.info-* gsl-1.5/sys/ChangeLog gsl-1.6/sys/ChangeLog *** gsl-1.5/sys/ChangeLog Tue Sep 2 10:19:23 2003 --- gsl-1.6/sys/ChangeLog Fri Dec 24 13:57:54 2004 *************** *** 1,2 **** --- 1,6 ---- + 2004-12-22 Brian Gough + + * infnan.c (gsl_isinf): added missing return type of int + 2003-09-02 Brian Gough diff -rc2P -x *.info -x *.info-* gsl-1.5/sys/Makefile.am gsl-1.6/sys/Makefile.am *** gsl-1.5/sys/Makefile.am Sun Jul 27 10:51:03 2003 --- gsl-1.6/sys/Makefile.am Sat Sep 11 14:46:04 2004 *************** *** 8,12 **** check_PROGRAMS = test ! TESTS = test test_SOURCES = test.c test_LDADD = libgslsys.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la libgslsys.la ../utils/libutils.la --- 8,12 ---- check_PROGRAMS = test ! TESTS = $(check_PROGRAMS) test_SOURCES = test.c test_LDADD = libgslsys.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la libgslsys.la ../utils/libutils.la diff -rc2P -x *.info -x *.info-* gsl-1.5/sys/Makefile.in gsl-1.6/sys/Makefile.in *** gsl-1.5/sys/Makefile.in Thu Jun 24 11:49:57 2004 --- gsl-1.6/sys/Makefile.in Fri Dec 31 15:15:41 2004 *************** *** 150,154 **** check_PROGRAMS = test ! TESTS = test test_SOURCES = test.c test_LDADD = libgslsys.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la libgslsys.la ../utils/libutils.la --- 150,154 ---- check_PROGRAMS = test ! TESTS = $(check_PROGRAMS) test_SOURCES = test.c test_LDADD = libgslsys.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la libgslsys.la ../utils/libutils.la diff -rc2P -x *.info -x *.info-* gsl-1.5/sys/infnan.c gsl-1.6/sys/infnan.c *** gsl-1.5/sys/infnan.c Sun Jun 20 19:41:17 2004 --- gsl-1.6/sys/infnan.c Fri Dec 24 13:57:54 2004 *************** *** 118,121 **** --- 118,122 ---- } #else + int gsl_isinf (const double x) { diff -rc2P -x *.info -x *.info-* gsl-1.5/test_gsl_histogram.sh gsl-1.6/test_gsl_histogram.sh *** gsl-1.5/test_gsl_histogram.sh Fri Jul 19 20:41:22 2002 --- gsl-1.6/test_gsl_histogram.sh Fri Nov 12 17:19:34 2004 *************** *** 8,12 **** EOF ! echo 1 2 2.5 4 | ./gsl-histogram 1 5 4 > test.obs.1.tmp cmp test.exp.1.tmp test.obs.1.tmp --- 8,12 ---- EOF ! echo 1 2 2.5 4 | ./gsl-histogram 1 5 4 | tr -d '\r' > test.obs.1.tmp cmp test.exp.1.tmp test.obs.1.tmp diff -rc2P -x *.info -x *.info-* gsl-1.5/vector/ChangeLog gsl-1.6/vector/ChangeLog *** gsl-1.5/vector/ChangeLog Wed Jan 1 20:22:44 2003 --- gsl-1.6/vector/ChangeLog Mon Sep 13 14:25:13 2004 *************** *** 1,2 **** --- 1,9 ---- + 2004-09-13 Brian Gough + + * swap_source.c (gsl_vector_swap): fixed bug where stride of + first argument v was used for second argument w + + * test.c: improved test coverage + 2003-01-01 Brian Gough diff -rc2P -x *.info -x *.info-* gsl-1.5/vector/Makefile.am gsl-1.6/vector/Makefile.am *** gsl-1.5/vector/Makefile.am Sun Jul 27 10:54:19 2003 --- gsl-1.6/vector/Makefile.am Mon Sep 13 14:23:20 2004 *************** *** 7,11 **** INCLUDES= -I$(top_builddir) -I$(top_srcdir) ! TESTS = test test_static test_LDADD = libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la --- 7,11 ---- INCLUDES= -I$(top_builddir) -I$(top_srcdir) ! TESTS = $(check_PROGRAMS) test_LDADD = libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la *************** *** 17,21 **** CLEANFILES = test.txt test.dat ! noinst_HEADERS = vector_source.c init_source.c file_source.c copy_source.c swap_source.c prop_source.c test_complex_source.c test_source.c test_io.c test_complex_io.c minmax_source.c oper_source.c reim_source.c subvector_source.c view_source.c libgslvector_la_SOURCES = init.c file.c vector.c copy.c swap.c prop.c minmax.c oper.c reim.c subvector.c view.c view.h --- 17,21 ---- CLEANFILES = test.txt test.dat ! noinst_HEADERS = vector_source.c init_source.c file_source.c copy_source.c swap_source.c prop_source.c test_complex_source.c test_source.c minmax_source.c oper_source.c reim_source.c subvector_source.c view_source.c libgslvector_la_SOURCES = init.c file.c vector.c copy.c swap.c prop.c minmax.c oper.c reim.c subvector.c view.c view.h diff -rc2P -x *.info -x *.info-* gsl-1.5/vector/Makefile.in gsl-1.6/vector/Makefile.in *** gsl-1.5/vector/Makefile.in Thu Jun 24 11:49:58 2004 --- gsl-1.6/vector/Makefile.in Fri Dec 31 15:15:43 2004 *************** *** 149,153 **** INCLUDES = -I$(top_builddir) -I$(top_srcdir) ! TESTS = test test_static test_LDADD = libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la --- 149,153 ---- INCLUDES = -I$(top_builddir) -I$(top_srcdir) ! TESTS = $(check_PROGRAMS) test_LDADD = libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la *************** *** 159,163 **** CLEANFILES = test.txt test.dat ! noinst_HEADERS = vector_source.c init_source.c file_source.c copy_source.c swap_source.c prop_source.c test_complex_source.c test_source.c test_io.c test_complex_io.c minmax_source.c oper_source.c reim_source.c subvector_source.c view_source.c libgslvector_la_SOURCES = init.c file.c vector.c copy.c swap.c prop.c minmax.c oper.c reim.c subvector.c view.c view.h --- 159,163 ---- CLEANFILES = test.txt test.dat ! noinst_HEADERS = vector_source.c init_source.c file_source.c copy_source.c swap_source.c prop_source.c test_complex_source.c test_source.c minmax_source.c oper_source.c reim_source.c subvector_source.c view_source.c libgslvector_la_SOURCES = init.c file.c vector.c copy.c swap.c prop.c minmax.c oper.c reim.c subvector.c view.c view.h diff -rc2P -x *.info -x *.info-* gsl-1.5/vector/swap_source.c gsl-1.6/vector/swap_source.c *** gsl-1.5/vector/swap_source.c Fri Jul 25 16:18:16 2003 --- gsl-1.6/vector/swap_source.c Mon Sep 13 14:25:13 2004 *************** *** 25,29 **** const size_t size = v->size ; const size_t s1 = MULTIPLICITY * v->stride ; ! const size_t s2 = MULTIPLICITY * v->stride ; size_t i, k ; --- 25,29 ---- const size_t size = v->size ; const size_t s1 = MULTIPLICITY * v->stride ; ! const size_t s2 = MULTIPLICITY * w->stride ; size_t i, k ; diff -rc2P -x *.info -x *.info-* gsl-1.5/vector/test.c gsl-1.6/vector/test.c *** gsl-1.5/vector/test.c Fri Jul 25 16:18:16 2003 --- gsl-1.6/vector/test.c Mon Sep 13 14:23:20 2004 *************** *** 39,50 **** #endif - #define N 1027 #define BASE_GSL_COMPLEX_LONG #include "templates_on.h" #include "test_complex_source.c" - #if HAVE_PRINTF_LONGDOUBLE - #include "test_complex_io.c" - #endif #include "templates_off.h" #undef BASE_GSL_COMPLEX_LONG --- 39,46 ---- *************** *** 54,58 **** #include "templates_on.h" #include "test_complex_source.c" - #include "test_complex_io.c" #include "templates_off.h" #undef BASE_GSL_COMPLEX --- 50,53 ---- *************** *** 61,65 **** #include "templates_on.h" #include "test_complex_source.c" - #include "test_complex_io.c" #include "templates_off.h" #undef BASE_GSL_COMPLEX_FLOAT --- 56,59 ---- *************** *** 68,74 **** #include "templates_on.h" #include "test_source.c" - #if HAVE_PRINTF_LONGDOUBLE - #include "test_io.c" - #endif #include "templates_off.h" #undef BASE_LONG_DOUBLE --- 62,65 ---- *************** *** 77,81 **** #include "templates_on.h" #include "test_source.c" - #include "test_io.c" #include "templates_off.h" #undef BASE_DOUBLE --- 68,71 ---- *************** *** 84,88 **** #include "templates_on.h" #include "test_source.c" - #include "test_io.c" #include "templates_off.h" #undef BASE_FLOAT --- 74,77 ---- *************** *** 91,95 **** #include "templates_on.h" #include "test_source.c" - #include "test_io.c" #include "templates_off.h" #undef BASE_ULONG --- 80,83 ---- *************** *** 98,102 **** #include "templates_on.h" #include "test_source.c" - #include "test_io.c" #include "templates_off.h" #undef BASE_LONG --- 86,89 ---- *************** *** 105,109 **** #include "templates_on.h" #include "test_source.c" - #include "test_io.c" #include "templates_off.h" #undef BASE_UINT --- 92,95 ---- *************** *** 112,116 **** #include "templates_on.h" #include "test_source.c" - #include "test_io.c" #include "templates_off.h" #undef BASE_INT --- 98,101 ---- *************** *** 119,123 **** #include "templates_on.h" #include "test_source.c" - #include "test_io.c" #include "templates_off.h" #undef BASE_USHORT --- 104,107 ---- *************** *** 126,130 **** #include "templates_on.h" #include "test_source.c" - #include "test_io.c" #include "templates_off.h" #undef BASE_SHORT --- 110,113 ---- *************** *** 133,137 **** #include "templates_on.h" #include "test_source.c" - #include "test_io.c" #include "templates_off.h" #undef BASE_UCHAR --- 116,119 ---- *************** *** 140,144 **** #include "templates_on.h" #include "test_source.c" - #include "test_io.c" #include "templates_off.h" #undef BASE_CHAR --- 122,125 ---- *************** *** 150,220 **** main (void) { gsl_ieee_env_setup (); ! test_func (); ! test_float_func (); ! test_long_double_func (); ! test_ulong_func (); ! test_long_func (); ! test_uint_func (); ! test_int_func (); ! test_ushort_func (); ! test_short_func (); ! test_uchar_func (); ! test_char_func (); ! test_complex_func (); ! test_complex_float_func (); ! test_complex_long_double_func (); ! test_text (); ! test_float_text (); #if HAVE_PRINTF_LONGDOUBLE ! test_long_double_text (); #endif ! test_ulong_text (); ! test_long_text (); ! test_uint_text (); ! test_int_text (); ! test_ushort_text (); ! test_short_text (); ! test_uchar_text (); ! test_char_text (); ! test_complex_text (); ! test_complex_float_text (); #if HAVE_PRINTF_LONGDOUBLE ! test_complex_long_double_text (); #endif ! test_binary (); ! test_float_binary (); ! test_long_double_binary (); ! test_ulong_binary (); ! test_long_binary (); ! test_uint_binary (); ! test_int_binary (); ! test_ushort_binary (); ! test_short_binary (); ! test_uchar_binary (); ! test_char_binary (); ! test_complex_binary (); ! test_complex_float_binary (); ! test_complex_long_double_binary (); gsl_set_error_handler (&my_error_handler); ! test_trap (); ! test_float_trap (); ! test_long_double_trap (); ! test_ulong_trap (); ! test_long_trap (); ! test_uint_trap (); ! test_int_trap (); ! test_ushort_trap (); ! test_short_trap (); ! test_uchar_trap (); ! test_char_trap (); ! test_complex_trap (); ! test_complex_float_trap (); ! test_complex_long_double_trap (); exit (gsl_test_summary ()); --- 131,232 ---- main (void) { + size_t stride, ostride, N; + gsl_ieee_env_setup (); ! for (N = 10; N < 1024; N = 2*N + 1) ! { ! for (stride = 1; stride < 5 ; stride++) ! { ! test_func (stride, N); ! test_float_func (stride, N); ! test_long_double_func (stride, N); ! test_ulong_func (stride, N); ! test_long_func (stride, N); ! test_uint_func (stride, N); ! test_int_func (stride, N); ! test_ushort_func (stride, N); ! test_short_func (stride, N); ! test_uchar_func (stride, N); ! test_char_func (stride, N); ! ! test_complex_func (stride, N); ! test_complex_float_func (stride, N); ! test_complex_long_double_func (stride, N); ! ! for (ostride = 1; ostride < 5 ; ostride++) ! { ! test_ops (stride, ostride, N); ! test_float_ops (stride, ostride, N); ! test_long_double_ops (stride, ostride, N); ! test_ulong_ops (stride, ostride, N); ! test_long_ops (stride, ostride, N); ! test_uint_ops (stride, ostride, N); ! test_int_ops (stride, ostride, N); ! test_ushort_ops (stride, ostride, N); ! test_short_ops (stride, ostride, N); ! test_uchar_ops (stride, ostride, N); ! test_char_ops (stride, ostride, N); ! } ! test_text (stride, N); ! test_float_text (stride, N); #if HAVE_PRINTF_LONGDOUBLE ! test_long_double_text (stride, N); #endif ! test_ulong_text (stride, N); ! test_long_text (stride, N); ! test_uint_text (stride, N); ! test_int_text (stride, N); ! test_ushort_text (stride, N); ! test_short_text (stride, N); ! test_uchar_text (stride, N); ! test_char_text (stride, N); ! ! test_complex_text (stride, N); ! test_complex_float_text (stride, N); #if HAVE_PRINTF_LONGDOUBLE ! test_complex_long_double_text (stride, N); #endif ! test_file (stride, N); ! test_float_file (stride, N); ! test_long_double_file (stride, N); ! test_ulong_file (stride, N); ! test_long_file (stride, N); ! test_uint_file (stride, N); ! test_int_file (stride, N); ! test_ushort_file (stride, N); ! test_short_file (stride, N); ! test_uchar_file (stride, N); ! test_char_file (stride, N); ! test_complex_file (stride, N); ! test_complex_float_file (stride, N); ! test_complex_long_double_file (stride, N); ! } ! } gsl_set_error_handler (&my_error_handler); ! for (N = 1; N < 1024; N *=2) ! { ! for (stride = 1; stride < 5 ; stride++) ! { ! test_trap (stride, N); ! test_float_trap (stride, N); ! test_long_double_trap (stride, N); ! test_ulong_trap (stride, N); ! test_long_trap (stride, N); ! test_uint_trap (stride, N); ! test_int_trap (stride, N); ! test_ushort_trap (stride, N); ! test_short_trap (stride, N); ! test_uchar_trap (stride, N); ! test_char_trap (stride, N); ! test_complex_trap (stride, N); ! test_complex_float_trap (stride, N); ! test_complex_long_double_trap (stride, N); ! } ! } exit (gsl_test_summary ()); Only in gsl-1.5/vector: test_complex_io.c diff -rc2P -x *.info -x *.info-* gsl-1.5/vector/test_complex_source.c gsl-1.6/vector/test_complex_source.c *** gsl-1.5/vector/test_complex_source.c Fri Jul 25 16:18:16 2003 --- gsl-1.6/vector/test_complex_source.c Mon Sep 13 14:23:20 2004 *************** *** 18,105 **** */ ! void FUNCTION (test, func) (void); ! void FUNCTION (test, binary) (void); ! void FUNCTION (test, trap) (void); ! void ! FUNCTION (test, func) (void) { ! size_t i; ! TYPE (gsl_vector) * v = FUNCTION (gsl_vector, calloc) (N); ! gsl_test (v->data == 0, NAME (gsl_vector) "_alloc returns valid pointer"); ! gsl_test (v->size != N, NAME (gsl_vector) "_alloc returns valid size"); ! gsl_test (v->stride != 1, NAME (gsl_vector) "_alloc returns unit stride"); ! for (i = 0; i < N; i++) { ! BASE x = ZERO; ! GSL_REAL (x) = (ATOMIC)i; ! GSL_IMAG (x) = (ATOMIC)(i + 1234); ! FUNCTION (gsl_vector, set) (v, i, x); ! }; ! status = 0; ! for (i = 0; i < N; i++) { ! if (v->data[2 * i] != (ATOMIC) i || v->data[2 * i + 1] != (ATOMIC) (i + 1234)) ! status = 1; ! }; ! ! gsl_test (status, NAME (gsl_vector) "_set writes into array"); ! status = 0; ! for (i = 0; i < N; i++) { ! BASE x, y; ! GSL_REAL (x) = (ATOMIC)i; ! GSL_IMAG (x) = (ATOMIC)(i + 1234); ! y = FUNCTION (gsl_vector, get) (v, i); ! if (!GSL_COMPLEX_EQ (x, y)) ! status = 1; ! }; ! gsl_test (status, NAME (gsl_vector) "_get reads from array"); ! /* Now set stride to 2 */ ! v->stride = 2 ; ! status = 0; - for (i = 0; i < N / 2; i++) - { - BASE x, y; - GSL_REAL (x) = (ATOMIC)(2 * i); - GSL_IMAG (x) = (ATOMIC)(2 * i + 1234); - y = FUNCTION (gsl_vector, get) (v, i); - if (!GSL_COMPLEX_EQ (x, y)) - status = 1; - }; - gsl_test (status, NAME (gsl_vector) "_get reads from array with stride"); ! for (i = 0; i < N / 2; i++) ! { ! BASE x; ! GSL_REAL (x) = (ATOMIC)i ; ! GSL_IMAG (x) = (ATOMIC)(i + 1234); ! FUNCTION (gsl_vector, set) (v, i, x); ! }; ! status = 0; ! for (i = 0; i < N / 2; i++) ! { ! if (v->data[2 * 2 * i] != (ATOMIC) i || v->data[2 * 2 * i + 1] != (ATOMIC) (i + 1234)) ! status = 1; ! }; ! gsl_test (status, NAME (gsl_vector) "_set writes into array with stride"); ! /* Reset stride to 1 */ ! v->stride = 1 ; for (i = 0; i < N; i++) --- 18,252 ---- */ ! void FUNCTION (test, func) (size_t stride, size_t N); ! void FUNCTION (test, ops) (size_t stride1, size_t stride2, size_t N); ! void FUNCTION (test, file) (size_t stride, size_t N); ! void FUNCTION (test, text) (size_t stride, size_t N); ! void FUNCTION (test, trap) (size_t stride, size_t N); ! TYPE (gsl_vector) * FUNCTION(create, vector) (size_t stride, size_t N); ! #define TEST(expr,desc) gsl_test((expr), NAME(gsl_vector) desc " stride=%d, N=%d", stride, N) ! #define TEST2(expr,desc) gsl_test((expr), NAME(gsl_vector) desc " stride1=%d, stride2=%d, N=%d", stride1, stride2, N) ! ! TYPE (gsl_vector) * ! FUNCTION(create, vector) (size_t stride, size_t N) { ! TYPE (gsl_vector) * v = FUNCTION (gsl_vector, calloc) (N*stride); ! v->stride = stride; ! v->size = N; ! return v; ! } ! void ! FUNCTION (test, func) (size_t stride, size_t N) ! { ! TYPE (gsl_vector) * v0; ! TYPE (gsl_vector) * v; ! QUALIFIED_VIEW(gsl_vector,view) view; ! size_t i, j; ! if (stride == 1) { ! v = FUNCTION (gsl_vector, calloc) (N); ! ! TEST(v->data == 0, "_calloc pointer"); ! TEST(v->size != N, "_calloc size"); ! TEST(v->stride != 1, "_calloc stride"); ! { ! int status = (FUNCTION(gsl_vector,isnull)(v) != 1); ! TEST (status, "_isnull" DESC " on calloc vector"); ! } ! FUNCTION (gsl_vector, free) (v); /* free whatever is in v */ ! } ! ! if (stride == 1) { ! v = FUNCTION (gsl_vector, alloc) (N); ! ! TEST(v->data == 0, "_alloc pointer"); ! TEST(v->size != N, "_alloc size"); ! TEST(v->stride != 1, "_alloc stride"); ! FUNCTION (gsl_vector, free) (v); /* free whatever is in v */ ! } ! if (stride == 1) { ! v0 = FUNCTION (gsl_vector, alloc) (N); ! view = FUNCTION (gsl_vector, subvector) (v, 0, N); ! v = &view.vector; ! } ! else ! { ! v0 = FUNCTION (gsl_vector, alloc) (N * stride); ! for (i = 0; i < N*stride; i++) ! { ! BASE x = ZERO; ! GSL_REAL (x) = (ATOMIC)i; ! GSL_IMAG (x) = (ATOMIC)(i + 1234); ! FUNCTION (gsl_vector, set) (v0, i, x); ! } ! ! view = FUNCTION (gsl_vector, subvector_with_stride) (v0, 0, stride, N); ! v = &view.vector; ! } ! ! { ! int status = 0; ! for (i = 0; i < N; i++) ! { ! BASE x = ZERO; ! GSL_REAL (x) = (ATOMIC)i; ! GSL_IMAG (x) = (ATOMIC)(i + 1234); ! FUNCTION (gsl_vector, set) (v, i, x); ! } ! for (i = 0; i < N; i++) ! { ! if (v->data[2*i*stride] != (ATOMIC) (i) || v->data[2 * i * stride + 1] != (ATOMIC) (i + 1234)) ! status = 1; ! }; ! ! TEST(status,"_set" DESC " writes into array"); ! } ! { ! int status = 0; ! for (i = 0; i < N; i++) ! { ! BASE x, y; ! GSL_REAL (x) = (ATOMIC)i; ! GSL_IMAG (x) = (ATOMIC)(i + 1234); ! y = FUNCTION (gsl_vector, get) (v, i); ! if (!GSL_COMPLEX_EQ (x, y)) ! status = 1; ! }; ! TEST (status, "_get" DESC " reads from array"); ! } ! { ! int status = 0; ! ! for (i = 0; i < N; i++) ! { ! if (FUNCTION (gsl_vector, ptr) (v, i) != (BASE *)v->data + i*stride) ! status = 1; ! }; ! ! TEST (status, "_ptr" DESC " access to array"); ! } ! ! ! { ! int status = 0; ! ! for (i = 0; i < N; i++) ! { ! if (FUNCTION (gsl_vector, const_ptr) (v, i) != (BASE *)v->data + i*stride) ! status = 1; ! }; ! ! TEST (status, "_const_ptr" DESC " access to array"); ! } ! ! { ! int status = 0; ! ! for (i = 0; i < N; i++) ! { ! BASE x = ZERO; ! FUNCTION (gsl_vector, set) (v, i, x); ! } ! ! status = (FUNCTION(gsl_vector,isnull)(v) != 1); ! TEST (status, "_isnull" DESC " on null vector") ; ! } ! ! { ! int status = 0; ! ! for (i = 0; i < N; i++) ! { ! BASE x = ZERO; ! GSL_REAL (x) = (ATOMIC)i; ! GSL_IMAG (x) = (ATOMIC)(i + 1234); ! FUNCTION (gsl_vector, set) (v, i, x); ! } ! ! status = (FUNCTION(gsl_vector,isnull)(v) != 0); ! TEST (status, "_isnull" DESC " on non-null vector") ; ! } ! ! { ! int status = 0; ! ! FUNCTION (gsl_vector, set_zero) (v); ! ! for (i = 0; i < N; i++) ! { ! BASE x, y = ZERO; ! x = FUNCTION (gsl_vector, get) (v, i); ! if (!GSL_COMPLEX_EQ (x, y)) ! status = 1; ! }; ! ! TEST (status, "_setzero" DESC " on non-null vector") ; ! } ! ! { ! int status = 0; ! ! BASE x; ! GSL_REAL (x) = (ATOMIC)27; ! GSL_IMAG (x) = (ATOMIC)(27 + 1234); ! ! FUNCTION (gsl_vector, set_all) (v, x); ! ! for (i = 0; i < N; i++) ! { ! BASE y = FUNCTION (gsl_vector, get) (v, i); ! if (!GSL_COMPLEX_EQ (x, y)) ! status = 1; ! }; ! ! TEST (status, "_setall" DESC " to non-zero value") ; ! } ! ! ! { ! int status = 0; ! ! for (i = 0; i < N; i++) ! { ! FUNCTION (gsl_vector, set_basis) (v, i); ! for (j = 0; j < N; j++) ! { ! BASE x = FUNCTION (gsl_vector, get) (v, j); ! BASE one = ONE; ! BASE zero = ZERO; ! ! if (i == j) ! { ! if (!GSL_COMPLEX_EQ (x, one)) ! status = 1 ; ! } ! else ! { ! if (!GSL_COMPLEX_EQ (x, zero)) ! status = 1; ! } ! }; ! } ! TEST (status, "_setbasis" DESC " over range") ; ! } for (i = 0; i < N; i++) *************** *** 109,116 **** GSL_IMAG (x) = (ATOMIC)(i + 1234); FUNCTION (gsl_vector, set) (v, i, x); ! }; ! { BASE x, y, r, s ; GSL_REAL(x) = 2 ; --- 256,263 ---- GSL_IMAG (x) = (ATOMIC)(i + 1234); FUNCTION (gsl_vector, set) (v, i, x); ! } { + int status; BASE x, y, r, s ; GSL_REAL(x) = 2 ; *************** *** 134,166 **** status |= ! GSL_COMPLEX_EQ(r,x) ; status |= ! GSL_COMPLEX_EQ(s,y) ; } ! gsl_test (status, NAME(gsl_vector) "_swap_elements" DESC " exchanges elements") ; ! status = 0; ! FUNCTION (gsl_vector,reverse) (v) ; ! ! for (i = 0; i < N; i++) ! { ! BASE x,r ; ! GSL_REAL(x) = (ATOMIC)(N - i - 1) ; ! GSL_IMAG(x) = (ATOMIC)(N - i - 1 + 1234); ! r = FUNCTION (gsl_vector, get) (v, i); - status |= !GSL_COMPLEX_EQ(r,x); - } ! gsl_test (status, NAME(gsl_vector) "_reverse" DESC " reverses elements") ; ! ! FUNCTION (gsl_vector, free) (v); /* free whatever is in v */ } ! void ! FUNCTION (test, binary) (void) { ! TYPE (gsl_vector) * v = FUNCTION (gsl_vector, calloc) (N); ! TYPE (gsl_vector) * w = FUNCTION (gsl_vector, calloc) (N); size_t i; --- 281,418 ---- status |= ! GSL_COMPLEX_EQ(r,x) ; status |= ! GSL_COMPLEX_EQ(s,y) ; + + TEST (status, "_swap_elements" DESC " exchanges elements") ; } ! { ! int status = 0; ! ! FUNCTION (gsl_vector,reverse) (v) ; ! ! for (i = 0; i < N; i++) ! { ! BASE x,r ; ! GSL_REAL(x) = (ATOMIC)(N - i - 1) ; ! GSL_IMAG(x) = (ATOMIC)(N - i - 1 + 1234); ! ! r = FUNCTION (gsl_vector, get) (v, i); ! ! status |= !GSL_COMPLEX_EQ(r,x); ! } ! ! gsl_test (status, NAME(gsl_vector) "_reverse" DESC " reverses elements") ; ! } ! ! { ! int status = 0; ! ! QUALIFIED_VIEW(gsl_vector,view) v1 = FUNCTION(gsl_vector, view_array) (v->data, N*stride); ! ! for (i = 0; i < N; i++) ! { ! BASE x = FUNCTION (gsl_vector, get) (&v1.vector, i*stride) ; ! BASE y = FUNCTION (gsl_vector, get) (v, i); ! if (!GSL_COMPLEX_EQ(x,y)) ! status = 1; ! }; ! TEST (status, "_view_array" DESC); ! } ! { ! int status = 0; ! ! QUALIFIED_VIEW(gsl_vector,view) v1 = FUNCTION(gsl_vector, view_array_with_stride) (v->data, stride, N*stride); ! ! for (i = 0; i < N; i++) ! { ! BASE x = FUNCTION (gsl_vector, get) (&v1.vector, i) ; ! BASE y = FUNCTION (gsl_vector, get) (v, i); ! if (!GSL_COMPLEX_EQ(x,y)) ! status = 1; ! }; ! TEST (status, "_view_array_with_stride" DESC); ! } ! { ! int status = 0; ! ! QUALIFIED_VIEW(gsl_vector,view) v1 = FUNCTION(gsl_vector, subvector) (v, N/3, N/2); ! ! for (i = 0; i < N/2; i++) ! { ! BASE x = FUNCTION (gsl_vector, get) (&v1.vector, i) ; ! BASE y = FUNCTION (gsl_vector, get) (v, (N/3)+i); ! if (!GSL_COMPLEX_EQ(x,y)) ! status = 1; ! }; ! ! TEST (status, "_view_subvector" DESC); ! } ! ! { ! int status = 0; ! ! QUALIFIED_VIEW(gsl_vector,view) v1 = FUNCTION(gsl_vector, subvector_with_stride) (v, N/5, 3, N/4); ! ! for (i = 0; i < N/4; i++) ! { ! BASE x = FUNCTION (gsl_vector, get) (&v1.vector, i) ; ! BASE y = FUNCTION (gsl_vector, get) (v, (N/5)+3*i); ! if (!GSL_COMPLEX_EQ(x,y)) ! status = 1; ! }; ! ! TEST (status, "_view_subvector_with_stride" DESC); ! } ! ! ! { ! int status = 0; ! ! QUALIFIED_REAL_VIEW(gsl_vector,view) vv = FUNCTION(gsl_vector, real) (v); ! ! for (i = 0; i < N; i++) ! { ! ATOMIC xr = REAL_VIEW (gsl_vector, get) (&vv.vector, i) ; ! BASE y = FUNCTION (gsl_vector, get) (v, i); ! ATOMIC yr = GSL_REAL(y); ! ! if (xr != yr) ! status = 1; ! }; ! ! TEST (status, "_real" DESC); ! } ! ! { ! int status = 0; ! ! QUALIFIED_REAL_VIEW(gsl_vector,view) vv = FUNCTION(gsl_vector, imag) (v); ! ! for (i = 0; i < N; i++) ! { ! ATOMIC xr = REAL_VIEW (gsl_vector, get) (&vv.vector, i) ; ! BASE y = FUNCTION (gsl_vector, get) (v, i); ! ATOMIC yr = GSL_IMAG(y); ! ! if (xr != yr) ! status = 1; ! }; ! ! TEST (status, "_imag" DESC); ! } ! ! ! FUNCTION (gsl_vector, free) (v0); /* free whatever is in v */ } ! void ! FUNCTION (test, file) (size_t stride, size_t N) { ! TYPE (gsl_vector) * v = FUNCTION (create, vector) (stride, N); ! TYPE (gsl_vector) * w = FUNCTION (create, vector) (stride, N); size_t i; *************** *** 190,194 **** for (i = 0; i < N; i++) { ! if (w->data[2 * i] != (ATOMIC) (N - i) || w->data[2 * i + 1] != (ATOMIC) (N - i + 1)) status = 1; }; --- 442,446 ---- for (i = 0; i < N; i++) { ! if (w->data[2 * i * stride] != (ATOMIC) (N - i) || w->data[2 * i * stride + 1] != (ATOMIC) (N - i + 1)) status = 1; }; *************** *** 203,211 **** } void ! FUNCTION (test, trap) (void) { ! TYPE (gsl_vector) * vc = FUNCTION (gsl_vector, alloc) (N); BASE z = {{(ATOMIC)1.2, (ATOMIC)3.4}}; --- 455,510 ---- } + #if USES_LONGDOUBLE && ! HAVE_PRINTF_LONGDOUBLE + /* skip this test */ + #else + void + FUNCTION (test, text) (size_t stride, size_t N) + { + TYPE (gsl_vector) * v = FUNCTION (create, vector) (stride, N); + TYPE (gsl_vector) * w = FUNCTION (create, vector) (stride, N); + + size_t i; + + { + FILE *f = fopen ("test.txt", "w"); + + for (i = 0; i < N; i++) + { + BASE x; + GSL_REAL (x) = (ATOMIC)i; + GSL_IMAG (x) = (ATOMIC)(i + 1); + FUNCTION (gsl_vector, set) (v, i, x); + }; + + FUNCTION (gsl_vector, fprintf) (f, v, OUT_FORMAT); + + fclose (f); + } + + { + FILE *f = fopen ("test.txt", "r"); + + FUNCTION (gsl_vector, fscanf) (f, w); + + status = 0; + for (i = 0; i < N; i++) + { + if (w->data[2 * i * stride] != (ATOMIC) i || w->data[2 * i * stride + 1] != (ATOMIC) (i + 1)) + status = 1; + }; + fclose (f); + } + + FUNCTION (gsl_vector, free) (v); + FUNCTION (gsl_vector, free) (w); + + gsl_test (status, NAME (gsl_vector) "_fprintf and fscanf"); + } + #endif void ! FUNCTION (test, trap) (size_t stride, size_t N) { ! TYPE (gsl_vector) * vc = FUNCTION (create, vector) (stride, N); BASE z = {{(ATOMIC)1.2, (ATOMIC)3.4}}; Only in gsl-1.5/vector: test_io.c diff -rc2P -x *.info -x *.info-* gsl-1.5/vector/test_source.c gsl-1.6/vector/test_source.c *** gsl-1.5/vector/test_source.c Fri Jul 25 16:18:16 2003 --- gsl-1.6/vector/test_source.c Mon Sep 13 14:23:20 2004 *************** *** 18,123 **** */ ! void FUNCTION (test, func) (void); ! void FUNCTION (test, binary) (void); ! void FUNCTION (test, trap) (void); void ! FUNCTION (test, func) (void) { TYPE (gsl_vector) * v; ! size_t i; ! v = FUNCTION (gsl_vector, calloc) (N); ! gsl_test (v->data == 0, NAME (gsl_vector) "_alloc returns valid pointer"); ! gsl_test (v->size != N, NAME (gsl_vector) "_alloc returns valid size"); ! gsl_test (v->stride != 1, NAME (gsl_vector) "_alloc returns unit stride"); ! ! for (i = 0; i < N; i++) { ! FUNCTION (gsl_vector, set) (v, i, (ATOMIC) i); ! } ! status = 0; ! for (i = 0; i < N; i++) { ! if (v->data[i] != (ATOMIC) i) ! status = 1; ! }; ! ! gsl_test (status, ! NAME (gsl_vector) "_set" DESC " writes into array"); ! status = 0; ! for (i = 0; i < N; i++) { ! if (FUNCTION (gsl_vector, get) (v, i) != (ATOMIC) i) ! status = 1; ! }; ! gsl_test (status, ! NAME (gsl_vector) "_get" DESC " reads from array"); ! /* Now set stride to 2 */ ! v->stride = 2; ! status = 0; ! for (i = 0; i < N / 2; i++) ! { ! if (FUNCTION (gsl_vector, get) (v, i) != (ATOMIC) (2 * i)) ! status = 1; ! }; ! gsl_test (status, NAME (gsl_vector) "_get" DESC " reads with stride"); - for (i = 0; i < N / 2; i++) - { - FUNCTION (gsl_vector, set) (v, i, (ATOMIC) (i + 1000)); - }; - - status = 0; ! for (i = 0; i < N / 2; i++) ! { ! if (v->data[2 * i] != (ATOMIC) (i + 1000)) ! status = 1; ! }; ! gsl_test (status, NAME (gsl_vector) "_set" DESC " writes with stride"); ! /* Reset stride to 1 */ ! v->stride = 1 ; - for (i = 0; i < N; i++) - { - FUNCTION (gsl_vector, set) (v, i, (ATOMIC) i); - } ! FUNCTION (gsl_vector,swap_elements) (v, 2, 5) ; ! ! status = (FUNCTION(gsl_vector,get)(v,2) != 5) ; ! status |= (FUNCTION(gsl_vector,get)(v,5) != 2) ; - FUNCTION (gsl_vector,swap_elements) (v, 2, 5) ; ! status |= (FUNCTION(gsl_vector,get)(v,2) != 2) ; ! status |= (FUNCTION(gsl_vector,get)(v,5) != 5) ; ! gsl_test (status, NAME(gsl_vector) "_swap_elements" DESC " exchanges elements") ; ! status = 0; ! FUNCTION (gsl_vector,reverse) (v) ; ! ! for (i = 0; i < N; i++) ! { ! status |= (FUNCTION (gsl_vector, get) (v, i) != (ATOMIC) (N - i - 1)); ! } ! gsl_test (status, NAME(gsl_vector) "_reverse" DESC " reverses elements") ; { --- 18,295 ---- */ ! void FUNCTION (test, func) (size_t stride, size_t N); ! void FUNCTION (test, ops) (size_t stride1, size_t stride2, size_t N); ! void FUNCTION (test, file) (size_t stride, size_t N); ! void FUNCTION (test, text) (size_t stride, size_t N); ! void FUNCTION (test, trap) (size_t stride, size_t N); ! TYPE (gsl_vector) * FUNCTION(create, vector) (size_t stride, size_t N); ! ! #define TEST(expr,desc) gsl_test((expr), NAME(gsl_vector) desc " stride=%d, N=%d", stride, N) ! #define TEST2(expr,desc) gsl_test((expr), NAME(gsl_vector) desc " stride1=%d, stride2=%d, N=%d", stride1, stride2, N) ! ! TYPE (gsl_vector) * ! FUNCTION(create, vector) (size_t stride, size_t N) ! { ! TYPE (gsl_vector) * v = FUNCTION (gsl_vector, calloc) (N*stride); ! v->stride = stride; ! v->size = N; ! return v; ! } void ! FUNCTION (test, func) (size_t stride, size_t N) { + TYPE (gsl_vector) * v0; TYPE (gsl_vector) * v; ! QUALIFIED_VIEW(gsl_vector,view) view; ! size_t i, j; ! if (stride == 1) { ! v = FUNCTION (gsl_vector, calloc) (N); ! ! TEST(v->data == 0, "_calloc pointer"); ! TEST(v->size != N, "_calloc size"); ! TEST(v->stride != 1, "_calloc stride"); + { + int status = (FUNCTION(gsl_vector,isnull)(v) != 1); + TEST (status, "_isnull" DESC " on calloc vector"); + } ! FUNCTION (gsl_vector, free) (v); /* free whatever is in v */ ! } ! if (stride == 1) { ! v = FUNCTION (gsl_vector, alloc) (N); ! ! TEST(v->data == 0, "_alloc pointer"); ! TEST(v->size != N, "_alloc size"); ! TEST(v->stride != 1, "_alloc stride"); + FUNCTION (gsl_vector, free) (v); /* free whatever is in v */ + } ! if (stride == 1) { ! v0 = FUNCTION (gsl_vector, alloc) (N); ! view = FUNCTION (gsl_vector, subvector) (v, 0, N); ! v = &view.vector; ! } ! else ! { ! v0 = FUNCTION (gsl_vector, alloc) (N * stride); + for (i = 0; i < N*stride; i++) + { + v0->data[i] = i; + } + + view = FUNCTION (gsl_vector, subvector_with_stride) (v0, 0, stride, N); + v = &view.vector; + } + + { + int status = 0; ! for (i = 0; i < N; i++) ! { ! FUNCTION (gsl_vector, set) (v, i, (ATOMIC) i); ! } ! for (i = 0; i < N; i++) ! { ! if (v->data[i*stride] != (ATOMIC) (i)) ! status = 1; ! }; ! TEST(status,"_set" DESC " writes into array"); ! } ! { ! int status = 0; ! ! for (i = 0; i < N; i++) ! { ! if (FUNCTION (gsl_vector, get) (v, i) != (ATOMIC) (i)) ! status = 1; ! }; ! ! TEST (status, "_get" DESC " reads from array"); ! } ! { ! int status = 0; ! for (i = 0; i < N; i++) ! { ! if (FUNCTION (gsl_vector, ptr) (v, i) != v->data + i*stride) ! status = 1; ! }; ! TEST (status, "_ptr" DESC " access to array"); ! } ! { ! int status = 0; ! ! for (i = 0; i < N; i++) ! { ! if (FUNCTION (gsl_vector, const_ptr) (v, i) != v->data + i*stride) ! status = 1; ! }; ! ! TEST (status, "_const_ptr" DESC " access to array"); ! } ! { ! int status = 0; ! for (i = 0; i < N; i++) ! { ! FUNCTION (gsl_vector, set) (v, i, (ATOMIC) 0); ! } ! ! status = (FUNCTION(gsl_vector,isnull)(v) != 1); ! TEST (status, "_isnull" DESC " on null vector") ; ! } ! { ! int status = 0; ! for (i = 0; i < N; i++) ! { ! FUNCTION (gsl_vector, set) (v, i, (ATOMIC) i); ! } ! ! status = (FUNCTION(gsl_vector,isnull)(v) != 0); ! TEST (status, "_isnull" DESC " on non-null vector") ; ! } ! ! { ! int status = 0; ! ! FUNCTION (gsl_vector, set_zero) (v); ! ! for (i = 0; i < N; i++) ! { ! if (FUNCTION (gsl_vector, get) (v, i) != (ATOMIC)0) ! status = 1; ! }; ! ! TEST (status, "_setzero" DESC " on non-null vector") ; ! } ! ! { ! int status = 0; ! ! FUNCTION (gsl_vector, set_all) (v, (ATOMIC)27); ! ! for (i = 0; i < N; i++) ! { ! if (FUNCTION (gsl_vector, get) (v, i) != (ATOMIC) (27)) ! status = 1; ! }; ! ! TEST (status, "_setall" DESC " to non-zero value") ; ! } ! ! ! { ! int status = 0; ! ! for (i = 0; i < N; i++) ! { ! FUNCTION (gsl_vector, set_basis) (v, i); ! ! for (j = 0; j < N; j++) ! { ! if (i == j) ! { ! if (FUNCTION (gsl_vector, get) (v, j) != (ATOMIC)1) ! status = 1 ; ! } ! else ! { ! if (FUNCTION (gsl_vector, get) (v, j) != (ATOMIC)(0)) ! status = 1; ! } ! }; ! } ! TEST (status, "_setbasis" DESC " over range") ; ! } ! ! { ! int status = 0; ! ! for (i = 0; i < N; i++) ! { ! FUNCTION (gsl_vector, set) (v, i, (ATOMIC) i); ! } ! ! FUNCTION (gsl_vector, scale) (v, 2.0); ! ! for (i = 0; i < N; i++) ! { ! if (FUNCTION (gsl_vector, get) (v, i) != (ATOMIC) (i*2.0)) ! status = 1; ! }; ! ! TEST (status, "_scale" DESC " by 2") ; ! } ! ! { ! int status = 0; ! ! FUNCTION (gsl_vector, add_constant) (v, (ATOMIC)7); ! ! for (i = 0; i < N; i++) ! { ! if (FUNCTION (gsl_vector, get) (v, i) != (ATOMIC) (i*2.0 + 7)) ! status = 1; ! }; ! ! TEST (status, "_add_constant" DESC) ; ! } ! ! { ! int status = 0; ! ! for (i = 0; i < N; i++) ! { ! FUNCTION (gsl_vector, set) (v, i, (ATOMIC) i); ! } ! ! FUNCTION (gsl_vector,swap_elements) (v, 2, 5) ; ! ! status = (FUNCTION(gsl_vector,get)(v,2) != 5) ; ! status |= (FUNCTION(gsl_vector,get)(v,5) != 2) ; ! ! FUNCTION (gsl_vector,swap_elements) (v, 2, 5) ; ! ! status |= (FUNCTION(gsl_vector,get)(v,2) != 2) ; ! status |= (FUNCTION(gsl_vector,get)(v,5) != 5) ; ! ! TEST (status, "_swap_elements" DESC " (2,5)") ; ! } ! ! { ! int status = 0; ! ! FUNCTION (gsl_vector,reverse) (v) ; ! ! for (i = 0; i < N; i++) ! { ! status |= (FUNCTION (gsl_vector, get) (v, i) != (ATOMIC) (N - i - 1)); ! } ! ! TEST (status, "_reverse" DESC " reverses elements") ; ! } { *************** *** 146,157 **** { BASE max = FUNCTION(gsl_vector, max) (v) ; ! ! gsl_test (max != exp_max, NAME(gsl_vector) "_max returns correct maximum value"); } { BASE min = FUNCTION(gsl_vector, min) (v) ; ! ! gsl_test (min != exp_min, NAME(gsl_vector) "_min returns correct minimum value"); } --- 318,327 ---- { BASE max = FUNCTION(gsl_vector, max) (v) ; ! TEST (max != exp_max, "_max returns correct maximum value"); } { BASE min = FUNCTION(gsl_vector, min) (v) ; ! TEST (min != exp_min, "_min returns correct minimum value"); } *************** *** 160,165 **** FUNCTION(gsl_vector, minmax) (v, &min, &max); ! gsl_test (max != exp_max, NAME(gsl_vector) "_minmax returns correct maximum value"); ! gsl_test (min != exp_min, NAME(gsl_vector) "_minmax returns correct minimum value"); } --- 330,335 ---- FUNCTION(gsl_vector, minmax) (v, &min, &max); ! TEST (max != exp_max, "_minmax returns correct maximum value"); ! TEST (min != exp_min, "_minmax returns correct minimum value"); } *************** *** 167,178 **** { size_t imax = FUNCTION(gsl_vector, max_index) (v) ; ! ! gsl_test (imax != exp_imax, NAME(gsl_vector) "_max_index returns correct maximum i"); } { size_t imin = FUNCTION(gsl_vector, min_index) (v) ; ! ! gsl_test (imin != exp_imin, NAME(gsl_vector) "_min_index returns correct minimum i"); } --- 337,346 ---- { size_t imax = FUNCTION(gsl_vector, max_index) (v) ; ! TEST (imax != exp_imax, "_max_index returns correct maximum i"); } { size_t imin = FUNCTION(gsl_vector, min_index) (v) ; ! TEST (imin != exp_imin, "_min_index returns correct minimum i"); } *************** *** 182,291 **** FUNCTION(gsl_vector, minmax_index) (v, &imin, &imax); ! gsl_test (imax != exp_imax, NAME(gsl_vector) "_minmax_index returns correct maximum i"); ! gsl_test (imin != exp_imin, NAME(gsl_vector) "_minmax_index returns correct minimum i"); } } - { ! TYPE (gsl_vector) * a = FUNCTION (gsl_vector, calloc) (N); ! TYPE (gsl_vector) * b = FUNCTION (gsl_vector, calloc) (N); for (i = 0; i < N; i++) { ! FUNCTION (gsl_vector, set) (a, i, (BASE)(3 + i)); ! FUNCTION (gsl_vector, set) (b, i, (BASE)(3 + 2 * i)); ! } ! FUNCTION(gsl_vector, memcpy) (v, a); ! FUNCTION(gsl_vector, add) (v, b); ! { ! int status = 0; ! ! for (i = 0; i < N; i++) ! { ! BASE r = FUNCTION(gsl_vector,get) (v,i); ! BASE x = FUNCTION(gsl_vector,get) (a,i); ! BASE y = FUNCTION(gsl_vector,get) (b,i); ! BASE z = x + y; ! if (r != z) ! status = 1; ! } ! gsl_test (status, NAME (gsl_vector) "_add vector addition"); ! } ! FUNCTION(gsl_vector, memcpy) (v, a); ! FUNCTION(gsl_vector, sub) (v, b); ! { ! int status = 0; ! ! for (i = 0; i < N; i++) ! { ! BASE r = FUNCTION(gsl_vector,get) (v,i); ! BASE x = FUNCTION(gsl_vector,get) (a,i); ! BASE y = FUNCTION(gsl_vector,get) (b,i); ! BASE z = x - y; ! if (r != z) ! status = 1; ! } ! gsl_test (status, NAME (gsl_vector) "_sub vector subtraction"); ! } ! FUNCTION(gsl_vector, memcpy) (v, a); ! FUNCTION(gsl_vector, mul) (v, b); { ! int status = 0; ! ! for (i = 0; i < N; i++) ! { ! BASE r = FUNCTION(gsl_vector,get) (v,i); ! BASE x = FUNCTION(gsl_vector,get) (a,i); ! BASE y = FUNCTION(gsl_vector,get) (b,i); ! BASE z = x * y; ! if (r != z) ! status = 1; ! } ! gsl_test (status, NAME (gsl_vector) "_mul multiplication"); } ! FUNCTION(gsl_vector, memcpy) (v, a); ! FUNCTION(gsl_vector, div) (v, b); ! { ! int status = 0; ! ! for (i = 0; i < N; i++) ! { ! BASE r = FUNCTION(gsl_vector,get) (v,i); ! BASE x = FUNCTION(gsl_vector,get) (a,i); ! BASE y = FUNCTION(gsl_vector,get) (b,i); ! BASE z = x / y; ! if (fabs(r - z) > 2 * GSL_FLT_EPSILON * fabs(z)) ! status = 1; ! } ! gsl_test (status, NAME (gsl_vector) "_div division"); ! } ! FUNCTION(gsl_vector, free) (a); ! FUNCTION(gsl_vector, free) (b); ! } ! FUNCTION (gsl_vector, free) (v); /* free whatever is in v */ } void ! FUNCTION (test, binary) (void) { ! TYPE (gsl_vector) * v = FUNCTION (gsl_vector, calloc) (N); ! TYPE (gsl_vector) * w = FUNCTION (gsl_vector, calloc) (N); size_t i; --- 350,541 ---- FUNCTION(gsl_vector, minmax_index) (v, &imin, &imax); ! TEST (imax != exp_imax, "_minmax_index returns correct maximum i"); ! TEST (imin != exp_imin, "_minmax_index returns correct minimum i"); } } { ! int status = 0; ! ! QUALIFIED_VIEW(gsl_vector,view) v1 = FUNCTION(gsl_vector, view_array) (v->data, N*stride); for (i = 0; i < N; i++) { ! if (FUNCTION (gsl_vector, get) (&v1.vector, i*stride) != FUNCTION (gsl_vector, get) (v, i)) ! status = 1; ! }; ! ! TEST (status, "_view_array" DESC); ! } ! ! { ! int status = 0; ! QUALIFIED_VIEW(gsl_vector,view) v1 = FUNCTION(gsl_vector, view_array_with_stride) (v->data, stride, N*stride); ! for (i = 0; i < N; i++) ! { ! if (FUNCTION (gsl_vector, get) (&v1.vector, i) != FUNCTION (gsl_vector, get) (v, i)) ! status = 1; ! }; ! ! TEST (status, "_view_array_with_stride" DESC); ! } ! { ! int status = 0; ! QUALIFIED_VIEW(gsl_vector,view) v1 = FUNCTION(gsl_vector, subvector) (v, N/3, N/2); ! ! for (i = 0; i < N/2; i++) ! { ! if (FUNCTION (gsl_vector, get) (&v1.vector, i) != FUNCTION (gsl_vector, get) (v, (N/3) + i)) ! status = 1; ! }; ! ! TEST (status, "_view_subvector" DESC); ! } ! { ! int status = 0; ! ! QUALIFIED_VIEW(gsl_vector,view) v1 = FUNCTION(gsl_vector, subvector_with_stride) (v, N/5, 3, N/4); + for (i = 0; i < N/4; i++) + { + if (FUNCTION (gsl_vector, get) (&v1.vector, i) != FUNCTION (gsl_vector, get) (v, (N/5) + 3*i)) + status = 1; + }; + + TEST (status, "_view_subvector_with_stride" DESC); + } + + + + FUNCTION (gsl_vector, free) (v0); /* free whatever is in v */ + } + + void + FUNCTION (test, ops) (size_t stride1, size_t stride2, size_t N) + { + size_t i; + TYPE (gsl_vector) * a = FUNCTION (create, vector) (stride1, N); + TYPE (gsl_vector) * b = FUNCTION (create, vector) (stride2, N); + TYPE (gsl_vector) * v = FUNCTION (create, vector) (stride1, N); + + for (i = 0; i < N; i++) { ! FUNCTION (gsl_vector, set) (a, i, (BASE)(3 + i)); ! FUNCTION (gsl_vector, set) (b, i, (BASE)(3 + 2 * i)); } + + FUNCTION(gsl_vector, memcpy) (v, a); + FUNCTION(gsl_vector, add) (v, b); + + { + int status = 0; + + for (i = 0; i < N; i++) + { + BASE r = FUNCTION(gsl_vector,get) (v,i); + BASE x = FUNCTION(gsl_vector,get) (a,i); + BASE y = FUNCTION(gsl_vector,get) (b,i); + BASE z = x + y; + if (r != z) + status = 1; + } + TEST2 (status, "_add vector addition"); + } ! { ! int status = 0; ! FUNCTION(gsl_vector, swap) (a, b); + for (i = 0; i < N; i++) + { + status |= (FUNCTION (gsl_vector, get) (a, i) != (BASE)(3 + 2 * i)); + status |= (FUNCTION (gsl_vector, get) (b, i) != (BASE)(3 + i)); + } ! FUNCTION(gsl_vector, swap) (a, b); + for (i = 0; i < N; i++) + { + status |= (FUNCTION (gsl_vector, get) (a, i) != (BASE)(3 + i)); + status |= (FUNCTION (gsl_vector, get) (b, i) != (BASE)(3 + 2 * i)); + } + TEST2 (status, "_swap exchange vectors"); + } + + FUNCTION(gsl_vector, memcpy) (v, a); + FUNCTION(gsl_vector, sub) (v, b); + + { + int status = 0; + + for (i = 0; i < N; i++) + { + BASE r = FUNCTION(gsl_vector,get) (v,i); + BASE x = FUNCTION(gsl_vector,get) (a,i); + BASE y = FUNCTION(gsl_vector,get) (b,i); + BASE z = x - y; + if (r != z) + status = 1; + } + TEST2 (status, "_sub vector subtraction"); + } + + FUNCTION(gsl_vector, memcpy) (v, a); + FUNCTION(gsl_vector, mul) (v, b); + + { + int status = 0; + + for (i = 0; i < N; i++) + { + BASE r = FUNCTION(gsl_vector,get) (v,i); + BASE x = FUNCTION(gsl_vector,get) (a,i); + BASE y = FUNCTION(gsl_vector,get) (b,i); + BASE z = x * y; + if (r != z) + status = 1; + } ! TEST2 (status, "_mul multiplication"); ! } ! ! FUNCTION(gsl_vector, memcpy) (v, a); ! FUNCTION(gsl_vector, div) (v, b); ! ! { ! int status = 0; ! ! for (i = 0; i < N; i++) ! { ! BASE r = FUNCTION(gsl_vector,get) (v,i); ! BASE x = FUNCTION(gsl_vector,get) (a,i); ! BASE y = FUNCTION(gsl_vector,get) (b,i); ! BASE z = x / y; ! if (fabs(r - z) > 2 * GSL_FLT_EPSILON * fabs(z)) ! status = 1; ! } ! TEST2 (status, "_div division"); ! } ! ! FUNCTION(gsl_vector, free) (a); ! FUNCTION(gsl_vector, free) (b); ! FUNCTION(gsl_vector, free) (v); } void ! FUNCTION (test, file) (size_t stride, size_t N) { ! TYPE (gsl_vector) * v = FUNCTION (create, vector) (stride, N); ! TYPE (gsl_vector) * w = FUNCTION (create, vector) (stride, N); size_t i; *************** *** 312,320 **** for (i = 0; i < N; i++) { ! if (w->data[i] != (ATOMIC) (N - i)) status = 1; }; ! gsl_test (status, NAME (gsl_vector) "_write and read"); fclose (f); --- 562,570 ---- for (i = 0; i < N; i++) { ! if (w->data[i*stride] != (ATOMIC) (N - i)) status = 1; }; ! TEST (status, "_write and read"); fclose (f); *************** *** 325,365 **** } void ! FUNCTION (test, trap) (void) { ! TYPE (gsl_vector) * v = FUNCTION (gsl_vector, alloc) (N); ! size_t j = 0; double x; status = 0; FUNCTION (gsl_vector, set) (v, j - 1, (ATOMIC)0); ! gsl_test (!status, NAME (gsl_vector) "_set traps index below lower bound"); status = 0; FUNCTION (gsl_vector, set) (v, N + 1, (ATOMIC)0); ! gsl_test (!status, NAME (gsl_vector) "_set traps index above upper bound"); status = 0; FUNCTION (gsl_vector, set) (v, N, (ATOMIC)0); ! gsl_test (!status, NAME (gsl_vector) "_set traps index at upper bound"); status = 0; x = FUNCTION (gsl_vector, get) (v, j - 1); ! gsl_test (!status, NAME (gsl_vector) "_get traps index below lower bound"); ! gsl_test (x != 0, ! NAME (gsl_vector) "_get returns zero for index below lower bound"); status = 0; x = FUNCTION (gsl_vector, get) (v, N + 1); ! gsl_test (!status, NAME (gsl_vector) "_get traps index above upper bound"); ! gsl_test (x != 0, ! NAME (gsl_vector) "_get returns zero for index above upper bound"); status = 0; x = FUNCTION (gsl_vector, get) (v, N); ! gsl_test (!status, NAME (gsl_vector) "_get traps index at upper bound"); ! gsl_test (x != 0, ! NAME (gsl_vector) "_get returns zero for index at upper bound"); FUNCTION (gsl_vector, free) (v); /* free whatever is in v */ --- 575,659 ---- } + #if USES_LONGDOUBLE && ! HAVE_PRINTF_LONGDOUBLE + /* skip this test */ + #else void ! FUNCTION (test, text) (size_t stride, size_t N) { ! TYPE (gsl_vector) * v = FUNCTION (create, vector) (stride, N); ! TYPE (gsl_vector) * w = FUNCTION (create, vector) (stride, N); ! size_t i; ! ! { ! FILE *f = fopen ("test.txt", "w"); ! ! for (i = 0; i < N; i++) ! { ! FUNCTION (gsl_vector, set) (v, i, (ATOMIC) i); ! }; ! ! FUNCTION (gsl_vector, fprintf) (f, v, OUT_FORMAT); ! ! fclose (f); ! } ! ! { ! FILE *f = fopen ("test.txt", "r"); ! ! FUNCTION (gsl_vector, fscanf) (f, w); ! ! status = 0; ! for (i = 0; i < N; i++) ! { ! if (w->data[i*stride] != (ATOMIC) i) ! status = 1; ! }; ! ! gsl_test (status, NAME (gsl_vector) "_fprintf and fscanf"); ! ! fclose (f); ! } ! ! FUNCTION (gsl_vector, free) (v); ! FUNCTION (gsl_vector, free) (w); ! } ! #endif ! ! void ! FUNCTION (test, trap) (size_t stride, size_t N) ! { double x; + size_t j = 0; + TYPE (gsl_vector) * v = FUNCTION (create, vector) (stride, N); + v->size = N; + v->stride = stride; status = 0; FUNCTION (gsl_vector, set) (v, j - 1, (ATOMIC)0); ! TEST (!status, "_set traps index below lower bound"); status = 0; FUNCTION (gsl_vector, set) (v, N + 1, (ATOMIC)0); ! TEST (!status, "_set traps index above upper bound"); status = 0; FUNCTION (gsl_vector, set) (v, N, (ATOMIC)0); ! TEST (!status, "_set traps index at upper bound"); status = 0; x = FUNCTION (gsl_vector, get) (v, j - 1); ! TEST (!status, "_get traps index below lower bound"); ! TEST (x != 0, "_get returns zero for index below lower bound"); status = 0; x = FUNCTION (gsl_vector, get) (v, N + 1); ! TEST (!status, "_get traps index above upper bound"); ! TEST (x != 0, "_get returns zero for index above upper bound"); status = 0; x = FUNCTION (gsl_vector, get) (v, N); ! TEST (!status, "_get traps index at upper bound"); ! TEST (x != 0, "_get returns zero for index at upper bound"); FUNCTION (gsl_vector, free) (v); /* free whatever is in v */ diff -rc2P -x *.info -x *.info-* gsl-1.5/wavelet/ChangeLog gsl-1.6/wavelet/ChangeLog *** gsl-1.5/wavelet/ChangeLog Thu Jan 1 01:00:00 1970 --- gsl-1.6/wavelet/ChangeLog Wed Dec 29 16:41:26 2004 *************** *** 0 **** --- 1,9 ---- + 2004-12-29 Brian Gough + + * gsl_wavelet.h: added missing includes, use GSL_VAR instead of + extern + + 2004-07-23 Brian Gough + + * added wavelet directory from Ivo Alxneit. + diff -rc2P -x *.info -x *.info-* gsl-1.5/wavelet/Makefile.am gsl-1.6/wavelet/Makefile.am *** gsl-1.5/wavelet/Makefile.am Thu Jan 1 01:00:00 1970 --- gsl-1.6/wavelet/Makefile.am Fri Jul 23 17:55:13 2004 *************** *** 0 **** --- 1,17 ---- + noinst_LTLIBRARIES = libgslwavelet.la + + pkginclude_HEADERS = gsl_wavelet.h gsl_wavelet2d.h + + INCLUDES= -I$(top_builddir) + + libgslwavelet_la_SOURCES = dwt.c wavelet.c bspline.c daubechies.c haar.c + + TESTS = test + + check_PROGRAMS = test + + test_LDADD = libgslwavelet.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + + test_SOURCES = test.c + + diff -rc2P -x *.info -x *.info-* gsl-1.5/wavelet/Makefile.in gsl-1.6/wavelet/Makefile.in *** gsl-1.5/wavelet/Makefile.in Thu Jan 1 01:00:00 1970 --- gsl-1.6/wavelet/Makefile.in Fri Dec 31 15:15:43 2004 *************** *** 0 **** --- 1,523 ---- + # Makefile.in generated by automake 1.7.5 from Makefile.am. + # @configure_input@ + + # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 + # Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. + + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY, to the extent permitted by law; without + # even the implied warranty of MERCHANTABILITY or FITNESS FOR A + # PARTICULAR PURPOSE. + + @SET_MAKE@ + + srcdir = @srcdir@ + top_srcdir = @top_srcdir@ + VPATH = @srcdir@ + pkgdatadir = $(datadir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ + top_builddir = .. + + am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd + INSTALL = @INSTALL@ + install_sh_DATA = $(install_sh) -c -m 644 + install_sh_PROGRAM = $(install_sh) -c + install_sh_SCRIPT = $(install_sh) -c + INSTALL_HEADER = $(INSTALL_DATA) + transform = $(program_transform_name) + NORMAL_INSTALL = : + PRE_INSTALL = : + POST_INSTALL = : + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : + host_triplet = @host@ + ACLOCAL = @ACLOCAL@ + AMTAR = @AMTAR@ + AR = @AR@ + AUTOCONF = @AUTOCONF@ + AUTOHEADER = @AUTOHEADER@ + AUTOMAKE = @AUTOMAKE@ + AWK = @AWK@ + CC = @CC@ + CFLAGS = @CFLAGS@ + CPP = @CPP@ + CPPFLAGS = @CPPFLAGS@ + CYGPATH_W = @CYGPATH_W@ + DEFS = @DEFS@ + ECHO = @ECHO@ + ECHO_C = @ECHO_C@ + ECHO_N = @ECHO_N@ + ECHO_T = @ECHO_T@ + EGREP = @EGREP@ + EXEEXT = @EXEEXT@ + GSL_CFLAGS = @GSL_CFLAGS@ + GSL_LIBS = @GSL_LIBS@ + GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ + GSL_LT_VERSION = @GSL_LT_VERSION@ + HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ + HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ + HAVE_EXTENDED_PRECISION_REGISTERS = @HAVE_EXTENDED_PRECISION_REGISTERS@ + HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ + HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ + HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ + HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ + HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ + HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ + HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ + HAVE_IEEE_COMPARISONS = @HAVE_IEEE_COMPARISONS@ + HAVE_IEEE_DENORMALS = @HAVE_IEEE_DENORMALS@ + HAVE_INLINE = @HAVE_INLINE@ + HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ + HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ + HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ + HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ + HAVE_PRINTF_LONGDOUBLE = @HAVE_PRINTF_LONGDOUBLE@ + HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ + HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ + HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ + INSTALL_DATA = @INSTALL_DATA@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ + LN_S = @LN_S@ + LTLIBOBJS = @LTLIBOBJS@ + MAINT = @MAINT@ + MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ + MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ + MAKEINFO = @MAKEINFO@ + OBJEXT = @OBJEXT@ + PACKAGE = @PACKAGE@ + PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + RANLIB = @RANLIB@ + RELEASED = @RELEASED@ + SET_MAKE = @SET_MAKE@ + SHELL = @SHELL@ + STRIP = @STRIP@ + VERSION = @VERSION@ + ac_ct_AR = @ac_ct_AR@ + ac_ct_CC = @ac_ct_CC@ + ac_ct_RANLIB = @ac_ct_RANLIB@ + ac_ct_STRIP = @ac_ct_STRIP@ + am__leading_dot = @am__leading_dot@ + bindir = @bindir@ + build = @build@ + build_alias = @build_alias@ + build_cpu = @build_cpu@ + build_os = @build_os@ + build_vendor = @build_vendor@ + datadir = @datadir@ + exec_prefix = @exec_prefix@ + host = @host@ + host_alias = @host_alias@ + host_cpu = @host_cpu@ + host_os = @host_os@ + host_vendor = @host_vendor@ + includedir = @includedir@ + infodir = @infodir@ + install_sh = @install_sh@ + libdir = @libdir@ + libexecdir = @libexecdir@ + localstatedir = @localstatedir@ + mandir = @mandir@ + oldincludedir = @oldincludedir@ + prefix = @prefix@ + program_transform_name = @program_transform_name@ + sbindir = @sbindir@ + sharedstatedir = @sharedstatedir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ + noinst_LTLIBRARIES = libgslwavelet.la + + pkginclude_HEADERS = gsl_wavelet.h gsl_wavelet2d.h + + INCLUDES = -I$(top_builddir) + + libgslwavelet_la_SOURCES = dwt.c wavelet.c bspline.c daubechies.c haar.c + + TESTS = test + + check_PROGRAMS = test + + test_LDADD = libgslwavelet.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + + test_SOURCES = test.c + subdir = wavelet + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs + CONFIG_HEADER = $(top_builddir)/config.h + CONFIG_CLEAN_FILES = + LTLIBRARIES = $(noinst_LTLIBRARIES) + + libgslwavelet_la_LDFLAGS = + libgslwavelet_la_LIBADD = + am_libgslwavelet_la_OBJECTS = dwt.lo wavelet.lo bspline.lo daubechies.lo \ + haar.lo + libgslwavelet_la_OBJECTS = $(am_libgslwavelet_la_OBJECTS) + check_PROGRAMS = test$(EXEEXT) + am_test_OBJECTS = test.$(OBJEXT) + test_OBJECTS = $(am_test_OBJECTS) + test_DEPENDENCIES = libgslwavelet.la ../blas/libgslblas.la \ + ../cblas/libgslcblas.la ../matrix/libgslmatrix.la \ + ../vector/libgslvector.la ../block/libgslblock.la \ + ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la \ + ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + test_LDFLAGS = + + DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) + depcomp = + am__depfiles_maybe = + COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ + $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + CCLD = $(CC) + LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + DIST_SOURCES = $(libgslwavelet_la_SOURCES) $(test_SOURCES) + HEADERS = $(pkginclude_HEADERS) + + DIST_COMMON = $(pkginclude_HEADERS) ChangeLog Makefile.am Makefile.in \ + TODO + SOURCES = $(libgslwavelet_la_SOURCES) $(test_SOURCES) + + all: all-am + + .SUFFIXES: + .SUFFIXES: .c .lo .o .obj + $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu wavelet/Makefile + Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) + + clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" = "$$p" && dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done + libgslwavelet.la: $(libgslwavelet_la_OBJECTS) $(libgslwavelet_la_DEPENDENCIES) + $(LINK) $(libgslwavelet_la_LDFLAGS) $(libgslwavelet_la_OBJECTS) $(libgslwavelet_la_LIBADD) $(LIBS) + + clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done + test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_LDFLAGS) $(test_OBJECTS) $(test_LDADD) $(LIBS) + + mostlyclean-compile: + -rm -f *.$(OBJEXT) core *.core + + distclean-compile: + -rm -f *.tab.c + + .c.o: + $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< + + .c.obj: + $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` + + .c.lo: + $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< + + mostlyclean-libtool: + -rm -f *.lo + + clean-libtool: + -rm -rf .libs _libs + + distclean-libtool: + -rm -f libtool + uninstall-info-am: + pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER) + install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(pkgincludedir) + @list='$(pkginclude_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(pkgincludeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(pkgincludedir)/$$f"; \ + $(pkgincludeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(pkgincludedir)/$$f; \ + done + + uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; for p in $$list; do \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " rm -f $(DESTDIR)$(pkgincludedir)/$$f"; \ + rm -f $(DESTDIR)$(pkgincludedir)/$$f; \ + done + + ETAGS = etags + ETAGSFLAGS = + + CTAGS = ctags + CTAGSFLAGS = + + tags: TAGS + + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique + + TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$tags$$unique" \ + || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique + + ctags: CTAGS + CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + + GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + + distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + + check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list='$(TESTS)'; \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *" $$tst "*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + echo "XPASS: $$tst"; \ + ;; \ + *) \ + echo "PASS: $$tst"; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *" $$tst "*) \ + xfail=`expr $$xfail + 1`; \ + echo "XFAIL: $$tst"; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + echo "FAIL: $$tst"; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + echo "SKIP: $$tst"; \ + fi; \ + done; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="All $$all tests passed"; \ + else \ + banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all tests failed"; \ + else \ + banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + skipped="($$skip tests were not run)"; \ + test `echo "$$skipped" | wc -c` -gt `echo "$$banner" | wc -c` && \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -gt `echo "$$banner" | wc -c` && \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + echo "$$dashes"; \ + echo "$$banner"; \ + test -n "$$skipped" && echo "$$skipped"; \ + test -n "$$report" && echo "$$report"; \ + echo "$$dashes"; \ + test "$$failed" -eq 0; \ + else :; fi + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + + top_distdir = .. + distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + + distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkinstalldirs) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS + check: check-am + all-am: Makefile $(LTLIBRARIES) $(HEADERS) + + installdirs: + $(mkinstalldirs) $(DESTDIR)$(pkgincludedir) + install: install-am + install-exec: install-exec-am + install-data: install-data-am + uninstall: uninstall-am + + install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + + installcheck: installcheck-am + install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + mostlyclean-generic: + + clean-generic: + + distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + + maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + clean: clean-am + + clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + + distclean: distclean-am + + distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags + + dvi: dvi-am + + dvi-am: + + info: info-am + + info-am: + + install-data-am: install-pkgincludeHEADERS + + install-exec-am: + + install-info: install-info-am + + install-man: + + installcheck-am: + + maintainer-clean: maintainer-clean-am + + maintainer-clean-am: distclean-am maintainer-clean-generic + + mostlyclean: mostlyclean-am + + mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + + pdf: pdf-am + + pdf-am: + + ps: ps-am + + ps-am: + + uninstall-am: uninstall-info-am uninstall-pkgincludeHEADERS + + .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-man install-pkgincludeHEADERS \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool pdf \ + pdf-am ps ps-am tags uninstall uninstall-am uninstall-info-am \ + uninstall-pkgincludeHEADERS + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: diff -rc2P -x *.info -x *.info-* gsl-1.5/wavelet/TODO gsl-1.6/wavelet/TODO *** gsl-1.5/wavelet/TODO Thu Jan 1 01:00:00 1970 --- gsl-1.6/wavelet/TODO Fri Jul 23 17:55:13 2004 *************** *** 0 **** --- 1,11 ---- + * Implement more wavelet types: + Check the literature to find out what are commonly used types. Candidates + could be coiflets and symmlets. + ** Coefficients for coiflets and symmlets found so far are only with a + precision of about eight digts. This is probaly insufficient. + + * Wavelet packet transform: + Should include utility functions for selecting the coefficients according + to "dwt-type", "best basis" or "best level". + + * Continuous wavelet transform. diff -rc2P -x *.info -x *.info-* gsl-1.5/wavelet/bspline.c gsl-1.6/wavelet/bspline.c *** gsl-1.5/wavelet/bspline.c Thu Jan 1 01:00:00 1970 --- gsl-1.6/wavelet/bspline.c Fri Dec 24 13:57:11 2004 *************** *** 0 **** --- 1,591 ---- + /* wavelet/bspline.c + * + * Copyright (C) 2004 Ivo Alxneit + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + /* Coefficients are from A. Cohen, I. Daubechies, and J.-C. Feauveau; + * "Biorthogonal Bases of Compactly Supported Wavelets", Communications + * on Pure and Apllied Mathematics, 45 (1992) 485--560 (table 6.1). + * + * Note the following errors in table 1: + * + * N = 2, N~ = 4, m0~ + * the second term in z^-1 (45/64 z^-1) should be left out. + * + * N = 3, N~ = 7, m0~ + * the term 336z^-3 should read 363z^-3. + */ + + #include + #include + #include + #include + + static const double h1_103[6] = { -0.0883883476483184405501055452631, + 0.0883883476483184405501055452631, + M_SQRT1_2, + M_SQRT1_2, + 0.0883883476483184405501055452631, + -0.0883883476483184405501055452631 + }; + + static const double g2_103[6] = { -0.0883883476483184405501055452631, + -0.0883883476483184405501055452631, + M_SQRT1_2, + -(M_SQRT1_2), + 0.0883883476483184405501055452631, + 0.0883883476483184405501055452631 + }; + + static const double h1_105[10] = { 0.0165728151840597076031447897368, + -0.0165728151840597076031447897368, + -0.1215339780164378557563951247368, + 0.1215339780164378557563951247368, + M_SQRT1_2, + M_SQRT1_2, + 0.1215339780164378557563951247368, + -0.1215339780164378557563951247368, + -0.0165728151840597076031447897368, + 0.0165728151840597076031447897368 + }; + + static const double g2_105[10] = { 0.0165728151840597076031447897368, + 0.0165728151840597076031447897368, + -0.1215339780164378557563951247368, + -0.1215339780164378557563951247368, + M_SQRT1_2, + -(M_SQRT1_2), + 0.1215339780164378557563951247368, + 0.1215339780164378557563951247368, + -0.0165728151840597076031447897368, + -0.0165728151840597076031447897368 + }; + + static const double g1_1[10] = { 0.0, 0.0, 0.0, 0.0, + M_SQRT1_2, + -(M_SQRT1_2), + 0.0, 0.0, 0.0, 0.0 + }; + + static const double h2_1[10] = { 0.0, 0.0, 0.0, 0.0, + M_SQRT1_2, + M_SQRT1_2, + 0.0, 0.0, 0.0, 0.0 + }; + + static const double h1_202[6] = { -0.1767766952966368811002110905262, + 0.3535533905932737622004221810524, + 1.0606601717798212866012665431573, + 0.3535533905932737622004221810524, + -0.1767766952966368811002110905262, + 0.0 + }; + + static const double g2_202[6] = { 0.0, + -0.1767766952966368811002110905262, + -0.3535533905932737622004221810524, + 1.0606601717798212866012665431573, + -0.3535533905932737622004221810524, + -0.1767766952966368811002110905262 + }; + + static const double h1_204[10] = { 0.0331456303681194152062895794737, + -0.0662912607362388304125791589473, + -0.1767766952966368811002110905262, + 0.4198446513295125926130013399998, + 0.9943689110435824561886873842099, + 0.4198446513295125926130013399998, + -0.1767766952966368811002110905262, + -0.0662912607362388304125791589473, + 0.0331456303681194152062895794737, + 0.0 + }; + + static const double g2_204[10] = { 0.0, + 0.0331456303681194152062895794737, + 0.0662912607362388304125791589473, + -0.1767766952966368811002110905262, + -0.4198446513295125926130013399998, + 0.9943689110435824561886873842099, + -0.4198446513295125926130013399998, + -0.1767766952966368811002110905262, + 0.0662912607362388304125791589473, + 0.0331456303681194152062895794737 + }; + + static const double h1_206[14] = { -0.0069053396600248781679769957237, + 0.0138106793200497563359539914474, + 0.0469563096881691715422435709210, + -0.1077232986963880994204411332894, + -0.1698713556366120029322340948025, + 0.4474660099696121052849093228945, + 0.9667475524034829435167794013152, + 0.4474660099696121052849093228945, + -0.1698713556366120029322340948025, + -0.1077232986963880994204411332894, + 0.0469563096881691715422435709210, + 0.0138106793200497563359539914474, + -0.0069053396600248781679769957237, + 0.0 + }; + + static const double g2_206[14] = { 0.0, + -0.0069053396600248781679769957237, + -0.0138106793200497563359539914474, + 0.0469563096881691715422435709210, + 0.1077232986963880994204411332894, + -0.1698713556366120029322340948025, + -0.4474660099696121052849093228945, + 0.9667475524034829435167794013152, + -0.4474660099696121052849093228945, + -0.1698713556366120029322340948025, + 0.1077232986963880994204411332894, + 0.0469563096881691715422435709210, + -0.0138106793200497563359539914474, + -0.0069053396600248781679769957237, + }; + + static const double h1_208[18] = { 0.0015105430506304420992449678146, + -0.0030210861012608841984899356291, + -0.0129475118625466465649568669819, + 0.0289161098263541773284036695929, + 0.0529984818906909399392234421792, + -0.1349130736077360572068505539514, + -0.1638291834340902345352542235443, + 0.4625714404759165262773590010400, + 0.9516421218971785225243297231697, + 0.4625714404759165262773590010400, + -0.1638291834340902345352542235443, + -0.1349130736077360572068505539514, + 0.0529984818906909399392234421792, + 0.0289161098263541773284036695929, + -0.0129475118625466465649568669819, + -0.0030210861012608841984899356291, + 0.0015105430506304420992449678146, + 0.0 + }; + + static const double g2_208[18] = { 0.0, + 0.0015105430506304420992449678146, + 0.0030210861012608841984899356291, + -0.0129475118625466465649568669819, + -0.0289161098263541773284036695929, + 0.0529984818906909399392234421792, + 0.1349130736077360572068505539514, + -0.1638291834340902345352542235443, + -0.4625714404759165262773590010400, + 0.9516421218971785225243297231697, + -0.4625714404759165262773590010400, + -0.1638291834340902345352542235443, + 0.1349130736077360572068505539514, + 0.0529984818906909399392234421792, + -0.0289161098263541773284036695929, + -0.0129475118625466465649568669819, + 0.0030210861012608841984899356291, + 0.0015105430506304420992449678146, + }; + + static const double h2_2[18] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.3535533905932737622004221810524, + 0.7071067811865475244008443621048, + 0.3535533905932737622004221810524, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 + }; + + static const double g1_2[18] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + -0.3535533905932737622004221810524, + 0.7071067811865475244008443621048, + -0.3535533905932737622004221810524, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 + }; + + static const double h1_301[4] = { -0.3535533905932737622004221810524, + 1.0606601717798212866012665431573, + 1.0606601717798212866012665431573, + -0.3535533905932737622004221810524 + }; + + static const double g2_301[4] = { 0.3535533905932737622004221810524, + 1.0606601717798212866012665431573, + -1.0606601717798212866012665431573, + -0.3535533905932737622004221810524 + }; + + static const double h1_303[8] = { 0.0662912607362388304125791589473, + -0.1988737822087164912377374768420, + -0.1546796083845572709626847042104, + 0.9943689110435824561886873842099, + 0.9943689110435824561886873842099, + -0.1546796083845572709626847042104, + -0.1988737822087164912377374768420, + 0.0662912607362388304125791589473 + }; + + static const double g2_303[8] = { -0.0662912607362388304125791589473, + -0.1988737822087164912377374768420, + 0.1546796083845572709626847042104, + 0.9943689110435824561886873842099, + -0.9943689110435824561886873842099, + -0.1546796083845572709626847042104, + 0.1988737822087164912377374768420, + 0.0662912607362388304125791589473 + }; + + static const double h1_305[12] = { -0.0138106793200497563359539914474, + 0.0414320379601492690078619743421, + 0.0524805814161890740766251675000, + -0.2679271788089652729175074340788, + -0.0718155324642587329469607555263, + 0.9667475524034829435167794013152, + 0.9667475524034829435167794013152, + -0.0718155324642587329469607555263, + -0.2679271788089652729175074340788, + 0.0524805814161890740766251675000, + 0.0414320379601492690078619743421, + -0.0138106793200497563359539914474 + }; + + static const double g2_305[12] = { 0.0138106793200497563359539914474, + 0.0414320379601492690078619743421, + -0.0524805814161890740766251675000, + -0.2679271788089652729175074340788, + 0.0718155324642587329469607555263, + 0.9667475524034829435167794013152, + -0.9667475524034829435167794013152, + -0.0718155324642587329469607555263, + 0.2679271788089652729175074340788, + 0.0524805814161890740766251675000, + -0.0414320379601492690078619743421, + -0.0138106793200497563359539914474 + }; + + static const double h1_307[16] = { 0.0030210861012608841984899356291, + -0.0090632583037826525954698068873, + -0.0168317654213106405344439270765, + 0.0746639850740189951912512662623, + 0.0313329787073628846871956180962, + -0.3011591259228349991008967259990, + -0.0264992409453454699696117210896, + 0.9516421218971785225243297231697, + 0.9516421218971785225243297231697, + -0.0264992409453454699696117210896, + -0.3011591259228349991008967259990, + 0.0313329787073628846871956180962, + 0.0746639850740189951912512662623, + -0.0168317654213106405344439270765, + -0.0090632583037826525954698068873, + 0.0030210861012608841984899356291 + }; + + static const double g2_307[16] = { -0.0030210861012608841984899356291, + -0.0090632583037826525954698068873, + 0.0168317654213106405344439270765, + 0.0746639850740189951912512662623, + -0.0313329787073628846871956180962, + -0.3011591259228349991008967259990, + 0.0264992409453454699696117210896, + 0.9516421218971785225243297231697, + -0.9516421218971785225243297231697, + -0.0264992409453454699696117210896, + 0.3011591259228349991008967259990, + 0.0313329787073628846871956180962, + -0.0746639850740189951912512662623, + -0.0168317654213106405344439270765, + 0.0090632583037826525954698068873, + 0.0030210861012608841984899356291 + }; + + static const double h1_309[20] = { -0.0006797443727836989446602355165, + 0.0020392331183510968339807065496, + 0.0050603192196119810324706421788, + -0.0206189126411055346546938106687, + -0.0141127879301758447558029850103, + 0.0991347824942321571990197448581, + 0.0123001362694193142367090236328, + -0.3201919683607785695513833204624, + 0.0020500227115698857061181706055, + 0.9421257006782067372990864259380, + 0.9421257006782067372990864259380, + 0.0020500227115698857061181706055, + -0.3201919683607785695513833204624, + 0.0123001362694193142367090236328, + 0.0991347824942321571990197448581, + -0.0141127879301758447558029850103, + -0.0206189126411055346546938106687, + 0.0050603192196119810324706421788, + 0.0020392331183510968339807065496, + -0.0006797443727836989446602355165 + }; + + static const double g2_309[20] = { 0.0006797443727836989446602355165, + 0.0020392331183510968339807065496, + -0.0050603192196119810324706421788, + -0.0206189126411055346546938106687, + 0.0141127879301758447558029850103, + 0.0991347824942321571990197448581, + -0.0123001362694193142367090236328, + -0.3201919683607785695513833204624, + -0.0020500227115698857061181706055, + 0.9421257006782067372990864259380, + -0.9421257006782067372990864259380, + 0.0020500227115698857061181706055, + 0.3201919683607785695513833204624, + 0.0123001362694193142367090236328, + -0.0991347824942321571990197448581, + -0.0141127879301758447558029850103, + 0.0206189126411055346546938106687, + 0.0050603192196119810324706421788, + -0.0020392331183510968339807065496, + -0.0006797443727836989446602355165 + }; + + static const double h2_3[20] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.1767766952966368811002110905262, + 0.5303300858899106433006332715786, + 0.5303300858899106433006332715786, + 0.1767766952966368811002110905262, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 + }; + + static const double g1_3[20] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + -0.1767766952966368811002110905262, + 0.5303300858899106433006332715786, + -0.5303300858899106433006332715786, + 0.1767766952966368811002110905262, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 + }; + + static int + bspline_init (const double **h1, const double **g1, + const double **h2, const double **g2, size_t * nc, + size_t * offset, size_t member) + { + switch (member) + { + case 103: + *nc = 6; + *h1 = h1_103; + *g1 = &g1_1[2]; + *h2 = &h2_1[2]; + *g2 = g2_103; + break; + + case 105: + *nc = 10; + *h1 = h1_105; + *g1 = g1_1; + *h2 = h2_1; + *g2 = g2_105; + break; + + case 202: + *nc = 6; + *h1 = h1_202; + *g1 = &g1_2[6]; + *h2 = &h2_2[6]; + *g2 = g2_202; + break; + + case 204: + *nc = 10; + *h1 = h1_204; + *g1 = &g1_2[4]; + *h2 = &h2_2[4]; + *g2 = g2_204; + break; + + case 206: + *nc = 14; + *h1 = h1_206; + *g1 = &g1_2[2]; + *h2 = &h2_2[2]; + *g2 = g2_206; + break; + + case 208: + *nc = 18; + *h1 = h1_208; + *g1 = g1_2; + *h2 = h2_2; + *g2 = g2_208; + break; + + case 301: + *nc = 4; + *h1 = h1_301; + *g1 = &g1_3[8]; + *h2 = &h2_3[8]; + *g2 = g2_301; + break; + + case 303: + *nc = 8; + *h1 = h1_303; + *g1 = &g1_3[6]; + *h2 = &h2_3[6]; + *g2 = g2_303; + break; + + case 305: + *nc = 12; + *h1 = h1_305; + *g1 = &g1_3[4]; + *h2 = &h2_3[4]; + *g2 = g2_305; + break; + + case 307: + *nc = 16; + *h1 = h1_307; + *g1 = &g1_3[2]; + *h2 = &h2_3[2]; + *g2 = g2_307; + break; + + case 309: + *nc = 20; + *h1 = h1_309; + *g1 = g1_3; + *h2 = h2_3; + *g2 = g2_309; + break; + + default: + return GSL_FAILURE; + } + + *offset = 0; + + return GSL_SUCCESS; + } + + static int + bspline_centered_init (const double **h1, const double **g1, + const double **h2, const double **g2, size_t * nc, + size_t * offset, size_t member) + { + switch (member) + { + case 103: + *nc = 6; + *h1 = h1_103; + *g1 = &g1_1[2]; + *h2 = &h2_1[2]; + *g2 = g2_103; + break; + + case 105: + *nc = 10; + *h1 = h1_105; + *g1 = g1_1; + *h2 = h2_1; + *g2 = g2_105; + break; + + case 202: + *nc = 6; + *h1 = h1_202; + *g1 = &g1_2[6]; + *h2 = &h2_2[6]; + *g2 = g2_202; + break; + + case 204: + *nc = 10; + *h1 = h1_204; + *g1 = &g1_2[4]; + *h2 = &h2_2[4]; + *g2 = g2_204; + break; + + case 206: + *nc = 14; + *h1 = h1_206; + *g1 = &g1_2[2]; + *h2 = &h2_2[2]; + *g2 = g2_206; + break; + + case 208: + *nc = 18; + *h1 = h1_208; + *g1 = g1_2; + *h2 = h2_2; + *g2 = g2_208; + break; + + case 301: + *nc = 4; + *h1 = h1_301; + *g1 = &g1_3[8]; + *h2 = &h2_3[8]; + *g2 = g2_301; + break; + + case 303: + *nc = 8; + *h1 = h1_303; + *g1 = &g1_3[6]; + *h2 = &h2_3[6]; + *g2 = g2_303; + break; + + case 305: + *nc = 12; + *h1 = h1_305; + *g1 = &g1_3[4]; + *h2 = &h2_3[4]; + *g2 = g2_305; + break; + + case 307: + *nc = 16; + *h1 = h1_307; + *g1 = &g1_3[2]; + *h2 = &h2_3[2]; + *g2 = g2_307; + break; + + case 309: + *nc = 20; + *h1 = h1_309; + *g1 = g1_3; + *h2 = h2_3; + *g2 = g2_309; + break; + + default: + return GSL_FAILURE; + } + + *offset = ((*nc) >> 1); + + return GSL_SUCCESS; + } + + static const gsl_wavelet_type bspline_type = { + "bspline", + &bspline_init + }; + + static const gsl_wavelet_type bspline_centered_type = { + "bspline-centered", + &bspline_centered_init + }; + + const gsl_wavelet_type *gsl_wavelet_bspline = &bspline_type; + const gsl_wavelet_type *gsl_wavelet_bspline_centered = &bspline_centered_type; diff -rc2P -x *.info -x *.info-* gsl-1.5/wavelet/daubechies.c gsl-1.6/wavelet/daubechies.c *** gsl-1.5/wavelet/daubechies.c Thu Jan 1 01:00:00 1970 --- gsl-1.6/wavelet/daubechies.c Fri Dec 24 13:57:11 2004 *************** *** 0 **** --- 1,458 ---- + /* wavelet/daubechies.c + * + * Copyright (C) 2004 Ivo Alxneit + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + /* + * Coefficients for Daubechies wavelets of extremal phase are from + * I. Daubechies, "Orthonormal Bases of Compactly Supported Wavelets", + * Communications on Pure and Apllied Mathematics, 41 (1988) 909--996 + * (table 1). + * Additional digits have been obtained using the Mathematica package + * Daubechies.m by Tong Chen & Meng Xu available at + * http://www.cwp.mines.edu/wavelets/. + */ + + #include + #include + #include + + static const double h_4[4] = { 0.48296291314453414337487159986, + 0.83651630373780790557529378092, + 0.22414386804201338102597276224, + -0.12940952255126038117444941881 + }; + + static const double g_4[4] = { -0.12940952255126038117444941881, + -0.22414386804201338102597276224, + 0.83651630373780790557529378092, + -0.48296291314453414337487159986 + }; + + static const double h_6[6] = { 0.33267055295008261599851158914, + 0.80689150931109257649449360409, + 0.45987750211849157009515194215, + -0.13501102001025458869638990670, + -0.08544127388202666169281916918, + 0.03522629188570953660274066472 + }; + + static const double g_6[6] = { 0.03522629188570953660274066472, + 0.08544127388202666169281916918, + -0.13501102001025458869638990670, + -0.45987750211849157009515194215, + 0.80689150931109257649449360409, + -0.33267055295008261599851158914 + }; + + static const double h_8[8] = { 0.23037781330889650086329118304, + 0.71484657055291564708992195527, + 0.63088076792985890788171633830, + -0.02798376941685985421141374718, + -0.18703481171909308407957067279, + 0.03084138183556076362721936253, + 0.03288301166688519973540751355, + -0.01059740178506903210488320852 + }; + + static const double g_8[8] = { -0.01059740178506903210488320852, + -0.03288301166688519973540751355, + 0.03084138183556076362721936253, + 0.18703481171909308407957067279, + -0.02798376941685985421141374718, + -0.63088076792985890788171633830, + 0.71484657055291564708992195527, + -0.23037781330889650086329118304 + }; + + static const double h_10[10] = { 0.16010239797419291448072374802, + 0.60382926979718967054011930653, + 0.72430852843777292772807124410, + 0.13842814590132073150539714634, + -0.24229488706638203186257137947, + -0.03224486958463837464847975506, + 0.07757149384004571352313048939, + -0.00624149021279827427419051911, + -0.01258075199908199946850973993, + 0.00333572528547377127799818342 + }; + + static const double g_10[10] = { 0.00333572528547377127799818342, + 0.01258075199908199946850973993, + -0.00624149021279827427419051911, + -0.07757149384004571352313048939, + -0.03224486958463837464847975506, + 0.24229488706638203186257137947, + 0.13842814590132073150539714634, + -0.72430852843777292772807124410, + 0.60382926979718967054011930653, + -0.16010239797419291448072374802 + }; + + static const double h_12[12] = { 0.11154074335010946362132391724, + 0.49462389039845308567720417688, + 0.75113390802109535067893449844, + 0.31525035170919762908598965481, + -0.22626469396543982007631450066, + -0.12976686756726193556228960588, + 0.09750160558732304910234355254, + 0.02752286553030572862554083950, + -0.03158203931748602956507908070, + 0.00055384220116149613925191840, + 0.00477725751094551063963597525, + -0.00107730108530847956485262161 + }; + + static const double g_12[12] = { -0.00107730108530847956485262161, + -0.00477725751094551063963597525, + 0.00055384220116149613925191840, + 0.03158203931748602956507908070, + 0.02752286553030572862554083950, + -0.09750160558732304910234355254, + -0.12976686756726193556228960588, + 0.22626469396543982007631450066, + 0.31525035170919762908598965481, + -0.75113390802109535067893449844, + 0.49462389039845308567720417688, + -0.11154074335010946362132391724 + }; + + static const double h_14[14] = { 0.07785205408500917901996352196, + 0.39653931948191730653900039094, + 0.72913209084623511991694307034, + 0.46978228740519312247159116097, + -0.14390600392856497540506836221, + -0.22403618499387498263814042023, + 0.07130921926683026475087657050, + 0.08061260915108307191292248036, + -0.03802993693501441357959206160, + -0.01657454163066688065410767489, + 0.01255099855609984061298988603, + 0.00042957797292136652113212912, + -0.00180164070404749091526826291, + 0.00035371379997452024844629584 + }; + + static const double g_14[14] = { 0.00035371379997452024844629584, + 0.00180164070404749091526826291, + 0.00042957797292136652113212912, + -0.01255099855609984061298988603, + -0.01657454163066688065410767489, + 0.03802993693501441357959206160, + 0.08061260915108307191292248036, + -0.07130921926683026475087657050, + -0.22403618499387498263814042023, + 0.14390600392856497540506836221, + 0.46978228740519312247159116097, + -0.72913209084623511991694307034, + 0.39653931948191730653900039094, + -0.07785205408500917901996352196 + }; + + static const double h_16[16] = { 0.05441584224310400995500940520, + 0.31287159091429997065916237551, + 0.67563073629728980680780076705, + 0.58535468365420671277126552005, + -0.01582910525634930566738054788, + -0.28401554296154692651620313237, + 0.00047248457391328277036059001, + 0.12874742662047845885702928751, + -0.01736930100180754616961614887, + -0.04408825393079475150676372324, + 0.01398102791739828164872293057, + 0.00874609404740577671638274325, + -0.00487035299345157431042218156, + -0.00039174037337694704629808036, + 0.00067544940645056936636954757, + -0.00011747678412476953373062823 + }; + + static const double g_16[16] = { -0.00011747678412476953373062823, + -0.00067544940645056936636954757, + -0.00039174037337694704629808036, + 0.00487035299345157431042218156, + 0.00874609404740577671638274325, + -0.01398102791739828164872293057, + -0.04408825393079475150676372324, + 0.01736930100180754616961614887, + 0.12874742662047845885702928751, + -0.00047248457391328277036059001, + -0.28401554296154692651620313237, + 0.01582910525634930566738054788, + 0.58535468365420671277126552005, + -0.67563073629728980680780076705, + 0.31287159091429997065916237551, + -0.05441584224310400995500940520 + }; + + static const double h_18[18] = { 0.03807794736387834658869765888, + 0.24383467461259035373204158165, + 0.60482312369011111190307686743, + 0.65728807805130053807821263905, + 0.13319738582500757619095494590, + -0.29327378327917490880640319524, + -0.09684078322297646051350813354, + 0.14854074933810638013507271751, + 0.03072568147933337921231740072, + -0.06763282906132997367564227483, + 0.00025094711483145195758718975, + 0.02236166212367909720537378270, + -0.00472320475775139727792570785, + -0.00428150368246342983449679500, + 0.00184764688305622647661912949, + 0.00023038576352319596720521639, + -0.00025196318894271013697498868, + 0.00003934732031627159948068988 + }; + + static const double g_18[18] = { 0.00003934732031627159948068988, + 0.00025196318894271013697498868, + 0.00023038576352319596720521639, + -0.00184764688305622647661912949, + -0.00428150368246342983449679500, + 0.00472320475775139727792570785, + 0.02236166212367909720537378270, + -0.00025094711483145195758718975, + -0.06763282906132997367564227483, + -0.03072568147933337921231740072, + 0.14854074933810638013507271751, + 0.09684078322297646051350813354, + -0.29327378327917490880640319524, + -0.13319738582500757619095494590, + 0.65728807805130053807821263905, + -0.60482312369011111190307686743, + 0.24383467461259035373204158165, + -0.03807794736387834658869765888 + }; + + static const double h_20[20] = { 0.02667005790055555358661744877, + 0.18817680007769148902089297368, + 0.52720118893172558648174482796, + 0.68845903945360356574187178255, + 0.28117234366057746074872699845, + -0.24984642432731537941610189792, + -0.19594627437737704350429925432, + 0.12736934033579326008267723320, + 0.09305736460357235116035228984, + -0.07139414716639708714533609308, + -0.02945753682187581285828323760, + 0.03321267405934100173976365318, + 0.00360655356695616965542329142, + -0.01073317548333057504431811411, + 0.00139535174705290116578931845, + 0.00199240529518505611715874224, + -0.00068585669495971162656137098, + -0.00011646685512928545095148097, + 0.00009358867032006959133405013, + -0.00001326420289452124481243668 + }; + + static const double g_20[20] = { -0.00001326420289452124481243668, + -0.00009358867032006959133405013, + -0.00011646685512928545095148097, + 0.00068585669495971162656137098, + 0.00199240529518505611715874224, + -0.00139535174705290116578931845, + -0.01073317548333057504431811411, + -0.00360655356695616965542329142, + 0.03321267405934100173976365318, + 0.02945753682187581285828323760, + -0.07139414716639708714533609308, + -0.09305736460357235116035228984, + 0.12736934033579326008267723320, + 0.19594627437737704350429925432, + -0.24984642432731537941610189792, + -0.28117234366057746074872699845, + 0.68845903945360356574187178255, + -0.52720118893172558648174482796, + 0.18817680007769148902089297368, + -0.02667005790055555358661744877 + }; + + static int + daubechies_init (const double **h1, const double **g1, const double **h2, + const double **g2, size_t * nc, size_t * offset, + size_t member) + { + switch (member) + { + case 4: + *h1 = h_4; + *g1 = g_4; + *h2 = h_4; + *g2 = g_4; + break; + + case 6: + *h1 = h_6; + *g1 = g_6; + *h2 = h_6; + *g2 = g_6; + break; + + case 8: + *h1 = h_8; + *g1 = g_8; + *h2 = h_8; + *g2 = g_8; + break; + + case 10: + *h1 = h_10; + *g1 = g_10; + *h2 = h_10; + *g2 = g_10; + break; + + case 12: + *h1 = h_12; + *g1 = g_12; + *h2 = h_12; + *g2 = g_12; + break; + + case 14: + *h1 = h_14; + *g1 = g_14; + *h2 = h_14; + *g2 = g_14; + break; + + case 16: + *h1 = h_16; + *g1 = g_16; + *h2 = h_16; + *g2 = g_16; + break; + + case 18: + *h1 = h_18; + *g1 = g_18; + *h2 = h_18; + *g2 = g_18; + break; + + case 20: + *h1 = h_20; + *g1 = g_20; + *h2 = h_20; + *g2 = g_20; + break; + + default: + return GSL_FAILURE; + } + + *nc = member; + *offset = 0; + + return GSL_SUCCESS; + } + + static int + daubechies_centered_init (const double **h1, const double **g1, + const double **h2, const double **g2, size_t * nc, + size_t * offset, size_t member) + { + switch (member) + { + case 4: + *h1 = h_4; + *g1 = g_4; + *h2 = h_4; + *g2 = g_4; + break; + + case 6: + *h1 = h_6; + *g1 = g_6; + *h2 = h_6; + *g2 = g_6; + break; + + case 8: + *h1 = h_8; + *g1 = g_8; + *h2 = h_8; + *g2 = g_8; + break; + + case 10: + *h1 = h_10; + *g1 = g_10; + *h2 = h_10; + *g2 = g_10; + break; + + case 12: + *h1 = h_12; + *g1 = g_12; + *h2 = h_12; + *g2 = g_12; + break; + + case 14: + *h1 = h_14; + *g1 = g_14; + *h2 = h_14; + *g2 = g_14; + break; + + case 16: + *h1 = h_16; + *g1 = g_16; + *h2 = h_16; + *g2 = g_16; + break; + + case 18: + *h1 = h_18; + *g1 = g_18; + *h2 = h_18; + *g2 = g_18; + break; + + case 20: + *h1 = h_20; + *g1 = g_20; + *h2 = h_20; + *g2 = g_20; + break; + + default: + return GSL_FAILURE; + } + + *nc = member; + *offset = (member >> 1); + + return GSL_SUCCESS; + } + + static const gsl_wavelet_type daubechies_type = { + "daubechies", + &daubechies_init + }; + + static const gsl_wavelet_type daubechies_centered_type = { + "daubechies-centered", + &daubechies_centered_init + }; + + const gsl_wavelet_type *gsl_wavelet_daubechies = &daubechies_type; + const gsl_wavelet_type *gsl_wavelet_daubechies_centered = + &daubechies_centered_type; diff -rc2P -x *.info -x *.info-* gsl-1.5/wavelet/dwt.c gsl-1.6/wavelet/dwt.c *** gsl-1.5/wavelet/dwt.c Thu Jan 1 01:00:00 1970 --- gsl-1.6/wavelet/dwt.c Fri Dec 24 13:57:34 2004 *************** *** 0 **** --- 1,357 ---- + /* wavelet/dwt.c + * + * Copyright (C) 2004 Ivo Alxneit + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + /* function dwt_step is based on the public domain function pwt.c + * available from http://www.numerical-recipes.com + */ + + #include + #include + #include + #include + + #define ELEMENT(a,stride,i) ((a)[(stride)*(i)]) + + static int binary_logn (const size_t n); + static void dwt_step (const gsl_wavelet * w, double *a, size_t stride, + size_t n, int isign, gsl_wavelet_workspace * work); + + static int + binary_logn (const size_t n) + { + size_t ntest; + size_t logn = 0; + size_t k = 1; + + while (k < n) + { + k *= 2; + logn++; + } + + ntest = (1 << logn); + + if (n != ntest) + { + return -1; /* n is not a power of 2 */ + } + + return logn; + } + + static void + dwt_step (const gsl_wavelet * w, double *a, size_t stride, size_t n, + gsl_wavelet_direction dir, gsl_wavelet_workspace * work) + { + double ai, ai1; + size_t i, ii; + size_t jf; + size_t k; + size_t n1, ni, nh, nmod; + + for (i = 0; i < work->n; i++) + { + work->scratch[i] = 0.0; + } + + nmod = w->nc * n; + nmod -= w->offset; /* center support */ + + n1 = n - 1; + nh = n >> 1; + + if (dir == forward) + { + for (ii = 0, i = 0; i < n; i += 2, ii++) + { + ni = i + nmod; + for (k = 0; k < w->nc; k++) + { + jf = n1 & (ni + k); + work->scratch[ii] += w->h1[k] * ELEMENT (a, stride, jf); + work->scratch[ii + nh] += w->g1[k] * ELEMENT (a, stride, jf); + } + } + } + else + { + for (ii = 0, i = 0; i < n; i += 2, ii++) + { + ai = ELEMENT (a, stride, ii); + ai1 = ELEMENT (a, stride, ii + nh); + ni = i + nmod; + for (k = 0; k < w->nc; k++) + { + jf = (n1 & (ni + k)); + work->scratch[jf] += (w->h2[k] * ai + w->g2[k] * ai1); + } + } + } + + for (i = 0; i < n; i++) + { + ELEMENT (a, stride, i) = work->scratch[i]; + } + } + + int + gsl_wavelet_transform (const gsl_wavelet * w, + double *data, size_t stride, size_t n, + gsl_wavelet_direction dir, + gsl_wavelet_workspace * work) + { + size_t i; + + if (work->n < n) + { + GSL_ERROR ("not enough workspace provided", GSL_EINVAL); + } + + if (binary_logn (n) == -1) + { + GSL_ERROR ("n is not a power of 2", GSL_EINVAL); + } + + if (n < 2) + { + return GSL_SUCCESS; + } + + if (dir == forward) + { + for (i = n; i >= 2; i >>= 1) + { + dwt_step (w, data, stride, i, dir, work); + } + } + else + { + for (i = 2; i <= n; i <<= 1) + { + dwt_step (w, data, stride, i, dir, work); + } + } + + return GSL_SUCCESS; + } + + int + gsl_wavelet_transform_forward (const gsl_wavelet * w, + double *data, size_t stride, size_t n, + gsl_wavelet_workspace * work) + { + return gsl_wavelet_transform (w, data, stride, n, forward, work); + } + + int + gsl_wavelet_transform_inverse (const gsl_wavelet * w, + double *data, size_t stride, size_t n, + gsl_wavelet_workspace * work) + { + return gsl_wavelet_transform (w, data, stride, n, backward, work); + } + + + /* Leaving this out for now BJG */ + #if 0 + int + gsl_dwt_vector (const gsl_wavelet * w, gsl_vector *v, gsl_wavelet_direction + dir, gsl_wavelet_workspace * work) + { + return gsl_dwt (w, v->data, v->stride, v->size, dir, work); + } + #endif + + int + gsl_wavelet2d_transform (const gsl_wavelet * w, + double *data, size_t tda, size_t size1, + size_t size2, gsl_wavelet_direction dir, + gsl_wavelet_workspace * work) + { + size_t i; + + if (size1 != size2) + { + GSL_ERROR ("2d dwt works only with square matrix", GSL_EINVAL); + } + + if (work->n < size1) + { + GSL_ERROR ("not enough workspace provided", GSL_EINVAL); + } + + if (binary_logn (size1) == -1) + { + GSL_ERROR ("n is not a power of 2", GSL_EINVAL); + } + + if (size1 < 2) + { + return GSL_SUCCESS; + } + + if (dir == forward) + { + for (i = 0; i < size1; i++) /* for every row j */ + { + gsl_wavelet_transform (w, &ELEMENT(data, tda, i), 1, size1, dir, work); + } + for (i = 0; i < size2; i++) /* for every column j */ + { + gsl_wavelet_transform (w, &ELEMENT(data, 1, i), tda, size2, dir, work); + } + } + else + { + for (i = 0; i < size2; i++) /* for every column j */ + { + gsl_wavelet_transform (w, &ELEMENT(data, 1, i), tda, size2, dir, work); + } + for (i = 0; i < size1; i++) /* for every row j */ + { + gsl_wavelet_transform (w, &ELEMENT(data, tda, i), 1, size1, dir, work); + } + } + + return GSL_SUCCESS; + } + + int + gsl_wavelet2d_nstransform (const gsl_wavelet * w, + double *data, size_t tda, size_t size1, + size_t size2, gsl_wavelet_direction dir, + gsl_wavelet_workspace * work) + { + size_t i, j; + + if (size1 != size2) + { + GSL_ERROR ("2d dwt works only with square matrix", GSL_EINVAL); + } + + if (work->n < size1) + { + GSL_ERROR ("not enough workspace provided", GSL_EINVAL); + } + + if (binary_logn (size1) == -1) + { + GSL_ERROR ("n is not a power of 2", GSL_EINVAL); + } + + if (size1 < 2) + { + return GSL_SUCCESS; + } + + if (dir == forward) + { + for (i = size1; i >= 2; i >>= 1) + { + for (j = 0; j < i; j++) /* for every row j */ + { + dwt_step (w, &ELEMENT(data, tda, j), 1, i, dir, work); + } + for (j = 0; j < i; j++) /* for every column j */ + { + dwt_step (w, &ELEMENT(data, 1, j), tda, i, dir, work); + } + } + } + else + { + for (i = 2; i <= size1; i <<= 1) + { + for (j = 0; j < i; j++) /* for every column j */ + { + dwt_step (w, &ELEMENT(data, 1, j), tda, i, dir, work); + } + for (j = 0; j < i; j++) /* for every row j */ + { + dwt_step (w, &ELEMENT(data, tda, j), 1, i, dir, work); + } + } + } + + return GSL_SUCCESS; + } + + int + gsl_wavelet2d_transform_matrix (const gsl_wavelet * w, + gsl_matrix * a, + gsl_wavelet_direction dir, + gsl_wavelet_workspace * work) + { + return gsl_wavelet2d_transform (w, a->data, + a->tda, a->size1, a->size2, + dir, work); + } + + int + gsl_wavelet2d_transform_matrix_forward (const gsl_wavelet * w, + gsl_matrix * a, + gsl_wavelet_workspace * work) + { + return gsl_wavelet2d_transform (w, a->data, + a->tda, a->size1, a->size2, + forward, work); + } + + int + gsl_wavelet2d_transform_matrix_inverse (const gsl_wavelet * w, + gsl_matrix * a, + gsl_wavelet_workspace * work) + { + return gsl_wavelet2d_transform (w, a->data, + a->tda, a->size1, a->size2, + backward, work); + } + + int + gsl_wavelet2d_nstransform_matrix (const gsl_wavelet * w, + gsl_matrix * a, + gsl_wavelet_direction dir, + gsl_wavelet_workspace * work) + { + return gsl_wavelet2d_nstransform (w, a->data, + a->tda, a->size1, a->size2, + dir, work); + } + + int + gsl_wavelet2d_nstransform_matrix_forward (const gsl_wavelet * w, + gsl_matrix * a, + gsl_wavelet_workspace * work) + { + return gsl_wavelet2d_nstransform (w, a->data, + a->tda, a->size1, a->size2, + forward, work); + } + + int + gsl_wavelet2d_nstransform_matrix_inverse (const gsl_wavelet * w, + gsl_matrix * a, + gsl_wavelet_workspace * work) + { + return gsl_wavelet2d_nstransform (w, a->data, + a->tda, a->size1, a->size2, + backward, work); + } + + diff -rc2P -x *.info -x *.info-* gsl-1.5/wavelet/gsl_wavelet.h gsl-1.6/wavelet/gsl_wavelet.h *** gsl-1.5/wavelet/gsl_wavelet.h Thu Jan 1 01:00:00 1970 --- gsl-1.6/wavelet/gsl_wavelet.h Wed Dec 29 16:41:26 2004 *************** *** 0 **** --- 1,100 ---- + /* wavelet/gsl_wavelet.h + * + * Copyright (C) 2004 Ivo Alxneit + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + #ifndef __GSL_WAVELET_H__ + #define __GSL_WAVELET_H__ + #include + #include + #include + + #undef __BEGIN_DECLS + #undef __END_DECLS + #ifdef __cplusplus + # define __BEGIN_DECLS extern "C" { + # define __END_DECLS } + #else + # define __BEGIN_DECLS /* empty */ + # define __END_DECLS /* empty */ + #endif + + __BEGIN_DECLS + + typedef enum { + forward = 1, backward = -1 + } + gsl_wavelet_direction; + + typedef struct + { + const char *name; + int (*init) (const double **h1, const double **g1, + const double **h2, const double **g2, size_t * nc, + size_t * offset, size_t member); + } + gsl_wavelet_type; + + typedef struct + { + const gsl_wavelet_type *type; + const double *h1; + const double *g1; + const double *h2; + const double *g2; + size_t nc; + size_t offset; + } + gsl_wavelet; + + typedef struct + { + double *scratch; + size_t n; + } + gsl_wavelet_workspace; + + GSL_VAR const gsl_wavelet_type *gsl_wavelet_daubechies; + GSL_VAR const gsl_wavelet_type *gsl_wavelet_daubechies_centered; + GSL_VAR const gsl_wavelet_type *gsl_wavelet_haar; + GSL_VAR const gsl_wavelet_type *gsl_wavelet_haar_centered; + GSL_VAR const gsl_wavelet_type *gsl_wavelet_bspline; + GSL_VAR const gsl_wavelet_type *gsl_wavelet_bspline_centered; + + gsl_wavelet *gsl_wavelet_alloc (const gsl_wavelet_type * T, size_t k); + void gsl_wavelet_free (gsl_wavelet * w); + const char *gsl_wavelet_name (const gsl_wavelet * w); + + gsl_wavelet_workspace *gsl_wavelet_workspace_alloc (size_t n); + void gsl_wavelet_workspace_free (gsl_wavelet_workspace * work); + + int gsl_wavelet_transform (const gsl_wavelet * w, + double *data, size_t stride, size_t n, + gsl_wavelet_direction dir, + gsl_wavelet_workspace * work); + + int gsl_wavelet_transform_forward (const gsl_wavelet * w, + double *data, size_t stride, size_t n, + gsl_wavelet_workspace * work); + + int gsl_wavelet_transform_inverse (const gsl_wavelet * w, + double *data, size_t stride, size_t n, + gsl_wavelet_workspace * work); + + __END_DECLS + + #endif /* __GSL_WAVELET_H__ */ diff -rc2P -x *.info -x *.info-* gsl-1.5/wavelet/gsl_wavelet2d.h gsl-1.6/wavelet/gsl_wavelet2d.h *** gsl-1.5/wavelet/gsl_wavelet2d.h Thu Jan 1 01:00:00 1970 --- gsl-1.6/wavelet/gsl_wavelet2d.h Wed Dec 29 16:41:26 2004 *************** *** 0 **** --- 1,107 ---- + /* wavelet/gsl_wavelet.h + * + * Copyright (C) 2004 Ivo Alxneit + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + #ifndef __GSL_WAVELET2D_H__ + #define __GSL_WAVELET2D_H__ + #include + #include + #include + #include + #include + + #undef __BEGIN_DECLS + #undef __END_DECLS + #ifdef __cplusplus + # define __BEGIN_DECLS extern "C" { + # define __END_DECLS } + #else + # define __BEGIN_DECLS /* empty */ + # define __END_DECLS /* empty */ + #endif + + __BEGIN_DECLS + + int gsl_wavelet2d_transform (const gsl_wavelet * w, + double *data, + size_t tda, size_t size1, size_t size2, + gsl_wavelet_direction dir, + gsl_wavelet_workspace * work); + + int gsl_wavelet2d_transform_forward (const gsl_wavelet * w, + double *data, + size_t tda, size_t size1, size_t size2, + gsl_wavelet_workspace * work); + + int gsl_wavelet2d_transform_inverse (const gsl_wavelet * w, + double *data, + size_t tda, size_t size1, size_t size2, + gsl_wavelet_workspace * work); + + int gsl_wavelet2d_nstransform (const gsl_wavelet * w, + double *data, + size_t tda, size_t size1, size_t size2, + gsl_wavelet_direction dir, + gsl_wavelet_workspace * work); + + int gsl_wavelet2d_nstransform_forward (const gsl_wavelet * w, + double *data, + size_t tda, size_t size1, size_t size2, + gsl_wavelet_workspace * work); + + int gsl_wavelet2d_nstransform_inverse (const gsl_wavelet * w, + double *data, + size_t tda, size_t size1, size_t size2, + gsl_wavelet_workspace * work); + + int + gsl_wavelet2d_transform_matrix (const gsl_wavelet * w, + gsl_matrix * a, + gsl_wavelet_direction dir, + gsl_wavelet_workspace * work); + + int + gsl_wavelet2d_transform_matrix_forward (const gsl_wavelet * w, + gsl_matrix * a, + gsl_wavelet_workspace * work); + + int + gsl_wavelet2d_transform_matrix_inverse (const gsl_wavelet * w, + gsl_matrix * a, + gsl_wavelet_workspace * work); + + + int + gsl_wavelet2d_nstransform_matrix (const gsl_wavelet * w, + gsl_matrix * a, + gsl_wavelet_direction dir, + gsl_wavelet_workspace * work); + + int + gsl_wavelet2d_nstransform_matrix_forward (const gsl_wavelet * w, + gsl_matrix * a, + gsl_wavelet_workspace * work); + + int + gsl_wavelet2d_nstransform_matrix_inverse (const gsl_wavelet * w, + gsl_matrix * a, + gsl_wavelet_workspace * work); + + __END_DECLS + + #endif /* __GSL_WAVELET2D_H__ */ diff -rc2P -x *.info -x *.info-* gsl-1.5/wavelet/haar.c gsl-1.6/wavelet/haar.c *** gsl-1.5/wavelet/haar.c Thu Jan 1 01:00:00 1970 --- gsl-1.6/wavelet/haar.c Fri Dec 24 13:57:11 2004 *************** *** 0 **** --- 1,81 ---- + /* wavelet/haar.c + * + * Copyright (C) 2004 Ivo Alxneit + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + #include + #include + #include + #include + + static const double ch_2[2] = { M_SQRT1_2, M_SQRT1_2 }; + static const double cg_2[2] = { M_SQRT1_2, -(M_SQRT1_2) }; + + static int + haar_init (const double **h1, const double **g1, const double **h2, + const double **g2, size_t * nc, size_t * offset, + const size_t member) + { + if (member != 2) + { + return GSL_FAILURE; + } + + *h1 = ch_2; + *g1 = cg_2; + *h2 = ch_2; + *g2 = cg_2; + + *nc = 2; + *offset = 0; + + return GSL_SUCCESS; + } + + static int + haar_centered_init (const double **h1, const double **g1, const double **h2, + const double **g2, size_t * nc, size_t * offset, + const size_t member) + { + if (member != 2) + { + return GSL_FAILURE; + } + + *h1 = ch_2; + *g1 = cg_2; + *h2 = ch_2; + *g2 = cg_2; + + *nc = 2; + *offset = 1; + + return GSL_SUCCESS; + } + + static const gsl_wavelet_type haar_type = { + "haar", + &haar_init + }; + + static const gsl_wavelet_type haar_centered_type = { + "haar-centered", + &haar_centered_init + }; + + const gsl_wavelet_type *gsl_wavelet_haar = &haar_type; + const gsl_wavelet_type *gsl_wavelet_haar_centered = &haar_centered_type; diff -rc2P -x *.info -x *.info-* gsl-1.5/wavelet/test.c gsl-1.6/wavelet/test.c *** gsl-1.5/wavelet/test.c Thu Jan 1 01:00:00 1970 --- gsl-1.6/wavelet/test.c Fri Dec 24 13:56:53 2004 *************** *** 0 **** --- 1,270 ---- + #include + #include + #include + + #include + #include + #include + #include + + #include + #include + + #define N_BS 11 + + double urand (void); + + double + urand (void) + { + static unsigned long int x = 1; + x = (1103515245 * x + 12345) & 0x7fffffffUL; + return x / 2147483648.0; + } + + const size_t member[N_BS] = + { 309, 307, 305, 303, 301, 208, 206, 204, 202, 105, 103 }; + + void + test_1d (size_t N, size_t stride, const gsl_wavelet_type * T, size_t member); + + void + test_2d (size_t N, size_t tda, const gsl_wavelet_type * T, size_t member, int type); + + int + main (int argc, char **argv) + { + size_t i, N, stride, tda; + const int S = 1, NS = 2; /* Standard & Non-standard transforms */ + + /* One-dimensional tests */ + + for (N = 1; N <= 16384; N *= 2) + { + for (stride = 1; stride <= 5; stride++) + { + for (i = 0; i < N_BS; i++) + { + test_1d (N, stride, gsl_wavelet_bspline, member[i]); + test_1d (N, stride, gsl_wavelet_bspline_centered, member[i]); + } + + for (i = 4; i <= 20; i += 2) + { + test_1d (N, stride, gsl_wavelet_daubechies, i); + test_1d (N, stride, gsl_wavelet_daubechies_centered, i); + } + + test_1d (N, stride, gsl_wavelet_haar, 2); + test_1d (N, stride, gsl_wavelet_haar_centered, 2); + } + } + + /* Two-dimensional tests */ + + for (N = 1; N <= 64; N *= 2) + { + for (tda = N; tda <= N + 5; tda++) + { + for (i = 0; i < N_BS; i++) + { + test_2d (N, tda, gsl_wavelet_bspline, member[i], S); + test_2d (N, tda, gsl_wavelet_bspline_centered, member[i], S); + + test_2d (N, tda, gsl_wavelet_bspline, member[i], NS); + test_2d (N, tda, gsl_wavelet_bspline_centered, member[i], NS); + } + + for (i = 4; i <= 20; i += 2) + { + test_2d (N, tda, gsl_wavelet_daubechies, i, S); + test_2d (N, tda, gsl_wavelet_daubechies_centered, i, S); + + test_2d (N, tda, gsl_wavelet_daubechies, i, NS); + test_2d (N, tda, gsl_wavelet_daubechies_centered, i, NS); + } + + test_2d (N, tda, gsl_wavelet_haar, 2, S); + test_2d (N, tda, gsl_wavelet_haar_centered, 2, S); + + test_2d (N, tda, gsl_wavelet_haar, 2, NS); + test_2d (N, tda, gsl_wavelet_haar_centered, 2, NS); + } + } + + exit (gsl_test_summary ()); + } + + + void + test_1d (size_t N, size_t stride, const gsl_wavelet_type * T, size_t member) + { + gsl_wavelet_workspace *work; + gsl_vector *v1, *v2, *vdelta; + gsl_vector_view v; + gsl_wavelet *w; + + size_t i; + double *data = malloc (N * stride * sizeof (double)); + + for (i = 0; i < N * stride; i++) + data[i] = 12345.0 + i; + + v = gsl_vector_view_array_with_stride (data, stride, N); + v1 = &(v.vector); + + for (i = 0; i < N; i++) + { + gsl_vector_set (v1, i, urand ()); + } + + v2 = gsl_vector_alloc (N); + gsl_vector_memcpy (v2, v1); + + vdelta = gsl_vector_alloc (N); + + work = gsl_wavelet_workspace_alloc (N); + + w = gsl_wavelet_alloc (T, member); + + gsl_wavelet_transform_forward (w, v2->data, v2->stride, v2->size, work); + gsl_wavelet_transform_inverse (w, v2->data, v2->stride, v2->size, work); + + for (i = 0; i < N; i++) + { + double x1 = gsl_vector_get (v1, i); + double x2 = gsl_vector_get (v2, i); + gsl_vector_set (vdelta, i, fabs (x1 - x2)); + } + + { + double x1, x2; + i = gsl_vector_max_index (vdelta); + x1 = gsl_vector_get (v1, i); + x2 = gsl_vector_get (v2, i); + + gsl_test (fabs (x2 - x1) > N * 1e-15, + "%s(%d), n = %d, stride = %d, maxerr = %g", + gsl_wavelet_name (w), member, N, stride, fabs (x2 - x1)); + } + + if (stride > 1) + { + int status = 0; + + for (i = 0; i < N * stride; i++) + { + if (i % stride == 0) + continue; + + status |= (data[i] != (12345.0 + i)); + } + + gsl_test (status, "%s(%d) other data untouched, n = %d, stride = %d", + gsl_wavelet_name (w), member, N, stride); + } + + gsl_wavelet_workspace_free (work); + gsl_wavelet_free (w); + gsl_vector_free (vdelta); + gsl_vector_free (v2); + free (data); + } + + + void + test_2d (size_t N, size_t tda, const gsl_wavelet_type * T, size_t member, int type) + { + gsl_wavelet_workspace *work; + gsl_matrix *m2; + gsl_wavelet *w; + gsl_matrix *m1; + gsl_matrix *mdelta; + gsl_matrix_view m; + size_t i; + size_t j; + + double *data = malloc (N * tda * sizeof (double)); + + const char * typename; + + typename = (type == 1) ? "standard" : "nonstd" ; + + for (i = 0; i < N * tda; i++) + data[i] = 12345.0 + i; + + m = gsl_matrix_view_array_with_tda (data, N, N, tda); + m1 = &(m.matrix); + + for (i = 0; i < N; i++) + { + for (j = 0; j < N; j++) + { + gsl_matrix_set (m1, i, j, urand()); + } + } + + m2 = gsl_matrix_alloc (N, N); + gsl_matrix_memcpy (m2, m1); + + mdelta = gsl_matrix_alloc (N, N); + + work = gsl_wavelet_workspace_alloc (N); + + w = gsl_wavelet_alloc (T, member); + + switch (type) + { + case 1: + gsl_wavelet2d_transform_matrix_forward (w, m2, work); + gsl_wavelet2d_transform_matrix_inverse (w, m2, work); + break; + case 2: + gsl_wavelet2d_nstransform_matrix_forward (w, m2, work); + gsl_wavelet2d_nstransform_matrix_inverse (w, m2, work); + break; + } + + for (i = 0; i < N; i++) + { + for (j = 0; j < N; j++) + { + double x1 = gsl_matrix_get (m1, i, j); + double x2 = gsl_matrix_get (m2, i, j ); + gsl_matrix_set (mdelta, i, j, fabs (x1 - x2)); + } + } + + { + double x1, x2; + gsl_matrix_max_index (mdelta, &i, &j); + x1 = gsl_matrix_get (m1, i, j); + x2 = gsl_matrix_get (m2, i, j); + + gsl_test (fabs (x2 - x1) > N * 1e-15, + "%s(%d)-2d %s, n = %d, tda = %d, maxerr = %g", + gsl_wavelet_name (w), member, typename, N, tda, fabs (x2 - x1)); + } + + if (tda > N) + { + int status = 0; + + for (i = 0; i < N ; i++) + { + for (j = N; j < tda; j++) + { + status |= (data[i*tda+j] != (12345.0 + (i*tda+j))); + } + } + + gsl_test (status, "%s(%d)-2d %s other data untouched, n = %d, tda = %d", + gsl_wavelet_name (w), member, typename, N, tda); + } + + free (data); + gsl_wavelet_workspace_free (work); + gsl_wavelet_free (w); + gsl_matrix_free (m2); + gsl_matrix_free (mdelta); + } diff -rc2P -x *.info -x *.info-* gsl-1.5/wavelet/wavelet.c gsl-1.6/wavelet/wavelet.c *** gsl-1.5/wavelet/wavelet.c Thu Jan 1 01:00:00 1970 --- gsl-1.6/wavelet/wavelet.c Fri Dec 24 13:57:34 2004 *************** *** 0 **** --- 1,132 ---- + /* wavelet/wavelet.c + * + * Copyright (C) 2004 Ivo Alxneit + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + #include + #include + #include + #include + + gsl_wavelet * + gsl_wavelet_alloc (const gsl_wavelet_type * T, size_t k) + { + int status; + + gsl_wavelet *w = (gsl_wavelet *) malloc (sizeof (gsl_wavelet)); + + if (w == NULL) + { + GSL_ERROR_VAL ("failed to allocate space for wavelet struct", + GSL_ENOMEM, 0); + }; + + w->type = T; + + status = (T->init) (&(w->h1), &(w->g1), &(w->h2), &(w->g2), + &(w->nc), &(w->offset), k); + + if (status) + { + free (w); + GSL_ERROR_VAL ("invalid wavelet member", GSL_EINVAL, 0); + } + + return w; + } + + void + gsl_wavelet_free (gsl_wavelet * w) + { + free (w); + } + + const char * + gsl_wavelet_name (const gsl_wavelet * w) + { + return w->type->name; + } + + + /* Let's not export this for now (BJG) */ + #if 0 + void + gsl_wavelet_print (const gsl_wavelet * w) + { + size_t n = w->nc; + size_t i; + + printf ("Wavelet type: %s\n", w->type->name); + + printf + (" h1(%d):%12.8f g1(%d):%12.8f h2(%d):%12.8f g2(%d):%12.8f\n", + 0, w->h1[0], 0, w->g1[0], 0, w->h2[0], 0, w->g2[0]); + + for (i = 1; i < (n < 10 ? n : 10); i++) + { + printf + (" h1(%d):%12.8f g1(%d):%12.8f h2(%d):%12.8f g2(%d):%12.8f\n", + i, w->h1[i], i, w->g1[i], i, w->h2[i], i, w->g2[i]); + } + + for (; i < n; i++) + { + printf + ("h1(%d):%12.8f g1(%d):%12.8f h2(%d):%12.8f g2(%d):%12.8f\n", + i, w->h1[i], i, w->g1[i], i, w->h2[i], i, w->g2[i]); + } + } + #endif + + gsl_wavelet_workspace * + gsl_wavelet_workspace_alloc (size_t n) + { + gsl_wavelet_workspace *work; + + if (n == 0) + { + GSL_ERROR_VAL ("length n must be positive integer", GSL_EDOM, 0); + } + + work = (gsl_wavelet_workspace *) malloc (sizeof (gsl_wavelet_workspace)); + + if (work == NULL) + { + GSL_ERROR_VAL ("failed to allocate struct", GSL_ENOMEM, 0); + } + + work->n = n; + work->scratch = (double *) malloc (n * sizeof (double)); + + if (work->scratch == NULL) + { + /* error in constructor, prevent memory leak */ + free (work); + GSL_ERROR_VAL ("failed to allocate scratch space", GSL_ENOMEM, 0); + } + + return work; + } + + void + gsl_wavelet_workspace_free (gsl_wavelet_workspace * work) + { + /* release scratch space */ + free (work->scratch); + work->scratch = NULL; + free (work); + }