diff -a -rc -C 2 -P gsl-1.11/ChangeLog gsl-1.12/ChangeLog *** gsl-1.11/ChangeLog Mon Mar 17 10:40:57 2008 --- gsl-1.12/ChangeLog Thu Nov 27 20:03:28 2008 *************** *** 1,3 **** --- 1,24 ---- + 2008-09-26 Brian Gough + + * configure.ac: handle test for SSE in cross-compilation (fall + back to checking if the ldmxcsr instruction compiles) + + 2008-07-03 Brian Gough + + * Makefile.am: added gsl_inline.h and build.h + + * gsl_mode.h gsl_pow_int.h: use new inline declarations + + * gsl_minmax.h: new header file for minmax functions, use new + inline declarations + + * gsl_math.h: moved minmax functions to separate header file + + * configure.ac: test for C99 inline as well + + * build.h gsl_inline.h: added new header to handle GNU-style and + C99 inlines + 2008-03-17 Brian Gough * configure.ac: remove hack to disable search for Fortran, Java, diff -a -rc -C 2 -P gsl-1.11/INSTALL gsl-1.12/INSTALL *** gsl-1.11/INSTALL Wed Feb 20 16:19:01 2008 --- gsl-1.12/INSTALL Thu Dec 11 12:42:33 2008 *************** *** 98,109 **** to allow C++ exceptions to be handled. ! 3) 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. 4) Attempts to run 'strip' on the static library libgsl.a will probably produce a broken library (it is known to happen with GNU binutils --- 98,115 ---- to allow C++ exceptions to be handled. ! 3) With gcc-4.3.2 the tests in the poly/ directory fail due to a ! compiler optimization bug which is fixed in later versions of GCC ! (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38478). ! ! FAIL: y.real, gsl_complex_poly_complex_eval ({-2.31 + 0.44i, 4.21 - 3.19i, 0.93 + 1.04i, -0.42 + 0.68i}, 0.49 + 0.95i) (-1.68450788000000018 observed vs 1.82462012000000007 expected) [9] ! FAIL: y.imag, gsl_complex_poly_complex_eval ({-2.31 + 0.44i, 4.21 - 3.19i, 0.93 + 1.04i, -0.42 + 0.68i}, 0.49 + 0.95i) (-0.30943988 observed vs 2.30389411999999982 expected) [10] ! ! 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. ! If you encounter these problems, install a different version of gcc. 4) Attempts to run 'strip' on the static library libgsl.a will probably produce a broken library (it is known to happen with GNU binutils *************** *** 141,146 **** --- 147,157 ---- ./configure --disable-shared make + If you compile with higher optimisation -O3 you will also need + -qstrict. The -O3 flag causes the -nostrict option to be + enabled. This affects the accuracy of the results and causes some of + the tests to fail. + If you get the error, ld: 0711-781 ERROR: TOC overflow. diff -a -rc -C 2 -P gsl-1.11/Makefile.am gsl-1.12/Makefile.am *** gsl-1.11/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 6,12 **** SUBLIBS = block/libgslblock.la blas/libgslblas.la bspline/libgslbspline.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 bin_SCRIPTS = gsl-config --- 6,12 ---- SUBLIBS = block/libgslblock.la blas/libgslblas.la bspline/libgslbspline.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 gsl_minmax.h gsl_inline.h bin_SCRIPTS = gsl-config *************** *** 19,25 **** libgsl_la_SOURCES = version.c libgsl_la_LIBADD = $(SUBLIBS) libgsl_la_LDFLAGS = -version-info $(GSL_LT_VERSION) ! noinst_HEADERS = templates_on.h templates_off.h MINGW32_HOST = @MINGW32_HOST@ if MINGW32_HOST --- 19,25 ---- libgsl_la_SOURCES = version.c libgsl_la_LIBADD = $(SUBLIBS) libgsl_la_LDFLAGS = -version-info $(GSL_LT_VERSION) ! noinst_HEADERS = templates_on.h templates_off.h build.h MINGW32_HOST = @MINGW32_HOST@ if MINGW32_HOST diff -a -rc -C 2 -P gsl-1.11/Makefile.in gsl-1.12/Makefile.in *** gsl-1.11/Makefile.in Sun Mar 30 12:07:12 2008 --- gsl-1.12/Makefile.in Mon Dec 15 14:55:21 2008 *************** *** 48,55 **** $(srcdir)/gsl-config.in $(srcdir)/gsl.pc.in \ $(srcdir)/gsl.spec.in $(srcdir)/gsl_version.h.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ ! THANKS TODO config.guess config.sub install-sh ltmain.sh \ ! mdate-sh missing mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ --- 48,55 ---- $(srcdir)/gsl-config.in $(srcdir)/gsl.pc.in \ $(srcdir)/gsl.spec.in $(srcdir)/gsl_version.h.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ ! THANKS TODO config.guess config.sub depcomp install-sh \ ! ltmain.sh mdate-sh missing mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ *************** *** 183,188 **** --- 183,189 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 190,196 **** --- 191,200 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 255,261 **** top_srcdir = @top_srcdir@ 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 bspline doc SUBLIBS = block/libgslblock.la blas/libgslblas.la bspline/libgslbspline.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 bin_SCRIPTS = gsl-config pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = gsl.pc --- 259,265 ---- top_srcdir = @top_srcdir@ 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 bspline doc SUBLIBS = block/libgslblock.la blas/libgslblas.la bspline/libgslbspline.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 gsl_minmax.h gsl_inline.h bin_SCRIPTS = gsl-config pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = gsl.pc *************** *** 264,270 **** libgsl_la_SOURCES = version.c libgsl_la_LIBADD = $(SUBLIBS) $(am__append_1) libgsl_la_LDFLAGS = -version-info $(GSL_LT_VERSION) $(am__append_2) ! noinst_HEADERS = templates_on.h templates_off.h MINGW32_HOST = @MINGW32_HOST@ m4datadir = $(datadir)/aclocal m4data_DATA = gsl.m4 --- 268,274 ---- libgsl_la_SOURCES = version.c libgsl_la_LIBADD = $(SUBLIBS) $(am__append_1) libgsl_la_LDFLAGS = -version-info $(GSL_LT_VERSION) $(am__append_2) ! noinst_HEADERS = templates_on.h templates_off.h build.h MINGW32_HOST = @MINGW32_HOST@ m4datadir = $(datadir)/aclocal m4data_DATA = gsl.m4 diff -a -rc -C 2 -P gsl-1.11/NEWS gsl-1.12/NEWS *** gsl-1.11/NEWS Sun Mar 30 12:07:29 2008 --- gsl-1.12/NEWS Tue Dec 9 19:19:12 2008 *************** *** 1,4 **** ! * What is new in gsl-1.11: ** The GSL repository and bug database are now hosted at Savannah http://savannah.gnu.org/projects/gsl/ --- 1,75 ---- ! * What is new in gsl-1.12: ! ! ** Upgraded to latest libtool, autoconf and automake (libtool-2.2.6, ! autoconf-2.63, automake-1.10.2) ! ! ** Improved the convergence of gsl_sf_gamma_inc_P for x/a ~=~ 1 and ! large x,a. Fixes problems with large arguments in cdf functions ! such as gsl_cdf_chisq_Pinv(x,nu) [bug 24704]. ! ! ** Fixed gsl_ran_gamma_knuth to handle the case of a >= UINT_MAX [bug ! #24897] ! ! ** Added gsl_bspline_eval_deriv to compute bspline derivatives ! (Rhys Ulerich) ! ! ** Added a faster simplex mininimser gsl_multimin_fminimizer_nmsimplex2 ! which is O(N) instead of O(N^2) [bug #24418] ! ! ** Improved the original chi-squared formula in gsl_monte_vegas to ! avoid catastrophic cancellation [bug #24510]. The previous formula ! could return incorrect or negative values for relative errors < ! 1e-8, which could occur when integrating very smooth functions. ! ! ** Added new auxiliary functions gsl_cheb_order, gsl_cheb_size, ! gsl_cheb_coeffs for Chebyshev series [bug #21830] ! ! ** Updated license of the reference manual to GNU FDL version 1.3. ! ! ** Fixed a bug where the gsl_isinf function would return +1 for -Inf ! on systems where isinf(-Inf) returns the non-standard value +1. ! [bug #24489] ! ! ** Added missing functions gsl_vector_complex_{isnonneg,add,sub,mul, ! div,scale,add_constant} and gsl_matrix_complex_float_isnonneg [bug ! #22478] ! ! ** Cross compilation should now work for x86 hosts. ! ! ** Fixed a bug in gsl_interp_accel_find() where values lying on the ! upper boundary between interpolation points could return the index ! from the lower side. [bug #24211] ! ! ** Fixed gsl_linalg_solve_cyc_tridiag so that its output respects the ! solution vector's stride. Previously the x_stride value was ignored ! causing the output to be incorrect for non-unit stride. [bug #24162] ! ! ** Corrected a bug in the series calculation of gsl_sf_ellint_Kcomp ! for k close to 1. [bug #24146] ! ! ** Extended gsl_linalg_QRPT_update to handle rectangular matrices. ! Corrected definition of the update formula in the manual for ! both gsl_linalg_QR_update and gsl_linalg_QRPT_update. ! ! ** Added routine gsl_linalg_cholesky_invert ! ! ** Fixed a bug the simplex algorithm which caused the second highest ! point to be incorrectly equal to the first when the first value was ! the highest, which could cause suboptimal convergence. [bug #23192] ! ! ** Fixed a problem with convergence for inverse gamma and chisq ! distribitions, gsl_cdf_gamma_{P,Q}inv and gsl_cdf_chisq_{P,Q}inv. ! [bug #23101] ! ! ** Improved the handling of constant regions in Vegas by eliminating ! spurious excess precision when computing box variances. ! ! ** Fixed a potential division by zero in gsl_monte_miser when the ! left/right weight factors decrease below 1. ! ! ** Fixed incorrect dimensions check in gsl_matrix_sub{row,column} ! ! * What was new in gsl-1.11: ** The GSL repository and bug database are now hosted at Savannah http://savannah.gnu.org/projects/gsl/ diff -a -rc -C 2 -P gsl-1.11/THANKS gsl-1.12/THANKS *** gsl-1.11/THANKS Wed Feb 13 22:05:57 2008 --- gsl-1.12/THANKS Sun Nov 30 08:59:45 2008 *************** *** 446,448 **** --- 446,459 ---- gsl_cdf_hypergeometric_{P,Q} * Claude Dion documentation bug reports + + * Michael Kuklik bug report for simplex + + * Paul Accisano, bug report and fix for cyclic solver + + * Thomas Weber bug and patch for interp + accelerator + + * Lori A. Pritchett-Sheats bug report for vegas chisq. + + * Frank Wang bug report for gsl_ran_gamma_knuth. diff -a -rc -C 2 -P gsl-1.11/TODO gsl-1.12/TODO *** gsl-1.11/TODO Tue Feb 5 13:22:10 2008 --- gsl-1.12/TODO Sun Dec 7 21:53:45 2008 *************** *** 40,45 **** --- 40,63 ---- * Cumulative Distribution functions for discrete random distributions + + Changes for Release 2.0 + + Break binary compatibility, but keep source compatibility. + + * Add a 'void *' to all workspaces, to allow for future changes. + + * Disable deprecated functions + + * Fix up the workspace_alloc functions so they have consistent names + (add functions where needed, don't remove) + + * Standardize function names, in particular VERB vs NOUN (e.g. _invert + vs _inverse). Also adopt a convection for functions which can operate + in place vs use of workspace (e.g linalg_solve functions). + + + Other tasks: * Remove use of long double internally, e.g. as an accumulator in *************** *** 75,83 **** of the form #define foo(x) (....) so there is no possibility of bad parsing. Need a perl script to check this! - * Clean up the ordering of lines in the Makefile.am's so that they are - all consistent. At the moment the lines are in any order. - * Eliminate use of volatile where it has been used to force rounding (integration/). It is better to write the code to avoid dependence on rounding. --- 93,98 ---- *************** *** 139,148 **** * Go through the matrix and vector functions systematically and decide what should be provided outside of BLAS. - * Standardize function names, in particular VERB vs NOUN (e.g. _invert - vs _inverse). Also adopt a convection for functions which can operate - in place vs use of workspace (e.g linalg_solve functions). - * Change from gsl-ref.texi to gsl.texi since it is the main file? Also, put under dir section "Math" (which seems to be the appropriate one for Debian, as Octave, Gnuplot etc are in that) --- 154,159 ---- *************** *** 175,179 **** of size_t for vectors and matrices, or at least vectors and matrices of size_t in addition to long, int, etc. ! * Fix up the workspace_alloc functions so they have consistent names --- 186,190 ---- of size_t for vectors and matrices, or at least vectors and matrices of size_t in addition to long, int, etc. ! diff -a -rc -C 2 -P gsl-1.11/aclocal.m4 gsl-1.12/aclocal.m4 *** gsl-1.11/aclocal.m4 Sat Mar 29 16:23:03 2008 --- gsl-1.12/aclocal.m4 Mon Dec 15 14:53:14 2008 *************** *** 655,661 **** # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) ! # serial 54 LT_INIT # LT_PREREQ(VERSION) --- 655,661 ---- # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) ! # serial 56 LT_INIT # LT_PREREQ(VERSION) *************** *** 675,681 **** m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) ! AC_MSG_WARN([Libtool does not cope well with whitespace in \`pwd\`]) ;; esac ]) --- 675,681 ---- m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) ! AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) *************** *** 773,781 **** _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl - AC_REQUIRE([AC_OBJEXT])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl - AC_REQUIRE([AC_EXEEXT])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl --- 773,779 ---- *************** *** 994,1005 **** # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], ! [_$0(m4_quote(m4_default([$1], [[, ]])), ! m4_quote(m4_if([$2], [], ! m4_quote(lt_decl_tag_varnames), ! m4_quote(m4_shift($@)))), ! m4_split(m4_normalize(m4_quote(_LT_TAGS))))]) ! m4_define([_lt_decl_varnames_tagged], [lt_combine([$1], [$2], [_], $3)]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) --- 992,1003 ---- # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], ! [m4_assert([$# <= 2])dnl ! _$0(m4_quote(m4_default([$1], [[, ]])), ! m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), ! m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) ! m4_define([_lt_decl_varnames_tagged], ! [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) *************** *** 1297,1303 **** #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. ! # Generated automatically by $as_me (GNU $PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # --- 1295,1301 ---- #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. ! # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # *************** *** 1507,1516 **** --- 1505,1523 ---- rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + AC_CHECK_TOOL([LIPO], [lipo], [:]) + AC_CHECK_TOOL([OTOOL], [otool], [:]) + AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) + _LT_DECL([], [LIPO], [1], + [Tool to manipulate fat objects and archives on Mac OS X]) + _LT_DECL([], [OTOOL], [1], + [ldd/readelf like tool for Mach-O binaries on Mac OS X]) + _LT_DECL([], [OTOOL64], [1], + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no *************** *** 1519,1532 **** # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. echo "int foo(void){return 1;}" > conftest.c $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ ! -dynamiclib ${wl}-single_module conftest.c ! if test -f libconftest.dylib; then lt_cv_apple_cc_single_mod=yes ! rm -rf libconftest.dylib* fi ! rm conftest.c fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], --- 1526,1545 ---- # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. + rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ ! -dynamiclib -Wl,-single_module conftest.c 2>conftest.err ! _lt_result=$? ! if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes ! else ! cat conftest.err >&AS_MESSAGE_LOG_FD fi ! rm -rf libconftest.dylib* ! rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], *************** *** 1544,1553 **** _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; ! darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment ! # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; --- 1557,1566 ---- _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; ! darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment ! # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; *************** *** 1589,1595 **** _LT_TAGVAR(whole_archive_flag_spec, $1)='' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" ! if test "$GCC" = "yes"; then output_verbose_link_cmd=echo _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" --- 1602,1612 ---- _LT_TAGVAR(whole_archive_flag_spec, $1)='' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" ! case $cc_basename in ! ifort*) _lt_dar_can_shared=yes ;; ! *) _lt_dar_can_shared=$GCC ;; ! esac ! if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" *************** *** 1806,1813 **** # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], ! [AC_REQUIRE([AC_OBJEXT])dnl ! AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes --- 1823,1829 ---- # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], ! [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes *************** *** 1996,2003 **** # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], ! [AC_REQUIRE([AC_OBJEXT])dnl ! m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no --- 2012,2018 ---- # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], ! [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no *************** *** 2113,2119 **** lt_cv_sys_max_cmd_len=-1; ;; ! cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, --- 2128,2134 ---- lt_cv_sys_max_cmd_len=-1; ;; ! cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, *************** *** 2281,2290 **** # endif #endif - #ifdef __cplusplus - extern "C" void exit (int); - #endif - void fnord() { int i=42;} int main () { --- 2296,2301 ---- *************** *** 2300,2306 **** else puts (dlerror ()); ! exit (status); }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then --- 2311,2317 ---- else puts (dlerror ()); ! return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then *************** *** 2339,2345 **** lt_cv_dlopen_self=yes ;; ! mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; --- 2350,2356 ---- lt_cv_dlopen_self=yes ;; ! mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; *************** *** 2449,2456 **** # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], ! [AC_REQUIRE([AC_OBJEXT])dnl ! m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], --- 2460,2466 ---- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], ! [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], *************** *** 2637,2642 **** --- 2647,2653 ---- [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl + m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], *************** *** 2767,2779 **** ;; amigaos*) ! if test "$host_cpu" = m68k; then library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ! else ! dynamic_linker=no ! fi ;; beos*) --- 2778,2795 ---- ;; amigaos*) ! case $host_cpu in ! powerpc) ! # Since July 2007 AmigaOS4 officially supports .so libraries. ! # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! ;; ! m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ! ;; ! esac ;; beos*) *************** *** 2796,2809 **** # libtool to hard-code these into programs ;; ! cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in ! yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ --- 2812,2825 ---- # libtool to hard-code these into programs ;; ! cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in ! yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ *************** *** 2826,2832 **** soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; ! mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` --- 2842,2848 ---- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; ! mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` *************** *** 3252,3258 **** version_type=linux need_lib_prefix=no need_version=no ! library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes --- 3268,3274 ---- version_type=linux need_lib_prefix=no need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes *************** *** 3276,3282 **** if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi ! if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi --- 3292,3298 ---- if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi ! if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi *************** *** 3553,3558 **** --- 3569,3575 ---- # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_MAGIC_METHOD], [m4_require([_LT_DECL_EGREP]) + m4_require([_LT_DECL_OBJDUMP]) AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' *************** *** 3603,3608 **** --- 3620,3631 ---- fi ;; + cegcc) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; *************** *** 3755,3761 **** # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl - AC_REQUIRE([AC_OBJEXT])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. --- 3778,3783 ---- *************** *** 3891,3897 **** m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl - AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl --- 3913,3918 ---- *************** *** 3916,3922 **** aix*) symcode='[[BCDT]]' ;; ! cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) --- 3937,3943 ---- aix*) symcode='[[BCDT]]' ;; ! cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) *************** *** 4143,4160 **** _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) ! if test "$host_cpu" = m68k; then ! # FIXME: we need at least 68020 code to build shared libraries, but ! # adding the `-m68020' flag to GCC prevents building anything better, ! # like `-m68040'. ! _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ! fi ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; ! mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style --- 4164,4189 ---- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; + amigaos*) ! case $host_cpu in ! powerpc) ! # see comment about AmigaOS4 .so support ! _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ! ;; ! m68k) ! # FIXME: we need at least 68020 code to build shared libraries, but ! # adding the `-m68020' flag to GCC prevents building anything better, ! # like `-m68040'. ! _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ! ;; ! esac ;; + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; ! mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style *************** *** 4181,4190 **** fi ;; hpux*) ! # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but ! # not for PA HP-UX. case $host_cpu in ! hppa*64*|ia64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' --- 4210,4220 ---- fi ;; hpux*) ! # PIC is the default for 64-bit PA HP-UX, but not for 32-bit ! # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag ! # sets the default TLS model and affects inlining. case $host_cpu in ! hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' *************** *** 4282,4293 **** _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ! icpc* | ecpc* ) ! # Intel C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' --- 4312,4330 ---- _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ! ecpc* ) ! # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' *************** *** 4435,4453 **** ;; amigaos*) ! if test "$host_cpu" = m68k; then ! # FIXME: we need at least 68020 code to build shared libraries, but ! # adding the `-m68020' flag to GCC prevents building anything better, ! # like `-m68040'. ! _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ! fi ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; ! mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style --- 4472,4496 ---- ;; amigaos*) ! case $host_cpu in ! powerpc) ! # see comment about AmigaOS4 .so support ! _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ! ;; ! m68k) ! # FIXME: we need at least 68020 code to build shared libraries, but ! # adding the `-m68020' flag to GCC prevents building anything better, ! # like `-m68040'. ! _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ! ;; ! esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; ! mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style *************** *** 4463,4472 **** ;; hpux*) ! # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but ! # not for PA HP-UX. case $host_cpu in ! hppa*64*|ia64*) # +Z the default ;; *) --- 4506,4516 ---- ;; hpux*) ! # PIC is the default for 64-bit PA HP-UX, but not for 32-bit ! # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag ! # sets the default TLS model and affects inlining. case $host_cpu in ! hppa*64*) # +Z the default ;; *) *************** *** 4516,4522 **** fi ;; ! mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], --- 4560,4566 ---- fi ;; ! mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], *************** *** 4547,4557 **** linux* | k*bsd*-gnu) case $cc_basename in ! icc* | ecc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) --- 4591,4615 ---- linux* | k*bsd*-gnu) case $cc_basename in ! # old Intel for x86_64 which still supported -KPIC. ! ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) *************** *** 4733,4739 **** pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; ! cygwin* | mingw*) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' ;; *) --- 4791,4797 ---- pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; ! cygwin* | mingw* | cegcc*) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' ;; *) *************** *** 4785,4791 **** extract_expsyms_cmds= case $host_os in ! cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. --- 4843,4849 ---- extract_expsyms_cmds= case $host_os in ! cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. *************** *** 4847,4865 **** ;; amigaos*) ! if test "$host_cpu" = m68k; then ! _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' ! _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ! _LT_TAGVAR(hardcode_minus_L, $1)=yes ! fi ! ! # Samuel A. Falvo II reports ! # that the semantics of dynamic libraries on AmigaOS, at least up ! # to version 4, is to share data among multiple programs linked ! # with the same dynamic library. Since this doesn't match the ! # behavior of shared libraries on other platforms, we can't use ! # them. ! _LT_TAGVAR(ld_shlibs, $1)=no ;; beos*) --- 4905,4922 ---- ;; amigaos*) ! case $host_cpu in ! powerpc) ! # see comment about AmigaOS4 .so support ! _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ! _LT_TAGVAR(archive_expsym_cmds, $1)='' ! ;; ! m68k) ! _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' ! _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ! _LT_TAGVAR(hardcode_minus_L, $1)=yes ! ;; ! esac ;; beos*) *************** *** 4873,4879 **** fi ;; ! cygwin* | mingw* | pw32*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' --- 4930,4936 ---- fi ;; ! cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' *************** *** 4939,4944 **** --- 4996,5004 ---- tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + _LT_TAGVAR(whole_archive_flag_spec, $1)= + tmp_sharedflag='--shared' ;; xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; *************** *** 5170,5175 **** --- 5230,5236 ---- fi fi + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes *************** *** 5206,5225 **** ;; amigaos*) ! if test "$host_cpu" = m68k; then ! _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' ! _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ! _LT_TAGVAR(hardcode_minus_L, $1)=yes ! fi ! # see comment about different semantics on the GNU ld section ! _LT_TAGVAR(ld_shlibs, $1)=no ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; ! cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is --- 5267,5291 ---- ;; amigaos*) ! case $host_cpu in ! powerpc) ! # see comment about AmigaOS4 .so support ! _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ! _LT_TAGVAR(archive_expsym_cmds, $1)='' ! ;; ! m68k) ! _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' ! _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ! _LT_TAGVAR(hardcode_minus_L, $1)=yes ! ;; ! esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; ! cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is *************** *** 5323,5329 **** _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) ! _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' --- 5389,5395 ---- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) ! _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' *************** *** 6104,6109 **** --- 6170,6176 ---- fi fi + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. *************** *** 6162,6168 **** esac ;; ! cygwin* | mingw* | pw32*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' --- 6229,6235 ---- esac ;; ! cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' *************** *** 7423,7428 **** --- 7490,7496 ---- CC=${GCJ-"gcj"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC + _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. *************** *** 7542,7547 **** --- 7610,7627 ---- ]) + # _LT_DECL_OBJDUMP + # -------------- + # If we don't have a new enough Autoconf to choose the best objdump + # available, choose the one first in the user's PATH. + m4_defun([_LT_DECL_OBJDUMP], + [AC_CHECK_TOOL(OBJDUMP, objdump, false) + test -z "$OBJDUMP" && OBJDUMP=objdump + _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) + AC_SUBST([OBJDUMP]) + ]) + + # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates *************** *** 7633,7639 **** xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ ! = c,a/b,, ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) --- 7713,7721 ---- xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ ! = c,a/b,, \ ! && eval 'test $(( 1 + 1 )) -eq 2 \ ! && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) *************** *** 7677,7682 **** --- 7759,7765 ---- [case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" + # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. *************** *** 7744,7753 **** --- 7827,7857 ---- *) func_lo2o_result=${1} ;; esac } + + # func_xform libobj-or-source + func_xform () + { + func_xform_result=${1%.*}.lo + } + + # func_arith arithmetic-term... + func_arith () + { + func_arith_result=$(( $[*] )) + } + + # func_len string + # STRING may not start with a hyphen. + func_len () + { + func_len_result=${#1} + } + _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" + # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. *************** *** 7768,7796 **** func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } ! # func_dirname_and_basename file append nondir_replacement ! # perform func_basename and func_dirname in a single function ! # call: ! # dirname: Compute the dirname of FILE. If nonempty, ! # add APPEND to the result, otherwise set result ! # to NONDIR_REPLACEMENT. ! # value returned in "$func_dirname_result" ! # basename: Compute filename of FILE. ! # value retuned in "$func_basename_result" ! # Implementation must be kept synchronized with func_dirname ! # and func_basename. For efficiency, we do not delegate to ! # those functions but instead duplicate the functionality here. ! func_dirname_and_basename () ! { ! # Extract subdirectory from the argument. ! func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` ! if test "X$func_dirname_result" = "X${1}"; then ! func_dirname_result="${3}" ! else ! func_dirname_result="$func_dirname_result${2}" ! fi ! func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` ! } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. --- 7872,7880 ---- func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } ! dnl func_dirname_and_basename ! dnl A portable version of this function is already defined in general.m4sh ! dnl so there is no need for it here. # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. *************** *** 7824,7829 **** --- 7908,7933 ---- { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } + + # func_xform libobj-or-source + func_xform () + { + func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` + } + + # func_arith arithmetic-term... + func_arith () + { + func_arith_result=`expr "$[@]"` + } + + # func_len string + # STRING may not start with a hyphen. + func_len () + { + func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` + } + _LT_EOF esac *************** *** 7848,7853 **** --- 7952,7958 ---- { eval "$[1]=\$$[1]\$[2]" } + _LT_EOF ;; esac *************** *** 7862,7868 **** # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. ! # serial 4 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) --- 7967,7973 ---- # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. ! # serial 6 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) *************** *** 7977,7983 **** [enable_win32_dll=yes case $host in ! *-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) --- 8082,8088 ---- [enable_win32_dll=yes case $host in ! *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) *************** *** 7995,8001 **** ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], ! [_LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) --- 8100,8107 ---- ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], ! [AC_REQUIRE([AC_CANONICAL_HOST])dnl ! _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) *************** *** 8043,8049 **** # Old names: AC_DEFUN([AC_ENABLE_SHARED], ! [_LT_SET_OPTION([LT_INIT], [shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], --- 8149,8155 ---- # Old names: AC_DEFUN([AC_ENABLE_SHARED], ! [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], *************** *** 8097,8103 **** # Old names: AC_DEFUN([AC_ENABLE_STATIC], ! [_LT_SET_OPTION([LT_INIT], [static]) ]) AC_DEFUN([AC_DISABLE_STATIC], --- 8203,8209 ---- # Old names: AC_DEFUN([AC_ENABLE_STATIC], ! [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], *************** *** 8151,8157 **** # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], ! [_LT_SET_OPTION([LT_INIT], [fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) --- 8257,8263 ---- # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], ! [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) *************** *** 8217,8230 **** # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # ! # Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. ! # Written by Gary V. Vaughan, 2004 # # This file 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. ! # serial 5 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) --- 8323,8336 ---- # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # ! # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. ! # Written by Gary V. Vaughan, 2004 # # This file 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. ! # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) *************** *** 8280,8293 **** # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. m4_define([lt_combine], ! [m4_if([$2], [], [], ! [m4_if([$4], [], [], ! [lt_join(m4_quote(m4_default([$1], [[, ]])), ! lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_prefix, [$2], ! [m4_foreach(_Lt_suffix, lt_car([m4_shiftn(3, $@)]), ! [_Lt_prefix[]$3[]_Lt_suffix ])])))))])])dnl ! ]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) --- 8386,8399 ---- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. + # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], ! [m4_if(m4_eval([$# > 3]), [1], ! [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl ! [[m4_foreach([_Lt_prefix], [$2], ! [m4_foreach([_Lt_suffix], ! ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, ! [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) *************** *** 8350,8364 **** # Generated from ltversion.in. ! # serial 2599 ltversion.m4 # This file is part of GNU Libtool ! m4_define([LT_PACKAGE_VERSION], [2.2]) ! m4_define([LT_PACKAGE_REVISION], [1.2599]) AC_DEFUN([LTVERSION_VERSION], ! [macro_version='2.2' ! macro_revision='1.2599' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) --- 8456,8470 ---- # Generated from ltversion.in. ! # serial 3012 ltversion.m4 # This file is part of GNU Libtool ! m4_define([LT_PACKAGE_VERSION], [2.2.6]) ! m4_define([LT_PACKAGE_REVISION], [1.3012]) AC_DEFUN([LTVERSION_VERSION], ! [macro_version='2.2.6' ! macro_revision='1.3012' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) *************** *** 8372,8378 **** # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. ! # serial 3 # These exist entirely to fool aclocal when bootstrapping libtool. # --- 8478,8484 ---- # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. ! # serial 4 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # diff -a -rc -C 2 -P gsl-1.11/autogen.sh gsl-1.12/autogen.sh *** gsl-1.11/autogen.sh Wed Mar 19 21:49:27 2008 --- gsl-1.12/autogen.sh Thu Nov 27 20:03:28 2008 *************** *** 5,10 **** --- 5,11 ---- libtoolize --automake aclocal + autoheader automake --add-missing --gnu autoconf echo "Now use ./configure --enable-maintainer-mode" diff -a -rc -C 2 -P gsl-1.11/blas/Makefile.am gsl-1.12/blas/Makefile.am *** gsl-1.11/blas/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/blas/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 2,8 **** pkginclude_HEADERS = gsl_blas.h gsl_blas_types.h ! INCLUDES= -I$(top_srcdir) libgslblas_la_SOURCES = blas.c --- 2,8 ---- pkginclude_HEADERS = gsl_blas.h gsl_blas_types.h ! INCLUDES = -I$(top_srcdir) libgslblas_la_SOURCES = blas.c diff -a -rc -C 2 -P gsl-1.11/blas/Makefile.in gsl-1.12/blas/Makefile.in *** gsl-1.11/blas/Makefile.in Sun Mar 30 12:07:00 2008 --- gsl-1.12/blas/Makefile.in Mon Dec 15 14:55:07 2008 *************** *** 126,131 **** --- 126,132 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 133,139 **** --- 134,143 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ diff -a -rc -C 2 -P gsl-1.11/block/ChangeLog gsl-1.12/block/ChangeLog *** gsl-1.11/block/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/block/ChangeLog Thu Nov 27 20:03:28 2008 *************** *** 1,3 **** --- 1,7 ---- + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): remove top_builddir + 2005-05-21 Brian Gough * Makefile.am (pkginclude_HEADERS): removed unused file diff -a -rc -C 2 -P gsl-1.11/block/Makefile.am gsl-1.12/block/Makefile.am *** gsl-1.11/block/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/block/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 4,10 **** pkginclude_HEADERS = gsl_block.h gsl_block_char.h gsl_block_complex_double.h gsl_block_complex_float.h gsl_block_complex_long_double.h gsl_block_double.h gsl_block_float.h gsl_block_int.h gsl_block_long.h gsl_block_long_double.h gsl_block_short.h gsl_block_uchar.h gsl_block_uint.h gsl_block_ulong.h gsl_block_ushort.h gsl_check_range.h ! INCLUDES= -I$(top_builddir) -I$(top_srcdir) TESTS = $(check_PROGRAMS) --- 4,10 ---- pkginclude_HEADERS = gsl_block.h gsl_block_char.h gsl_block_complex_double.h gsl_block_complex_float.h gsl_block_complex_long_double.h gsl_block_double.h gsl_block_float.h gsl_block_int.h gsl_block_long.h gsl_block_long_double.h gsl_block_short.h gsl_block_uchar.h gsl_block_uint.h gsl_block_ulong.h gsl_block_ushort.h gsl_check_range.h ! INCLUDES = -I$(top_srcdir) TESTS = $(check_PROGRAMS) diff -a -rc -C 2 -P gsl-1.11/block/Makefile.in gsl-1.12/block/Makefile.in *** gsl-1.11/block/Makefile.in Sun Mar 30 12:07:00 2008 --- gsl-1.12/block/Makefile.in Mon Dec 15 14:55:07 2008 *************** *** 132,137 **** --- 132,138 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 139,145 **** --- 140,149 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 204,210 **** top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslblock.la pkginclude_HEADERS = gsl_block.h gsl_block_char.h gsl_block_complex_double.h gsl_block_complex_float.h gsl_block_complex_long_double.h gsl_block_double.h gsl_block_float.h gsl_block_int.h gsl_block_long.h gsl_block_long_double.h gsl_block_short.h gsl_block_uchar.h gsl_block_uint.h gsl_block_ulong.h gsl_block_ushort.h gsl_check_range.h ! 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 test_SOURCES = test.c --- 208,214 ---- top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslblock.la pkginclude_HEADERS = gsl_block.h gsl_block_char.h gsl_block_complex_double.h gsl_block_complex_float.h gsl_block_complex_long_double.h gsl_block_double.h gsl_block_float.h gsl_block_int.h gsl_block_long.h gsl_block_long_double.h gsl_block_short.h gsl_block_uchar.h gsl_block_uint.h gsl_block_ulong.h gsl_block_ushort.h gsl_check_range.h ! INCLUDES = -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 test_SOURCES = test.c diff -a -rc -C 2 -P gsl-1.11/bspline/ChangeLog gsl-1.12/bspline/ChangeLog *** gsl-1.11/bspline/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/bspline/ChangeLog Tue Dec 9 09:12:39 2008 *************** *** 1,3 **** --- 1,16 ---- + 2008-12-09 Brian Gough + + * bspline.c (gsl_bspline_deriv_alloc): add size to derivative + struct + + 2008-12-08 Brian Gough + + * gsl_bspline.h: preserve binary compatibility in workspaces + + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + 2006-11-02 Brian Gough * added test program diff -a -rc -C 2 -P gsl-1.11/bspline/Makefile.am gsl-1.12/bspline/Makefile.am *** gsl-1.11/bspline/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/bspline/Makefile.am Mon Dec 8 20:42:50 2008 *************** *** 2,11 **** pkginclude_HEADERS = gsl_bspline.h ! INCLUDES= -I$(top_builddir) libgslbspline_la_SOURCES = bspline.c check_PROGRAMS = test TESTS = $(check_PROGRAMS) --- 2,13 ---- pkginclude_HEADERS = gsl_bspline.h ! INCLUDES = -I$(top_srcdir) libgslbspline_la_SOURCES = bspline.c + noinst_HEADERS = bspline.h + check_PROGRAMS = test TESTS = $(check_PROGRAMS) diff -a -rc -C 2 -P gsl-1.11/bspline/Makefile.in gsl-1.12/bspline/Makefile.in *** gsl-1.11/bspline/Makefile.in Sun Mar 30 12:07:01 2008 --- gsl-1.12/bspline/Makefile.in Mon Dec 15 14:55:07 2008 *************** *** 35,42 **** host_triplet = @host@ check_PROGRAMS = test$(EXEEXT) subdir = bspline ! DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ ! $(srcdir)/Makefile.in ChangeLog TODO ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ --- 35,42 ---- host_triplet = @host@ check_PROGRAMS = test$(EXEEXT) subdir = bspline ! DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ ! $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog TODO ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ *************** *** 79,85 **** am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(pkgincludedir)" pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER) ! HEADERS = $(pkginclude_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) --- 79,85 ---- am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(pkgincludedir)" pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER) ! HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) *************** *** 136,141 **** --- 136,142 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 143,149 **** --- 144,153 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 208,215 **** top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslbspline.la pkginclude_HEADERS = gsl_bspline.h ! INCLUDES = -I$(top_builddir) libgslbspline_la_SOURCES = bspline.c TESTS = $(check_PROGRAMS) test_LDADD = libgslbspline.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 test_SOURCES = test.c --- 212,220 ---- top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslbspline.la pkginclude_HEADERS = gsl_bspline.h ! INCLUDES = -I$(top_srcdir) libgslbspline_la_SOURCES = bspline.c + noinst_HEADERS = bspline.h TESTS = $(check_PROGRAMS) test_LDADD = libgslbspline.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 test_SOURCES = test.c diff -a -rc -C 2 -P gsl-1.11/bspline/TODO gsl-1.12/bspline/TODO *** gsl-1.11/bspline/TODO Tue Feb 5 13:22:10 2008 --- gsl-1.12/bspline/TODO Mon Dec 8 20:25:23 2008 *************** *** 1,7 **** Add functions: - gsl_bspline_eval_deriv (see pppack bsplvd) to compute B-spline derivatives - gsl_bspline_smooth to fit smoothing splines to data more efficiently than the standard least squares inversion (see pppack l2appr and smooth.spline() from GNU R) --- 1,5 ---- diff -a -rc -C 2 -P gsl-1.11/bspline/bspline.c gsl-1.12/bspline/bspline.c *** gsl-1.11/bspline/bspline.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/bspline/bspline.c Tue Dec 9 09:07:39 2008 *************** *** 1,17 **** /* bspline/bspline.c ! * * Copyright (C) 2006, 2007, 2008 Patrick Alken ! * * 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- 1,18 ---- /* bspline/bspline.c ! * * Copyright (C) 2006, 2007, 2008 Patrick Alken ! * Copyright (C) 2008 Rhys Ulerich ! * * 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *************** *** 27,39 **** * * [1] Carl de Boor, "A Practical Guide to Splines", Springer * Verlag, 1978. */ ! static int bspline_eval_all(const double x, gsl_vector *B, size_t *idx, ! gsl_bspline_workspace *w); ! ! static inline size_t bspline_find_interval(const double x, int *flag, ! gsl_bspline_workspace *w); /* gsl_bspline_alloc() --- 28,42 ---- * * [1] Carl de Boor, "A Practical Guide to Splines", Springer * Verlag, 1978. + * + * The bspline_pppack_* internal routines contain code adapted from + * + * [2] "PPPACK - Piecewise Polynomial Package", + * http://www.netlib.org/pppack/ + * */ ! #include "bspline.h" /* gsl_bspline_alloc() *************** *** 47,72 **** */ gsl_bspline_workspace * ! gsl_bspline_alloc(const size_t k, const size_t nbreak) { if (k == 0) { ! GSL_ERROR_NULL("k must be at least 1", GSL_EINVAL); } else if (nbreak < 2) { ! GSL_ERROR_NULL("nbreak must be at least 2", GSL_EINVAL); } else { gsl_bspline_workspace *w; ! w = (gsl_bspline_workspace *) ! calloc(1, sizeof(gsl_bspline_workspace)); if (w == 0) ! { ! GSL_ERROR_NULL("failed to allocate space for workspace", GSL_ENOMEM); ! } w->k = k; w->km1 = k - 1; --- 50,76 ---- */ gsl_bspline_workspace * ! gsl_bspline_alloc (const size_t k, const size_t nbreak) { if (k == 0) { ! GSL_ERROR_NULL ("k must be at least 1", GSL_EINVAL); } else if (nbreak < 2) { ! GSL_ERROR_NULL ("nbreak must be at least 2", GSL_EINVAL); } else { gsl_bspline_workspace *w; ! w = (gsl_bspline_workspace *) malloc (sizeof (gsl_bspline_workspace)); ! if (w == 0) ! { ! GSL_ERROR_NULL ("failed to allocate space for workspace", ! GSL_ENOMEM); ! } w->k = k; w->km1 = k - 1; *************** *** 74,104 **** w->l = nbreak - 1; w->n = w->l + k - 1; ! w->knots = gsl_vector_alloc(w->n + k); if (w->knots == 0) ! { ! gsl_bspline_free(w); ! GSL_ERROR_NULL("failed to allocate space for knots vector", GSL_ENOMEM); ! } ! ! w->deltal = gsl_vector_alloc(k); ! w->deltar = gsl_vector_alloc(k); ! if (!w->deltal || !w->deltar) ! { ! gsl_bspline_free(w); ! GSL_ERROR_NULL("failed to allocate space for delta vectors", GSL_ENOMEM); ! } ! w->B = gsl_vector_alloc(k); if (w->B == 0) ! { ! gsl_bspline_free(w); ! GSL_ERROR_NULL("failed to allocate space for temporary spline vector", GSL_ENOMEM); ! } ! return (w); } ! } /* gsl_bspline_alloc() */ /* Return number of coefficients */ size_t --- 78,182 ---- w->l = nbreak - 1; w->n = w->l + k - 1; ! w->knots = gsl_vector_alloc (w->n + k); if (w->knots == 0) ! { ! free (w); ! GSL_ERROR_NULL ("failed to allocate space for knots vector", ! GSL_ENOMEM); ! } ! ! w->deltal = gsl_vector_alloc (k); ! if (w->deltal == 0) ! { ! free (w->knots); ! free (w); ! GSL_ERROR_NULL ("failed to allocate space for deltal vector", ! GSL_ENOMEM); ! } ! ! w->deltar = gsl_vector_alloc (k); ! if (w->deltar == 0) ! { ! free (w->deltal); ! free (w->knots); ! free (w); ! GSL_ERROR_NULL ("failed to allocate space for deltar vector", ! GSL_ENOMEM); ! } ! ! w->B = gsl_vector_alloc (k); if (w->B == 0) ! { ! free (w->deltar);; ! free (w->deltal); ! free (w->knots); ! free (w); ! GSL_ERROR_NULL ! ("failed to allocate space for temporary spline vector", ! GSL_ENOMEM); ! } ! return w; } ! } /* gsl_bspline_alloc() */ ! ! /* ! gsl_bspline_deriv_alloc() ! Allocate space for a bspline derivative workspace. The size of the ! workspace is O(2k^2) ! ! Inputs: k - spline order (cubic = 4) ! ! Return: pointer to workspace ! */ ! ! gsl_bspline_deriv_workspace * ! gsl_bspline_deriv_alloc (const size_t k) ! { ! if (k == 0) ! { ! GSL_ERROR_NULL ("k must be at least 1", GSL_EINVAL); ! } ! else ! { ! gsl_bspline_deriv_workspace *dw; ! ! dw = ! (gsl_bspline_deriv_workspace *) ! malloc (sizeof (gsl_bspline_deriv_workspace)); ! ! if (dw == 0) ! { ! GSL_ERROR_NULL ("failed to allocate space for workspace", ! GSL_ENOMEM); ! } ! ! dw->A = gsl_matrix_alloc (k, k); ! if (dw->A == 0) ! { ! free (dw); ! GSL_ERROR_NULL ! ("failed to allocate space for derivative work matrix", ! GSL_ENOMEM); ! } ! ! dw->dB = gsl_matrix_alloc (k, k + 1); ! if (dw->dB == 0) ! { ! free (dw->A); ! free (dw); ! GSL_ERROR_NULL ! ("failed to allocate space for temporary derivative matrix", ! GSL_ENOMEM); ! } ! ! dw->k = k; ! ! return dw; ! } ! } /* gsl_bspline_deriv_alloc() */ /* Return number of coefficients */ size_t *************** *** 121,136 **** return w->nbreak; } double gsl_bspline_breakpoint (size_t i, gsl_bspline_workspace * w) { size_t j = i + w->k - 1; ! return gsl_vector_get(w->knots, j); } /* gsl_bspline_free() ! Free a bspline workspace Inputs: w - workspace to free --- 199,215 ---- return w->nbreak; } + /* Return the location of the i-th breakpoint*/ double gsl_bspline_breakpoint (size_t i, gsl_bspline_workspace * w) { size_t j = i + w->k - 1; ! return gsl_vector_get (w->knots, j); } /* gsl_bspline_free() ! Free a gsl_bspline_workspace. Inputs: w - workspace to free *************** *** 138,170 **** */ void ! gsl_bspline_free(gsl_bspline_workspace *w) { ! if (w->knots) ! gsl_vector_free(w->knots); ! if (w->deltal) ! gsl_vector_free(w->deltal); ! if (w->deltar) ! gsl_vector_free(w->deltar); ! if (w->B) ! gsl_vector_free(w->B); ! free(w); ! } /* gsl_bspline_free() */ /* gsl_bspline_knots() Compute the knots from the given breakpoints: ! knots(1:k) = breakpts(1) ! knots(k+1:k+l-1) = breakpts(i), i = 2 .. l ! knots(n+1:n+k) = breakpts(l + 1) where l is the number of polynomial pieces (l = nbreak - 1) and ! n = k + l - 1 (using matlab syntax for the arrays) The repeated knots at the beginning and end of the interval --- 217,258 ---- */ void ! gsl_bspline_free (gsl_bspline_workspace * w) { ! gsl_vector_free (w->knots); ! gsl_vector_free (w->deltal); ! gsl_vector_free (w->deltar); ! gsl_vector_free (w->B); ! free (w); ! } /* gsl_bspline_free() */ ! /* ! gsl_bspline_deriv_free() ! Free a gsl_bspline_deriv_workspace. ! Inputs: dw - workspace to free ! Return: none ! */ ! void ! gsl_bspline_deriv_free (gsl_bspline_deriv_workspace * dw) ! { ! gsl_matrix_free (dw->A); ! gsl_matrix_free (dw->dB); ! free (dw); ! } /* gsl_bspline_deriv_free() */ /* gsl_bspline_knots() Compute the knots from the given breakpoints: ! knots(1:k) = breakpts(1) ! knots(k+1:k+l-1) = breakpts(i), i = 2 .. l ! knots(n+1:n+k) = breakpts(l + 1) where l is the number of polynomial pieces (l = nbreak - 1) and ! n = k + l - 1 (using matlab syntax for the arrays) The repeated knots at the beginning and end of the interval *************** *** 178,208 **** */ int ! gsl_bspline_knots(const gsl_vector *breakpts, gsl_bspline_workspace *w) { if (breakpts->size != w->nbreak) { ! GSL_ERROR("breakpts vector has wrong size", GSL_EBADLEN); } else { ! size_t i; /* looping */ ! for (i = 0; i < w->k; ++i) ! gsl_vector_set(w->knots, i, gsl_vector_get(breakpts, 0)); ! for (i = 1; i < w->l; ++i) ! { ! gsl_vector_set(w->knots, w->k - 1 + i, ! gsl_vector_get(breakpts, i)); ! } ! for (i = w->n; i < w->n + w->k; ++i) ! gsl_vector_set(w->knots, i, gsl_vector_get(breakpts, w->l)); return GSL_SUCCESS; } ! } /* gsl_bspline_knots() */ /* gsl_bspline_knots_uniform() --- 266,296 ---- */ int ! gsl_bspline_knots (const gsl_vector * breakpts, gsl_bspline_workspace * w) { if (breakpts->size != w->nbreak) { ! GSL_ERROR ("breakpts vector has wrong size", GSL_EBADLEN); } else { ! size_t i; /* looping */ ! for (i = 0; i < w->k; i++) ! gsl_vector_set (w->knots, i, gsl_vector_get (breakpts, 0)); ! for (i = 1; i < w->l; i++) ! { ! gsl_vector_set (w->knots, w->k - 1 + i, ! gsl_vector_get (breakpts, i)); ! } ! for (i = w->n; i < w->n + w->k; i++) ! gsl_vector_set (w->knots, i, gsl_vector_get (breakpts, w->l)); return GSL_SUCCESS; } ! } /* gsl_bspline_knots() */ /* gsl_bspline_knots_uniform() *************** *** 228,263 **** */ int ! gsl_bspline_knots_uniform(const double a, const double b, ! gsl_bspline_workspace *w) { ! size_t i; /* looping */ ! double delta; /* interval spacing */ double x; delta = (b - a) / (double) w->l; ! for (i = 0; i < w->k; ++i) ! gsl_vector_set(w->knots, i, a); x = a + delta; ! for (i = 0; i < w->l - 1; ++i) { ! gsl_vector_set(w->knots, w->k + i, x); x += delta; } ! for (i = w->n; i < w->n + w->k; ++i) ! gsl_vector_set(w->knots, i, b); return GSL_SUCCESS; ! } /* gsl_bspline_knots_uniform() */ /* gsl_bspline_eval() Evaluate the basis functions B_i(x) for all i. This is ! basically a wrapper function for bspline_eval_all() ! which formats the output in a nice way. Inputs: x - point for evaluation B - (output) where to store B_i(x) values --- 316,351 ---- */ int ! gsl_bspline_knots_uniform (const double a, const double b, ! gsl_bspline_workspace * w) { ! size_t i; /* looping */ ! double delta; /* interval spacing */ double x; delta = (b - a) / (double) w->l; ! for (i = 0; i < w->k; i++) ! gsl_vector_set (w->knots, i, a); x = a + delta; ! for (i = 0; i < w->l - 1; i++) { ! gsl_vector_set (w->knots, w->k + i, x); x += delta; } ! for (i = w->n; i < w->n + w->k; i++) ! gsl_vector_set (w->knots, i, b); return GSL_SUCCESS; ! } /* gsl_bspline_knots_uniform() */ /* gsl_bspline_eval() Evaluate the basis functions B_i(x) for all i. This is ! a wrapper function for gsl_bspline_eval_nonzero() which ! formats the output in a nice way. Inputs: x - point for evaluation B - (output) where to store B_i(x) values *************** *** 272,452 **** */ int ! gsl_bspline_eval(const double x, gsl_vector *B, ! gsl_bspline_workspace *w) { if (B->size != w->n) { ! GSL_ERROR("B vector length does not match n", GSL_EBADLEN); } else { ! size_t i; /* looping */ ! size_t idx = 0; ! size_t start; /* first non-zero spline */ /* find all non-zero B_i(x) values */ ! bspline_eval_all(x, w->B, &idx, w); /* store values in appropriate part of given vector */ ! start = idx - w->k + 1; ! for (i = 0; i < start; ++i) ! gsl_vector_set(B, i, 0.0); ! ! for (i = start; i <= idx; ++i) ! gsl_vector_set(B, i, gsl_vector_get(w->B, i - start)); ! for (i = idx + 1; i < w->n; ++i) ! gsl_vector_set(B, i, 0.0); return GSL_SUCCESS; } ! } /* gsl_bspline_eval() */ ! ! /**************************************** ! * INTERNAL ROUTINES * ! ****************************************/ /* ! bspline_eval_all() ! Evaluate all non-zero B-splines B_i(x) using algorithm (8) ! of chapter X of [1] ! ! The idea is something like this. Given x \in [t_i, t_{i+1}] ! with t_i < t_{i+1} and the t_i are knots, the values of the ! B-splines not automatically zero fit into a triangular ! array as follows: ! 0 ! 0 ! 0 B_{i-2,3} ! B_{i-1,2} ! B_{i,1} B_{i-1,3} ... ! B_{i,2} ! 0 B_{i,3} ! 0 ! 0 ! ! where B_{i,k} is the ith B-spline of order k. The boundary 0s ! indicate that those B-splines not in the table vanish at x. ! ! To compute the non-zero B-splines of a given order k, we use ! Eqs. (4) and (5) of chapter X of [1]: ! ! (4) B_{i,1}(x) = { 1, t_i <= x < t_{i+1} ! 0, else } ! ! (5) B_{i,k}(x) = (x - t_i) ! ----------------- B_{i,k-1}(x) ! (t_{i+k-1} - t_i) ! ! t_{i+k} - x ! + ----------------- B_{i+1,k-1}(x) ! t_{i+k} - t_{i+1} ! ! So (4) gives us the first column of the table and we can use ! the recurrence relation (5) to get the rest of the columns. ! ! Inputs: x - point at which to evaluate splines ! B - (output) where to store B-spline values (length k) ! idx - (output) B-spline function index of last output ! value (B_{idx}(x) is stored in the last slot of 'B') ! w - bspline workspace Return: success or error Notes: 1) the w->knots vector must be initialized before calling this function ! 2) On output, B contains: ! ! B = [B_{i-k+1,k}, B_{i-k+2,k}, ..., B_{i-1,k}, B_{i,k}] ! where 'i' is stored in 'idx' on output ! 3) based on PPPACK bsplvb */ ! static int ! bspline_eval_all(const double x, gsl_vector *B, size_t *idx, ! gsl_bspline_workspace *w) { ! if (B->size != w->k) { ! GSL_ERROR("B vector not of length k", GSL_EBADLEN); } else { ! size_t i; /* spline index */ ! size_t j; /* looping */ ! size_t ii; /* looping */ ! int flag = 0; /* error flag */ ! double saved; ! double term; ! ! i = bspline_find_interval(x, &flag, w); ! ! if (flag == -1) ! { ! GSL_ERROR("x outside of knot interval", GSL_EINVAL); ! } ! else if (flag == 1) ! { ! if (x <= gsl_vector_get(w->knots, i) + GSL_DBL_EPSILON) ! { ! --i; ! } ! else ! { ! GSL_ERROR("x outside of knot interval", GSL_EINVAL); ! } ! } ! ! if (gsl_vector_get(w->knots, i) == gsl_vector_get(w->knots, i + 1)) ! { ! GSL_ERROR("knot(i) = knot(i+1) will result in division by zero", ! GSL_EINVAL); ! } ! ! *idx = i; ! ! gsl_vector_set(B, 0, 1.0); ! ! for (j = 0; j < w->k - 1; ++j) ! { ! gsl_vector_set(w->deltar, j, ! gsl_vector_get(w->knots, i + j + 1) - x); ! gsl_vector_set(w->deltal, j, ! x - gsl_vector_get(w->knots, i - j)); ! ! saved = 0.0; ! ! for (ii = 0; ii <= j; ++ii) ! { ! term = gsl_vector_get(B, ii) / ! (gsl_vector_get(w->deltar, ii) + ! gsl_vector_get(w->deltal, j - ii)); ! ! gsl_vector_set(B, ii, ! saved + ! gsl_vector_get(w->deltar, ii) * term); ! saved = gsl_vector_get(w->deltal, j - ii) * term; ! } ! gsl_vector_set(B, j + 1, saved); ! } return GSL_SUCCESS; } ! } /* bspline_eval_all() */ /* ! bspline_find_interval() ! Find knot interval such that ! t_i <= x < t_{i + 1} where the t_i are knot values. Inputs: x - x value --- 360,637 ---- */ int ! gsl_bspline_eval (const double x, gsl_vector * B, gsl_bspline_workspace * w) { if (B->size != w->n) { ! GSL_ERROR ("vector B not of length n", GSL_EBADLEN); } else { ! size_t i; /* looping */ ! size_t istart; /* first non-zero spline for x */ ! size_t iend; /* last non-zero spline for x, knot for x */ ! int error; /* error handling */ /* find all non-zero B_i(x) values */ ! error = gsl_bspline_eval_nonzero (x, w->B, &istart, &iend, w); ! if (error) ! { ! return error; ! } /* store values in appropriate part of given vector */ + for (i = 0; i < istart; i++) + gsl_vector_set (B, i, 0.0); ! for (i = istart; i <= iend; i++) ! gsl_vector_set (B, i, gsl_vector_get (w->B, i - istart)); ! for (i = iend + 1; i < w->n; i++) ! gsl_vector_set (B, i, 0.0); return GSL_SUCCESS; } ! } /* gsl_bspline_eval() */ /* ! gsl_bspline_eval_nonzero() ! Evaluate all non-zero B-spline functions at point x. ! These are the B_i(x) for i in [istart, iend]. ! Always B_i(x) = 0 for i < istart and for i > iend. ! ! Inputs: x - point at which to evaluate splines ! Bk - (output) where to store B-spline values (length k) ! istart - (output) B-spline function index of ! first non-zero basis for given x ! iend - (output) B-spline function index of ! last non-zero basis for given x. ! This is also the knot index corresponding to x. ! w - bspline workspace Return: success or error Notes: 1) the w->knots vector must be initialized before calling this function ! 2) On output, B contains ! [B_{istart,k}, B_{istart+1,k}, ! ..., B_{iend-1,k}, B_{iend,k}] ! evaluated at the given x. */ ! int ! gsl_bspline_eval_nonzero (const double x, gsl_vector * Bk, size_t * istart, ! size_t * iend, gsl_bspline_workspace * w) { ! if (Bk->size != w->k) { ! GSL_ERROR ("Bk vector length does not match order k", GSL_EBADLEN); } else { ! size_t i; /* spline index */ ! size_t j; /* looping */ ! int flag = 0; /* interval search flag */ ! int error = 0; /* error flag */ ! ! i = bspline_find_interval (x, &flag, w); ! error = bspline_process_interval_for_eval (x, &i, flag, w); ! if (error) ! { ! return error; ! } ! *istart = i - w->k + 1; ! *iend = i; ! bspline_pppack_bsplvb (w->knots, w->k, 1, x, *iend, &j, w->deltal, ! w->deltar, Bk); return GSL_SUCCESS; } ! } /* gsl_bspline_eval_nonzero() */ /* ! gsl_bspline_deriv_eval() ! Evaluate d^j/dx^j B_i(x) for all i, 0 <= j <= nderiv. ! This is a wrapper function for gsl_bspline_deriv_eval_nonzero() ! which formats the output in a nice way. ! ! Inputs: x - point for evaluation ! nderiv - number of derivatives to compute, inclusive. ! dB - (output) where to store d^j/dx^j B_i(x) ! values. the size of this matrix is ! (n = nbreak + k - 2 = l + k - 1 = w->n) ! by (nderiv + 1) ! w - bspline derivative workspace ! ! Return: success or error ! ! Notes: 1) The w->knots vector must be initialized prior to calling ! this function (see gsl_bspline_knots()) ! ! 2) based on PPPACK's bsplvd ! */ ! ! int ! gsl_bspline_deriv_eval (const double x, const size_t nderiv, gsl_matrix * dB, ! gsl_bspline_workspace * w, ! gsl_bspline_deriv_workspace * dw) ! { ! if (dB->size1 != w->n) ! { ! GSL_ERROR ("dB matrix first dimension not of length n", GSL_EBADLEN); ! } ! else if (dB->size2 < nderiv + 1) ! { ! GSL_ERROR ! ("dB matrix second dimension must be at least length nderiv+1", ! GSL_EBADLEN); ! } ! else if (dw->k < w->k) ! { ! GSL_ERROR ("derivative workspace is too small", GSL_EBADLEN); ! } ! else ! { ! size_t i; /* looping */ ! size_t j; /* looping */ ! size_t istart; /* first non-zero spline for x */ ! size_t iend; /* last non-zero spline for x, knot for x */ ! int error; /* error handling */ ! ! /* find all non-zero d^j/dx^j B_i(x) values */ ! error = ! gsl_bspline_deriv_eval_nonzero (x, nderiv, dw->dB, &istart, &iend, w, ! dw); ! if (error) ! { ! return error; ! } ! ! /* store values in appropriate part of given matrix */ ! for (j = 0; j <= nderiv; j++) ! { ! for (i = 0; i < istart; i++) ! gsl_matrix_set (dB, i, j, 0.0); ! ! for (i = istart; i <= iend; i++) ! gsl_matrix_set (dB, i, j, gsl_matrix_get (dw->dB, i - istart, j)); ! ! for (i = iend + 1; i < w->n; i++) ! gsl_matrix_set (dB, i, j, 0.0); ! } ! return GSL_SUCCESS; ! } ! } /* gsl_bspline_deriv_eval() */ ! ! /* ! gsl_bspline_deriv_eval_nonzero() ! At point x evaluate all requested, non-zero B-spline function ! derivatives and store them in dB. These are the ! d^j/dx^j B_i(x) with i in [istart, iend] and j in [0, nderiv]. ! Always d^j/dx^j B_i(x) = 0 for i < istart and for i > iend. ! ! Inputs: x - point at which to evaluate splines ! nderiv - number of derivatives to request, inclusive ! dB - (output) where to store dB-spline derivatives ! (size k by nderiv + 1) ! istart - (output) B-spline function index of ! first non-zero basis for given x ! iend - (output) B-spline function index of ! last non-zero basis for given x. ! This is also the knot index corresponding to x. ! w - bspline derivative workspace ! ! Return: success or error ! ! Notes: 1) the w->knots vector must be initialized before calling ! this function + 2) On output, dB contains + + [[B_{istart, k}, ..., d^nderiv/dx^nderiv B_{istart ,k}], + [B_{istart+1,k}, ..., d^nderiv/dx^nderiv B_{istart+1,k}], + ... + [B_{iend-1, k}, ..., d^nderiv/dx^nderiv B_{iend-1, k}], + [B_{iend, k}, ..., d^nderiv/dx^nderiv B_{iend, k}]] + + evaluated at x. B_{istart, k} is stored in dB(0,0). + Each additional column contains an additional derivative. + + 3) Note that the zero-th column of the result contains the + 0th derivative, which is simply a function evaluation. + + 4) based on PPPACK's bsplvd + */ + + int + gsl_bspline_deriv_eval_nonzero (const double x, const size_t nderiv, + gsl_matrix * dB, size_t * istart, + size_t * iend, gsl_bspline_workspace * w, + gsl_bspline_deriv_workspace * dw) + { + if (dB->size1 != w->k) + { + GSL_ERROR ("dB matrix first dimension not of length k", GSL_EBADLEN); + } + else if (dB->size2 < nderiv + 1) + { + GSL_ERROR + ("dB matrix second dimension must be at least length nderiv+1", + GSL_EBADLEN); + } + else if (dw->k < w->k) + { + GSL_ERROR ("derivative workspace is too small", GSL_EBADLEN); + } + else + { + size_t i; /* spline index */ + size_t j; /* looping */ + int flag = 0; /* interval search flag */ + int error = 0; /* error flag */ + size_t min_nderivk; + + i = bspline_find_interval (x, &flag, w); + error = bspline_process_interval_for_eval (x, &i, flag, w); + if (error) + { + return error; + } + + *istart = i - w->k + 1; + *iend = i; + + bspline_pppack_bsplvd (w->knots, w->k, x, *iend, + w->deltal, w->deltar, dw->A, dB, nderiv); + + /* An order k b-spline has at most k-1 nonzero derivatives + so we need to zero all requested higher order derivatives */ + min_nderivk = GSL_MIN_INT (nderiv, w->k - 1); + for (j = min_nderivk + 1; j <= nderiv; j++) + { + for (i = 0; i < w->k; i++) + { + gsl_matrix_set (dB, i, j, 0.0); + } + } + + return GSL_SUCCESS; + } + } /* gsl_bspline_deriv_eval_nonzero() */ + + /**************************************** + * INTERNAL ROUTINES * + ****************************************/ + + /* + bspline_find_interval() + Find knot interval such that t_i <= x < t_{i + 1} where the t_i are knot values. Inputs: x - x value *************** *** 457,499 **** Notes: The error conditions are reported as follows: ! Condition Return value Flag ! --------- ------------ ---- ! x < t_0 0 -1 ! t_i <= x < t_{i+1} i 0 ! t_i < x = t_{i+1} = t_{n+k-1} i 0 ! t_{n+k-1} < x l+k-1 +1 */ static inline size_t ! bspline_find_interval(const double x, int *flag, ! gsl_bspline_workspace *w) { size_t i; ! if (x < gsl_vector_get(w->knots, 0)) { *flag = -1; return 0; } /* find i such that t_i <= x < t_{i+1} */ ! for (i = w->k - 1; i < w->k + w->l - 1; ++i) { ! const double ti = gsl_vector_get(w->knots, i); ! const double tip1 = gsl_vector_get(w->knots, i + 1); if (tip1 < ti) ! { ! GSL_ERROR("knots vector is not increasing", GSL_EINVAL); ! } if (ti <= x && x < tip1) ! break; ! if (ti < x && x == tip1 && ! tip1 == gsl_vector_get(w->knots, w->k + w->l - 1)) ! break; } if (i == w->k + w->l - 1) --- 642,683 ---- Notes: The error conditions are reported as follows: ! Condition Return value Flag ! --------- ------------ ---- ! x < t_0 0 -1 ! t_i <= x < t_{i+1} i 0 ! t_i < x = t_{i+1} = t_{n+k-1} i 0 ! t_{n+k-1} < x l+k-1 +1 */ static inline size_t ! bspline_find_interval (const double x, int *flag, gsl_bspline_workspace * w) { size_t i; ! if (x < gsl_vector_get (w->knots, 0)) { *flag = -1; return 0; } /* find i such that t_i <= x < t_{i+1} */ ! for (i = w->k - 1; i < w->k + w->l - 1; i++) { ! const double ti = gsl_vector_get (w->knots, i); ! const double tip1 = gsl_vector_get (w->knots, i + 1); if (tip1 < ti) ! { ! GSL_ERROR ("knots vector is not increasing", GSL_EINVAL); ! } if (ti <= x && x < tip1) ! break; ! if (ti < x && x == tip1 && tip1 == gsl_vector_get (w->knots, w->k + w->l ! - 1)) ! break; } if (i == w->k + w->l - 1) *************** *** 502,505 **** *flag = 0; return i; ! } /* bspline_find_interval() */ --- 686,1007 ---- *flag = 0; return i; ! } /* bspline_find_interval() */ ! ! /* ! bspline_process_interval_for_eval() ! Consumes an x location, left knot from bspline_find_interval, flag ! from bspline_find_interval, and a workspace. Checks that x lies within ! the splines' knots, enforces some endpoint continuity requirements, and ! avoids divide by zero errors in the underlying bspline_pppack_* functions. ! */ ! static inline int ! bspline_process_interval_for_eval (const double x, size_t * i, const int flag, ! gsl_bspline_workspace * w) ! { ! if (flag == -1) ! { ! GSL_ERROR ("x outside of knot interval", GSL_EINVAL); ! } ! else if (flag == 1) ! { ! if (x <= gsl_vector_get (w->knots, *i) + GSL_DBL_EPSILON) ! { ! *i -= 1; ! } ! else ! { ! GSL_ERROR ("x outside of knot interval", GSL_EINVAL); ! } ! } ! ! if (gsl_vector_get (w->knots, *i) == gsl_vector_get (w->knots, *i + 1)) ! { ! GSL_ERROR ("knot(i) = knot(i+1) will result in division by zero", ! GSL_EINVAL); ! } ! ! return GSL_SUCCESS; ! } /* bspline_process_interval_for_eval */ ! ! /******************************************************************** ! * PPPACK ROUTINES ! * ! * The routines herein deliberately avoid using the bspline workspace, ! * choosing instead to pass all work areas explicitly. This allows ! * others to more easily adapt these routines to low memory or ! * parallel scenarios. ! ********************************************************************/ ! ! /* ! bspline_pppack_bsplvb() ! calculates the value of all possibly nonzero b-splines at x of order ! jout = max( jhigh , (j+1)*(index-1) ) with knot sequence t. ! ! Parameters: ! t - knot sequence, of length left + jout , assumed to be ! nondecreasing. assumption t(left).lt.t(left + 1). ! division by zero will result if t(left) = t(left+1) ! jhigh - ! index - integers which determine the order jout = max(jhigh, ! (j+1)*(index-1)) of the b-splines whose values at x ! are to be returned. index is used to avoid ! recalculations when several columns of the triangular ! array of b-spline values are needed (e.g., in bsplpp ! or in bsplvd ). precisely, ! ! if index = 1 , ! the calculation starts from scratch and the entire ! triangular array of b-spline values of orders ! 1,2,...,jhigh is generated order by order , i.e., ! column by column . ! ! if index = 2 , ! only the b-spline values of order j+1, j+2, ..., jout ! are generated, the assumption being that biatx, j, ! deltal, deltar are, on entry, as they were on exit ! at the previous call. ! ! in particular, if jhigh = 0, then jout = j+1, i.e., ! just the next column of b-spline values is generated. ! x - the point at which the b-splines are to be evaluated. ! left - an integer chosen (usually) so that ! t(left) .le. x .le. t(left+1). ! j - (output) a working scalar for indexing ! deltal - (output) a working area which must be of length at least jout ! deltar - (output) a working area which must be of length at least jout ! biatx - (output) array of length jout, with biatx(i) ! containing the value at x of the polynomial of order ! jout which agrees with the b-spline b(left-jout+i,jout,t) ! on the interval (t(left), t(left+1)) . ! ! Method: ! the recurrence relation ! ! x - t(i) t(i+j+1) - x ! b(i,j+1)(x) = -----------b(i,j)(x) + ---------------b(i+1,j)(x) ! t(i+j)-t(i) t(i+j+1)-t(i+1) ! ! is used (repeatedly) to generate the (j+1)-vector b(left-j,j+1)(x), ! ...,b(left,j+1)(x) from the j-vector b(left-j+1,j)(x),..., ! b(left,j)(x), storing the new values in biatx over the old. the ! facts that ! ! b(i,1) = 1 if t(i) .le. x .lt. t(i+1) ! ! and that ! ! b(i,j)(x) = 0 unless t(i) .le. x .lt. t(i+j) ! ! are used. the particular organization of the calculations follows ! algorithm (8) in chapter x of [1]. ! ! Notes: ! ! (1) This is a direct translation of PPPACK's bsplvb routine with ! j, deltal, deltar rewritten as input parameters and ! utilizing zero-based indexing. ! ! (2) This routine contains no error checking. Please use routines ! like gsl_bspline_eval(). ! */ ! ! static void ! bspline_pppack_bsplvb (const gsl_vector * t, ! const size_t jhigh, ! const size_t index, ! const double x, ! const size_t left, ! size_t * j, ! gsl_vector * deltal, ! gsl_vector * deltar, gsl_vector * biatx) ! { ! size_t i; /* looping */ ! double saved; ! double term; ! ! if (index == 1) ! { ! *j = 0; ! gsl_vector_set (biatx, 0, 1.0); ! } ! ! for ( /* NOP */ ; *j < jhigh - 1; *j += 1) ! { ! gsl_vector_set (deltar, *j, gsl_vector_get (t, left + *j + 1) - x); ! gsl_vector_set (deltal, *j, x - gsl_vector_get (t, left - *j)); ! ! saved = 0.0; ! ! for (i = 0; i <= *j; i++) ! { ! term = gsl_vector_get (biatx, i) / (gsl_vector_get (deltar, i) ! + gsl_vector_get (deltal, ! *j - i)); ! ! gsl_vector_set (biatx, i, ! saved + gsl_vector_get (deltar, i) * term); ! ! saved = gsl_vector_get (deltal, *j - i) * term; ! } ! ! gsl_vector_set (biatx, *j + 1, saved); ! } ! ! return; ! } /* gsl_bspline_pppack_bsplvb */ ! ! /* ! bspline_pppack_bsplvd() ! calculates value and derivs of all b-splines which do not vanish at x ! ! Parameters: ! t - the knot array, of length left+k (at least) ! k - the order of the b-splines to be evaluated ! x - the point at which these values are sought ! left - an integer indicating the left endpoint of the interval ! of interest. the k b-splines whose support contains the ! interval (t(left), t(left+1)) are to be considered. ! it is assumed that t(left) .lt. t(left+1) ! division by zero will result otherwise (in bsplvb). ! also, the output is as advertised only if ! t(left) .le. x .le. t(left+1) . ! deltal - a working area which must be of length at least k ! deltar - a working area which must be of length at least k ! a - an array of order (k,k), to contain b-coeffs of the ! derivatives of a certain order of the k b-splines ! of interest. ! dbiatx - an array of order (k,nderiv). its entry (i,m) contains ! value of (m)th derivative of (left-k+i)-th b-spline ! of order k for knot sequence t, i=1,...,k, m=0,...,nderiv. ! nderiv - an integer indicating that values of b-splines and ! their derivatives up to AND INCLUDING the nderiv-th ! are asked for. (nderiv is replaced internally by the ! integer mhigh in (1,k) closest to it.) ! ! Method: ! values at x of all the relevant b-splines of order k,k-1,..., k+1-nderiv ! are generated via bsplvb and stored temporarily in dbiatx. then, the ! b-coeffs of the required derivatives of the b-splines of interest are ! generated by differencing, each from the preceeding one of lower order, ! and combined with the values of b-splines of corresponding order in ! dbiatx to produce the desired values . ! ! Notes: ! ! (1) This is a direct translation of PPPACK's bsplvd routine with ! deltal, deltar rewritten as input parameters (to later feed them ! to bspline_pppack_bsplvb) and utilizing zero-based indexing. ! ! (2) This routine contains no error checking. ! */ ! ! static void ! bspline_pppack_bsplvd (const gsl_vector * t, ! const size_t k, ! const double x, ! const size_t left, ! gsl_vector * deltal, ! gsl_vector * deltar, ! gsl_matrix * a, ! gsl_matrix * dbiatx, const size_t nderiv) ! { ! int i, ideriv, il, j, jlow, jp1mid, kmm, ldummy, m, mhigh; ! double factor, fkmm, sum; ! ! size_t bsplvb_j; ! gsl_vector_view dbcol = gsl_matrix_column (dbiatx, 0); ! ! mhigh = GSL_MIN_INT (nderiv, k - 1); ! bspline_pppack_bsplvb (t, k - mhigh, 1, x, left, &bsplvb_j, deltal, deltar, ! &dbcol.vector); ! if (mhigh > 0) ! { ! /* the first column of dbiatx always contains the b-spline ! values for the current order. these are stored in column ! k-current order before bsplvb is called to put values ! for the next higher order on top of it. */ ! ideriv = mhigh; ! for (m = 1; m <= mhigh; m++) ! { ! for (j = ideriv, jp1mid = 0; j < (int) k; j++, jp1mid++) ! { ! gsl_matrix_set (dbiatx, j, ideriv, ! gsl_matrix_get (dbiatx, jp1mid, 0)); ! } ! ideriv--; ! bspline_pppack_bsplvb (t, k - ideriv, 2, x, left, &bsplvb_j, deltal, ! deltar, &dbcol.vector); ! } ! ! /* at this point, b(left-k+i, k+1-j)(x) is in dbiatx(i,j) ! for i=j,...,k-1 and j=0,...,mhigh. in particular, the ! first column of dbiatx is already in final form. to obtain ! corresponding derivatives of b-splines in subsequent columns, ! generate their b-repr. by differencing, then evaluate at x. */ ! jlow = 0; ! for (i = 0; i < (int) k; i++) ! { ! for (j = jlow; j < (int) k; j++) ! { ! gsl_matrix_set (a, j, i, 0.0); ! } ! jlow = i; ! gsl_matrix_set (a, i, i, 1.0); ! } ! ! /* at this point, a(.,j) contains the b-coeffs for the j-th of the ! k b-splines of interest here. */ ! for (m = 1; m <= mhigh; m++) ! { ! kmm = k - m; ! fkmm = (float) kmm; ! il = left; ! i = k - 1; ! ! /* for j=1,...,k, construct b-coeffs of (m)th derivative ! of b-splines from those for preceding derivative by ! differencing and store again in a(.,j) . the fact that ! a(i,j) = 0 for i .lt. j is used. */ ! for (ldummy = 0; ldummy < kmm; ldummy++) ! { ! factor = ! fkmm / (gsl_vector_get (t, il + kmm) - ! gsl_vector_get (t, il)); ! /* the assumption that t(left).lt.t(left+1) makes ! denominator in factor nonzero. */ ! for (j = 0; j <= i; j++) ! { ! gsl_matrix_set (a, i, j, factor * (gsl_matrix_get (a, i, j) ! - gsl_matrix_get (a, ! i - 1, ! j))); ! } ! il--; ! i--; ! } ! ! /* for i=1,...,k, combine b-coeffs a(.,i) with b-spline values ! stored in dbiatx(.,m) to get value of (m)th derivative ! of i-th b-spline (of interest here) at x, and store in ! dbiatx(i,m). storage of this value over the value of a ! b-spline of order m there is safe since the remaining ! b-spline derivatives of the same order do not use this ! value due to the fact that a(j,i) = 0 for j .lt. i . */ ! for (i = 0; i < (int) k; i++) ! { ! sum = 0; ! jlow = GSL_MAX_INT (i, m); ! for (j = jlow; j < (int) k; j++) ! { ! sum += ! gsl_matrix_get (a, j, i) * gsl_matrix_get (dbiatx, j, m); ! } ! gsl_matrix_set (dbiatx, i, m, sum); ! } ! } ! } ! ! return; ! ! } /* bspline_pppack_bsplvd */ diff -a -rc -C 2 -P gsl-1.11/bspline/bspline.h gsl-1.12/bspline/bspline.h *** gsl-1.11/bspline/bspline.h Thu Jan 1 00:00:00 1970 --- gsl-1.12/bspline/bspline.h Mon Dec 8 20:21:22 2008 *************** *** 0 **** --- 1,26 ---- + static inline size_t + bspline_find_interval (const double x, int *flag, gsl_bspline_workspace * w); + + static inline int + bspline_process_interval_for_eval (const double x, size_t * i, int flag, + gsl_bspline_workspace * w); + + static void + bspline_pppack_bsplvb (const gsl_vector * t, + const size_t jhigh, + const size_t index, + const double x, + const size_t left, + size_t * j, + gsl_vector * deltal, + gsl_vector * deltar, gsl_vector * biatx); + + static void + bspline_pppack_bsplvd (const gsl_vector * t, + const size_t k, + const double x, + const size_t left, + gsl_vector * deltal, + gsl_vector * deltar, + gsl_matrix * a, + gsl_matrix * dbiatx, const size_t nderiv); diff -a -rc -C 2 -P gsl-1.11/bspline/gsl_bspline.h gsl-1.12/bspline/gsl_bspline.h *** gsl-1.11/bspline/gsl_bspline.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/bspline/gsl_bspline.h Tue Dec 9 09:07:09 2008 *************** *** 1,17 **** /* bspline/gsl_bspline.h ! * * Copyright (C) 2006 Patrick Alken ! * * 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- 1,18 ---- /* bspline/gsl_bspline.h ! * * Copyright (C) 2006 Patrick Alken ! * Copyright (C) 2008 Rhys Ulerich ! * * 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *************** *** 23,28 **** --- 24,30 ---- #include #include #include + #include #undef __BEGIN_DECLS #undef __END_DECLS *************** *** 38,64 **** typedef struct { ! size_t k; /* spline order */ ! size_t km1; /* k - 1 (polynomial order) */ ! size_t l; /* number of polynomial pieces on interval */ ! size_t nbreak; /* number of breakpoints (l + 1) */ ! size_t n; /* number of bspline basis functions (l + k - 1) */ ! ! gsl_vector *knots; /* knots vector */ ! gsl_vector *deltal; /* left delta */ ! gsl_vector *deltar; /* right delta */ ! gsl_vector *B; /* temporary spline results */ } gsl_bspline_workspace; gsl_bspline_workspace * gsl_bspline_alloc(const size_t k, const size_t nbreak); void gsl_bspline_free(gsl_bspline_workspace *w); ! size_t gsl_bspline_ncoeffs (gsl_bspline_workspace * w); ! size_t gsl_bspline_order (gsl_bspline_workspace * w); ! size_t gsl_bspline_nbreak (gsl_bspline_workspace * w); ! double gsl_bspline_breakpoint (size_t i, gsl_bspline_workspace * w); int gsl_bspline_knots(const gsl_vector *breakpts, gsl_bspline_workspace *w); --- 40,73 ---- typedef struct { ! size_t k; /* spline order */ ! size_t km1; /* k - 1 (polynomial order) */ ! size_t l; /* number of polynomial pieces on interval */ ! size_t nbreak; /* number of breakpoints (l + 1) */ ! size_t n; /* number of bspline basis functions (l + k - 1) */ ! ! gsl_vector *knots; /* knots vector */ ! gsl_vector *deltal; /* left delta */ ! gsl_vector *deltar; /* right delta */ ! gsl_vector *B; /* temporary spline results */ } gsl_bspline_workspace; + typedef struct + { + size_t k; /* spline order */ + gsl_matrix *A; /* work matrix */ + gsl_matrix *dB; /* temporary derivative results */ + } gsl_bspline_deriv_workspace; + gsl_bspline_workspace * gsl_bspline_alloc(const size_t k, const size_t nbreak); void gsl_bspline_free(gsl_bspline_workspace *w); ! size_t gsl_bspline_ncoeffs(gsl_bspline_workspace * w); ! size_t gsl_bspline_order(gsl_bspline_workspace * w); ! size_t gsl_bspline_nbreak(gsl_bspline_workspace * w); ! double gsl_bspline_breakpoint(size_t i, gsl_bspline_workspace * w); int gsl_bspline_knots(const gsl_vector *breakpts, gsl_bspline_workspace *w); *************** *** 67,75 **** gsl_bspline_workspace *w); int ! gsl_bspline_eval(const double x, gsl_vector *B, gsl_bspline_workspace *w); __END_DECLS #endif /* __GSL_BSPLINE_H__ */ --- 76,113 ---- gsl_bspline_workspace *w); int ! gsl_bspline_eval(const double x, gsl_vector *B, gsl_bspline_workspace *w); + int + gsl_bspline_eval_nonzero(const double x, + gsl_vector *Bk, + size_t *istart, + size_t *iend, + gsl_bspline_workspace *w); + + gsl_bspline_deriv_workspace * + gsl_bspline_deriv_alloc(const size_t k); + + void + gsl_bspline_deriv_free(gsl_bspline_deriv_workspace *w); + + int + gsl_bspline_deriv_eval(const double x, + const size_t nderiv, + gsl_matrix *dB, + gsl_bspline_workspace *w, + gsl_bspline_deriv_workspace *dw); + + int + gsl_bspline_deriv_eval_nonzero(const double x, + const size_t nderiv, + gsl_matrix *dB, + size_t *istart, + size_t *iend, + gsl_bspline_workspace *w, + gsl_bspline_deriv_workspace *dw); + __END_DECLS #endif /* __GSL_BSPLINE_H__ */ diff -a -rc -C 2 -P gsl-1.11/bspline/test.c gsl-1.12/bspline/test.c *** gsl-1.11/bspline/test.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/bspline/test.c Mon Dec 8 19:58:35 2008 *************** *** 1,17 **** /* bspline/test.c ! * * Copyright (C) 2006, 2007 Brian Gough ! * * 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- 1,18 ---- /* bspline/test.c ! * * Copyright (C) 2006, 2007 Brian Gough ! * Copyright (C) 2008 Rhys Ulerich ! * * 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *************** *** 22,74 **** #include #include #include void ! test_bspline (gsl_bspline_workspace * bw) { gsl_vector *B; size_t i, j; size_t n = 100; ! size_t ncoeffs = gsl_bspline_ncoeffs (bw); ! size_t order = gsl_bspline_order (bw); ! size_t nbreak = gsl_bspline_nbreak (bw); ! double a = gsl_bspline_breakpoint (0, bw); ! double b = gsl_bspline_breakpoint (nbreak - 1, bw); ! B = gsl_vector_alloc (ncoeffs); for (i = 0; i < n; i++) { double xi = a + (b - a) * (i / (n - 1.0)); double sum = 0; ! gsl_bspline_eval (xi, B, bw); for (j = 0; j < ncoeffs; j++) { ! double Bj = gsl_vector_get (B, j); int s = (Bj < 0 || Bj > 1); ! gsl_test (s, ! "basis-spline coefficient %u is in range [0,1] for x=%g", ! j, xi); sum += Bj; } ! gsl_test_rel (sum, 1.0, order * GSL_DBL_EPSILON, ! "basis-spline order %u is normalized for x=%g", order, ! xi); } ! gsl_vector_free (B); ! } int ! main (int argc, char **argv) { size_t order, breakpoints, i; ! gsl_ieee_env_setup (); argc = 0; /* prevent warnings about unused parameters */ argv = 0; --- 23,95 ---- #include #include #include + #include void ! test_bspline(gsl_bspline_workspace * bw, gsl_bspline_deriv_workspace * dbw) { gsl_vector *B; + gsl_matrix *dB; size_t i, j; size_t n = 100; ! size_t ncoeffs = gsl_bspline_ncoeffs(bw); ! size_t order = gsl_bspline_order(bw); ! size_t nbreak = gsl_bspline_nbreak(bw); ! double a = gsl_bspline_breakpoint(0, bw); ! double b = gsl_bspline_breakpoint(nbreak - 1, bw); ! B = gsl_vector_alloc(ncoeffs); ! dB = gsl_matrix_alloc(ncoeffs, 1); + /* Ensure B-splines form a partition of unity */ for (i = 0; i < n; i++) { double xi = a + (b - a) * (i / (n - 1.0)); double sum = 0; ! gsl_bspline_eval(xi, B, bw); for (j = 0; j < ncoeffs; j++) { ! double Bj = gsl_vector_get(B, j); int s = (Bj < 0 || Bj > 1); ! gsl_test(s, ! "basis-spline coefficient %u is in range [0,1] for x=%g", ! j, xi); sum += Bj; } ! gsl_test_rel(sum, 1.0, order * GSL_DBL_EPSILON, ! "basis-spline order %u is normalized for x=%g", order, ! xi); } ! /* Ensure B-splines 0th derivatives agree with regular evaluation */ ! for (i = 0; i < n; i++) ! { ! double xi = a + (b - a) * (i / (n - 1.0)); ! gsl_bspline_eval(xi, B, bw); ! gsl_bspline_deriv_eval(xi, 0, dB, bw, dbw); ! ! for (j = 0; j < ncoeffs; j++) ! { ! gsl_test_abs(gsl_matrix_get(dB, j, 0), gsl_vector_get(B, j), ! GSL_DBL_EPSILON, ! "b-spline order %d basis #%d evaluation and 0th derivative consistent for x=%g", ! order, j, xi); ! } + } + gsl_vector_free(B); + gsl_matrix_free(dB); + } int ! main(int argc, char **argv) { size_t order, breakpoints, i; ! gsl_ieee_env_setup(); argc = 0; /* prevent warnings about unused parameters */ argv = 0; *************** *** 78,87 **** for (breakpoints = 2; breakpoints < 100; breakpoints++) { double a = -1.23 * order, b = 45.6 * order; ! gsl_bspline_workspace *bw = gsl_bspline_alloc (order, breakpoints); ! gsl_bspline_knots_uniform (a, b, bw); ! test_bspline (bw); ! gsl_bspline_free (bw); } } --- 99,110 ---- for (breakpoints = 2; breakpoints < 100; breakpoints++) { double a = -1.23 * order, b = 45.6 * order; ! gsl_bspline_workspace *bw = gsl_bspline_alloc(order, breakpoints); ! gsl_bspline_deriv_workspace *dbw = gsl_bspline_deriv_alloc(order); ! gsl_bspline_knots_uniform(a, b, bw); ! test_bspline(bw, dbw); ! gsl_bspline_deriv_free(dbw); ! gsl_bspline_free(bw); } } *************** *** 91,111 **** for (breakpoints = 2; breakpoints < 100; breakpoints++) { double a = -1.23 * order, b = 45.6 * order; ! gsl_bspline_workspace *bw = gsl_bspline_alloc (order, breakpoints); ! gsl_vector *k = gsl_vector_alloc (breakpoints); for (i = 0; i < breakpoints; i++) { double f, x; ! f = sqrt (i / (breakpoints - 1.0)); x = (1 - f) * a + f * b; ! gsl_vector_set (k, i, x); }; ! gsl_bspline_knots (k, bw); ! test_bspline (bw); ! gsl_vector_free (k); ! gsl_bspline_free (bw); } } ! exit (gsl_test_summary ()); } --- 114,271 ---- for (breakpoints = 2; breakpoints < 100; breakpoints++) { double a = -1.23 * order, b = 45.6 * order; ! gsl_bspline_workspace *bw = gsl_bspline_alloc(order, breakpoints); ! gsl_bspline_deriv_workspace *dbw = gsl_bspline_deriv_alloc(order); ! gsl_vector *k = gsl_vector_alloc(breakpoints); for (i = 0; i < breakpoints; i++) { double f, x; ! f = sqrt(i / (breakpoints - 1.0)); x = (1 - f) * a + f * b; ! gsl_vector_set(k, i, x); }; ! gsl_bspline_knots(k, bw); ! test_bspline(bw, dbw); ! gsl_vector_free(k); ! gsl_bspline_deriv_free(dbw); ! gsl_bspline_free(bw); } } ! /* Spot check known 0th, 1st, 2nd derivative ! evaluations for a particular k = 2 case. */ ! { ! size_t i, j; /* looping */ ! ! const double xloc[4] = { 0.0, 1.0, 6.0, 7.0}; ! const double deriv[4][3] = ! { ! { -1.0/2.0, 1.0/2.0, 0.0 }, ! { -1.0/2.0, 1.0/2.0, 0.0 }, ! { 0.0, -1.0/5.0, 1.0/5.0 }, ! { 0.0, -1.0/5.0, 1.0/5.0 } ! }; ! ! gsl_bspline_workspace *bw = gsl_bspline_alloc(2, 3); ! gsl_bspline_deriv_workspace *dbw = gsl_bspline_deriv_alloc(2); ! gsl_matrix *dB = gsl_matrix_alloc(gsl_bspline_ncoeffs(bw), ! gsl_bspline_order(bw) + 1); ! ! gsl_vector *breakpts = gsl_vector_alloc(3); ! gsl_vector_set(breakpts, 0, 0.0); ! gsl_vector_set(breakpts, 1, 2.0); ! gsl_vector_set(breakpts, 2, 7.0); ! gsl_bspline_knots(breakpts, bw); ! ! ! for (i = 0; i < 4; ++i) /* at each location */ ! { ! /* Initialize dB with poison to ensure we overwrite it */ ! gsl_matrix_set_all(dB, GSL_NAN); ! ! gsl_bspline_deriv_eval(xloc[i], gsl_bspline_order(bw), dB, bw, dbw); ! for (j = 0; j < gsl_bspline_ncoeffs(bw) ; ++j) ! { ! /* check basis function 1st deriv */ ! gsl_test_abs(gsl_matrix_get(dB, j, 1), deriv[i][j], GSL_DBL_EPSILON, ! "b-spline k=%d basis #%d derivative %d at x = %f", ! gsl_bspline_order(bw), j, 1, xloc[i]); ! } ! for (j = 0; j < gsl_bspline_ncoeffs(bw); ++j) ! { ! /* check k order basis function has k-th deriv equal to 0 */ ! gsl_test_abs(gsl_matrix_get(dB, j, gsl_bspline_order(bw)), 0.0, ! GSL_DBL_EPSILON, ! "b-spline k=%d basis #%d derivative %d at x = %f", ! gsl_bspline_order(bw), j, gsl_bspline_order(bw), ! xloc[i]); ! } ! } ! ! gsl_matrix_free(dB); ! gsl_bspline_deriv_free(dbw); ! gsl_bspline_free(bw); ! gsl_vector_free(breakpts); ! } ! ! /* Spot check known 0th, 1st, 2nd derivative ! evaluations for a particular k = 3 case. */ ! { ! size_t i, j; /* looping */ ! const double xloc[5] = { 0.0, 5.0, 9.0, 12.0, 15.0 }; ! const double eval[5][6] = ! { ! { 4./25., 69./100., 3./ 20. , 0. , 0. , 0. }, ! { 0. , 4./21. , 143./210. , 9./70., 0. , 0. }, ! { 0. , 0. , 3./ 10. , 7./10., 0. , 0. }, ! { 0. , 0. , 0. , 3./4. , 1./4., 0. }, ! { 0. , 0. , 0. , 1./3. , 5./9., 1./9. } ! }; ! const double deriv[5][6] = ! { ! { -4./25., 3./50., 1./ 10., 0. , 0. , 0. }, ! { 0. , -2./21., 1./105., 3./35., 0. , 0. }, ! { 0. , 0. , -1./5. , 1./ 5., 0. , 0. }, ! { 0. , 0. , 0. , -1./ 6., 1./6. , 0. }, ! { 0. , 0. , 0. , -1./ 9., 1./27., 2./27. } ! }; ! const double deriv2[5][6] = ! { ! { 2./25., -17./150., 1.0/30.0 , 0.0 , 0. , 0. }, ! { 0. , 1./ 42., -11.0/210.0, 1.0/35.0, 0. , 0. }, ! { 0. , 0. , 1.0/15.0 ,-11.0/90.0, 1./18. , 0. }, ! { 0. , 0. , 0.0 , 1.0/54.0, -7./162., 2./81. }, ! { 0. , 0. , 0.0 , 1.0/54.0, -7./162., 2./81. } ! }; ! ! gsl_bspline_workspace *bw = gsl_bspline_alloc(3, 5); ! gsl_bspline_deriv_workspace *dbw = gsl_bspline_deriv_alloc(3); ! ! gsl_matrix *dB = gsl_matrix_alloc(gsl_bspline_ncoeffs(bw), ! gsl_bspline_order(bw) + 1); ! ! gsl_vector *breakpts = gsl_vector_alloc(5); ! gsl_vector_set(breakpts, 0, -3.0); ! gsl_vector_set(breakpts, 1, 2.0); ! gsl_vector_set(breakpts, 2, 9.0); ! gsl_vector_set(breakpts, 3, 12.0); ! gsl_vector_set(breakpts, 4, 21.0); ! gsl_bspline_knots(breakpts, bw); ! ! for (i = 0; i < 5; ++i) /* at each location */ ! { ! /* Initialize dB with poison to ensure we overwrite it */ ! gsl_matrix_set_all(dB, GSL_NAN); ! gsl_bspline_deriv_eval(xloc[i], gsl_bspline_order(bw), dB, bw, dbw); ! ! /* check basis function evaluation */ ! for (j = 0; j < gsl_bspline_ncoeffs(bw); ++j) ! { ! gsl_test_abs(gsl_matrix_get(dB, j, 0), eval[i][j], GSL_DBL_EPSILON, ! "b-spline k=%d basis #%d derivative %d at x = %f", ! gsl_bspline_order(bw), j, 0, xloc[i]); ! } ! /* check 1st derivative evaluation */ ! for (j = 0; j < gsl_bspline_ncoeffs(bw); ++j) ! { ! gsl_test_abs(gsl_matrix_get(dB, j, 1), deriv[i][j], GSL_DBL_EPSILON, ! "b-spline k=%d basis #%d derivative %d at x = %f", ! gsl_bspline_order(bw), j, 1, xloc[i]); ! } ! /* check 2nd derivative evaluation */ ! for (j = 0; j < gsl_bspline_ncoeffs(bw); ++j) ! { ! gsl_test_abs(gsl_matrix_get(dB, j, 2), deriv2[i][j], GSL_DBL_EPSILON, ! "b-spline k=%d basis #%d derivative %d at x = %f", ! gsl_bspline_order(bw), j, 2, xloc[i]); ! } ! } ! ! gsl_matrix_free(dB); ! gsl_bspline_deriv_free(dbw); ! gsl_bspline_free(bw); ! gsl_vector_free(breakpts); ! } ! ! exit(gsl_test_summary()); } diff -a -rc -C 2 -P gsl-1.11/build.h gsl-1.12/build.h *** gsl-1.11/build.h Thu Jan 1 00:00:00 1970 --- gsl-1.12/build.h Thu Nov 27 20:03:28 2008 *************** *** 0 **** --- 1,37 ---- + /* Compile subsequent inline functions as static functions */ + + #ifdef __GSL_BUILD_H__ + #error build.h must not be included multiple times + #endif + + #define __GSL_BUILD_H__ + + #ifdef COMPILE_INLINE_STATIC + #ifndef HIDE_INLINE_STATIC /* skip if inline functions are hidden */ + + #undef __GSL_INLINE_H__ + #define __GSL_INLINE_H__ /* first, ignore the gsl_inline.h header file */ + + #undef INLINE_DECL + #define INLINE_DECL /* disable inline in declarations */ + + #undef INLINE_FUN + #define INLINE_FUN /* disable inline in definitions */ + + #ifndef HAVE_INLINE /* enable compilation of definitions in .h files */ + #define HAVE_INLINE + #endif + + /* Compile range checking code for inline functions used in the library */ + #undef GSL_RANGE_CHECK + #define GSL_RANGE_CHECK 1 + + /* Use the global variable gsl_check_range to enable/disable range checking at + runtime */ + #undef GSL_RANGE_COND + #define GSL_RANGE_COND(x) (gsl_check_range && (x)) + + #endif + #else + #error must be called with COMPILE_INLINE_STATIC + #endif diff -a -rc -C 2 -P gsl-1.11/cblas/Makefile.am gsl-1.12/cblas/Makefile.am *** gsl-1.11/cblas/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/cblas/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 8,14 **** pkginclude_HEADERS = gsl_cblas.h ! INCLUDES= -I$(top_srcdir) libgslcblas_la_SOURCES = sasum.c saxpy.c scasum.c scnrm2.c scopy.c sdot.c sdsdot.c sgbmv.c sgemm.c sgemv.c sger.c snrm2.c srot.c srotg.c srotm.c srotmg.c ssbmv.c sscal.c sspmv.c sspr.c sspr2.c sswap.c ssymm.c ssymv.c ssyr.c ssyr2.c ssyr2k.c ssyrk.c stbmv.c stbsv.c stpmv.c stpsv.c strmm.c strmv.c strsm.c strsv.c dasum.c daxpy.c dcopy.c ddot.c dgbmv.c dgemm.c dgemv.c dger.c dnrm2.c drot.c drotg.c drotm.c drotmg.c dsbmv.c dscal.c dsdot.c dspmv.c dspr.c dspr2.c dswap.c dsymm.c dsymv.c dsyr.c dsyr2.c dsyr2k.c dsyrk.c dtbmv.c dtbsv.c dtpmv.c dtpsv.c dtrmm.c dtrmv.c dtrsm.c dtrsv.c dzasum.c dznrm2.c caxpy.c ccopy.c cdotc_sub.c cdotu_sub.c cgbmv.c cgemm.c cgemv.c cgerc.c cgeru.c chbmv.c chemm.c chemv.c cher.c cher2.c cher2k.c cherk.c chpmv.c chpr.c chpr2.c cscal.c csscal.c cswap.c csymm.c csyr2k.c csyrk.c ctbmv.c ctbsv.c ctpmv.c ctpsv.c ctrmm.c ctrmv.c ctrsm.c ctrsv.c zaxpy.c zcopy.c zdotc_sub.c zdotu_sub.c zdscal.c zgbmv.c zgemm.c zgemv.c zgerc.c zgeru.c zhbmv.c zhemm.c zhemv.c zher.c zher2.c zher2k.c zherk.c zhpmv.c zhpr.c zhpr2.c zscal.c zswap.c zsymm.c zsyr2k.c zsyrk.c ztbmv.c ztbsv.c ztpmv.c ztpsv.c ztrmm.c ztrmv.c ztrsm.c ztrsv.c icamax.c idamax.c isamax.c izamax.c xerbla.c --- 8,14 ---- pkginclude_HEADERS = gsl_cblas.h ! INCLUDES = -I$(top_srcdir) libgslcblas_la_SOURCES = sasum.c saxpy.c scasum.c scnrm2.c scopy.c sdot.c sdsdot.c sgbmv.c sgemm.c sgemv.c sger.c snrm2.c srot.c srotg.c srotm.c srotmg.c ssbmv.c sscal.c sspmv.c sspr.c sspr2.c sswap.c ssymm.c ssymv.c ssyr.c ssyr2.c ssyr2k.c ssyrk.c stbmv.c stbsv.c stpmv.c stpsv.c strmm.c strmv.c strsm.c strsv.c dasum.c daxpy.c dcopy.c ddot.c dgbmv.c dgemm.c dgemv.c dger.c dnrm2.c drot.c drotg.c drotm.c drotmg.c dsbmv.c dscal.c dsdot.c dspmv.c dspr.c dspr2.c dswap.c dsymm.c dsymv.c dsyr.c dsyr2.c dsyr2k.c dsyrk.c dtbmv.c dtbsv.c dtpmv.c dtpsv.c dtrmm.c dtrmv.c dtrsm.c dtrsv.c dzasum.c dznrm2.c caxpy.c ccopy.c cdotc_sub.c cdotu_sub.c cgbmv.c cgemm.c cgemv.c cgerc.c cgeru.c chbmv.c chemm.c chemv.c cher.c cher2.c cher2k.c cherk.c chpmv.c chpr.c chpr2.c cscal.c csscal.c cswap.c csymm.c csyr2k.c csyrk.c ctbmv.c ctbsv.c ctpmv.c ctpsv.c ctrmm.c ctrmv.c ctrsm.c ctrsv.c zaxpy.c zcopy.c zdotc_sub.c zdotu_sub.c zdscal.c zgbmv.c zgemm.c zgemv.c zgerc.c zgeru.c zhbmv.c zhemm.c zhemv.c zher.c zher2.c zher2k.c zherk.c zhpmv.c zhpr.c zhpr2.c zscal.c zswap.c zsymm.c zsyr2k.c zsyrk.c ztbmv.c ztbsv.c ztpmv.c ztpsv.c ztrmm.c ztrmv.c ztrsm.c ztrsv.c icamax.c idamax.c isamax.c izamax.c xerbla.c diff -a -rc -C 2 -P gsl-1.11/cblas/Makefile.in gsl-1.12/cblas/Makefile.in *** gsl-1.11/cblas/Makefile.in Sun Mar 30 12:07:01 2008 --- gsl-1.12/cblas/Makefile.in Mon Dec 15 14:55:08 2008 *************** *** 172,177 **** --- 172,178 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 179,185 **** --- 180,189 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ diff -a -rc -C 2 -P gsl-1.11/cdf/ChangeLog gsl-1.12/cdf/ChangeLog *** gsl-1.11/cdf/ChangeLog Wed Feb 20 17:51:20 2008 --- gsl-1.12/cdf/ChangeLog Wed Dec 3 14:55:46 2008 *************** *** 1,3 **** --- 1,19 ---- + 2008-12-03 Brian Gough + + * gammainv.c (gsl_cdf_gamma_Pinv): keep iterating if P is still + changing (fix for bug 24704) + + * test.c (test_chisqinv): added test cases for bug 24704 + + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + + 2008-04-29 Brian Gough + + * gammainv.c (gsl_cdf_gamma_Pinv, gsl_cdf_gamma_Qinv): restrict + the range of the gaussian approximation + 2008-02-20 Brian Gough * beta_inc.c (beta_inc_AXPY): add some handling for large diff -a -rc -C 2 -P gsl-1.11/cdf/Makefile.am gsl-1.12/cdf/Makefile.am *** gsl-1.11/cdf/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/cdf/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 3,9 **** pkginclude_HEADERS= gsl_cdf.h ! INCLUDES= -I$(top_builddir) libgslcdf_la_SOURCES = beta.c betainv.c cauchy.c cauchyinv.c chisq.c chisqinv.c exponential.c exponentialinv.c exppow.c fdist.c fdistinv.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 binomial.c poisson.c geometric.c nbinomial.c pascal.c hypergeometric.c --- 3,9 ---- pkginclude_HEADERS= gsl_cdf.h ! INCLUDES = -I$(top_srcdir) libgslcdf_la_SOURCES = beta.c betainv.c cauchy.c cauchyinv.c chisq.c chisqinv.c exponential.c exponentialinv.c exppow.c fdist.c fdistinv.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 binomial.c poisson.c geometric.c nbinomial.c pascal.c hypergeometric.c diff -a -rc -C 2 -P gsl-1.11/cdf/Makefile.in gsl-1.12/cdf/Makefile.in *** gsl-1.11/cdf/Makefile.in Sun Mar 30 12:07:01 2008 --- gsl-1.12/cdf/Makefile.in Mon Dec 15 14:55:08 2008 *************** *** 142,147 **** --- 142,148 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 149,155 **** --- 150,159 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 214,220 **** top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslcdf.la pkginclude_HEADERS = gsl_cdf.h ! INCLUDES = -I$(top_builddir) libgslcdf_la_SOURCES = beta.c betainv.c cauchy.c cauchyinv.c chisq.c chisqinv.c exponential.c exponentialinv.c exppow.c fdist.c fdistinv.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 binomial.c poisson.c geometric.c nbinomial.c pascal.c hypergeometric.c noinst_HEADERS = beta_inc.c rat_eval.h test_auto.c error.h TESTS = $(check_PROGRAMS) --- 218,224 ---- top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslcdf.la pkginclude_HEADERS = gsl_cdf.h ! INCLUDES = -I$(top_srcdir) libgslcdf_la_SOURCES = beta.c betainv.c cauchy.c cauchyinv.c chisq.c chisqinv.c exponential.c exponentialinv.c exppow.c fdist.c fdistinv.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 binomial.c poisson.c geometric.c nbinomial.c pascal.c hypergeometric.c noinst_HEADERS = beta_inc.c rat_eval.h test_auto.c error.h TESTS = $(check_PROGRAMS) diff -a -rc -C 2 -P gsl-1.11/cdf/gammainv.c gsl-1.12/cdf/gammainv.c *** gsl-1.11/cdf/gammainv.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/cdf/gammainv.c Wed Dec 3 11:28:48 2008 *************** *** 42,48 **** /* Consider, small, large and intermediate cases separately. The boundaries at 0.05 and 0.95 have not been optimised, but seem ok ! for an initial approximation. */ if (P < 0.05) { --- 42,54 ---- /* Consider, small, large and intermediate cases separately. The boundaries at 0.05 and 0.95 have not been optimised, but seem ok ! for an initial approximation. ! ! BJG: These approximations aren't really valid, the relevant ! criterion is P*gamma(a+1) < 1. Need to rework these routines and ! use a single bisection style solver for all the inverse ! functions. ! */ if (P < 0.05) { *************** *** 57,63 **** else { double xg = gsl_cdf_ugaussian_Pinv (P); ! double x0 = (xg < -sqrt (a)) ? a : sqrt (a) * xg + a; x = x0; } --- 63,69 ---- else { double xg = gsl_cdf_ugaussian_Pinv (P); ! double x0 = (xg < -0.5*sqrt (a)) ? a : sqrt (a) * xg + a; x = x0; } *************** *** 85,91 **** double step1 = -((a - 1) / x - 1) * lambda * lambda / 4.0; double step = step0; ! if (fabs (step1) < fabs (step0)) step += step1; if (x + step > 0) --- 91,97 ---- double step1 = -((a - 1) / x - 1) * lambda * lambda / 4.0; double step = step0; ! if (fabs (step1) < 0.5 * fabs (step0)) step += step1; if (x + step > 0) *************** *** 95,101 **** x /= 2.0; } ! if (fabs (step0) > 1e-10 * x) goto start; } --- 101,107 ---- x /= 2.0; } ! if (fabs (step0) > 1e-10 * x || fabs(step0 * phi) > 1e-10 * P) goto start; } *************** *** 140,146 **** else { double xg = gsl_cdf_ugaussian_Qinv (Q); ! double x0 = (xg < -sqrt (a)) ? a : sqrt (a) * xg + a; x = x0; } --- 146,152 ---- else { double xg = gsl_cdf_ugaussian_Qinv (Q); ! double x0 = (xg < -0.5*sqrt (a)) ? a : sqrt (a) * xg + a; x = x0; } *************** *** 168,174 **** double step1 = -((a - 1) / x - 1) * lambda * lambda / 4.0; double step = step0; ! if (fabs (step1) < fabs (step0)) step += step1; if (x + step > 0) --- 174,180 ---- double step1 = -((a - 1) / x - 1) * lambda * lambda / 4.0; double step = step0; ! if (fabs (step1) < 0.5 * fabs (step0)) step += step1; if (x + step > 0) diff -a -rc -C 2 -P gsl-1.11/cdf/test.c gsl-1.12/cdf/test.c *** gsl-1.11/cdf/test.c Sat Feb 16 17:11:07 2008 --- gsl-1.12/cdf/test.c Wed Dec 3 14:54:52 2008 *************** *** 1242,1247 **** --- 1242,1254 ---- TEST (gsl_cdf_chisq_Pinv, (9.99999999999998341e-1, 13.0), 100.0, 0.01); TEST (gsl_cdf_chisq_Pinv, (1e0, 13.0), GSL_POSINF, 0.0); + TEST (gsl_cdf_chisq_Pinv, (1.93238145206123590e-01, 1.5), 0.211980092931799521729407, TEST_TOL6); + TEST (gsl_cdf_chisq_Pinv, (4.83e-8, 19.19), 1.632280186860266704532868343, TEST_TOL6); + + /* Test cases for bug 24704 */ + TEST (gsl_cdf_chisq_Pinv, (0.05, 1263131.0), 1260517.771133388726131469059, TEST_TOL6); + TEST (gsl_cdf_chisq_Pinv, (0.05, 2526262.0), 2522565.864973351096735720202, TEST_TOL6); + TEST (gsl_cdf_chisq_Qinv, (0.0, 13.0), GSL_POSINF, TEST_TOL6); TEST (gsl_cdf_chisq_Qinv, (1.65902608070858809e-15, 13.0), 100.0, TEST_TOL6); TEST (gsl_cdf_chisq_Qinv, (9.52102560780915127e-2, 13.0), 20.0, TEST_TOL6); diff -a -rc -C 2 -P gsl-1.11/cheb/ChangeLog gsl-1.12/cheb/ChangeLog *** gsl-1.11/cheb/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/cheb/ChangeLog Sat Nov 29 16:42:42 2008 *************** *** 1,3 **** --- 1,14 ---- + 2008-11-18 Brian Gough + + * gsl_chebyshev.h: added auxiliary functions + + * init.c (gsl_cheb_order, gsl_cheb_size, gsl_cheb_coeffs): added + auxiliary functions + + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + 2007-01-29 Brian Gough * eval.c (gsl_cheb_eval_mode_e): compute error consistently with diff -a -rc -C 2 -P gsl-1.11/cheb/Makefile.am gsl-1.12/cheb/Makefile.am *** gsl-1.11/cheb/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/cheb/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 2,8 **** pkginclude_HEADERS = gsl_chebyshev.h ! INCLUDES= -I$(top_builddir) libgslcheb_la_SOURCES = deriv.c eval.c init.c integ.c --- 2,8 ---- pkginclude_HEADERS = gsl_chebyshev.h ! INCLUDES = -I$(top_srcdir) libgslcheb_la_SOURCES = deriv.c eval.c init.c integ.c diff -a -rc -C 2 -P gsl-1.11/cheb/Makefile.in gsl-1.12/cheb/Makefile.in *** gsl-1.11/cheb/Makefile.in Sun Mar 30 12:07:02 2008 --- gsl-1.12/cheb/Makefile.in Mon Dec 15 14:55:08 2008 *************** *** 132,137 **** --- 132,138 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 139,145 **** --- 140,149 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 204,210 **** top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslcheb.la pkginclude_HEADERS = gsl_chebyshev.h ! INCLUDES = -I$(top_builddir) libgslcheb_la_SOURCES = deriv.c eval.c init.c integ.c TESTS = $(check_PROGRAMS) test_LDADD = libgslcheb.la ../ieee-utils/libgslieeeutils.la ../test/libgsltest.la ../sys/libgslsys.la ../err/libgslerr.la ../utils/libutils.la --- 208,214 ---- top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslcheb.la pkginclude_HEADERS = gsl_chebyshev.h ! INCLUDES = -I$(top_srcdir) libgslcheb_la_SOURCES = deriv.c eval.c init.c integ.c TESTS = $(check_PROGRAMS) test_LDADD = libgslcheb.la ../ieee-utils/libgslieeeutils.la ../test/libgsltest.la ../sys/libgslsys.la ../err/libgslerr.la ../utils/libutils.la diff -a -rc -C 2 -P gsl-1.11/cheb/deriv.c gsl-1.12/cheb/deriv.c *** gsl-1.11/cheb/deriv.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/cheb/deriv.c Thu Nov 27 20:03:28 2008 *************** *** 39,47 **** deriv->a = f->a; deriv->b = f->b; ! #ifdef ERR ! deriv->err = n * n * f->c[n-1]; /* error in derivative is n^2 c_n */ ! #endif /* FIXME: should probably set deriv->f[] as well */ --- 39,46 ---- deriv->a = f->a; deriv->b = f->b; ! /* error in derivative is n^2 c_n */ ! /* deriv->err = n * n * f->c[n-1];*/ /* FIXME: should probably set deriv->f[] as well */ diff -a -rc -C 2 -P gsl-1.11/cheb/gsl_chebyshev.h gsl-1.12/cheb/gsl_chebyshev.h *** gsl-1.11/cheb/gsl_chebyshev.h Thu Feb 21 11:40:03 2008 --- gsl-1.12/cheb/gsl_chebyshev.h Sat Nov 29 16:42:42 2008 *************** *** 82,87 **** --- 82,91 ---- int gsl_cheb_init(gsl_cheb_series * cs, const gsl_function * func, const double a, const double b); + /* Return the order, size of coefficient array and coefficient array ptr */ + size_t gsl_cheb_order (const gsl_cheb_series * cs); + size_t gsl_cheb_size (const gsl_cheb_series * cs); + double *gsl_cheb_coeffs (const gsl_cheb_series * cs); /* Evaluate a Chebyshev series at a given point. * No errors can occur for a struct obtained from gsl_cheb_new(). diff -a -rc -C 2 -P gsl-1.11/cheb/init.c gsl-1.12/cheb/init.c *** gsl-1.11/cheb/init.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/cheb/init.c Sat Nov 29 16:42:42 2008 *************** *** 95,101 **** return GSL_SUCCESS; } ! --- 95,115 ---- return GSL_SUCCESS; } + size_t + gsl_cheb_order (const gsl_cheb_series * cs) + { + return cs->order; + } + size_t + gsl_cheb_size (const gsl_cheb_series * cs) + { + return (cs->order + 1); + } ! double * ! gsl_cheb_coeffs (const gsl_cheb_series * cs) ! { ! return cs->c; ! } diff -a -rc -C 2 -P gsl-1.11/cheb/test.c gsl-1.12/cheb/test.c *** gsl-1.11/cheb/test.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/cheb/test.c Sat Nov 29 16:42:42 2008 *************** *** 75,80 **** --- 75,90 ---- gsl_cheb_init(cs, &F_T0, -1.0, 1.0); + { + size_t expected = 40; + size_t order = gsl_cheb_order (cs); + size_t size = gsl_cheb_size (cs); + double * p = gsl_cheb_coeffs (cs); + gsl_test(order != expected, "gsl_cheb_order"); + gsl_test(size != expected + 1, "gsl_cheb_size"); + gsl_test(p != cs->c, "gsl_cheb_coeffs"); + } + for (i = 0; iorder; i++) { double c_exp = (i == 0) ? 2.0 : 0.0; diff -a -rc -C 2 -P gsl-1.11/combination/ChangeLog gsl-1.12/combination/ChangeLog *** gsl-1.11/combination/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/combination/ChangeLog Thu Nov 27 20:03:28 2008 *************** *** 1,3 **** --- 1,14 ---- + 2008-07-03 Brian Gough + + * gsl_combination.h: added gsl_inline.h, use INLINE_DECL and + GSL_RANGE_COND for gsl_combination_get + + * combination.c: moved gsl_combination_get to inline.c + + * inline.c: separate file for inline function object code + + * Makefile.am (INCLUDES): use top_srcdir only, remove top_builddir + 2003-07-30 Brian Gough * init.c (gsl_combination_alloc): set c->data to NULL when k=0 diff -a -rc -C 2 -P gsl-1.11/combination/Makefile.am gsl-1.12/combination/Makefile.am *** gsl-1.11/combination/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/combination/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 2,10 **** pkginclude_HEADERS = gsl_combination.h ! INCLUDES= -I$(top_builddir) -I$(top_srcdir) ! libgslcombination_la_SOURCES = init.c file.c combination.c noinst_HEADERS = --- 2,10 ---- pkginclude_HEADERS = gsl_combination.h ! INCLUDES = -I$(top_srcdir) ! libgslcombination_la_SOURCES = init.c file.c combination.c inline.c noinst_HEADERS = diff -a -rc -C 2 -P gsl-1.11/combination/Makefile.in gsl-1.12/combination/Makefile.in *** gsl-1.11/combination/Makefile.in Sun Mar 30 12:07:02 2008 --- gsl-1.12/combination/Makefile.in Mon Dec 15 14:55:08 2008 *************** *** 46,52 **** CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libgslcombination_la_LIBADD = ! am_libgslcombination_la_OBJECTS = init.lo file.lo combination.lo libgslcombination_la_OBJECTS = $(am_libgslcombination_la_OBJECTS) am_test_OBJECTS = test.$(OBJEXT) test_OBJECTS = $(am_test_OBJECTS) --- 46,53 ---- CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libgslcombination_la_LIBADD = ! am_libgslcombination_la_OBJECTS = init.lo file.lo combination.lo \ ! inline.lo libgslcombination_la_OBJECTS = $(am_libgslcombination_la_OBJECTS) am_test_OBJECTS = test.$(OBJEXT) test_OBJECTS = $(am_test_OBJECTS) *************** *** 133,138 **** --- 134,140 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 140,146 **** --- 142,151 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 205,212 **** top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslcombination.la pkginclude_HEADERS = gsl_combination.h ! INCLUDES = -I$(top_builddir) -I$(top_srcdir) ! libgslcombination_la_SOURCES = init.c file.c combination.c noinst_HEADERS = TESTS = $(check_PROGRAMS) test_SOURCES = test.c --- 210,217 ---- top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslcombination.la pkginclude_HEADERS = gsl_combination.h ! INCLUDES = -I$(top_srcdir) ! libgslcombination_la_SOURCES = init.c file.c combination.c inline.c noinst_HEADERS = TESTS = $(check_PROGRAMS) test_SOURCES = test.c diff -a -rc -C 2 -P gsl-1.11/combination/combination.c gsl-1.12/combination/combination.c *** gsl-1.11/combination/combination.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/combination/combination.c Thu Nov 27 20:03:28 2008 *************** *** 40,62 **** return c->data ; } - #ifndef HIDE_INLINE_STATIC - size_t - gsl_combination_get (const gsl_combination * c, const size_t i) - { - if (gsl_check_range) - { - if (i >= c->k) /* size_t is unsigned, can't be negative */ - { - GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); - } - } - - return c->data[i]; - } - #endif - - int gsl_combination_valid (gsl_combination * c) { --- 40,45 ---- diff -a -rc -C 2 -P gsl-1.11/combination/gsl_combination.h gsl-1.12/combination/gsl_combination.h *** gsl-1.11/combination/gsl_combination.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/combination/gsl_combination.h Thu Nov 27 20:03:28 2008 *************** *** 24,29 **** --- 24,30 ---- #include #include #include + #include #include #undef __BEGIN_DECLS *************** *** 63,82 **** size_t gsl_combination_k (const gsl_combination * c); size_t * gsl_combination_data (const gsl_combination * c); - size_t gsl_combination_get (const gsl_combination * c, const size_t i); - int gsl_combination_valid (gsl_combination * c); int gsl_combination_next (gsl_combination * c); int gsl_combination_prev (gsl_combination * c); #ifdef HAVE_INLINE ! extern inline size_t gsl_combination_get (const gsl_combination * c, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= c->k) { GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); } --- 64,83 ---- size_t gsl_combination_k (const gsl_combination * c); size_t * gsl_combination_data (const gsl_combination * c); int gsl_combination_valid (gsl_combination * c); int gsl_combination_next (gsl_combination * c); int gsl_combination_prev (gsl_combination * c); + INLINE_DECL size_t gsl_combination_get (const gsl_combination * c, const size_t i); + #ifdef HAVE_INLINE ! INLINE_FUN size_t gsl_combination_get (const gsl_combination * c, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= c->k)) /* size_t is unsigned, can't be negative */ { GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); } diff -a -rc -C 2 -P gsl-1.11/combination/inline.c gsl-1.12/combination/inline.c *** gsl-1.11/combination/inline.c Thu Jan 1 00:00:00 1970 --- gsl-1.12/combination/inline.c Thu Nov 27 20:03:28 2008 *************** *** 0 **** --- 1,24 ---- + /* combination/inline.c + * + * Copyright (C) 2008 Brian Gough + * + * 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + + /* Compile all the inline functions */ + + #define COMPILE_INLINE_STATIC + #include "build.h" + #include diff -a -rc -C 2 -P gsl-1.11/complex/ChangeLog gsl-1.12/complex/ChangeLog *** gsl-1.11/complex/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/complex/ChangeLog Thu Nov 27 20:03:28 2008 *************** *** 1,3 **** --- 1,13 ---- + 2008-07-03 Brian Gough + + * math.c: handle inline functions separately + + * gsl_complex_math.h: add declarations for inline functions + + * inline.c: separate file for inline functions + + * Makefile.am (INCLUDES): use top_srcdir + 2007-09-14 Brian Gough * test.c: add a margin of safety on tests for released versions, diff -a -rc -C 2 -P gsl-1.11/complex/Makefile.am gsl-1.12/complex/Makefile.am *** gsl-1.11/complex/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/complex/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 2,11 **** pkginclude_HEADERS = gsl_complex.h gsl_complex_math.h - #INCLUDES = -I$(top_builddir) -I$(top_srcdir) INCLUDES = -I$(top_srcdir) ! libgslcomplex_la_SOURCES = math.c TESTS = $(check_PROGRAMS) check_PROGRAMS = test --- 2,10 ---- pkginclude_HEADERS = gsl_complex.h gsl_complex_math.h INCLUDES = -I$(top_srcdir) ! libgslcomplex_la_SOURCES = math.c inline.c TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -a -rc -C 2 -P gsl-1.11/complex/Makefile.in gsl-1.12/complex/Makefile.in *** gsl-1.11/complex/Makefile.in Sun Mar 30 12:07:02 2008 --- gsl-1.12/complex/Makefile.in Mon Dec 15 14:55:09 2008 *************** *** 46,52 **** CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libgslcomplex_la_LIBADD = ! am_libgslcomplex_la_OBJECTS = math.lo libgslcomplex_la_OBJECTS = $(am_libgslcomplex_la_OBJECTS) am_test_OBJECTS = test.$(OBJEXT) test_OBJECTS = $(am_test_OBJECTS) --- 46,52 ---- CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libgslcomplex_la_LIBADD = ! am_libgslcomplex_la_OBJECTS = math.lo inline.lo libgslcomplex_la_OBJECTS = $(am_libgslcomplex_la_OBJECTS) am_test_OBJECTS = test.$(OBJEXT) test_OBJECTS = $(am_test_OBJECTS) *************** *** 132,137 **** --- 132,138 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 139,145 **** --- 140,149 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 204,213 **** top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslcomplex.la pkginclude_HEADERS = gsl_complex.h gsl_complex_math.h - - #INCLUDES = -I$(top_builddir) -I$(top_srcdir) INCLUDES = -I$(top_srcdir) ! libgslcomplex_la_SOURCES = math.c TESTS = $(check_PROGRAMS) test_SOURCES = test.c results.h results1.h results2.h results_real.h test_LDADD = libgslcomplex.la ../err/libgslerr.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la --- 208,215 ---- top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslcomplex.la pkginclude_HEADERS = gsl_complex.h gsl_complex_math.h INCLUDES = -I$(top_srcdir) ! libgslcomplex_la_SOURCES = math.c inline.c TESTS = $(check_PROGRAMS) test_SOURCES = test.c results.h results1.h results2.h results_real.h test_LDADD = libgslcomplex.la ../err/libgslerr.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la diff -a -rc -C 2 -P gsl-1.11/complex/gsl_complex_math.h gsl-1.12/complex/gsl_complex_math.h *** gsl-1.11/complex/gsl_complex_math.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/complex/gsl_complex_math.h Thu Nov 27 20:03:28 2008 *************** *** 19,24 **** --- 19,25 ---- #ifndef __GSL_COMPLEX_MATH_H__ #define __GSL_COMPLEX_MATH_H__ + #include #include #undef __BEGIN_DECLS *************** *** 35,45 **** /* Complex numbers */ - gsl_complex gsl_complex_rect (double x, double y); /* r= real+i*imag */ gsl_complex gsl_complex_polar (double r, double theta); /* r= r e^(i theta) */ #ifdef HAVE_INLINE ! extern inline gsl_complex gsl_complex_rect (double x, double y) { /* return z = x + i y */ gsl_complex z; --- 36,47 ---- /* Complex numbers */ gsl_complex gsl_complex_polar (double r, double theta); /* r= r e^(i theta) */ + INLINE_DECL gsl_complex gsl_complex_rect (double x, double y); /* r= real+i*imag */ + #ifdef HAVE_INLINE ! INLINE_FUN gsl_complex gsl_complex_rect (double x, double y) { /* return z = x + i y */ gsl_complex z; diff -a -rc -C 2 -P gsl-1.11/complex/inline.c gsl-1.12/complex/inline.c *** gsl-1.11/complex/inline.c Thu Jan 1 00:00:00 1970 --- gsl-1.12/complex/inline.c Thu Nov 27 20:03:28 2008 *************** *** 0 **** --- 1,24 ---- + /* complex/inline.c + * + * Copyright (C) 2008 Brian Gough + * + * 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + + /* Compile all the inline functions */ + + #define COMPILE_INLINE_STATIC + #include "build.h" + #include diff -a -rc -C 2 -P gsl-1.11/complex/math.c gsl-1.12/complex/math.c *** gsl-1.11/complex/math.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/complex/math.c Thu Nov 27 20:03:28 2008 *************** *** 51,66 **** * Complex numbers **********************************************************************/ - #ifndef HIDE_INLINE_STATIC - gsl_complex - gsl_complex_rect (double x, double y) - { /* return z = x + i y */ - gsl_complex z; - GSL_SET_COMPLEX (&z, x, y); - return z; - } - #endif - gsl_complex gsl_complex_polar (double r, double theta) { /* return z = r exp(i theta) */ --- 51,56 ---- diff -a -rc -C 2 -P gsl-1.11/config.guess gsl-1.12/config.guess *** gsl-1.11/config.guess Tue Mar 21 15:21:43 2006 --- gsl-1.12/config.guess Wed Jan 30 20:26:55 2008 *************** *** 1,9 **** #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ! # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ! timestamp='2005-12-13' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by --- 1,10 ---- #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ! # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, ! # Inc. ! timestamp='2007-05-17' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by *************** *** 106,112 **** trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; ! { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; --- 107,113 ---- trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; ! { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; *************** *** 160,165 **** --- 161,167 ---- arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched *************** *** 206,213 **** *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) ! echo powerppc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} --- 208,218 ---- *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; macppc:MirBSD:*:*) ! echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} *************** *** 325,331 **** sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; ! i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) --- 330,336 ---- sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; ! i86pc:SunOS:5.*:* | ix86xen:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) *************** *** 764,775 **** echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) ! echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; ! i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) --- 769,787 ---- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) ! case ${UNAME_MACHINE} in ! pc98) ! echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ! amd64) ! echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ! *) ! echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ! esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; ! *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) *************** *** 779,787 **** i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; ! x86:Interix*:[345]*) ! echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' ! exit ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; --- 791,805 ---- i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; ! *:Interix*:[3456]*) ! case ${UNAME_MACHINE} in ! x86) ! echo i586-pc-interix${UNAME_RELEASE} ! exit ;; ! EM64T | authenticamd) ! echo x86_64-unknown-interix${UNAME_RELEASE} ! exit ;; ! esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; *************** *** 817,822 **** --- 835,843 ---- arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; *************** *** 851,857 **** #endif #endif EOF ! eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) --- 872,882 ---- #endif #endif EOF ! eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' ! /^CPU/{ ! s: ::g ! p ! }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) *************** *** 870,876 **** #endif #endif EOF ! eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) --- 895,905 ---- #endif #endif EOF ! eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' ! /^CPU/{ ! s: ::g ! p ! }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) *************** *** 925,930 **** --- 954,962 ---- x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; + xtensa:Linux:*:*) + echo xtensa-unknown-linux-gnu + exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent *************** *** 967,973 **** LIBC=gnulibc1 # endif #else ! #if defined(__INTEL_COMPILER) || defined(__PGI) LIBC=gnu #else LIBC=gnuaout --- 999,1005 ---- LIBC=gnulibc1 # endif #else ! #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout *************** *** 977,983 **** LIBC=dietlibc #endif EOF ! eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit --- 1009,1019 ---- LIBC=dietlibc #endif EOF ! eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' ! /^LIBC/{ ! s: ::g ! p ! }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit *************** *** 1179,1184 **** --- 1215,1229 ---- SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; diff -a -rc -C 2 -P gsl-1.11/config.sub gsl-1.12/config.sub *** gsl-1.11/config.sub Tue Mar 21 15:21:43 2006 --- gsl-1.12/config.sub Wed Jan 30 20:26:55 2008 *************** *** 1,9 **** #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ! # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ! timestamp='2005-12-11' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software --- 1,10 ---- #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ! # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, ! # Inc. ! timestamp='2007-04-29' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software *************** *** 240,254 **** | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ ! | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ ! | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ ! | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ --- 241,256 ---- | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ ! | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ ! | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ ! | m32c | m32r | m32rle | m68000 | m68k | m88k \ ! | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ *************** *** 268,293 **** | mn10200 | mn10300 \ | mt \ | msp430 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ ! | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ ! | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ ! | sparcv8 | sparcv9 | sparcv9b \ ! | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ ! | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; - m32c) - basic_machine=$basic_machine-unknown - ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown --- 270,294 ---- | mn10200 | mn10300 \ | mt \ | msp430 \ + | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ ! | score \ ! | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ ! | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ ! | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ ! | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ ! | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown *************** *** 317,334 **** | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ ! | avr-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ ! | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ ! | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ --- 318,335 ---- | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ ! | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ ! | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ ! | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ *************** *** 350,378 **** | mmix-* \ | mt-* \ | msp430-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ ! | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ ! | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ | sparclite-* \ ! | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ ! | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; - m32c-*) - ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) --- 351,378 ---- | mmix-* \ | mt-* \ | msp430-* \ + | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ ! | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ ! | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ ! | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ ! | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) *************** *** 683,688 **** --- 683,692 ---- basic_machine=i386-pc os=-mingw32 ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; miniframe) basic_machine=m68000-convergent ;; *************** *** 818,823 **** --- 822,833 ---- pc532 | pc532-*) basic_machine=ns32k-pc532 ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; *************** *** 904,909 **** --- 914,923 ---- sb1el) basic_machine=mipsisa64sb1el-unknown ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; sei) basic_machine=mips-sei os=-seiux *************** *** 915,920 **** --- 929,937 ---- basic_machine=sh-hitachi os=-hms ;; + sh5el) + basic_machine=sh5le-unknown + ;; sh64) basic_machine=sh64-unknown ;; *************** *** 1120,1126 **** sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; ! sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) --- 1137,1143 ---- sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; ! sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) *************** *** 1193,1199 **** | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ ! | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ --- 1210,1217 ---- | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ ! | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ ! | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ *************** *** 1208,1214 **** | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ ! | -skyos* | -haiku* | -rdos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) --- 1226,1232 ---- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ ! | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) *************** *** 1360,1365 **** --- 1378,1389 ---- # system, and we'll never get to this point. case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; *-acorn) os=-riscix1.2 ;; *************** *** 1369,1377 **** arm*-semi) os=-aout ;; ! c4x-* | tic4x-*) ! os=-coff ! ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 --- 1393,1401 ---- arm*-semi) os=-aout ;; ! c4x-* | tic4x-*) ! os=-coff ! ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 *************** *** 1397,1402 **** --- 1421,1429 ---- m68*-cisco) os=-aout ;; + mep-*) + os=-elf + ;; mips*-cisco) os=-elf ;; diff -a -rc -C 2 -P gsl-1.11/configure gsl-1.12/configure *** gsl-1.11/configure Sat Mar 29 16:23:19 2008 --- gsl-1.12/configure Mon Dec 15 14:53:34 2008 *************** *** 1,6 **** #! /bin/sh # Guess values for system-dependent variables and create Makefiles. ! # Generated by GNU Autoconf 2.61 for gsl 1.11. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. --- 1,6 ---- #! /bin/sh # Guess values for system-dependent variables and create Makefiles. ! # Generated by GNU Autoconf 2.61 for gsl 1.12. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. *************** *** 721,728 **** # Identity of this package. PACKAGE_NAME='gsl' PACKAGE_TARNAME='gsl' ! PACKAGE_VERSION='1.11' ! PACKAGE_STRING='gsl 1.11' PACKAGE_BUGREPORT='' ac_unique_file="gsl_math.h" --- 721,728 ---- # Identity of this package. PACKAGE_NAME='gsl' PACKAGE_TARNAME='gsl' ! PACKAGE_VERSION='1.12' ! PACKAGE_STRING='gsl 1.12' PACKAGE_BUGREPORT='' ac_unique_file="gsl_math.h" *************** *** 852,862 **** --- 852,866 ---- DUMPBIN ac_ct_DUMPBIN NM + OBJDUMP AR RANLIB lt_ECHO DSYMUTIL NMEDIT + LIPO + OTOOL + OTOOL64 GSL_CFLAGS GSL_LIBS MINGW32_HOST_TRUE *************** *** 1392,1398 **** # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF ! \`configure' configures gsl 1.11 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... --- 1396,1402 ---- # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF ! \`configure' configures gsl 1.12 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... *************** *** 1462,1468 **** if test -n "$ac_init_help"; then case $ac_init_help in ! short | recursive ) echo "Configuration of gsl 1.11:";; esac cat <<\_ACEOF --- 1466,1472 ---- if test -n "$ac_init_help"; then case $ac_init_help in ! short | recursive ) echo "Configuration of gsl 1.12:";; esac cat <<\_ACEOF *************** *** 1557,1563 **** test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF ! gsl configure 1.11 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, --- 1561,1567 ---- test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF ! gsl configure 1.12 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, *************** *** 1571,1577 **** This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. ! It was created by gsl $as_me 1.11, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ --- 1575,1581 ---- This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. ! It was created by gsl $as_me 1.12, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ *************** *** 2263,2269 **** # Define the identity of the package. PACKAGE='gsl' ! VERSION='1.11' cat >>confdefs.h <<_ACEOF --- 2267,2273 ---- # Define the identity of the package. PACKAGE='gsl' ! VERSION='1.12' cat >>confdefs.h <<_ACEOF *************** *** 2435,2443 **** ! GSL_CURRENT=12 GSL_REVISION=0 ! GSL_AGE=12 CBLAS_CURRENT=0 CBLAS_REVISION=0 CBLAS_AGE=0 --- 2439,2447 ---- ! GSL_CURRENT=13 GSL_REVISION=0 ! GSL_AGE=13 CBLAS_CURRENT=0 CBLAS_REVISION=0 CBLAS_AGE=0 *************** *** 3829,3836 **** ! macro_version='2.2' ! macro_revision='1.2599' --- 3833,3840 ---- ! macro_version='2.2.6' ! macro_revision='1.3012' *************** *** 4321,4327 **** - { echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 echo $ECHO_N "checking for BSD- or MS-compatible name lister (nm)... $ECHO_C" >&6; } if test "${lt_cv_path_NM+set}" = set; then --- 4325,4330 ---- *************** *** 4500,4512 **** else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext ! (eval echo "\"\$as_me:4503: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 ! (eval echo "\"\$as_me:4506: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 ! (eval echo "\"\$as_me:4509: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" --- 4503,4515 ---- else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext ! (eval echo "\"\$as_me:4506: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 ! (eval echo "\"\$as_me:4509: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 ! (eval echo "\"\$as_me:4512: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" *************** *** 4541,4547 **** lt_cv_sys_max_cmd_len=-1; ;; ! cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, --- 4544,4550 ---- lt_cv_sys_max_cmd_len=-1; ;; ! cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, *************** *** 4650,4656 **** - : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} --- 4653,4658 ---- *************** *** 4661,4667 **** xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ ! = c,a/b,, ) >/dev/null 2>&1 \ && xsi_shell=yes { echo "$as_me:$LINENO: result: $xsi_shell" >&5 echo "${ECHO_T}$xsi_shell" >&6; } --- 4663,4671 ---- xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ ! = c,a/b,, \ ! && eval 'test $(( 1 + 1 )) -eq 2 \ ! && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { echo "$as_me:$LINENO: result: $xsi_shell" >&5 echo "${ECHO_T}$xsi_shell" >&6; } *************** *** 4741,4746 **** --- 4745,4855 ---- + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. + set dummy ${ac_tool_prefix}objdump; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_OBJDUMP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + fi + fi + OBJDUMP=$ac_cv_prog_OBJDUMP + if test -n "$OBJDUMP"; then + { echo "$as_me:$LINENO: result: $OBJDUMP" >&5 + echo "${ECHO_T}$OBJDUMP" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + + fi + if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. + set dummy objdump; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + fi + fi + ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP + if test -n "$ac_ct_OBJDUMP"; then + { echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 + echo "${ECHO_T}$ac_ct_OBJDUMP" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in + yes:) + { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&5 + echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&2;} + ac_tool_warned=yes ;; + esac + OBJDUMP=$ac_ct_OBJDUMP + fi + else + OBJDUMP="$ac_cv_prog_OBJDUMP" + fi + + test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + + + { echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } *************** *** 4795,4800 **** --- 4904,4915 ---- fi ;; + cegcc) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; *************** *** 5345,5351 **** aix*) symcode='[BCDT]' ;; ! cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; hpux*) --- 5460,5466 ---- aix*) symcode='[BCDT]' ;; ! cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) *************** *** 5605,5611 **** ;; *-*-irix6*) # Find out which ABI we are using. ! echo '#line 5608 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? --- 5720,5726 ---- ;; *-*-irix6*) # Find out which ABI we are using. ! echo '#line 5723 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? *************** *** 5987,5992 **** --- 6102,6410 ---- NMEDIT="$ac_cv_prog_NMEDIT" fi + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. + set dummy ${ac_tool_prefix}lipo; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_LIPO+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_LIPO="${ac_tool_prefix}lipo" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + fi + fi + LIPO=$ac_cv_prog_LIPO + if test -n "$LIPO"; then + { echo "$as_me:$LINENO: result: $LIPO" >&5 + echo "${ECHO_T}$LIPO" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + + fi + if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. + set dummy lipo; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_LIPO="lipo" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + fi + fi + ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO + if test -n "$ac_ct_LIPO"; then + { echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5 + echo "${ECHO_T}$ac_ct_LIPO" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + case $cross_compiling:$ac_tool_warned in + yes:) + { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&5 + echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&2;} + ac_tool_warned=yes ;; + esac + LIPO=$ac_ct_LIPO + fi + else + LIPO="$ac_cv_prog_LIPO" + fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. + set dummy ${ac_tool_prefix}otool; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_OTOOL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OTOOL="${ac_tool_prefix}otool" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + fi + fi + OTOOL=$ac_cv_prog_OTOOL + if test -n "$OTOOL"; then + { echo "$as_me:$LINENO: result: $OTOOL" >&5 + echo "${ECHO_T}$OTOOL" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + + fi + if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. + set dummy otool; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OTOOL="otool" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + fi + fi + ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL + if test -n "$ac_ct_OTOOL"; then + { echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5 + echo "${ECHO_T}$ac_ct_OTOOL" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + else + case $cross_compiling:$ac_tool_warned in + yes:) + { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&5 + echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&2;} + ac_tool_warned=yes ;; + esac + OTOOL=$ac_ct_OTOOL + fi + else + OTOOL="$ac_cv_prog_OTOOL" + fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. + set dummy ${ac_tool_prefix}otool64; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_OTOOL64+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + fi + fi + OTOOL64=$ac_cv_prog_OTOOL64 + if test -n "$OTOOL64"; then + { echo "$as_me:$LINENO: result: $OTOOL64" >&5 + echo "${ECHO_T}$OTOOL64" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + + fi + if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. + set dummy otool64; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OTOOL64="otool64" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + fi + fi + ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 + if test -n "$ac_ct_OTOOL64"; then + { echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5 + echo "${ECHO_T}$ac_ct_OTOOL64" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + else + case $cross_compiling:$ac_tool_warned in + yes:) + { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&5 + echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&2;} + ac_tool_warned=yes ;; + esac + OTOOL64=$ac_ct_OTOOL64 + fi + else + OTOOL64="$ac_cv_prog_OTOOL64" + fi + + + + + + + + + + + + + + + + *************** *** 6009,6022 **** # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. echo "int foo(void){return 1;}" > conftest.c $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ ! -dynamiclib ${wl}-single_module conftest.c ! if test -f libconftest.dylib; then lt_cv_apple_cc_single_mod=yes ! rm -rf libconftest.dylib* fi ! rm conftest.c fi fi { echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 --- 6427,6446 ---- # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. + rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ ! -dynamiclib -Wl,-single_module conftest.c 2>conftest.err ! _lt_result=$? ! if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes ! else ! cat conftest.err >&5 fi ! rm -rf libconftest.dylib* ! rm -f conftest.* fi fi { echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 *************** *** 6913,6923 **** -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` ! (eval echo "\"\$as_me:6916: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 ! echo "$as_me:6920: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. --- 7337,7347 ---- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` ! (eval echo "\"\$as_me:7340: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 ! echo "$as_me:7344: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. *************** *** 6967,6985 **** ;; amigaos*) ! if test "$host_cpu" = m68k; then ! # FIXME: we need at least 68020 code to build shared libraries, but ! # adding the `-m68020' flag to GCC prevents building anything better, ! # like `-m68040'. ! lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ! fi ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; ! mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style --- 7391,7415 ---- ;; amigaos*) ! case $host_cpu in ! powerpc) ! # see comment about AmigaOS4 .so support ! lt_prog_compiler_pic='-fPIC' ! ;; ! m68k) ! # FIXME: we need at least 68020 code to build shared libraries, but ! # adding the `-m68020' flag to GCC prevents building anything better, ! # like `-m68040'. ! lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ! ;; ! esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; ! mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style *************** *** 6994,7003 **** ;; hpux*) ! # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but ! # not for PA HP-UX. case $host_cpu in ! hppa*64*|ia64*) # +Z the default ;; *) --- 7424,7434 ---- ;; hpux*) ! # PIC is the default for 64-bit PA HP-UX, but not for 32-bit ! # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag ! # sets the default TLS model and affects inlining. case $host_cpu in ! hppa*64*) # +Z the default ;; *) *************** *** 7047,7053 **** fi ;; ! mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' --- 7478,7484 ---- fi ;; ! mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' *************** *** 7077,7087 **** linux* | k*bsd*-gnu) case $cc_basename in ! icc* | ecc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) --- 7508,7532 ---- linux* | k*bsd*-gnu) case $cc_basename in ! # old Intel for x86_64 which still supported -KPIC. ! ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) *************** *** 7231,7241 **** -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` ! (eval echo "\"\$as_me:7234: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 ! echo "$as_me:7238: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. --- 7676,7686 ---- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` ! (eval echo "\"\$as_me:7679: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 ! echo "$as_me:7683: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. *************** *** 7336,7346 **** -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` ! (eval echo "\"\$as_me:7339: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 ! echo "$as_me:7343: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized --- 7781,7791 ---- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` ! (eval echo "\"\$as_me:7784: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 ! echo "$as_me:7788: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized *************** *** 7391,7401 **** -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` ! (eval echo "\"\$as_me:7394: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 ! echo "$as_me:7398: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized --- 7836,7846 ---- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` ! (eval echo "\"\$as_me:7839: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 ! echo "$as_me:7843: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized *************** *** 7495,7501 **** extract_expsyms_cmds= case $host_os in ! cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. --- 7940,7946 ---- extract_expsyms_cmds= case $host_os in ! cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. *************** *** 7557,7575 **** ;; amigaos*) ! if test "$host_cpu" = m68k; then ! archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' ! hardcode_libdir_flag_spec='-L$libdir' ! hardcode_minus_L=yes ! fi ! ! # Samuel A. Falvo II reports ! # that the semantics of dynamic libraries on AmigaOS, at least up ! # to version 4, is to share data among multiple programs linked ! # with the same dynamic library. Since this doesn't match the ! # behavior of shared libraries on other platforms, we can't use ! # them. ! ld_shlibs=no ;; beos*) --- 8002,8019 ---- ;; amigaos*) ! case $host_cpu in ! powerpc) ! # see comment about AmigaOS4 .so support ! archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ! archive_expsym_cmds='' ! ;; ! m68k) ! archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' ! hardcode_libdir_flag_spec='-L$libdir' ! hardcode_minus_L=yes ! ;; ! esac ;; beos*) *************** *** 7583,7589 **** fi ;; ! cygwin* | mingw* | pw32*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' --- 8027,8033 ---- fi ;; ! cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' *************** *** 7649,7654 **** --- 8093,8101 ---- tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; *************** *** 7880,7885 **** --- 8327,8333 ---- fi fi + export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes *************** *** 8028,8047 **** ;; amigaos*) ! if test "$host_cpu" = m68k; then ! archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' ! hardcode_libdir_flag_spec='-L$libdir' ! hardcode_minus_L=yes ! fi ! # see comment about different semantics on the GNU ld section ! ld_shlibs=no ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; ! cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is --- 8476,8500 ---- ;; amigaos*) ! case $host_cpu in ! powerpc) ! # see comment about AmigaOS4 .so support ! archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ! archive_expsym_cmds='' ! ;; ! m68k) ! archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' ! hardcode_libdir_flag_spec='-L$libdir' ! hardcode_minus_L=yes ! ;; ! esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; ! cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is *************** *** 8072,8078 **** whole_archive_flag_spec='' link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" ! if test "$GCC" = "yes"; then output_verbose_link_cmd=echo archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" --- 8525,8535 ---- whole_archive_flag_spec='' link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" ! case $cc_basename in ! ifort*) _lt_dar_can_shared=yes ;; ! *) _lt_dar_can_shared=$GCC ;; ! esac ! if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" *************** *** 8164,8170 **** archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) ! archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' --- 8621,8627 ---- archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) ! archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' *************** *** 8868,8880 **** ;; amigaos*) ! if test "$host_cpu" = m68k; then library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ! else ! dynamic_linker=no ! fi ;; beos*) --- 9325,9342 ---- ;; amigaos*) ! case $host_cpu in ! powerpc) ! # Since July 2007 AmigaOS4 officially supports .so libraries. ! # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! ;; ! m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ! ;; ! esac ;; beos*) *************** *** 8897,8910 **** # libtool to hard-code these into programs ;; ! cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in ! yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ --- 9359,9372 ---- # libtool to hard-code these into programs ;; ! cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in ! yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ *************** *** 8927,8933 **** soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; ! mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` --- 9389,9395 ---- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; ! mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` *************** *** 9396,9402 **** version_type=linux need_lib_prefix=no need_version=no ! library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes --- 9858,9864 ---- version_type=linux need_lib_prefix=no need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes *************** *** 9573,9579 **** lt_cv_dlopen_self=yes ;; ! mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; --- 10035,10041 ---- lt_cv_dlopen_self=yes ;; ! mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; *************** *** 10130,10136 **** lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF ! #line 10133 "configure" #include "confdefs.h" #if HAVE_DLFCN_H --- 10592,10598 ---- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF ! #line 10595 "configure" #include "confdefs.h" #if HAVE_DLFCN_H *************** *** 10171,10180 **** # endif #endif - #ifdef __cplusplus - extern "C" void exit (int); - #endif - void fnord() { int i=42;} int main () { --- 10633,10638 ---- *************** *** 10190,10196 **** else puts (dlerror ()); ! exit (status); } _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 --- 10648,10654 ---- else puts (dlerror ()); ! return status; } _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 *************** *** 10230,10236 **** lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF ! #line 10233 "configure" #include "confdefs.h" #if HAVE_DLFCN_H --- 10688,10694 ---- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF ! #line 10691 "configure" #include "confdefs.h" #if HAVE_DLFCN_H *************** *** 10271,10280 **** # endif #endif - #ifdef __cplusplus - extern "C" void exit (int); - #endif - void fnord() { int i=42;} int main () { --- 10729,10734 ---- *************** *** 10290,10296 **** else puts (dlerror ()); ! exit (status); } _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 --- 10744,10750 ---- else puts (dlerror ()); ! return status; } _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 *************** *** 10720,10727 **** ! { echo "$as_me:$LINENO: checking for extern inline" >&5 ! echo $ECHO_N "checking for extern inline... $ECHO_C" >&6; } if test "${ac_cv_c_extern_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else --- 11174,11181 ---- ! { echo "$as_me:$LINENO: checking for GNU-style extern inline" >&5 ! echo $ECHO_N "checking for GNU-style extern inline... $ECHO_C" >&6; } if test "${ac_cv_c_extern_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else *************** *** 10780,10785 **** --- 11234,11302 ---- #define HAVE_INLINE _ACEOF + else + { echo "$as_me:$LINENO: checking for C99-style inline" >&5 + echo $ECHO_N "checking for C99-style inline... $ECHO_C" >&6; } + if test "${ac_cv_c_c99inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_cv_c_c99inline=no + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #ifdef __GNUC_STDC_INLINE__ + inline double foo(double x); + inline double foo(double x) { return x + 1.0 ; }; + #endif + int + main () + { + foo(1.0) + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_c99inline="yes" + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + fi + { echo "$as_me:$LINENO: result: $ac_cv_c_c99inline" >&5 + echo "${ECHO_T}$ac_cv_c_c99inline" >&6; } + + if test "$ac_cv_c_c99inline" != no ; then + + cat >>confdefs.h <<\_ACEOF + #define HAVE_INLINE + _ACEOF + + fi fi *************** *** 12574,12584 **** else ac_cv_c_fpu_sse=no if test "$cross_compiling" = yes; then ! { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling ! See \`config.log' for more details." >&5 ! echo "$as_me: error: cannot run test program while cross compiling ! See \`config.log' for more details." >&2;} ! { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ --- 13091,13142 ---- else ac_cv_c_fpu_sse=no if test "$cross_compiling" = yes; then ! ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! #include ! #define _FPU_SETMXCSR(cw_sse) asm volatile ("ldmxcsr %0" : : "m" (*&cw_sse)) ! ! int ! main () ! { ! unsigned int mode = 0x1f80 ; _FPU_SETMXCSR(mode); exit(0); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (ac_try="$ac_compile" ! case "(($ac_try" in ! *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ! *) ac_try_echo=$ac_try;; ! esac ! eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ! (eval "$ac_compile") 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && { ! test -z "$ac_c_werror_flag" || ! test ! -s conftest.err ! } && test -s conftest.$ac_objext; then ! ac_cv_c_fpu_sse="yes" ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_c_fpu_sse="no" ! fi ! ! rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ! else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ *************** *** 12624,12638 **** echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi { echo "$as_me:$LINENO: result: $ac_cv_c_fpu_sse" >&5 echo "${ECHO_T}$ac_cv_c_fpu_sse" >&6; } if test $ac_cv_c_fpu_sse = yes; then cat >>confdefs.h <<\_ACEOF --- 13182,13198 ---- echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) + ac_cv_c_fpu_sse="no" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_c_fpu_sse" >&5 echo "${ECHO_T}$ac_cv_c_fpu_sse" >&6; } + if test $ac_cv_c_fpu_sse = yes; then cat >>confdefs.h <<\_ACEOF *************** *** 13320,13326 **** # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" ! This file was extended by gsl $as_me 1.11, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES --- 13880,13886 ---- # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" ! This file was extended by gsl $as_me 1.12, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES *************** *** 13373,13379 **** _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ ! gsl config.status 1.11 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" --- 13933,13939 ---- _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ ! gsl config.status 1.12 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" *************** *** 13514,13519 **** --- 14074,14080 ---- lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' + OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' *************** *** 13543,13548 **** --- 14104,14112 ---- need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' + LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' + OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' + OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' *************** *** 13616,13621 **** --- 14180,14186 ---- lt_SP2NL \ lt_NL2SP \ reload_flag \ + OBJDUMP \ deplibs_check_method \ file_magic_cmd \ AR \ *************** *** 13639,13644 **** --- 14204,14212 ---- need_locks \ DSYMUTIL \ NMEDIT \ + LIPO \ + OTOOL \ + OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ *************** *** 13939,13951 **** DUMPBIN!$DUMPBIN$ac_delim ac_ct_DUMPBIN!$ac_ct_DUMPBIN$ac_delim NM!$NM$ac_delim AR!$AR$ac_delim RANLIB!$RANLIB$ac_delim lt_ECHO!$lt_ECHO$ac_delim DSYMUTIL!$DSYMUTIL$ac_delim NMEDIT!$NMEDIT$ac_delim ! GSL_CFLAGS!$GSL_CFLAGS$ac_delim ! GSL_LIBS!$GSL_LIBS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then --- 14507,14519 ---- DUMPBIN!$DUMPBIN$ac_delim ac_ct_DUMPBIN!$ac_ct_DUMPBIN$ac_delim NM!$NM$ac_delim + OBJDUMP!$OBJDUMP$ac_delim AR!$AR$ac_delim RANLIB!$RANLIB$ac_delim lt_ECHO!$lt_ECHO$ac_delim DSYMUTIL!$DSYMUTIL$ac_delim NMEDIT!$NMEDIT$ac_delim ! LIPO!$LIPO$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then *************** *** 13987,13992 **** --- 14555,14564 ---- ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF + OTOOL!$OTOOL$ac_delim + OTOOL64!$OTOOL64$ac_delim + GSL_CFLAGS!$GSL_CFLAGS$ac_delim + GSL_LIBS!$GSL_LIBS$ac_delim MINGW32_HOST_TRUE!$MINGW32_HOST_TRUE$ac_delim MINGW32_HOST_FALSE!$MINGW32_HOST_FALSE$ac_delim LIBOBJS!$LIBOBJS$ac_delim *************** *** 14010,14016 **** LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF ! if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 --- 14582,14588 ---- LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF ! if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 25; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 *************** *** 14469,14475 **** #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. ! # Generated automatically by $as_me (GNU $PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # --- 15041,15047 ---- #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. ! # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # *************** *** 14575,14580 **** --- 15147,15155 ---- reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds + # An object symbol dumper. + OBJDUMP=$lt_OBJDUMP + # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method *************** *** 14632,14637 **** --- 15207,15221 ---- # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT + # Tool to manipulate fat objects and archives on Mac OS X. + LIPO=$lt_LIPO + + # ldd/readelf like tool for Mach-O binaries on Mac OS X. + OTOOL=$lt_OTOOL + + # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. + OTOOL64=$lt_OTOOL64 + # Old archive suffix (normally "a"). libext=$libext *************** *** 14872,14877 **** --- 15456,15462 ---- case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" + # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. *************** *** 14939,14948 **** --- 15524,15554 ---- *) func_lo2o_result=${1} ;; esac } + + # func_xform libobj-or-source + func_xform () + { + func_xform_result=${1%.*}.lo + } + + # func_arith arithmetic-term... + func_arith () + { + func_arith_result=$(( $* )) + } + + # func_len string + # STRING may not start with a hyphen. + func_len () + { + func_len_result=${#1} + } + _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" + # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. *************** *** 14963,14991 **** func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } - # func_dirname_and_basename file append nondir_replacement - # perform func_basename and func_dirname in a single function - # call: - # dirname: Compute the dirname of FILE. If nonempty, - # add APPEND to the result, otherwise set result - # to NONDIR_REPLACEMENT. - # value returned in "$func_dirname_result" - # basename: Compute filename of FILE. - # value retuned in "$func_basename_result" - # Implementation must be kept synchronized with func_dirname - # and func_basename. For efficiency, we do not delegate to - # those functions but instead duplicate the functionality here. - func_dirname_and_basename () - { - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` - } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. --- 15569,15574 ---- *************** *** 15019,15024 **** --- 15602,15627 ---- { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } + + # func_xform libobj-or-source + func_xform () + { + func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` + } + + # func_arith arithmetic-term... + func_arith () + { + func_arith_result=`expr "$@"` + } + + # func_len string + # STRING may not start with a hyphen. + func_len () + { + func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` + } + _LT_EOF esac *************** *** 15043,15048 **** --- 15646,15652 ---- { eval "$1=\$$1\$2" } + _LT_EOF ;; esac diff -a -rc -C 2 -P gsl-1.11/configure.ac gsl-1.12/configure.ac *** gsl-1.11/configure.ac Sat Mar 29 16:09:27 2008 --- gsl-1.12/configure.ac Mon Dec 15 14:52:45 2008 *************** *** 1,6 **** dnl Process this file with autoconf to produce a configure script. ! AC_INIT([gsl],[1.11]) AC_CONFIG_SRCDIR(gsl_math.h) AM_INIT_AUTOMAKE([gnu no-dependencies]) --- 1,6 ---- dnl Process this file with autoconf to produce a configure script. ! AC_INIT([gsl],[1.12]) AC_CONFIG_SRCDIR(gsl_math.h) AM_INIT_AUTOMAKE([gnu no-dependencies]) *************** *** 23,28 **** --- 23,29 ---- dnl gsl-1.9 libgsl 10:0:10 libgslcblas 0:0:0 dnl gsl-1.10 libgsl 10:0:10 (*) libgslcblas 0:0:0 dnl gsl-1.11 libgsl 12:0:12 libgslcblas 0:0:0 + dnl gsl-1.12 libgsl 13:0:13 libgslcblas 0:0:0 dnl dnl (*) There was an error on this release. Firstly, the versioning dnl numbers were not updated. Secondly, 2 functions were removed, but *************** *** 43,51 **** dnl so set to 0 if both happened. dnl ! GSL_CURRENT=12 GSL_REVISION=0 ! GSL_AGE=12 dnl CBLAS_CURRENT=0 CBLAS_REVISION=0 --- 44,52 ---- dnl so set to 0 if both happened. dnl ! GSL_CURRENT=13 GSL_REVISION=0 ! GSL_AGE=13 dnl CBLAS_CURRENT=0 CBLAS_REVISION=0 *************** *** 96,102 **** dnl Check for "extern inline", using a modified version of the test dnl for AC_C_INLINE from acspecific.mt dnl ! AC_CACHE_CHECK([for extern inline], ac_cv_c_extern_inline, [ac_cv_c_extern_inline=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[extern $ac_cv_c_inline double foo(double x); extern $ac_cv_c_inline double foo(double x) { return x + 1.0 ; } ; --- 97,103 ---- dnl Check for "extern inline", using a modified version of the test dnl for AC_C_INLINE from acspecific.mt dnl ! AC_CACHE_CHECK([for GNU-style extern inline], ac_cv_c_extern_inline, [ac_cv_c_extern_inline=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[extern $ac_cv_c_inline double foo(double x); extern $ac_cv_c_inline double foo(double x) { return x + 1.0 ; } ; *************** *** 105,110 **** --- 106,124 ---- if test "$ac_cv_c_extern_inline" != no ; then AC_DEFINE(HAVE_INLINE,[],[Define if you have inline]) + else + AC_CACHE_CHECK([for C99-style inline], ac_cv_c_c99inline, + [ac_cv_c_c99inline=no + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef __GNUC_STDC_INLINE__ + inline double foo(double x); + inline double foo(double x) { return x + 1.0 ; }; + #endif]], + [[ foo(1.0) ]])],[ac_cv_c_c99inline="yes"],[]) + ]) + + if test "$ac_cv_c_c99inline" != no ; then + AC_DEFINE(HAVE_INLINE,[],[Define if you have inline]) + fi fi dnl Checks for header files. *************** *** 311,318 **** AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include #define _FPU_SETMXCSR(cw_sse) asm volatile ("ldmxcsr %0" : : "m" (*&cw_sse)) ! ]], [[ unsigned int mode = 0x1f80 ; _FPU_SETMXCSR(mode); exit(0); ]])],[ac_cv_c_fpu_sse="yes"]) ! ]) if test $ac_cv_c_fpu_sse = yes; then AC_DEFINE([HAVE_FPU_X86_SSE], 1, [Define if x86 processor has sse extensions.]) --- 325,337 ---- AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include #define _FPU_SETMXCSR(cw_sse) asm volatile ("ldmxcsr %0" : : "m" (*&cw_sse)) ! ]], [[ unsigned int mode = 0x1f80 ; _FPU_SETMXCSR(mode); exit(0); ]])],[ac_cv_c_fpu_sse="yes"],[ac_cv_c_fpu_sse="no"],[ ! AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ! #include ! #define _FPU_SETMXCSR(cw_sse) asm volatile ("ldmxcsr %0" : : "m" (*&cw_sse)) ! ]], [[ unsigned int mode = 0x1f80 ; _FPU_SETMXCSR(mode); exit(0); ]])],[ac_cv_c_fpu_sse="yes"],[ac_cv_c_fpu_sse="no"]) ! ])]) ! if test $ac_cv_c_fpu_sse = yes; then AC_DEFINE([HAVE_FPU_X86_SSE], 1, [Define if x86 processor has sse extensions.]) diff -a -rc -C 2 -P gsl-1.11/const/ChangeLog gsl-1.12/const/ChangeLog *** gsl-1.11/const/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/const/ChangeLog Thu Nov 27 20:03:28 2008 *************** *** 1,3 **** --- 1,7 ---- + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + 2006-03-21 Brian Gough * test.c (main): added some extra tests diff -a -rc -C 2 -P gsl-1.11/const/Makefile.am gsl-1.12/const/Makefile.am *** gsl-1.11/const/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/const/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 1,6 **** pkginclude_HEADERS = gsl_const.h gsl_const_cgs.h gsl_const_mks.h gsl_const_cgsm.h gsl_const_mksa.h gsl_const_num.h ! INCLUDES= -I$(top_builddir) TESTS = $(check_PROGRAMS) --- 1,6 ---- pkginclude_HEADERS = gsl_const.h gsl_const_cgs.h gsl_const_mks.h gsl_const_cgsm.h gsl_const_mksa.h gsl_const_num.h ! INCLUDES = -I$(top_srcdir) TESTS = $(check_PROGRAMS) diff -a -rc -C 2 -P gsl-1.11/const/Makefile.in gsl-1.12/const/Makefile.in *** gsl-1.11/const/Makefile.in Sun Mar 30 12:07:02 2008 --- gsl-1.12/const/Makefile.in Mon Dec 15 14:55:09 2008 *************** *** 127,132 **** --- 127,133 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 134,140 **** --- 135,144 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 198,204 **** top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ pkginclude_HEADERS = gsl_const.h gsl_const_cgs.h gsl_const_mks.h gsl_const_cgsm.h gsl_const_mksa.h gsl_const_num.h ! INCLUDES = -I$(top_builddir) TESTS = $(check_PROGRAMS) test_SOURCES = test.c test_LDADD = ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la --- 202,208 ---- top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ pkginclude_HEADERS = gsl_const.h gsl_const_cgs.h gsl_const_mks.h gsl_const_cgsm.h gsl_const_mksa.h gsl_const_num.h ! INCLUDES = -I$(top_srcdir) TESTS = $(check_PROGRAMS) test_SOURCES = test.c test_LDADD = ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la diff -a -rc -C 2 -P gsl-1.11/depcomp gsl-1.12/depcomp *** gsl-1.11/depcomp Thu Jan 1 00:00:00 1970 --- gsl-1.12/depcomp Mon Feb 4 13:53:53 2008 *************** *** 0 **** --- 1,589 ---- + #! /bin/sh + # depcomp - compile a program generating dependencies as side-effects + + scriptversion=2007-03-29.01 + + # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software + # Foundation, Inc. + + # 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA + # 02110-1301, USA. + + # As a special exception to the GNU General Public License, if you + # distribute this file as part of a program that contains a + # configuration script generated by Autoconf, you may include it under + # the same distribution terms that you use for the rest of that program. + + # Originally written by Alexandre Oliva . + + case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF + Usage: depcomp [--help] [--version] PROGRAM [ARGS] + + Run PROGRAMS ARGS to compile a file, generating dependencies + as side-effects. + + Environment variables: + depmode Dependency tracking mode. + source Source file read by `PROGRAMS ARGS'. + object Object file output by `PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputing dependencies. + libtool Whether libtool is used (yes/no). + + Report bugs to . + EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; + esac + + if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 + fi + + # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. + depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} + tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + + rm -f "$tmpdepfile" + + # Some modes work just like other modes, but use different flags. We + # parameterize here, but still list the modes in the big case below, + # to make depend.m4 easier to write. Note that we *cannot* use a case + # here, because this file can only contain one case statement. + if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc + fi + + if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout + fi + + case "$depmode" in + gcc3) + ## gcc 3 implements dependency tracking that does exactly what + ## we want. Yay! Note: for some reason libtool 1.4 doesn't like + ## it if -MD -MP comes after the -MF stuff. Hmm. + ## Unfortunately, FreeBSD c89 acceptance of flags depends upon + ## the command line argument order; so add the flags where they + ## appear in depend2.am. Note that the slowdown incurred here + ## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + + gcc) + ## There are various ways to get dependency output from gcc. Here's + ## why we pick this rather obscure method: + ## - Don't want to use -MD because we'd like the dependencies to end + ## up in a subdir. Having to rename by hand is ugly. + ## (We might end up doing this anyway to support other compilers.) + ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like + ## -MM, not -M (despite what the docs say). + ## - Using -M directly means running the compiler twice (even worse + ## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz + ## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" + ## This next piece of magic avoids the `deleted header file' problem. + ## The problem is that when a header file which appears in a .P file + ## is deleted, the dependency causes make to die (because there is + ## typically no way to rebuild the header). We avoid this by adding + ## dummy dependencies for each header file. Too bad gcc doesn't do + ## this for us directly. + tr ' ' ' + ' < "$tmpdepfile" | + ## Some versions of gcc put a space before the `:'. On the theory + ## that the space means something, we add a space to the output as + ## well. + ## Some versions of the HPUX 10.20 sed can't process this invocation + ## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + + hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + + sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' + ' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' + ' ' ' >> $depfile + echo >> $depfile + + # The second pass generates a dummy entry for each header file. + tr ' ' ' + ' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> $depfile + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + + aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts `$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + + icc) + # Intel's C compiler understands `-MD -MF file'. However on + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # ICC 7.0 will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want: + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + # ICC 7.1 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using \ : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | + sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + + hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add `dependent.h:' lines. + sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + + tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + # With Tru64 cc, shared objects can also be used to make a + # static library. This mechanism is used in libtool 1.4 series to + # handle both shared and static libraries in a single compilation. + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. + # + # With libtool 1.5 this exception was removed, and libtool now + # generates 2 separate objects for the 2 libraries. These two + # compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 + tmpdepfile2=$dir$base.o.d # libtool 1.5 + tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 + tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.o.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + tmpdepfile4=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + + #nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + + dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for `:' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + "$@" $dashmflag | + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' + ' < "$tmpdepfile" | \ + ## Some versions of the HPUX 10.20 sed can't process this invocation + ## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + + dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + + makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no + for arg in "$@"; do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix="`echo $object | sed 's/^.*\././'`" + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' + ' | \ + ## Some versions of the HPUX 10.20 sed can't process this invocation + ## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + + cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E | + sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + + msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + "$@" || exit $? + IFS=" " + for arg + do + case "$arg" in + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + + none) + exec "$@" + ;; + + *) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; + esac + + exit 0 + + # Local Variables: + # mode: shell-script + # sh-indentation: 2 + # eval: (add-hook 'write-file-hooks 'time-stamp) + # time-stamp-start: "scriptversion=" + # time-stamp-format: "%:y-%02m-%02d.%02H" + # time-stamp-end: "$" + # End: diff -a -rc -C 2 -P gsl-1.11/deriv/ChangeLog gsl-1.12/deriv/ChangeLog *** gsl-1.11/deriv/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/deriv/ChangeLog Thu Nov 27 20:03:28 2008 *************** *** 1,3 **** --- 1,7 ---- + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + 2007-08-22 Brian Gough * deriv.c (central_deriv): corrected dy term for error in h diff -a -rc -C 2 -P gsl-1.11/deriv/Makefile.am gsl-1.12/deriv/Makefile.am *** gsl-1.11/deriv/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/deriv/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 1,6 **** noinst_LTLIBRARIES = libgslderiv.la ! INCLUDES= -I$(top_builddir) libgslderiv_la_SOURCES = deriv.c --- 1,6 ---- noinst_LTLIBRARIES = libgslderiv.la ! INCLUDES = -I$(top_srcdir) libgslderiv_la_SOURCES = deriv.c diff -a -rc -C 2 -P gsl-1.11/deriv/Makefile.in gsl-1.12/deriv/Makefile.in *** gsl-1.11/deriv/Makefile.in Sun Mar 30 12:07:02 2008 --- gsl-1.12/deriv/Makefile.in Mon Dec 15 14:55:09 2008 *************** *** 132,137 **** --- 132,138 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 139,145 **** --- 140,149 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 203,209 **** top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslderiv.la ! INCLUDES = -I$(top_builddir) libgslderiv_la_SOURCES = deriv.c pkginclude_HEADERS = gsl_deriv.h TESTS = $(check_PROGRAMS) --- 207,213 ---- top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslderiv.la ! INCLUDES = -I$(top_srcdir) libgslderiv_la_SOURCES = deriv.c pkginclude_HEADERS = gsl_deriv.h TESTS = $(check_PROGRAMS) diff -a -rc -C 2 -P gsl-1.11/dht/ChangeLog gsl-1.12/dht/ChangeLog *** gsl-1.11/dht/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/dht/ChangeLog Thu Nov 27 20:03:28 2008 *************** *** 1,3 **** --- 1,7 ---- + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + Mon Apr 23 10:31:58 2001 Brian Gough * unified error handling conventions to _e for error handling diff -a -rc -C 2 -P gsl-1.11/dht/Makefile.am gsl-1.12/dht/Makefile.am *** gsl-1.11/dht/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/dht/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 2,8 **** pkginclude_HEADERS = gsl_dht.h ! INCLUDES= -I$(top_builddir) TESTS = $(check_PROGRAMS) --- 2,8 ---- pkginclude_HEADERS = gsl_dht.h ! INCLUDES = -I$(top_srcdir) TESTS = $(check_PROGRAMS) diff -a -rc -C 2 -P gsl-1.11/dht/Makefile.in gsl-1.12/dht/Makefile.in *** gsl-1.11/dht/Makefile.in Sun Mar 30 12:07:03 2008 --- gsl-1.12/dht/Makefile.in Mon Dec 15 14:55:10 2008 *************** *** 133,138 **** --- 133,139 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 140,146 **** --- 141,150 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 205,211 **** top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgsldht.la pkginclude_HEADERS = gsl_dht.h ! INCLUDES = -I$(top_builddir) TESTS = $(check_PROGRAMS) test_LDADD = libgsldht.la ../specfunc/libgslspecfunc.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la test_SOURCES = test.c --- 209,215 ---- top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgsldht.la pkginclude_HEADERS = gsl_dht.h ! INCLUDES = -I$(top_srcdir) TESTS = $(check_PROGRAMS) test_LDADD = libgsldht.la ../specfunc/libgslspecfunc.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la test_SOURCES = test.c diff -a -rc -C 2 -P gsl-1.11/diff/ChangeLog gsl-1.12/diff/ChangeLog *** gsl-1.11/diff/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/diff/ChangeLog Thu Nov 27 20:03:28 2008 *************** *** 1,3 **** --- 1,15 ---- + 2008-09-18 Brian Gough + + * diff.c test.c: temporarily enable deprecated functions for + testing + + * gsl_diff.h: marked these functions deprecated, use gsl_deriv + instead. + + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + Mon Apr 23 13:26:21 2001 Brian Gough * Makefile.am: removed demo from Makefile diff -a -rc -C 2 -P gsl-1.11/diff/Makefile.am gsl-1.12/diff/Makefile.am *** gsl-1.11/diff/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/diff/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 1,6 **** noinst_LTLIBRARIES = libgsldiff.la ! INCLUDES= -I$(top_builddir) libgsldiff_la_SOURCES = diff.c --- 1,6 ---- noinst_LTLIBRARIES = libgsldiff.la ! INCLUDES = -I$(top_srcdir) libgsldiff_la_SOURCES = diff.c diff -a -rc -C 2 -P gsl-1.11/diff/Makefile.in gsl-1.12/diff/Makefile.in *** gsl-1.11/diff/Makefile.in Sun Mar 30 12:07:03 2008 --- gsl-1.12/diff/Makefile.in Mon Dec 15 14:55:10 2008 *************** *** 132,137 **** --- 132,138 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 139,145 **** --- 140,149 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 203,209 **** top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgsldiff.la ! INCLUDES = -I$(top_builddir) libgsldiff_la_SOURCES = diff.c pkginclude_HEADERS = gsl_diff.h TESTS = $(check_PROGRAMS) --- 207,213 ---- top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgsldiff.la ! INCLUDES = -I$(top_srcdir) libgsldiff_la_SOURCES = diff.c pkginclude_HEADERS = gsl_diff.h TESTS = $(check_PROGRAMS) diff -a -rc -C 2 -P gsl-1.11/diff/diff.c gsl-1.12/diff/diff.c *** gsl-1.11/diff/diff.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/diff/diff.c Thu Nov 27 20:03:28 2008 *************** *** 21,26 **** --- 21,28 ---- #include #include #include + + #undef GSL_DISABLE_DEPRECATED #include int diff -a -rc -C 2 -P gsl-1.11/diff/gsl_diff.h gsl-1.12/diff/gsl_diff.h *** gsl-1.11/diff/gsl_diff.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/diff/gsl_diff.h Thu Nov 27 20:03:28 2008 *************** *** 33,38 **** --- 33,39 ---- __BEGIN_DECLS + #ifndef GSL_DISABLE_DEPRECATED int gsl_diff_central (const gsl_function *f, double x, double *result, double *abserr); *************** *** 44,49 **** --- 45,51 ---- int gsl_diff_forward (const gsl_function *f, double x, double *result, double *abserr); + #endif __END_DECLS diff -a -rc -C 2 -P gsl-1.11/diff/test.c gsl-1.12/diff/test.c *** gsl-1.11/diff/test.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/diff/test.c Thu Nov 27 20:03:28 2008 *************** *** 22,32 **** #include #include #include - #include #include #include #include double f1 (double x, void *params) { --- 22,34 ---- #include #include #include #include #include #include + #undef GSL_DISABLE_DEPRECATED + #include + double f1 (double x, void *params) { diff -a -rc -C 2 -P gsl-1.11/doc/Makefile.in gsl-1.12/doc/Makefile.in *** gsl-1.11/doc/Makefile.in Sun Mar 30 12:07:03 2008 --- gsl-1.12/doc/Makefile.in Mon Dec 15 14:55:10 2008 *************** *** 126,131 **** --- 126,132 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 133,139 **** --- 134,143 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ diff -a -rc -C 2 -P gsl-1.11/doc/blas.texi gsl-1.12/doc/blas.texi *** gsl-1.11/doc/blas.texi Tue Feb 5 13:22:10 2008 --- gsl-1.12/doc/blas.texi Thu Nov 27 20:03:28 2008 *************** *** 110,115 **** --- 110,119 ---- general matrix-matrix multiply'' and @sc{zgemm} stands for ``double-precision complex matrix-matrix multiply''. + Note that the vector and matrix arguments to BLAS functions must not + be aliased, as the results are undefined when the underlying arrays + overlap (@pxref{Aliasing of arrays}). + @menu * GSL BLAS Interface:: * BLAS Examples:: *************** *** 556,562 **** These functions compute a rank-k update of the hermitian matrix @var{C}, @math{C = \alpha A A^H + \beta C} when @var{Trans} is @code{CblasNoTrans} and @math{C = \alpha A^H A + \beta C} when ! @var{Trans} is @code{CblasTrans}. Since the matrix @var{C} is hermitian only its upper half or lower half need to be stored. When @var{Uplo} is @code{CblasUpper} then the upper triangle and diagonal of @var{C} are used, and when @var{Uplo} is @code{CblasLower} then the lower triangle --- 560,566 ---- These functions compute a rank-k update of the hermitian matrix @var{C}, @math{C = \alpha A A^H + \beta C} when @var{Trans} is @code{CblasNoTrans} and @math{C = \alpha A^H A + \beta C} when ! @var{Trans} is @code{CblasConjTrans}. Since the matrix @var{C} is hermitian only its upper half or lower half need to be stored. When @var{Uplo} is @code{CblasUpper} then the upper triangle and diagonal of @var{C} are used, and when @var{Uplo} is @code{CblasLower} then the lower triangle diff -a -rc -C 2 -P gsl-1.11/doc/bspline.texi gsl-1.12/doc/bspline.texi *** gsl-1.11/doc/bspline.texi Tue Feb 5 13:22:10 2008 --- gsl-1.12/doc/bspline.texi Mon Dec 8 21:10:11 2008 *************** *** 10,15 **** --- 10,16 ---- * Initializing the B-splines solver:: * Constructing the knots vector:: * Evaluation of B-spline basis functions:: + * Evaluation of B-spline basis function derivatives:: * Example programs for B-splines:: * References and Further Reading:: @end menu *************** *** 77,82 **** --- 78,85 ---- @section Initializing the B-splines solver @cindex basis splines, initializing + Using B-splines requires a gsl_bspline_workspace: + @deftypefun {gsl_bspline_workspace *} gsl_bspline_alloc (const size_t @var{k}, const size_t @var{nbreak}) This function allocates a workspace for computing B-splines of order @var{k}. The number of breakpoints is given by @var{nbreak}. This *************** *** 89,94 **** --- 92,111 ---- This function frees the memory associated with the workspace @var{w}. @end deftypefun + Evaluation of B-spline basis function derivatives additionally requires + a @code{gsl_bspline_deriv_workspace}: + + @deftypefun {gsl_bspline_deriv_workspace *} gsl_bspline_deriv_alloc (const size_t @var{k}) + This function allocates a workspace for computing the derivatives of a + B-spline basis function of order @var{k}. The size of the workspace + is @math{O(2k^2)}. + @end deftypefun + + @deftypefun void gsl_bspline_deriv_free (gsl_bspline_deriv_workspace * @var{w}) + This function frees the memory associated with the derivative + workspace @var{w}. + @end deftypefun + @node Constructing the knots vector @section Constructing the knots vector @cindex knots *************** *** 120,130 **** --- 137,187 ---- defining recurrence relation. @end deftypefun + @deftypefun int gsl_bspline_eval_nonzero (const double @var{x}, gsl_vector * @var{Bk}, size_t * @var{istart}, size_t * @var{iend}, gsl_bspline_workspace * @var{w}) + This function evaluates all potentially nonzero B-spline basis + functions at the position @var{x} and stores them in @var{Bk}, so + that the @math{i}th element of @var{Bk} is @math{B_(istart+i)(x)}. + The last element of @var{Bk} is @math{B_(iend)(x)}. @var{Bk} must be + of length @math{k}. Only returning nonzero basis functions allows users + to more cheaply perform tasks requiring linear combinations of the basis + functions, e.g. when evaluating an interpolated function. + @end deftypefun + @deftypefun size_t gsl_bspline_ncoeffs (gsl_bspline_workspace * @var{w}) This function returns the number of B-spline coefficients given by @math{n = nbreak + k - 2}. @end deftypefun + @node Evaluation of B-spline basis function derivatives + @section Evaluation of B-spline derivatives + @cindex basis splines, derivatives + + @deftypefun int gsl_bspline_deriv_eval (const double @var{x}, const size_t @var{nderiv}, gsl_matrix * @var{dB}, gsl_bspline_workspace * @var{w}, gsl_bspline_deriv_workspace * @var{dw}) + This function evaluates all B-spline basis function derivatives of orders + @math{0} through @math{nderiv} (inclusive) at the position @var{x} + and stores them in @var{dB}. The @math{(i,j)}th element of @var{dB} + is @math{d^j/dx^j B_i(x)}. @var{dB} must be of size @math{n = nbreak + + k - 2} by @math{nderiv + 1}. The value @math{n} may also be obtained + by calling @code{gsl_bspline_ncoeffs}. Note that function evaluations + are included as the @math{0}th order derivatives in @var{dB}. + It is far more efficient to compute all of the basis functions derivatives + at once than to compute them individually, due to the nature of the + defining recurrence relation. + @end deftypefun + + @deftypefun int gsl_bspline_deriv_eval_nonzero (const double @var{x}, const size_t @var{nderiv}, gsl_matrix * @var{dB}, size_t * @var{istart}, size_t * @var{iend}, gsl_bspline_workspace * @var{w}, gsl_bspline_deriv_workspace * @var{dw}) + This function evaluates all potentially nonzero B-spline basis function + derivatives of orders @math{0} through @math{nderiv} (inclusive) at + the position @var{x} and stores them in @var{dB}. The @math{(i,j)}th + element of @var{dB} is @math{d^j/dx^j B_(istart+i)(x)}. The last row + of @var{dB} contains @math{d^j/dx^j B_(iend)(x)}. @var{dB} must be + of size @math{k} by at least @math{nderiv + 1}. Note that function + evaluations are included as the @math{0}th order derivatives in @var{dB}. + Only returning nonzero basis functions allows users to more cheaply + perform tasks requiring linear combinations of the basis functions, e.g. + when evaluating an interpolated function. + @end deftypefun + @node Example programs for B-splines @section Example programs for B-splines @cindex basis splines, examples *************** *** 164,167 **** @noindent A large collection of B-spline routines is available in the ! @sc{pppack} library available at @uref{http://www.netlib.org/pppack}. --- 221,225 ---- @noindent A large collection of B-spline routines is available in the ! @sc{pppack} library available at @uref{http://www.netlib.org/pppack}, ! which is also part of @sc{slatec}. diff -a -rc -C 2 -P gsl-1.11/doc/cheb.texi gsl-1.12/doc/cheb.texi *** gsl-1.11/doc/cheb.texi Tue Feb 5 13:22:10 2008 --- gsl-1.12/doc/cheb.texi Sat Nov 29 16:42:42 2008 *************** *** 18,26 **** @menu * Chebyshev Definitions:: * Creation and Calculation of Chebyshev Series:: * Chebyshev Series Evaluation:: * Derivatives and Integrals:: ! * Chebyshev Approximation examples:: * Chebyshev Approximation References and Further Reading:: @end menu --- 18,27 ---- @menu * Chebyshev Definitions:: * Creation and Calculation of Chebyshev Series:: + * Auxiliary Functions for Chebyshev Series:: * Chebyshev Series Evaluation:: * Derivatives and Integrals:: ! * Chebyshev Approximation Examples:: * Chebyshev Approximation References and Further Reading:: @end menu *************** *** 80,85 **** --- 81,102 ---- @math{O(n^2)} process, and requires @math{n} function evaluations. @end deftypefun + @node Auxiliary Functions for Chebyshev Series + @section Auxiliary Functions + The following functions provide information about an existing + Chebyshev series. + + @deftypefun size_t gsl_cheb_order (const gsl_cheb_series * @var{cs}) + This function returns the order of Chebyshev series @var{cs}. + @end deftypefun + + @deftypefun size_t gsl_cheb_size (const gsl_cheb_series * @var{cs}) + @deftypefunx {double *} gsl_cheb_coeffs (const gsl_cheb_series * @var{cs}) + These functions return the size of the Chebyshev coefficient array + @code{c[]} and a pointer to its location in memory for the Chebyshev + series @var{cs}. + @end deftypefun + @node Chebyshev Series Evaluation @section Chebyshev Series Evaluation *************** *** 140,146 **** end of the range @var{a}. @end deftypefun ! @node Chebyshev Approximation examples @section Examples The following example program computes Chebyshev approximations to a --- 157,163 ---- end of the range @var{a}. @end deftypefun ! @node Chebyshev Approximation Examples @section Examples The following example program computes Chebyshev approximations to a diff -a -rc -C 2 -P gsl-1.11/doc/complex.texi gsl-1.12/doc/complex.texi *** gsl-1.11/doc/complex.texi Tue Feb 5 13:22:10 2008 --- gsl-1.12/doc/complex.texi Thu Nov 27 20:03:28 2008 *************** *** 21,27 **** defined in @file{gsl_complex_math.h}. @menu ! * Complex numbers:: * Properties of complex numbers:: * Complex arithmetic operators:: * Elementary Complex Functions:: --- 21,27 ---- defined in @file{gsl_complex_math.h}. @menu ! * Representation of complex numbers:: * Properties of complex numbers:: * Complex arithmetic operators:: * Elementary Complex Functions:: *************** *** 32,39 **** * Complex Number References and Further Reading:: @end menu ! @node Complex numbers ! @section Complex numbers @cindex representations of complex numbers @cindex polar form of complex numbers @tindex gsl_complex --- 32,39 ---- * Complex Number References and Further Reading:: @end menu ! @node Representation of complex numbers ! @section Representation of complex numbers @cindex representations of complex numbers @cindex polar form of complex numbers @tindex gsl_complex diff -a -rc -C 2 -P gsl-1.11/doc/debug.texi gsl-1.12/doc/debug.texi *** gsl-1.11/doc/debug.texi Tue Feb 5 13:22:10 2008 --- gsl-1.12/doc/debug.texi Thu Nov 27 20:03:28 2008 *************** *** 256,263 **** @example gcc -ansi -pedantic -Werror -Wall -W -Wmissing-prototypes -Wstrict-prototypes ! -Wtraditional -Wconversion -Wshadow ! -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-externs -fshort-enums -fno-common -Dinline= -g -O2 @end example --- 256,263 ---- @example gcc -ansi -pedantic -Werror -Wall -W -Wmissing-prototypes -Wstrict-prototypes ! -Wconversion -Wshadow -Wpointer-arith ! -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-externs -fshort-enums -fno-common -Dinline= -g -O2 @end example diff -a -rc -C 2 -P gsl-1.11/doc/examples/nmsimplex.c gsl-1.12/doc/examples/nmsimplex.c *** gsl-1.11/doc/examples/nmsimplex.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/doc/examples/nmsimplex.c Sat Nov 29 17:52:42 2008 *************** *** 4,10 **** double par[5] = {1.0, 2.0, 10.0, 20.0, 30.0}; const gsl_multimin_fminimizer_type *T = ! gsl_multimin_fminimizer_nmsimplex; gsl_multimin_fminimizer *s = NULL; gsl_vector *ss, *x; gsl_multimin_function minex_func; --- 4,10 ---- double par[5] = {1.0, 2.0, 10.0, 20.0, 30.0}; const gsl_multimin_fminimizer_type *T = ! gsl_multimin_fminimizer_nmsimplex2; gsl_multimin_fminimizer *s = NULL; gsl_vector *ss, *x; gsl_multimin_function minex_func; *************** *** 46,52 **** printf ("converged to minimum at\n"); } ! printf ("%5d %10.3e %10.3ef f() = %7.3f size = %.3f\n", iter, gsl_vector_get (s->x, 0), gsl_vector_get (s->x, 1), --- 46,52 ---- printf ("converged to minimum at\n"); } ! printf ("%5d %10.3e %10.3e f() = %7.3f size = %.3f\n", iter, gsl_vector_get (s->x, 0), gsl_vector_get (s->x, 1), diff -a -rc -C 2 -P gsl-1.11/doc/examples/nmsimplex.out gsl-1.12/doc/examples/nmsimplex.out *** gsl-1.11/doc/examples/nmsimplex.out Tue Feb 5 13:22:10 2008 --- gsl-1.12/doc/examples/nmsimplex.out Sat Nov 29 17:53:10 2008 *************** *** 1,26 **** ! 1 6.500e+00 5.000e+00 f() = 512.500 size = 1.082 ! 2 5.250e+00 4.000e+00 f() = 290.625 size = 1.372 ! 3 5.250e+00 4.000e+00 f() = 290.625 size = 1.372 ! 4 5.500e+00 1.000e+00 f() = 252.500 size = 1.372 ! 5 2.625e+00 3.500e+00 f() = 101.406 size = 1.823 ! 6 3.469e+00 1.375e+00 f() = 98.760 size = 1.526 ! 7 1.820e+00 3.156e+00 f() = 63.467 size = 1.105 ! 8 1.820e+00 3.156e+00 f() = 63.467 size = 1.105 ! 9 1.016e+00 2.812e+00 f() = 43.206 size = 1.105 ! 10 2.041e+00 2.008e+00 f() = 40.838 size = 0.645 ! 11 1.236e+00 1.664e+00 f() = 32.816 size = 0.645 ! 12 1.236e+00 1.664e+00 f() = 32.816 size = 0.447 ! 13 5.225e-01 1.980e+00 f() = 32.288 size = 0.447 ! 14 1.103e+00 2.073e+00 f() = 30.214 size = 0.345 ! 15 1.103e+00 2.073e+00 f() = 30.214 size = 0.264 ! 16 1.103e+00 2.073e+00 f() = 30.214 size = 0.160 ! 17 9.864e-01 1.934e+00 f() = 30.090 size = 0.132 ! 18 9.190e-01 1.987e+00 f() = 30.069 size = 0.092 ! 19 1.028e+00 2.017e+00 f() = 30.013 size = 0.056 ! 20 1.028e+00 2.017e+00 f() = 30.013 size = 0.046 ! 21 1.028e+00 2.017e+00 f() = 30.013 size = 0.033 ! 22 9.874e-01 1.985e+00 f() = 30.006 size = 0.028 ! 23 9.846e-01 1.995e+00 f() = 30.003 size = 0.023 ! 24 1.007e+00 2.003e+00 f() = 30.001 size = 0.012 ! converged to minimum at ! 25 1.007e+00 2.003e+00 f() = 30.001 size = 0.010 --- 1,25 ---- ! 1 6.500e+00 5.000e+00 f() = 512.500 size = 1.130 ! 2 5.250e+00 4.000e+00 f() = 290.625 size = 1.409 ! 3 5.250e+00 4.000e+00 f() = 290.625 size = 1.409 ! 4 5.500e+00 1.000e+00 f() = 252.500 size = 1.409 ! 5 2.625e+00 3.500e+00 f() = 101.406 size = 1.847 ! 6 2.625e+00 3.500e+00 f() = 101.406 size = 1.847 ! 7 0.000e+00 3.000e+00 f() = 60.000 size = 1.847 ! 8 2.094e+00 1.875e+00 f() = 42.275 size = 1.321 ! 9 2.578e-01 1.906e+00 f() = 35.684 size = 1.069 ! 10 5.879e-01 2.445e+00 f() = 35.664 size = 0.841 ! 11 1.258e+00 2.025e+00 f() = 30.680 size = 0.476 ! 12 1.258e+00 2.025e+00 f() = 30.680 size = 0.367 ! 13 1.093e+00 1.849e+00 f() = 30.539 size = 0.300 ! 14 8.830e-01 2.004e+00 f() = 30.137 size = 0.172 ! 15 8.830e-01 2.004e+00 f() = 30.137 size = 0.126 ! 16 9.582e-01 2.060e+00 f() = 30.090 size = 0.106 ! 17 1.022e+00 2.004e+00 f() = 30.005 size = 0.063 ! 18 1.022e+00 2.004e+00 f() = 30.005 size = 0.043 ! 19 1.022e+00 2.004e+00 f() = 30.005 size = 0.043 ! 20 1.022e+00 2.004e+00 f() = 30.005 size = 0.027 ! 21 1.022e+00 2.004e+00 f() = 30.005 size = 0.022 ! 22 9.920e-01 1.997e+00 f() = 30.001 size = 0.016 ! 23 9.920e-01 1.997e+00 f() = 30.001 size = 0.013 ! converged to minimum at ! 24 9.920e-01 1.997e+00 f() = 30.001 size = 0.008 diff -a -rc -C 2 -P gsl-1.11/doc/fdl.texi gsl-1.12/doc/fdl.texi *** gsl-1.11/doc/fdl.texi Tue Feb 5 13:22:10 2008 --- gsl-1.12/doc/fdl.texi Thu Nov 27 20:03:28 2008 *************** *** 1,15 **** ! @cindex FDL, GNU Free Documentation License ! @center Version 1.2, November 2002 @iftex @smallerfonts @rm @end iftex @display ! Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc. ! 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA ! Everyone is permitted to copy and distribute verbatim copies of this license ! document, but changing it is not allowed. @end display @enumerate 0 --- 1,18 ---- ! @c The GNU Free Documentation License. ! @center Version 1.3, 3 November 2008 @iftex @smallerfonts @rm @end iftex + @c This file is intended to be included within another document, + @c hence no sectioning command or @node. + @display ! Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. ! @uref{http://fsf.org/} ! Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is ! not allowed. @end display @enumerate 0 *************** *** 111,116 **** --- 114,122 ---- the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. + The ``publisher'' means any person or entity that distributes copies + of the Document to the public. + A section ``Entitled XYZ'' means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a *************** *** 379,391 **** @item TERMINATION ! You may not copy, modify, sublicense, or distribute the Document except ! as expressly provided for under this License. Any other attempt to ! copy, modify, sublicense or distribute the Document is void, and will ! automatically terminate your rights under this License. However, ! parties who have received copies, or rights, from you under this ! License will not have their licenses terminated so long as such ! parties remain in full compliance. @item FUTURE REVISIONS OF THIS LICENSE --- 385,414 ---- @item TERMINATION ! You may not copy, modify, sublicense, or distribute the Document ! except as expressly provided under this License. Any attempt ! otherwise to copy, modify, sublicense, or distribute it is void, and ! will automatically terminate your rights under this License. ! ! However, if you cease all violation of this License, then your license ! from a particular copyright holder is reinstated (a) provisionally, ! unless and until the copyright holder explicitly and finally ! terminates your license, and (b) permanently, if the copyright holder ! fails to notify you of the violation by some reasonable means prior to ! 60 days after the cessation. ! ! Moreover, your license from a particular copyright holder is ! reinstated permanently if the copyright holder notifies you of the ! violation by some reasonable means, this is the first time you have ! received notice of violation of this License (for any work) from that ! copyright holder, and you cure the violation prior to 30 days after ! your receipt of the notice. ! ! Termination of your rights under this section does not terminate the ! licenses of parties who have received copies or rights from you under ! this License. If your rights have been terminated and not permanently ! reinstated, receipt of a copy of some or all of the same material does ! not give you any rights to use it. @item FUTURE REVISIONS OF THIS LICENSE *************** *** 403,409 **** of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not ! as a draft) by the Free Software Foundation. @end enumerate @page --- 426,467 ---- of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not ! as a draft) by the Free Software Foundation. If the Document ! specifies that a proxy can decide which future versions of this ! License can be used, that proxy's public statement of acceptance of a ! version permanently authorizes you to choose that version for the ! Document. ! ! @item ! RELICENSING ! ! ``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any ! World Wide Web server that publishes copyrightable works and also ! provides prominent facilities for anybody to edit those works. A ! public wiki that anybody can edit is an example of such a server. A ! ``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the ! site means any set of copyrightable works thus published on the MMC ! site. ! ! ``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0 ! license published by Creative Commons Corporation, a not-for-profit ! corporation with a principal place of business in San Francisco, ! California, as well as future copyleft versions of that license ! published by that same organization. ! ! ``Incorporate'' means to publish or republish a Document, in whole or ! in part, as part of another Document. ! ! An MMC is ``eligible for relicensing'' if it is licensed under this ! License, and if all works that were first published under this License ! somewhere other than this MMC, and subsequently incorporated in whole ! or in part into the MMC, (1) had no cover texts or invariant sections, ! and (2) were thus incorporated prior to November 1, 2008. ! ! The operator of an MMC Site may republish an MMC contained in the site ! under CC-BY-SA on the same site at any time before August 1, 2009, ! provided the MMC is eligible for relicensing. ! @end enumerate @page *************** *** 415,424 **** @smallexample @group ! Copyright (C) @var{year} @var{your name}. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free ! Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in --- 473,482 ---- @smallexample @group ! Copyright (C) @var{year} @var{your name}. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free ! Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in *************** *** 427,438 **** @end smallexample If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, ! replace the ``with...Texts.'' line with this: @smallexample @group with the Invariant Sections being @var{list their ! titles}, with the Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}. @end group @end smallexample --- 485,496 ---- @end smallexample If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, ! replace the ``with@dots{}Texts.'' line with this: @smallexample @group with the Invariant Sections being @var{list their ! titles}, with the Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}. @end group @end smallexample diff -a -rc -C 2 -P gsl-1.11/doc/fft.texi gsl-1.12/doc/fft.texi *** gsl-1.11/doc/fft.texi Tue Feb 5 13:22:10 2008 --- gsl-1.12/doc/fft.texi Thu Nov 27 20:03:28 2008 *************** *** 619,625 **** The following table shows the correspondence between the output @var{data} and the equivalent results obtained by considering the input ! data as a complex sequence with zero imaginary part, @example complex[0].real = data[0] --- 619,625 ---- The following table shows the correspondence between the output @var{data} and the equivalent results obtained by considering the input ! data as a complex sequence with zero imaginary part (assuming @var{stride=1}), @example complex[0].real = data[0] *************** *** 641,648 **** @end example @noindent Note that the output data can be converted into the full complex ! sequence using the function @code{gsl_fft_halfcomplex_unpack} ! described in the next section. @end deftypefun The radix-2 FFT functions for halfcomplex data are declared in the --- 641,648 ---- @end example @noindent Note that the output data can be converted into the full complex ! sequence using the function @code{gsl_fft_halfcomplex_radix2_unpack} ! described below. @end deftypefun The radix-2 FFT functions for halfcomplex data are declared in the *************** *** 656,665 **** @var{data} stored according the output scheme used by @code{gsl_fft_real_radix2}. The result is a real array stored in natural order. - @end deftypefun @node Mixed-radix FFT routines for real data @section Mixed-radix FFT routines for real data --- 656,699 ---- @var{data} stored according the output scheme used by @code{gsl_fft_real_radix2}. The result is a real array stored in natural order. @end deftypefun + @deftypefun int gsl_fft_halfcomplex_radix2_unpack (const double @var{halfcomplex_coefficient}[], gsl_complex_packed_array @var{complex_coefficient}, size_t @var{stride}, size_t @var{n}) + This function converts @var{halfcomplex_coefficient}, an array of + half-complex coefficients as returned by @code{gsl_fft_real_radix2_transform}, into an ordinary complex array, @var{complex_coefficient}. It fills in the + complex array using the symmetry + @c{$z_k = z_{N-k}^*$} + @math{z_k = z_@{N-k@}^*} + to reconstruct the redundant elements. The algorithm for the conversion + is, + + @example + complex_coefficient[0].real + = halfcomplex_coefficient[0]; + complex_coefficient[0].imag + = 0.0; + for (i = 1; i < n - i; i++) + @{ + double hc_real + = halfcomplex_coefficient[i*stride]; + double hc_imag + = halfcomplex_coefficient[(n-i)*stride]; + complex_coefficient[i*stride].real = hc_real; + complex_coefficient[i*stride].imag = hc_imag; + complex_coefficient[(n - i)*stride].real = hc_real; + complex_coefficient[(n - i)*stride].imag = -hc_imag; + @} + + if (i == n - i) + @{ + complex_coefficient[i*stride].real + = halfcomplex_coefficient[(n - 1)*stride]; + complex_coefficient[i*stride].imag + = 0.0; + @} + @end example + @end deftypefun @node Mixed-radix FFT routines for real data @section Mixed-radix FFT routines for real data *************** *** 812,820 **** @example for (i = 0; i < n; i++) @{ ! complex_coefficient[i].real ! = real_coefficient[i]; ! complex_coefficient[i].imag = 0.0; @} @end example --- 846,854 ---- @example for (i = 0; i < n; i++) @{ ! complex_coefficient[i*stride].real ! = real_coefficient[i*stride]; ! complex_coefficient[i*stride].imag = 0.0; @} @end example *************** *** 840,859 **** for (i = 1; i < n - i; i++) @{ double hc_real ! = halfcomplex_coefficient[2 * i - 1]; double hc_imag ! = halfcomplex_coefficient[2 * i]; ! complex_coefficient[i].real = hc_real; ! complex_coefficient[i].imag = hc_imag; ! complex_coefficient[n - i].real = hc_real; ! complex_coefficient[n - i].imag = -hc_imag; @} if (i == n - i) @{ ! complex_coefficient[i].real ! = halfcomplex_coefficient[n - 1]; ! complex_coefficient[i].imag = 0.0; @} @end example --- 874,893 ---- for (i = 1; i < n - i; i++) @{ double hc_real ! = halfcomplex_coefficient[(2 * i - 1)*stride]; double hc_imag ! = halfcomplex_coefficient[(2 * i)*stride]; ! complex_coefficient[i*stride].real = hc_real; ! complex_coefficient[i*stride].imag = hc_imag; ! complex_coefficient[(n - i)*stride].real = hc_real; ! complex_coefficient[(n - i)*stride].imag = -hc_imag; @} if (i == n - i) @{ ! complex_coefficient[i*stride].real ! = halfcomplex_coefficient[(n - 1)*stride]; ! complex_coefficient[i*stride].imag = 0.0; @} @end example diff -a -rc -C 2 -P gsl-1.11/doc/gsl-config.1 gsl-1.12/doc/gsl-config.1 *** gsl-1.11/doc/gsl-config.1 Tue Feb 5 13:22:10 2008 --- gsl-1.12/doc/gsl-config.1 Thu Nov 27 20:03:28 2008 *************** *** 12,18 **** to the .m4 macros for GNU autoconf that are included with \fIGSL\fP. . .SH OPTIONS - .l \fIgsl-config\fP accepts the following options: .TP 8 .B \-\-version --- 12,17 ---- diff -a -rc -C 2 -P gsl-1.11/doc/gsl-design.texi gsl-1.12/doc/gsl-design.texi *** gsl-1.11/doc/gsl-design.texi Wed Mar 19 16:18:18 2008 --- gsl-1.12/doc/gsl-design.texi Mon Dec 8 20:05:26 2008 *************** *** 905,910 **** --- 905,915 ---- separate functions and passed around as a "workspace" argument. This allows memory allocation to be factored out of tight loops. + To avoid confusion over ownership, workspaces should not own each + other or contain other workspaces. For clarity and ease of use in + different contexts, they should be allocated from integer arguments + rather than derived from other structs. + @node Memory layout, Linear Algebra Levels, Memory allocation and ownership, Design @section Memory layout *************** *** 1117,1127 **** use something like @example ! for (i = N; i > 0 && i--;) @{ ... @} @end example @noindent ! to avoid problems with wrap-around at @code{i=0}. If you really want to avoid confusion use a separate variable to invert the loop order, --- 1122,1137 ---- use something like @example ! for (i = N; i-- > 0;) @{ ... @} @end example @noindent ! to avoid problems with wrap-around at @code{i=0}. Note that the ! post-decrement ensures that the loop variable is tested before it ! reaches zero. Beware that @code{i} will wraparound on exit from the ! loop. (This could also be written as @code{for (i = N; i--;)} since ! the test for @code{i>0} is equivalent to @code{i!=0} for an unsigned ! integer) If you really want to avoid confusion use a separate variable to invert the loop order, *************** *** 1129,1134 **** --- 1139,1160 ---- for (i = 0; i < N; i++) @{ j = N - i; ... @} @end example + Note (BJG). Originally, I suggested using + + @example + for (i = N; i > 0 && i--;) @{ ... @} + @end example + + which makes the test for @code{i>0} explicit and leaves @code{i=0} on + exit from the loop. However, it is slower as there is an additional + branch which prevents unrolling. Thanks to J. Seward for pointing + this out. + + Note: As a matter of style, please use post-increment (@code{i++}) and + post-decrement (@code{i--}) operators by default and only use + pre-increment (@code{++i}) and pre-decrement (@code{--i}) operators + where specifically needed. + @node Arrays vs Pointers, Pointers, size_t, Design @section Arrays vs Pointers diff -a -rc -C 2 -P gsl-1.11/doc/gsl-ref.info gsl-1.12/doc/gsl-ref.info *** gsl-1.11/doc/gsl-ref.info Sat Mar 29 15:07:29 2008 --- gsl-1.12/doc/gsl-ref.info Mon Dec 15 15:28:50 2008 *************** *** 1,4 **** ! This is gsl-ref.info, produced by makeinfo version 4.8 from gsl-ref.texi. INFO-DIR-SECTION Scientific software --- 1,4 ---- ! This is gsl-ref.info, produced by makeinfo version 4.11 from gsl-ref.texi. INFO-DIR-SECTION Scientific software *************** *** 7,16 **** END-INFO-DIR-ENTRY Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, ! 2005, 2006, 2007 The GSL Team. Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with the Invariant Sections being "GNU General Public License" and "Free Software Needs Free Documentation", the Front-Cover text being "A GNU Manual", --- 7,16 ---- END-INFO-DIR-ENTRY Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, ! 2005, 2006, 2007, 2008 The GSL Team. Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "GNU General Public License" and "Free Software Needs Free Documentation", the Front-Cover text being "A GNU Manual", *************** *** 23,604 ****  Indirect: ! gsl-ref.info-1: 924 ! gsl-ref.info-2: 300894 ! gsl-ref.info-3: 599483 ! gsl-ref.info-4: 896610 ! gsl-ref.info-5: 1119386 ! gsl-ref.info-6: 1365699  Tag Table: (Indirect) ! Node: Top924 ! Node: Introduction3617 ! Node: Routines available in GSL4269 ! Node: GSL is Free Software6184 ! Node: Obtaining GSL8576 ! Node: No Warranty9717 ! Node: Reporting Bugs10223 ! Node: Further Information11107 ! Node: Conventions used in this manual12120 ! Node: Using the library12884 ! Node: An Example Program13470 ! Ref: An Example Program-Footnote-114213 ! Node: Compiling and Linking14320 ! Node: Linking programs with the library15390 ! Node: Linking with an alternative BLAS library16535 ! Node: Shared Libraries17465 ! Node: ANSI C Compliance18881 ! Node: Inline functions19974 ! Node: Long double21017 ! Node: Portability functions22605 ! Node: Alternative optimized functions24002 ! Node: Support for different numeric types25460 ! Node: Compatibility with C++28523 ! Node: Aliasing of arrays29095 ! Node: Thread-safety29846 ! Node: Deprecated Functions30933 ! Node: Code Reuse31558 ! Node: Error Handling32202 ! Node: Error Reporting32952 ! Node: Error Codes34844 ! Node: Error Handlers36700 ! Node: Using GSL error reporting in your own functions40337 ! Node: Error Reporting Examples42295 ! Node: Mathematical Functions43507 ! Node: Mathematical Constants44268 ! Node: Infinities and Not-a-number45398 ! Node: Elementary Functions46466 ! Node: Small integer powers48913 ! Node: Testing the Sign of Numbers50497 ! Node: Testing for Odd and Even Numbers50928 ! Node: Maximum and Minimum functions51484 ! Node: Approximate Comparison of Floating Point Numbers53566 ! Node: Complex Numbers54925 ! Ref: Complex Numbers-Footnote-156233 ! Node: Complex numbers56297 ! Node: Properties of complex numbers58180 ! Node: Complex arithmetic operators59167 ! Node: Elementary Complex Functions61913 ! Node: Complex Trigonometric Functions63733 ! Node: Inverse Complex Trigonometric Functions64954 ! Node: Complex Hyperbolic Functions67560 ! Node: Inverse Complex Hyperbolic Functions68856 ! Node: Complex Number References and Further Reading70844 ! Node: Polynomials72240 ! Node: Polynomial Evaluation73007 ! Node: Divided Difference Representation of Polynomials74038 ! Node: Quadratic Equations75787 ! Node: Cubic Equations77727 ! Node: General Polynomial Equations79309 ! Node: Roots of Polynomials Examples81654 ! Node: Roots of Polynomials References and Further Reading83043 ! Node: Special Functions83988 ! Node: Special Function Usage85982 ! Node: The gsl_sf_result struct87165 ! Node: Special Function Modes88429 ! Node: Airy Functions and Derivatives89365 ! Node: Airy Functions90061 ! Node: Derivatives of Airy Functions91421 ! Node: Zeros of Airy Functions92933 ! Node: Zeros of Derivatives of Airy Functions93652 ! Node: Bessel Functions94411 ! Node: Regular Cylindrical Bessel Functions95603 ! Node: Irregular Cylindrical Bessel Functions96927 ! Node: Regular Modified Cylindrical Bessel Functions98383 ! Node: Irregular Modified Cylindrical Bessel Functions101210 ! Node: Regular Spherical Bessel Functions104178 ! Node: Irregular Spherical Bessel Functions106390 ! Node: Regular Modified Spherical Bessel Functions108077 ! Node: Irregular Modified Spherical Bessel Functions110080 ! Node: Regular Bessel Function - Fractional Order112143 ! Node: Irregular Bessel Functions - Fractional Order113141 ! Node: Regular Modified Bessel Functions - Fractional Order113723 ! Node: Irregular Modified Bessel Functions - Fractional Order114648 ! Node: Zeros of Regular Bessel Functions115884 ! Node: Clausen Functions116987 ! Node: Coulomb Functions117591 ! Node: Normalized Hydrogenic Bound States118040 ! Node: Coulomb Wave Functions119153 ! Node: Coulomb Wave Function Normalization Constant122563 ! Node: Coupling Coefficients123316 ! Node: 3-j Symbols124039 ! Node: 6-j Symbols124643 ! Node: 9-j Symbols125267 ! Node: Dawson Function125973 ! Node: Debye Functions126540 ! Node: Dilogarithm128314 ! Node: Real Argument128609 ! Node: Complex Argument129302 ! Node: Elementary Operations129771 ! Node: Elliptic Integrals130595 ! Node: Definition of Legendre Forms131167 ! Node: Definition of Carlson Forms131987 ! Node: Legendre Form of Complete Elliptic Integrals132684 ! Node: Legendre Form of Incomplete Elliptic Integrals134252 ! Node: Carlson Forms136440 ! Node: Elliptic Functions (Jacobi)137987 ! Node: Error Functions138568 ! Node: Error Function139019 ! Node: Complementary Error Function139392 ! Node: Log Complementary Error Function139852 ! Node: Probability functions140304 ! Node: Exponential Functions141557 ! Node: Exponential Function141940 ! Node: Relative Exponential Functions143163 ! Node: Exponentiation With Error Estimate144834 ! Node: Exponential Integrals146043 ! Node: Exponential Integral146525 ! Node: Ei(x)147452 ! Node: Hyperbolic Integrals147900 ! Node: Ei_3(x)148556 ! Node: Trigonometric Integrals148948 ! Node: Arctangent Integral149547 ! Node: Fermi-Dirac Function149947 ! Node: Complete Fermi-Dirac Integrals150317 ! Node: Incomplete Fermi-Dirac Integrals152885 ! Node: Gamma and Beta Functions153528 ! Node: Gamma Functions153964 ! Node: Factorials157085 ! Node: Pochhammer Symbol159638 ! Node: Incomplete Gamma Functions161150 ! Node: Beta Functions162399 ! Node: Incomplete Beta Function163151 ! Node: Gegenbauer Functions163862 ! Node: Hypergeometric Functions165512 ! Node: Laguerre Functions169792 ! Node: Lambert W Functions171355 ! Node: Legendre Functions and Spherical Harmonics172393 ! Node: Legendre Polynomials172982 ! Node: Associated Legendre Polynomials and Spherical Harmonics175062 ! Node: Conical Functions177943 ! Node: Radial Functions for Hyperbolic Space180066 ! Node: Logarithm and Related Functions182243 ! Node: Mathieu Functions183867 ! Node: Mathieu Function Workspace185216 ! Node: Mathieu Function Characteristic Values186029 ! Node: Angular Mathieu Functions187097 ! Node: Radial Mathieu Functions188129 ! Node: Power Function189367 ! Node: Psi (Digamma) Function190294 ! Node: Digamma Function190814 ! Node: Trigamma Function191644 ! Node: Polygamma Function192221 ! Node: Synchrotron Functions192605 ! Node: Transport Functions193368 ! Node: Trigonometric Functions194515 ! Node: Circular Trigonometric Functions195138 ! Node: Trigonometric Functions for Complex Arguments196147 ! Node: Hyperbolic Trigonometric Functions197181 ! Node: Conversion Functions197784 ! Node: Restriction Functions198567 ! Node: Trigonometric Functions With Error Estimates199499 ! Node: Zeta Functions200409 ! Node: Riemann Zeta Function200867 ! Node: Riemann Zeta Function Minus One201546 ! Node: Hurwitz Zeta Function202317 ! Node: Eta Function202822 ! Node: Special Functions Examples203381 ! Node: Special Functions References and Further Reading205075 ! Node: Vectors and Matrices206182 ! Node: Data types206941 ! Node: Blocks208144 ! Node: Block allocation209060 ! Node: Reading and writing blocks210544 ! Node: Example programs for blocks212608 ! Node: Vectors213235 ! Node: Vector allocation215121 ! Node: Accessing vector elements216739 ! Node: Initializing vector elements219222 ! Node: Reading and writing vectors219916 ! Node: Vector views222006 ! Node: Copying vectors229448 ! Node: Exchanging elements230308 ! Node: Vector operations230866 ! Node: Finding maximum and minimum elements of vectors232380 ! Node: Vector properties233905 ! Node: Example programs for vectors234519 ! Node: Matrices236808 ! Node: Matrix allocation239666 ! Node: Accessing matrix elements241333 ! Node: Initializing matrix elements243282 ! Node: Reading and writing matrices244078 ! Node: Matrix views246181 ! Node: Creating row and column views253321 ! Node: Copying matrices257792 ! Node: Copying rows and columns258388 ! Node: Exchanging rows and columns260065 ! Node: Matrix operations261543 ! Node: Finding maximum and minimum elements of matrices263183 ! Node: Matrix properties265087 ! Node: Example programs for matrices265826 ! Node: Vector and Matrix References and Further Reading269897 ! Node: Permutations270383 ! Node: The Permutation struct271671 ! Node: Permutation allocation272175 ! Node: Accessing permutation elements273609 ! Node: Permutation properties274452 ! Node: Permutation functions275157 ! Node: Applying Permutations276414 ! Node: Reading and writing permutations278339 ! Ref: Reading and writing permutations-Footnote-1280554 ! Node: Permutations in cyclic form280666 ! Node: Permutation Examples284091 ! Node: Permutation References and Further Reading286634 ! Node: Combinations287308 ! Node: The Combination struct288153 ! Node: Combination allocation288705 ! Node: Accessing combination elements290490 ! Node: Combination properties291149 ! Node: Combination functions292035 ! Node: Reading and writing combinations292975 ! Ref: Reading and writing combinations-Footnote-1295209 ! Node: Combination Examples295321 ! Node: Combination References and Further Reading296629 ! Node: Sorting297033 ! Node: Sorting objects297983 ! Node: Sorting vectors300894 ! Node: Selecting the k smallest or largest elements303470 ! Node: Computing the rank306804 ! Node: Sorting Examples308005 ! Node: Sorting References and Further Reading309649 ! Node: BLAS Support310195 ! Node: GSL BLAS Interface313170 ! Node: Level 1 GSL BLAS Interface313657 ! Node: Level 2 GSL BLAS Interface320400 ! Node: Level 3 GSL BLAS Interface329694 ! Node: BLAS Examples340830 ! Node: BLAS References and Further Reading342251 ! Node: Linear Algebra343610 ! Node: LU Decomposition344735 ! Node: QR Decomposition349943 ! Node: QR Decomposition with Column Pivoting356148 ! Node: Singular Value Decomposition360558 ! Node: Cholesky Decomposition364148 ! Node: Tridiagonal Decomposition of Real Symmetric Matrices366862 ! Node: Tridiagonal Decomposition of Hermitian Matrices368710 ! Node: Hessenberg Decomposition of Real Matrices370665 ! Node: Hessenberg-Triangular Decomposition of Real Matrices373075 ! Node: Bidiagonalization374195 ! Node: Householder Transformations376618 ! Node: Householder solver for linear systems378970 ! Node: Tridiagonal Systems379875 ! Node: Balancing382747 ! Node: Linear Algebra Examples383548 ! Node: Linear Algebra References and Further Reading385536 ! Node: Eigensystems387026 ! Node: Real Symmetric Matrices388240 ! Node: Complex Hermitian Matrices390754 ! Node: Real Nonsymmetric Matrices393262 ! Node: Real Generalized Symmetric-Definite Eigensystems398465 ! Node: Complex Generalized Hermitian-Definite Eigensystems401337 ! Node: Real Generalized Nonsymmetric Eigensystems404044 ! Node: Sorting Eigenvalues and Eigenvectors410618 ! Node: Eigenvalue and Eigenvector Examples413895 ! Node: Eigenvalue and Eigenvector References419283 ! Node: Fast Fourier Transforms420308 ! Node: Mathematical Definitions421517 ! Node: Overview of complex data FFTs423922 ! Node: Radix-2 FFT routines for complex data426865 ! Node: Mixed-radix FFT routines for complex data431077 ! Node: Overview of real data FFTs440406 ! Node: Radix-2 FFT routines for real data442840 ! Node: Mixed-radix FFT routines for real data445847 ! Node: FFT References and Further Reading456427 ! Node: Numerical Integration459296 ! Node: Numerical Integration Introduction460841 ! Node: Integrands without weight functions463110 ! Node: Integrands with weight functions463939 ! Node: Integrands with singular weight functions464650 ! Node: QNG non-adaptive Gauss-Kronrod integration465568 ! Node: QAG adaptive integration466849 ! Node: QAGS adaptive integration with singularities469480 ! Node: QAGP adaptive integration with known singular points471280 ! Node: QAGI adaptive integration on infinite intervals472594 ! Node: QAWC adaptive integration for Cauchy principal values474887 ! Node: QAWS adaptive integration for singular functions476062 ! Node: QAWO adaptive integration for oscillatory functions479284 ! Node: QAWF adaptive integration for Fourier integrals483063 ! Node: Numerical integration error codes485688 ! Node: Numerical integration examples486456 ! Node: Numerical integration References and Further Reading488501 ! Node: Random Number Generation489230 ! Node: General comments on random numbers490732 ! Node: The Random Number Generator Interface492682 ! Node: Random number generator initialization494040 ! Node: Sampling from a random number generator496056 ! Node: Auxiliary random number generator functions499297 ! Node: Random number environment variables501617 ! Node: Copying random number generator state504143 ! Node: Reading and writing random number generator state505118 ! Node: Random number generator algorithms506530 ! Node: Unix random number generators516339 ! Node: Other random number generators520057 ! Node: Random Number Generator Performance528690 ! Node: Random Number Generator Examples530008 ! Node: Random Number References and Further Reading531564 ! Node: Random Number Acknowledgements532861 ! Node: Quasi-Random Sequences533347 ! Node: Quasi-random number generator initialization534454 ! Node: Sampling from a quasi-random number generator535469 ! Node: Auxiliary quasi-random number generator functions536166 ! Node: Saving and resorting quasi-random number generator state537112 ! Node: Quasi-random number generator algorithms537920 ! Node: Quasi-random number generator examples539057 ! Node: Quasi-random number references540042 ! Node: Random Number Distributions540568 ! Node: Random Number Distribution Introduction543767 ! Node: The Gaussian Distribution545562 ! Node: The Gaussian Tail Distribution548224 ! Node: The Bivariate Gaussian Distribution549893 ! Node: The Exponential Distribution551216 ! Node: The Laplace Distribution552355 ! Node: The Exponential Power Distribution553452 ! Node: The Cauchy Distribution554720 ! Node: The Rayleigh Distribution555969 ! Node: The Rayleigh Tail Distribution557141 ! Node: The Landau Distribution558013 ! Node: The Levy alpha-Stable Distributions558968 ! Node: The Levy skew alpha-Stable Distribution560026 ! Node: The Gamma Distribution561638 ! Node: The Flat (Uniform) Distribution563295 ! Node: The Lognormal Distribution564447 ! Node: The Chi-squared Distribution565795 ! Node: The F-distribution567199 ! Node: The t-distribution568835 ! Node: The Beta Distribution570229 ! Node: The Logistic Distribution571388 ! Node: The Pareto Distribution572517 ! Node: Spherical Vector Distributions573687 ! Node: The Weibull Distribution576521 ! Node: The Type-1 Gumbel Distribution577715 ! Node: The Type-2 Gumbel Distribution578952 ! Node: The Dirichlet Distribution580183 ! Node: General Discrete Distributions581851 ! Node: The Poisson Distribution585716 ! Node: The Bernoulli Distribution586724 ! Node: The Binomial Distribution587475 ! Node: The Multinomial Distribution588680 ! Node: The Negative Binomial Distribution590449 ! Node: The Pascal Distribution591814 ! Node: The Geometric Distribution592972 ! Node: The Hypergeometric Distribution594220 ! Node: The Logarithmic Distribution595873 ! Node: Shuffling and Sampling596664 ! Node: Random Number Distribution Examples599483 ! Node: Random Number Distribution References and Further Reading602679 ! Node: Statistics604745 ! Node: Mean and standard deviation and variance606040 ! Node: Absolute deviation609548 ! Node: Higher moments (skewness and kurtosis)610840 ! Node: Autocorrelation612973 ! Node: Covariance613787 ! Node: Correlation614763 ! Node: Weighted Samples615472 ! Node: Maximum and Minimum values621300 ! Node: Median and Percentiles624039 ! Node: Example statistical programs626454 ! Node: Statistics References and Further Reading629115 ! Node: Histograms630323 ! Node: The histogram struct632083 ! Node: Histogram allocation633886 ! Node: Copying Histograms636847 ! Node: Updating and accessing histogram elements637523 ! Node: Searching histogram ranges640790 ! Node: Histogram Statistics641789 ! Node: Histogram Operations643649 ! Node: Reading and writing histograms645721 ! Node: Resampling from histograms648763 ! Node: The histogram probability distribution struct649561 ! Node: Example programs for histograms652592 ! Node: Two dimensional histograms654655 ! Node: The 2D histogram struct655376 ! Node: 2D Histogram allocation657184 ! Node: Copying 2D Histograms659255 ! Node: Updating and accessing 2D histogram elements659960 ! Node: Searching 2D histogram ranges663615 ! Node: 2D Histogram Statistics664634 ! Node: 2D Histogram Operations667493 ! Node: Reading and writing 2D histograms669667 ! Node: Resampling from 2D histograms673296 ! Node: Example programs for 2D histograms676315 ! Node: N-tuples678143 ! Node: The ntuple struct679399 ! Node: Creating ntuples679877 ! Node: Opening an existing ntuple file680544 ! Node: Writing ntuples681172 ! Node: Reading ntuples681633 ! Node: Closing an ntuple file681964 ! Node: Histogramming ntuple values682304 ! Node: Example ntuple programs684310 ! Node: Ntuple References and Further Reading687639 ! Node: Monte Carlo Integration687960 ! Node: Monte Carlo Interface689205 ! Node: PLAIN Monte Carlo691828 ! Node: MISER694266 ! Node: VEGAS700104 ! Node: Monte Carlo Examples708439 ! Node: Monte Carlo Integration References and Further Reading714382 ! Node: Simulated Annealing715164 ! Node: Simulated Annealing algorithm716371 ! Node: Simulated Annealing functions717525 ! Node: Examples with Simulated Annealing722060 ! Node: Trivial example722614 ! Node: Traveling Salesman Problem725265 ! Node: Simulated Annealing References and Further Reading728578 ! Node: Ordinary Differential Equations728989 ! Node: Defining the ODE System729810 ! Node: Stepping Functions732002 ! Node: Adaptive Step-size Control736347 ! Node: Evolution741805 ! Node: ODE Example programs745422 ! Node: ODE References and Further Reading750661 ! Node: Interpolation751300 ! Node: Introduction to Interpolation752313 ! Node: Interpolation Functions752754 ! Node: Interpolation Types753961 ! Node: Index Look-up and Acceleration756571 ! Node: Evaluation of Interpolating Functions758366 ! Node: Higher-level Interface760750 ! Node: Interpolation Example programs762789 ! Node: Interpolation References and Further Reading766039 ! Node: Numerical Differentiation766612 ! Node: Numerical Differentiation functions767201 ! Node: Numerical Differentiation Examples770059 ! Node: Numerical Differentiation References771472 ! Node: Chebyshev Approximations772023 ! Node: Chebyshev Definitions773039 ! Node: Creation and Calculation of Chebyshev Series773829 ! Node: Chebyshev Series Evaluation774801 ! Node: Derivatives and Integrals776185 ! Node: Chebyshev Approximation examples777427 ! Node: Chebyshev Approximation References and Further Reading778923 ! Node: Series Acceleration779372 ! Node: Acceleration functions780137 ! Node: Acceleration functions without error estimation782462 ! Node: Example of accelerating a series785072 ! Node: Series Acceleration References787418 ! Node: Wavelet Transforms788306 ! Node: DWT Definitions788847 ! Node: DWT Initialization789799 ! Node: DWT Transform Functions792378 ! Node: DWT in one dimension792913 ! Node: DWT in two dimension794932 ! Node: DWT Examples799533 ! Node: DWT References801350 ! Node: Discrete Hankel Transforms803513 ! Node: Discrete Hankel Transform Definition803981 ! Node: Discrete Hankel Transform Functions806120 ! Node: Discrete Hankel Transform References807651 ! Node: One dimensional Root-Finding808055 ! Node: Root Finding Overview809315 ! Node: Root Finding Caveats811173 ! Node: Initializing the Solver812940 ! Node: Providing the function to solve815573 ! Node: Search Bounds and Guesses819339 ! Node: Root Finding Iteration820200 ! Node: Search Stopping Parameters822049 ! Node: Root Bracketing Algorithms824563 ! Node: Root Finding Algorithms using Derivatives827861 ! Node: Root Finding Examples831364 ! Node: Root Finding References and Further Reading838652 ! Node: One dimensional Minimization839291 ! Node: Minimization Overview840593 ! Node: Minimization Caveats842299 ! Node: Initializing the Minimizer843636 ! Node: Providing the function to minimize845877 ! Node: Minimization Iteration846355 ! Node: Minimization Stopping Parameters848491 ! Node: Minimization Algorithms850100 ! Node: Minimization Examples852539 ! Node: Minimization References and Further Reading855466 ! Node: Multidimensional Root-Finding855922 ! Node: Overview of Multidimensional Root Finding857411 ! Node: Initializing the Multidimensional Solver859598 ! Node: Providing the multidimensional system of equations to solve862829 ! Node: Iteration of the multidimensional solver867734 ! Node: Search Stopping Parameters for the multidimensional solver870013 ! Node: Algorithms using Derivatives871750 ! Node: Algorithms without Derivatives876496 ! Node: Example programs for Multidimensional Root finding879584 ! Node: References and Further Reading for Multidimensional Root Finding888197 ! Node: Multidimensional Minimization889436 ! Node: Multimin Overview890728 ! Node: Multimin Caveats892700 ! Node: Initializing the Multidimensional Minimizer893449 ! Node: Providing a function to minimize896610 ! Node: Multimin Iteration900662 ! Node: Multimin Stopping Criteria902653 ! Node: Multimin Algorithms904205 ! Node: Multimin Examples909164 ! Node: Multimin References and Further Reading915784 ! Node: Least-Squares Fitting916647 ! Node: Fitting Overview917646 ! Node: Linear regression919980 ! Node: Linear fitting without a constant term922582 ! Node: Multi-parameter fitting924775 ! Node: Fitting Examples930425 ! Node: Fitting References and Further Reading937250 ! Node: Nonlinear Least-Squares Fitting938072 ! Node: Overview of Nonlinear Least-Squares Fitting939522 ! Node: Initializing the Nonlinear Least-Squares Solver940989 ! Node: Providing the Function to be Minimized943842 ! Node: Iteration of the Minimization Algorithm946779 ! Node: Search Stopping Parameters for Minimization Algorithms948629 ! Node: Minimization Algorithms using Derivatives950724 ! Node: Minimization Algorithms without Derivatives953972 ! Node: Computing the covariance matrix of best fit parameters954364 ! Node: Example programs for Nonlinear Least-Squares Fitting956398 ! Node: References and Further Reading for Nonlinear Least-Squares Fitting964126 ! Node: Basis Splines964862 ! Node: Overview of B-splines965437 ! Node: Initializing the B-splines solver966720 ! Node: Constructing the knots vector967463 ! Node: Evaluation of B-spline basis functions968250 ! Node: Example programs for B-splines969184 ! Node: References and Further Reading973189 ! Node: Physical Constants973703 ! Node: Fundamental Constants975113 ! Node: Astronomy and Astrophysics976252 ! Node: Atomic and Nuclear Physics976917 ! Node: Measurement of Time978554 ! Node: Imperial Units978984 ! Node: Speed and Nautical Units979426 ! Node: Printers Units979930 ! Node: Volume Area and Length980253 ! Node: Mass and Weight980939 ! Node: Thermal Energy and Power981758 ! Node: Pressure982181 ! Node: Viscosity982794 ! Node: Light and Illumination983070 ! Node: Radioactivity983662 ! Node: Force and Energy983997 ! Node: Prefixes984401 ! Node: Physical Constant Examples985144 ! Node: Physical Constant References and Further Reading986933 ! Node: IEEE floating-point arithmetic987644 ! Node: Representation of floating point numbers988230 ! Node: Setting up your IEEE environment992711 ! Node: IEEE References and Further Reading999703 ! Node: Debugging Numerical Programs1000858 ! Node: Using gdb1001342 ! Node: Examining floating point registers1004685 ! Node: Handling floating point exceptions1005970 ! Node: GCC warning options for numerical programs1007382 ! Node: Debugging References1011575 ! Node: Contributors to GSL1012287 ! Node: Autoconf Macros1016522 ! Node: GSL CBLAS Library1020551 ! Node: Level 1 CBLAS Functions1021078 ! Node: Level 2 CBLAS Functions1026380 ! Node: Level 3 CBLAS Functions1043050 ! Node: GSL CBLAS Examples1052712 ! Node: Free Software Needs Free Documentation1054274 ! Node: GNU General Public License1059343 ! Node: GNU Free Documentation License1096955 ! Node: Function Index1119386 ! Node: Variable Index1360881 ! Node: Type Index1362053 ! Node: Concept Index1365699  End Tag Table --- 23,608 ----  Indirect: ! gsl-ref.info-1: 931 ! gsl-ref.info-2: 299527 ! gsl-ref.info-3: 598896 ! gsl-ref.info-4: 898337 ! gsl-ref.info-5: 1131697 ! gsl-ref.info-6: 1380540  Tag Table: (Indirect) ! Node: Top931 ! Node: Introduction3630 ! Node: Routines available in GSL4282 ! Node: GSL is Free Software6197 ! Node: Obtaining GSL8589 ! Node: No Warranty9730 ! Node: Reporting Bugs10236 ! Node: Further Information11120 ! Node: Conventions used in this manual12133 ! Node: Using the library12897 ! Node: An Example Program13483 ! Ref: An Example Program-Footnote-114226 ! Node: Compiling and Linking14333 ! Node: Linking programs with the library15403 ! Node: Linking with an alternative BLAS library16548 ! Node: Shared Libraries17478 ! Node: ANSI C Compliance18894 ! Node: Inline functions19987 ! Node: Long double21525 ! Node: Portability functions23113 ! Node: Alternative optimized functions24510 ! Node: Support for different numeric types25968 ! Node: Compatibility with C++29031 ! Node: Aliasing of arrays29603 ! Node: Thread-safety30354 ! Node: Deprecated Functions31441 ! Node: Code Reuse32066 ! Node: Error Handling32710 ! Node: Error Reporting33460 ! Node: Error Codes35352 ! Node: Error Handlers37208 ! Node: Using GSL error reporting in your own functions40845 ! Node: Error Reporting Examples42803 ! Node: Mathematical Functions44015 ! Node: Mathematical Constants44776 ! Node: Infinities and Not-a-number45906 ! Ref: Infinities and Not-a-number-Footnote-147013 ! Node: Elementary Functions47423 ! Node: Small integer powers49870 ! Node: Testing the Sign of Numbers51454 ! Node: Testing for Odd and Even Numbers51885 ! Node: Maximum and Minimum functions52441 ! Node: Approximate Comparison of Floating Point Numbers54716 ! Node: Complex Numbers56075 ! Ref: Complex Numbers-Footnote-157401 ! Node: Representation of complex numbers57465 ! Node: Properties of complex numbers59402 ! Node: Complex arithmetic operators60407 ! Node: Elementary Complex Functions63153 ! Node: Complex Trigonometric Functions64973 ! Node: Inverse Complex Trigonometric Functions66194 ! Node: Complex Hyperbolic Functions68800 ! Node: Inverse Complex Hyperbolic Functions70096 ! Node: Complex Number References and Further Reading72084 ! Node: Polynomials73480 ! Node: Polynomial Evaluation74247 ! Node: Divided Difference Representation of Polynomials75278 ! Node: Quadratic Equations77027 ! Node: Cubic Equations78967 ! Node: General Polynomial Equations80549 ! Node: Roots of Polynomials Examples82894 ! Node: Roots of Polynomials References and Further Reading84283 ! Node: Special Functions85228 ! Node: Special Function Usage87222 ! Node: The gsl_sf_result struct88405 ! Node: Special Function Modes89669 ! Node: Airy Functions and Derivatives90605 ! Node: Airy Functions91301 ! Node: Derivatives of Airy Functions92661 ! Node: Zeros of Airy Functions94173 ! Node: Zeros of Derivatives of Airy Functions94892 ! Node: Bessel Functions95651 ! Node: Regular Cylindrical Bessel Functions96843 ! Node: Irregular Cylindrical Bessel Functions98167 ! Node: Regular Modified Cylindrical Bessel Functions99623 ! Node: Irregular Modified Cylindrical Bessel Functions102450 ! Node: Regular Spherical Bessel Functions105418 ! Node: Irregular Spherical Bessel Functions107630 ! Node: Regular Modified Spherical Bessel Functions109317 ! Node: Irregular Modified Spherical Bessel Functions111320 ! Node: Regular Bessel Function - Fractional Order113383 ! Node: Irregular Bessel Functions - Fractional Order114381 ! Node: Regular Modified Bessel Functions - Fractional Order114963 ! Node: Irregular Modified Bessel Functions - Fractional Order115888 ! Node: Zeros of Regular Bessel Functions117124 ! Node: Clausen Functions118227 ! Node: Coulomb Functions118831 ! Node: Normalized Hydrogenic Bound States119280 ! Node: Coulomb Wave Functions120393 ! Node: Coulomb Wave Function Normalization Constant123803 ! Node: Coupling Coefficients124556 ! Node: 3-j Symbols125279 ! Node: 6-j Symbols125883 ! Node: 9-j Symbols126507 ! Node: Dawson Function127213 ! Node: Debye Functions127780 ! Node: Dilogarithm129554 ! Node: Real Argument129849 ! Node: Complex Argument130542 ! Node: Elementary Operations131011 ! Node: Elliptic Integrals131835 ! Node: Definition of Legendre Forms132407 ! Node: Definition of Carlson Forms133227 ! Node: Legendre Form of Complete Elliptic Integrals133924 ! Node: Legendre Form of Incomplete Elliptic Integrals135492 ! Node: Carlson Forms137680 ! Node: Elliptic Functions (Jacobi)139227 ! Node: Error Functions139808 ! Node: Error Function140259 ! Node: Complementary Error Function140632 ! Node: Log Complementary Error Function141092 ! Node: Probability functions141544 ! Node: Exponential Functions142797 ! Node: Exponential Function143180 ! Node: Relative Exponential Functions144403 ! Node: Exponentiation With Error Estimate146074 ! Node: Exponential Integrals147283 ! Node: Exponential Integral147765 ! Node: Ei(x)148692 ! Node: Hyperbolic Integrals149140 ! Node: Ei_3(x)149796 ! Node: Trigonometric Integrals150188 ! Node: Arctangent Integral150787 ! Node: Fermi-Dirac Function151187 ! Node: Complete Fermi-Dirac Integrals151557 ! Node: Incomplete Fermi-Dirac Integrals154125 ! Node: Gamma and Beta Functions154768 ! Node: Gamma Functions155204 ! Node: Factorials158325 ! Node: Pochhammer Symbol160878 ! Node: Incomplete Gamma Functions162390 ! Node: Beta Functions163639 ! Node: Incomplete Beta Function164391 ! Node: Gegenbauer Functions165102 ! Node: Hypergeometric Functions166752 ! Node: Laguerre Functions171032 ! Node: Lambert W Functions172595 ! Node: Legendre Functions and Spherical Harmonics173633 ! Node: Legendre Polynomials174222 ! Node: Associated Legendre Polynomials and Spherical Harmonics176302 ! Node: Conical Functions179183 ! Node: Radial Functions for Hyperbolic Space181306 ! Node: Logarithm and Related Functions183483 ! Node: Mathieu Functions185107 ! Node: Mathieu Function Workspace186456 ! Node: Mathieu Function Characteristic Values187269 ! Node: Angular Mathieu Functions188337 ! Node: Radial Mathieu Functions189369 ! Node: Power Function190607 ! Node: Psi (Digamma) Function191534 ! Node: Digamma Function192054 ! Node: Trigamma Function192884 ! Node: Polygamma Function193461 ! Node: Synchrotron Functions193845 ! Node: Transport Functions194608 ! Node: Trigonometric Functions195755 ! Node: Circular Trigonometric Functions196378 ! Node: Trigonometric Functions for Complex Arguments197387 ! Node: Hyperbolic Trigonometric Functions198421 ! Node: Conversion Functions199024 ! Node: Restriction Functions199807 ! Node: Trigonometric Functions With Error Estimates200739 ! Node: Zeta Functions201649 ! Node: Riemann Zeta Function202107 ! Node: Riemann Zeta Function Minus One202786 ! Node: Hurwitz Zeta Function203557 ! Node: Eta Function204062 ! Node: Special Functions Examples204621 ! Node: Special Functions References and Further Reading206315 ! Node: Vectors and Matrices207422 ! Node: Data types208181 ! Node: Blocks209384 ! Node: Block allocation210300 ! Node: Reading and writing blocks211784 ! Node: Example programs for blocks213848 ! Node: Vectors214475 ! Node: Vector allocation216361 ! Node: Accessing vector elements217979 ! Node: Initializing vector elements220462 ! Node: Reading and writing vectors221156 ! Node: Vector views223246 ! Node: Copying vectors230688 ! Node: Exchanging elements231548 ! Node: Vector operations232106 ! Node: Finding maximum and minimum elements of vectors233559 ! Node: Vector properties235145 ! Node: Example programs for vectors235910 ! Node: Matrices238199 ! Node: Matrix allocation241057 ! Node: Accessing matrix elements242724 ! Node: Initializing matrix elements244673 ! Node: Reading and writing matrices245469 ! Node: Matrix views247572 ! Node: Creating row and column views254712 ! Node: Copying matrices259183 ! Node: Copying rows and columns259779 ! Node: Exchanging rows and columns261456 ! Node: Matrix operations262934 ! Node: Finding maximum and minimum elements of matrices264574 ! Node: Matrix properties266478 ! Node: Example programs for matrices267370 ! Node: Vector and Matrix References and Further Reading271441 ! Node: Permutations271927 ! Node: The Permutation struct273215 ! Node: Permutation allocation273719 ! Node: Accessing permutation elements275153 ! Node: Permutation properties275996 ! Node: Permutation functions276701 ! Node: Applying Permutations277958 ! Node: Reading and writing permutations279883 ! Ref: Reading and writing permutations-Footnote-1282098 ! Node: Permutations in cyclic form282210 ! Node: Permutation Examples285635 ! Node: Permutation References and Further Reading288178 ! Node: Combinations288852 ! Node: The Combination struct289697 ! Node: Combination allocation290249 ! Node: Accessing combination elements292034 ! Node: Combination properties292693 ! Node: Combination functions293579 ! Node: Reading and writing combinations294519 ! Ref: Reading and writing combinations-Footnote-1296753 ! Node: Combination Examples296865 ! Node: Combination References and Further Reading298173 ! Node: Sorting298577 ! Node: Sorting objects299527 ! Node: Sorting vectors302438 ! Node: Selecting the k smallest or largest elements305014 ! Node: Computing the rank308348 ! Node: Sorting Examples309549 ! Node: Sorting References and Further Reading311193 ! Node: BLAS Support311739 ! Node: GSL BLAS Interface314893 ! Node: Level 1 GSL BLAS Interface315380 ! Node: Level 2 GSL BLAS Interface322123 ! Node: Level 3 GSL BLAS Interface331417 ! Node: BLAS Examples342557 ! Node: BLAS References and Further Reading343978 ! Node: Linear Algebra345337 ! Node: LU Decomposition346462 ! Node: QR Decomposition351707 ! Node: QR Decomposition with Column Pivoting358016 ! Node: Singular Value Decomposition362471 ! Node: Cholesky Decomposition366442 ! Node: Tridiagonal Decomposition of Real Symmetric Matrices369527 ! Node: Tridiagonal Decomposition of Hermitian Matrices371375 ! Node: Hessenberg Decomposition of Real Matrices373330 ! Node: Hessenberg-Triangular Decomposition of Real Matrices375740 ! Node: Bidiagonalization376860 ! Node: Householder Transformations379285 ! Node: Householder solver for linear systems381637 ! Node: Tridiagonal Systems382542 ! Node: Balancing385414 ! Node: Linear Algebra Examples386215 ! Node: Linear Algebra References and Further Reading388203 ! Node: Eigensystems389848 ! Node: Real Symmetric Matrices391062 ! Node: Complex Hermitian Matrices393576 ! Node: Real Nonsymmetric Matrices396084 ! Node: Real Generalized Symmetric-Definite Eigensystems401287 ! Node: Complex Generalized Hermitian-Definite Eigensystems404159 ! Node: Real Generalized Nonsymmetric Eigensystems406866 ! Node: Sorting Eigenvalues and Eigenvectors413440 ! Node: Eigenvalue and Eigenvector Examples416717 ! Node: Eigenvalue and Eigenvector References422105 ! Node: Fast Fourier Transforms423130 ! Node: Mathematical Definitions424339 ! Node: Overview of complex data FFTs426744 ! Node: Radix-2 FFT routines for complex data429687 ! Node: Mixed-radix FFT routines for complex data433899 ! Node: Overview of real data FFTs443228 ! Node: Radix-2 FFT routines for real data445662 ! Node: Mixed-radix FFT routines for real data450091 ! Node: FFT References and Further Reading460765 ! Node: Numerical Integration463634 ! Node: Numerical Integration Introduction465179 ! Node: Integrands without weight functions467448 ! Node: Integrands with weight functions468277 ! Node: Integrands with singular weight functions468988 ! Node: QNG non-adaptive Gauss-Kronrod integration469906 ! Node: QAG adaptive integration471187 ! Node: QAGS adaptive integration with singularities473818 ! Node: QAGP adaptive integration with known singular points475618 ! Node: QAGI adaptive integration on infinite intervals476932 ! Node: QAWC adaptive integration for Cauchy principal values479225 ! Node: QAWS adaptive integration for singular functions480400 ! Node: QAWO adaptive integration for oscillatory functions483622 ! Node: QAWF adaptive integration for Fourier integrals487401 ! Node: Numerical integration error codes490026 ! Node: Numerical integration examples490794 ! Node: Numerical integration References and Further Reading492839 ! Node: Random Number Generation493568 ! Node: General comments on random numbers495070 ! Node: The Random Number Generator Interface497020 ! Node: Random number generator initialization498378 ! Node: Sampling from a random number generator500751 ! Node: Auxiliary random number generator functions503992 ! Node: Random number environment variables506312 ! Node: Copying random number generator state508838 ! Node: Reading and writing random number generator state509813 ! Node: Random number generator algorithms511207 ! Node: Unix random number generators521016 ! Node: Other random number generators524734 ! Node: Random Number Generator Performance533367 ! Node: Random Number Generator Examples534685 ! Node: Random Number References and Further Reading536241 ! Node: Random Number Acknowledgements537538 ! Node: Quasi-Random Sequences538024 ! Node: Quasi-random number generator initialization539131 ! Node: Sampling from a quasi-random number generator540146 ! Node: Auxiliary quasi-random number generator functions540843 ! Node: Saving and resorting quasi-random number generator state541789 ! Node: Quasi-random number generator algorithms542597 ! Node: Quasi-random number generator examples543733 ! Node: Quasi-random number references544718 ! Node: Random Number Distributions545244 ! Node: Random Number Distribution Introduction548443 ! Node: The Gaussian Distribution550238 ! Node: The Gaussian Tail Distribution552900 ! Node: The Bivariate Gaussian Distribution554569 ! Node: The Exponential Distribution555892 ! Node: The Laplace Distribution557031 ! Node: The Exponential Power Distribution558128 ! Node: The Cauchy Distribution559396 ! Node: The Rayleigh Distribution560645 ! Node: The Rayleigh Tail Distribution561817 ! Node: The Landau Distribution562689 ! Node: The Levy alpha-Stable Distributions563644 ! Node: The Levy skew alpha-Stable Distribution564702 ! Node: The Gamma Distribution566314 ! Node: The Flat (Uniform) Distribution567971 ! Node: The Lognormal Distribution569123 ! Node: The Chi-squared Distribution570471 ! Node: The F-distribution571875 ! Node: The t-distribution573511 ! Node: The Beta Distribution574905 ! Node: The Logistic Distribution576064 ! Node: The Pareto Distribution577193 ! Node: Spherical Vector Distributions578363 ! Node: The Weibull Distribution581197 ! Node: The Type-1 Gumbel Distribution582391 ! Node: The Type-2 Gumbel Distribution583628 ! Node: The Dirichlet Distribution584859 ! Node: General Discrete Distributions586527 ! Node: The Poisson Distribution590392 ! Node: The Bernoulli Distribution591400 ! Node: The Binomial Distribution592151 ! Node: The Multinomial Distribution593356 ! Node: The Negative Binomial Distribution595125 ! Node: The Pascal Distribution596490 ! Node: The Geometric Distribution597648 ! Node: The Hypergeometric Distribution598896 ! Node: The Logarithmic Distribution600549 ! Node: Shuffling and Sampling601340 ! Node: Random Number Distribution Examples604159 ! Node: Random Number Distribution References and Further Reading607355 ! Node: Statistics609421 ! Node: Mean and standard deviation and variance610716 ! Node: Absolute deviation614224 ! Node: Higher moments (skewness and kurtosis)615516 ! Node: Autocorrelation617649 ! Node: Covariance618463 ! Node: Correlation619439 ! Node: Weighted Samples620148 ! Node: Maximum and Minimum values625976 ! Node: Median and Percentiles628715 ! Node: Example statistical programs631130 ! Node: Statistics References and Further Reading633791 ! Node: Histograms634999 ! Node: The histogram struct636759 ! Node: Histogram allocation638562 ! Node: Copying Histograms641523 ! Node: Updating and accessing histogram elements642199 ! Node: Searching histogram ranges645466 ! Node: Histogram Statistics646465 ! Node: Histogram Operations648325 ! Node: Reading and writing histograms650397 ! Node: Resampling from histograms653439 ! Node: The histogram probability distribution struct654237 ! Node: Example programs for histograms657268 ! Node: Two dimensional histograms659331 ! Node: The 2D histogram struct660052 ! Node: 2D Histogram allocation661860 ! Node: Copying 2D Histograms663931 ! Node: Updating and accessing 2D histogram elements664636 ! Node: Searching 2D histogram ranges668292 ! Node: 2D Histogram Statistics669311 ! Node: 2D Histogram Operations672170 ! Node: Reading and writing 2D histograms674344 ! Node: Resampling from 2D histograms677973 ! Node: Example programs for 2D histograms680992 ! Node: N-tuples682820 ! Node: The ntuple struct684076 ! Node: Creating ntuples684554 ! Node: Opening an existing ntuple file685221 ! Node: Writing ntuples685849 ! Node: Reading ntuples686310 ! Node: Closing an ntuple file686641 ! Node: Histogramming ntuple values686981 ! Node: Example ntuple programs688987 ! Node: Ntuple References and Further Reading692316 ! Node: Monte Carlo Integration692637 ! Node: Monte Carlo Interface693882 ! Node: PLAIN Monte Carlo696505 ! Node: MISER698943 ! Node: VEGAS704781 ! Node: Monte Carlo Examples713116 ! Node: Monte Carlo Integration References and Further Reading719059 ! Node: Simulated Annealing719841 ! Node: Simulated Annealing algorithm721048 ! Node: Simulated Annealing functions722202 ! Node: Examples with Simulated Annealing726737 ! Node: Trivial example727291 ! Node: Traveling Salesman Problem729942 ! Node: Simulated Annealing References and Further Reading733255 ! Node: Ordinary Differential Equations733666 ! Node: Defining the ODE System734487 ! Node: Stepping Functions736679 ! Node: Adaptive Step-size Control741024 ! Node: Evolution746482 ! Node: ODE Example programs750099 ! Node: ODE References and Further Reading755338 ! Node: Interpolation755977 ! Node: Introduction to Interpolation756990 ! Node: Interpolation Functions757431 ! Node: Interpolation Types758638 ! Node: Index Look-up and Acceleration761248 ! Node: Evaluation of Interpolating Functions763043 ! Node: Higher-level Interface765427 ! Node: Interpolation Example programs767466 ! Node: Interpolation References and Further Reading770716 ! Node: Numerical Differentiation771289 ! Node: Numerical Differentiation functions771878 ! Node: Numerical Differentiation Examples774736 ! Node: Numerical Differentiation References776149 ! Node: Chebyshev Approximations776700 ! Node: Chebyshev Definitions777761 ! Node: Creation and Calculation of Chebyshev Series778551 ! Node: Auxiliary Functions for Chebyshev Series779536 ! Node: Chebyshev Series Evaluation780276 ! Node: Derivatives and Integrals781656 ! Node: Chebyshev Approximation Examples782898 ! Node: Chebyshev Approximation References and Further Reading784394 ! Node: Series Acceleration784843 ! Node: Acceleration functions785608 ! Node: Acceleration functions without error estimation787933 ! Node: Example of accelerating a series790543 ! Node: Series Acceleration References792889 ! Node: Wavelet Transforms793777 ! Node: DWT Definitions794318 ! Node: DWT Initialization795270 ! Node: DWT Transform Functions797849 ! Node: DWT in one dimension798384 ! Node: DWT in two dimension800403 ! Node: DWT Examples805004 ! Node: DWT References806821 ! Node: Discrete Hankel Transforms808984 ! Node: Discrete Hankel Transform Definition809452 ! Node: Discrete Hankel Transform Functions811591 ! Node: Discrete Hankel Transform References813122 ! Node: One dimensional Root-Finding813526 ! Node: Root Finding Overview814786 ! Node: Root Finding Caveats816644 ! Node: Initializing the Solver818411 ! Node: Providing the function to solve821044 ! Node: Search Bounds and Guesses824810 ! Node: Root Finding Iteration825671 ! Node: Search Stopping Parameters827520 ! Node: Root Bracketing Algorithms830034 ! Node: Root Finding Algorithms using Derivatives833332 ! Node: Root Finding Examples836835 ! Node: Root Finding References and Further Reading844123 ! Node: One dimensional Minimization844762 ! Node: Minimization Overview846064 ! Node: Minimization Caveats847770 ! Node: Initializing the Minimizer849107 ! Node: Providing the function to minimize851348 ! Node: Minimization Iteration851826 ! Node: Minimization Stopping Parameters853962 ! Node: Minimization Algorithms855571 ! Node: Minimization Examples858010 ! Node: Minimization References and Further Reading860937 ! Node: Multidimensional Root-Finding861393 ! Node: Overview of Multidimensional Root Finding862882 ! Node: Initializing the Multidimensional Solver865069 ! Node: Providing the multidimensional system of equations to solve868300 ! Node: Iteration of the multidimensional solver873205 ! Node: Search Stopping Parameters for the multidimensional solver875484 ! Node: Algorithms using Derivatives877221 ! Node: Algorithms without Derivatives881967 ! Node: Example programs for Multidimensional Root finding885055 ! Node: References and Further Reading for Multidimensional Root Finding893668 ! Node: Multidimensional Minimization894907 ! Node: Multimin Overview896260 ! Node: Multimin Caveats898337 ! Node: Initializing the Multidimensional Minimizer899086 ! Node: Providing a function to minimize902247 ! Node: Multimin Iteration906299 ! Node: Multimin Stopping Criteria908290 ! Node: Multimin Algorithms with Derivatives909859 ! Node: Multimin Algorithms without Derivatives913387 ! Node: Multimin Examples915562 ! Node: Multimin References and Further Reading922142 ! Node: Least-Squares Fitting923007 ! Node: Fitting Overview924006 ! Node: Linear regression926340 ! Node: Linear fitting without a constant term928942 ! Node: Multi-parameter fitting931135 ! Node: Fitting Examples936785 ! Node: Fitting References and Further Reading943610 ! Node: Nonlinear Least-Squares Fitting944432 ! Node: Overview of Nonlinear Least-Squares Fitting945882 ! Node: Initializing the Nonlinear Least-Squares Solver947349 ! Node: Providing the Function to be Minimized950202 ! Node: Iteration of the Minimization Algorithm953139 ! Node: Search Stopping Parameters for Minimization Algorithms954989 ! Node: Minimization Algorithms using Derivatives957084 ! Node: Minimization Algorithms without Derivatives960332 ! Node: Computing the covariance matrix of best fit parameters960724 ! Node: Example programs for Nonlinear Least-Squares Fitting962758 ! Node: References and Further Reading for Nonlinear Least-Squares Fitting970486 ! Node: Basis Splines971222 ! Node: Overview of B-splines971851 ! Node: Initializing the B-splines solver973134 ! Node: Constructing the knots vector974466 ! Node: Evaluation of B-spline basis functions975253 ! Node: Evaluation of B-spline basis function derivatives976812 ! Node: Example programs for B-splines978731 ! Node: References and Further Reading982747 ! Node: Physical Constants983291 ! Node: Fundamental Constants984701 ! Node: Astronomy and Astrophysics985840 ! Node: Atomic and Nuclear Physics986505 ! Node: Measurement of Time988142 ! Node: Imperial Units988572 ! Node: Speed and Nautical Units989014 ! Node: Printers Units989518 ! Node: Volume Area and Length989841 ! Node: Mass and Weight990527 ! Node: Thermal Energy and Power991346 ! Node: Pressure991769 ! Node: Viscosity992382 ! Node: Light and Illumination992658 ! Node: Radioactivity993250 ! Node: Force and Energy993585 ! Node: Prefixes993989 ! Node: Physical Constant Examples994732 ! Node: Physical Constant References and Further Reading996521 ! Node: IEEE floating-point arithmetic997232 ! Node: Representation of floating point numbers997818 ! Node: Setting up your IEEE environment1002299 ! Node: IEEE References and Further Reading1009291 ! Node: Debugging Numerical Programs1010446 ! Node: Using gdb1010930 ! Node: Examining floating point registers1014273 ! Node: Handling floating point exceptions1015558 ! Node: GCC warning options for numerical programs1016970 ! Node: Debugging References1021149 ! Node: Contributors to GSL1021861 ! Node: Autoconf Macros1026096 ! Node: GSL CBLAS Library1030125 ! Node: Level 1 CBLAS Functions1030652 ! Node: Level 2 CBLAS Functions1035954 ! Node: Level 3 CBLAS Functions1052624 ! Node: GSL CBLAS Examples1062286 ! Node: Free Software Needs Free Documentation1063848 ! Node: GNU General Public License1068917 ! Node: GNU Free Documentation License1106529 ! Node: Function Index1131697 ! Node: Variable Index1375646 ! Node: Type Index1376818 ! Node: Concept Index1380540  End Tag Table diff -a -rc -C 2 -P gsl-1.11/doc/gsl-ref.info-1 gsl-1.12/doc/gsl-ref.info-1 *** gsl-1.11/doc/gsl-ref.info-1 Sat Mar 29 15:07:29 2008 --- gsl-1.12/doc/gsl-ref.info-1 Mon Dec 15 15:28:50 2008 *************** *** 1,4 **** ! This is gsl-ref.info, produced by makeinfo version 4.8 from gsl-ref.texi. INFO-DIR-SECTION Scientific software --- 1,4 ---- ! This is gsl-ref.info, produced by makeinfo version 4.11 from gsl-ref.texi. INFO-DIR-SECTION Scientific software *************** *** 7,16 **** END-INFO-DIR-ENTRY Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, ! 2005, 2006, 2007 The GSL Team. Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with the Invariant Sections being "GNU General Public License" and "Free Software Needs Free Documentation", the Front-Cover text being "A GNU Manual", --- 7,16 ---- END-INFO-DIR-ENTRY Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, ! 2005, 2006, 2007, 2008 The GSL Team. Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "GNU General Public License" and "Free Software Needs Free Documentation", the Front-Cover text being "A GNU Manual", *************** *** 29,35 **** This file documents the GNU Scientific Library (GSL), a collection of numerical routines for scientific computing. It corresponds to release ! 1.11 of the library. Please report any errors in this manual to . More information about GSL can be found at the project homepage, --- 29,35 ---- This file documents the GNU Scientific Library (GSL), a collection of numerical routines for scientific computing. It corresponds to release ! 1.12 of the library. Please report any errors in this manual to . More information about GSL can be found at the project homepage, *************** *** 43,52 **** project homepage thanks to Daisuke Tominaga. Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, ! 2005, 2006, 2007 The GSL Team. Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with the Invariant Sections being "GNU General Public License" and "Free Software Needs Free Documentation", the Front-Cover text being "A GNU Manual", --- 43,52 ---- project homepage thanks to Daisuke Tominaga. Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, ! 2005, 2006, 2007, 2008 The GSL Team. Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "GNU General Public License" and "Free Software Needs Free Documentation", the Front-Cover text being "A GNU Manual", *************** *** 478,484 **** $ gcc example.o -lgsl -lcblas -latlas -lm ! For more information see *Note BLAS Support::.  File: gsl-ref.info, Node: Shared Libraries, Next: ANSI C Compliance, Prev: Compiling and Linking, Up: Using the library --- 478,484 ---- $ gcc example.o -lgsl -lcblas -latlas -lm ! For more information see *note BLAS Support::.  File: gsl-ref.info, Node: Shared Libraries, Next: ANSI C Compliance, Prev: Compiling and Linking, Up: Using the library *************** *** 554,564 **** ==================== The `inline' keyword is not part of the original ANSI C standard (C89) ! and the library does not export any inline function definitions by ! default. However, the library provides optional inline versions of ! performance-critical functions by conditional compilation. The inline ! versions of these functions can be included by defining the macro ! `HAVE_INLINE' when compiling an application, $ gcc -Wall -c -DHAVE_INLINE example.c --- 554,569 ---- ==================== The `inline' keyword is not part of the original ANSI C standard (C89) ! so the library does not export any inline function definitions by ! default. Inline functions were introduced officially in the newer C99 ! standard but most C89 compilers have also included `inline' as an ! extension for a long time. ! ! To allow the use of inline functions, the library provides optional ! inline versions of performance-critical routines by conditional ! compilation in the exported header files. The inline versions of these ! functions can be included by defining the macro `HAVE_INLINE' when ! compiling an application, $ gcc -Wall -c -DHAVE_INLINE example.c *************** *** 566,575 **** do not define the macro `HAVE_INLINE' then the slower non-inlined versions of the functions will be used instead. ! Note that the actual usage of the inline keyword is `extern inline', ! which eliminates unnecessary function definitions in GCC. If the form ! `extern inline' causes problems with other compilers a stricter ! autoconf test can be used, see *Note Autoconf Macros::.  File: gsl-ref.info, Node: Long double, Next: Portability functions, Prev: Inline functions, Up: Using the library --- 571,586 ---- do not define the macro `HAVE_INLINE' then the slower non-inlined versions of the functions will be used instead. ! By default, the actual form of the inline keyword is `extern ! inline', which is a `gcc' extension that eliminates unnecessary ! function definitions. If the form `extern inline' causes problems with ! other compilers a stricter autoconf test can be used, see *note ! Autoconf Macros::. ! ! When compiling with `gcc' in C99 mode (`gcc -std=c99') the header ! files automatically switch to C99-compatible inline function ! declarations instead of `extern inline'. With other C99 compilers, ! define the macro `GSL_C99_INLINE' to use these declarations.  File: gsl-ref.info, Node: Long double, Next: Portability functions, Prev: Inline functions, Up: Using the library *************** *** 634,640 **** The application source files can then use the include command `#include ' to replace each occurrence of `hypot' by `gsl_hypot' when `hypot' is not available. This substitution can be made automatically ! if you use `autoconf', see *Note Autoconf Macros::. In most circumstances the best strategy is to use the native versions of these functions when available, and fall back to GSL --- 645,651 ---- The application source files can then use the include command `#include ' to replace each occurrence of `hypot' by `gsl_hypot' when `hypot' is not available. This substitution can be made automatically ! if you use `autoconf', see *note Autoconf Macros::. In most circumstances the best strategy is to use the native versions of these functions when available, and fall back to GSL *************** *** 1214,1225 **** -- Function: int gsl_isinf (const double X) This function returns +1 if X is positive infinity, -1 if X is ! negative infinity and 0 otherwise. -- Function: int gsl_finite (const double X) This function returns 1 if X is a real number, and 0 if it is infinite or not-a-number.  File: gsl-ref.info, Node: Elementary Functions, Next: Small integer powers, Prev: Infinities and Not-a-number, Up: Mathematical Functions --- 1225,1245 ---- -- Function: int gsl_isinf (const double X) This function returns +1 if X is positive infinity, -1 if X is ! negative infinity and 0 otherwise.(1) -- Function: int gsl_finite (const double X) This function returns 1 if X is a real number, and 0 if it is infinite or not-a-number. + ---------- Footnotes ---------- + + (1) Note that the C99 standard only requires the system `isinf' + function to return a non-zero value, without the sign of the infinity. + The implementation in some earlier versions of GSL used the system + `isinf' function and may have this behavior on some platforms. + Therefore, it is advisable to test the sign of X separately, if needed, + rather than relying the sign of the return value from `gsl_isinf()'. +  File: gsl-ref.info, Node: Elementary Functions, Next: Small integer powers, Prev: Infinities and Not-a-number, Up: Mathematical Functions *************** *** 1342,1347 **** --- 1362,1371 ---- 4.7 Maximum and Minimum functions ================================= + Note that the following macros perform multiple evaluations of their + arguments, so they should not be used with arguments that have side + effects (such as a call to a random number generator). + -- Macro: GSL_MAX (a, b) This macro returns the maximum of A and B. It is defined as `((a) > (b) ? (a):(b))'. *************** *** 1434,1440 **** * Menu: ! * Complex numbers:: * Properties of complex numbers:: * Complex arithmetic operators:: * Elementary Complex Functions:: --- 1458,1464 ---- * Menu: ! * Representation of complex numbers:: * Properties of complex numbers:: * Complex arithmetic operators:: * Elementary Complex Functions:: *************** *** 1449,1458 **** (1) Note that the first edition uses different definitions.  ! File: gsl-ref.info, Node: Complex numbers, Next: Properties of complex numbers, Up: Complex Numbers ! 5.1 Complex numbers ! =================== Complex numbers are represented using the type `gsl_complex'. The internal representation of this type may vary across platforms and --- 1473,1482 ---- (1) Note that the first edition uses different definitions.  ! File: gsl-ref.info, Node: Representation of complex numbers, Next: Properties of complex numbers, Up: Complex Numbers ! 5.1 Representation of complex numbers ! ===================================== Complex numbers are represented using the type `gsl_complex'. The internal representation of this type may vary across platforms and *************** *** 1502,1508 **** number pointed to by ZP to be set independently.  ! File: gsl-ref.info, Node: Properties of complex numbers, Next: Complex arithmetic operators, Prev: Complex numbers, Up: Complex Numbers 5.2 Properties of complex numbers ================================= --- 1526,1532 ---- number pointed to by ZP to be set independently.  ! File: gsl-ref.info, Node: Properties of complex numbers, Next: Complex arithmetic operators, Prev: Representation of complex numbers, Up: Complex Numbers 5.2 Properties of complex numbers ================================= *************** *** 5652,5659 **** 8.3.8 Vector operations ----------------------- - The following operations are only defined for real vectors. - -- Function: int gsl_vector_add (gsl_vector * A, const gsl_vector * B) This function adds the elements of vector B to the elements of vector A, a'_i = a_i + b_i. The two vectors must have the same --- 5676,5681 ---- *************** *** 5689,5694 **** --- 5711,5718 ---- 8.3.9 Finding maximum and minimum elements of vectors ----------------------------------------------------- + The following operations are only defined for real vectors. + -- Function: double gsl_vector_max (const gsl_vector * V) This function returns the maximum value in the vector V. *************** *** 5723,5728 **** --- 5747,5756 ---- 8.3.10 Vector properties ------------------------ + The following functions are defined for real and complex vectors. For + complex vectors both the real and imaginary parts must satisfy the + conditions. + -- Function: int gsl_vector_isnull (const gsl_vector * V) -- Function: int gsl_vector_ispos (const gsl_vector * V) -- Function: int gsl_vector_isneg (const gsl_vector * V) *************** *** 6466,6471 **** --- 6494,6503 ---- 8.4.12 Matrix properties ------------------------ + The following functions are defined for real and complex matrices. For + complex matrices both the real and imaginary parts must satisfy the + conditions. + -- Function: int gsl_matrix_isnull (const gsl_matrix * M) -- Function: int gsl_matrix_ispos (const gsl_matrix * M) -- Function: int gsl_matrix_isneg (const gsl_matrix * M) *************** *** 7371,7442 **** * Sorting Examples:: * Sorting References and Further Reading:: -  - File: gsl-ref.info, Node: Sorting objects, Next: Sorting vectors, Up: Sorting - - 11.1 Sorting objects - ==================== - - The following function provides a simple alternative to the standard - library function `qsort'. It is intended for systems lacking `qsort', - not as a replacement for it. The function `qsort' should be used - whenever possible, as it will be faster and can provide stable ordering - of equal elements. Documentation for `qsort' is available in the `GNU - C Library Reference Manual'. - - The functions described in this section are defined in the header - file `gsl_heapsort.h'. - - -- Function: void gsl_heapsort (void * ARRAY, size_t COUNT, size_t - SIZE, gsl_comparison_fn_t COMPARE) - This function sorts the COUNT elements of the array ARRAY, each of - size SIZE, into ascending order using the comparison function - COMPARE. The type of the comparison function is defined by, - - int (*gsl_comparison_fn_t) (const void * a, - const void * b) - - A comparison function should return a negative integer if the first - argument is less than the second argument, `0' if the two arguments - are equal and a positive integer if the first argument is greater - than the second argument. - - For example, the following function can be used to sort doubles - into ascending numerical order. - - int - compare_doubles (const double * a, - const double * b) - { - if (*a > *b) - return 1; - else if (*a < *b) - return -1; - else - return 0; - } - - The appropriate function call to perform the sort is, - - gsl_heapsort (array, count, sizeof(double), - compare_doubles); - - Note that unlike `qsort' the heapsort algorithm cannot be made into - a stable sort by pointer arithmetic. The trick of comparing - pointers for equal elements in the comparison function does not - work for the heapsort algorithm. The heapsort algorithm performs - an internal rearrangement of the data which destroys its initial - ordering. - - -- Function: int gsl_heapsort_index (size_t * P, const void * ARRAY, - size_t COUNT, size_t SIZE, gsl_comparison_fn_t COMPARE) - This function indirectly sorts the COUNT elements of the array - ARRAY, each of size SIZE, into ascending order using the - comparison function COMPARE. The resulting permutation is stored - in P, an array of length N. The elements of P give the index of - the array element which would have been stored in that position if - the array had been sorted in place. The first element of P gives - the index of the least element in ARRAY, and the last element of P - gives the index of the greatest element in ARRAY. The array - itself is not changed. - --- 7403,7405 ---- diff -a -rc -C 2 -P gsl-1.11/doc/gsl-ref.info-2 gsl-1.12/doc/gsl-ref.info-2 *** gsl-1.11/doc/gsl-ref.info-2 Sat Mar 29 15:07:29 2008 --- gsl-1.12/doc/gsl-ref.info-2 Mon Dec 15 15:28:50 2008 *************** *** 1,4 **** ! This is gsl-ref.info, produced by makeinfo version 4.8 from gsl-ref.texi. INFO-DIR-SECTION Scientific software --- 1,4 ---- ! This is gsl-ref.info, produced by makeinfo version 4.11 from gsl-ref.texi. INFO-DIR-SECTION Scientific software *************** *** 7,16 **** END-INFO-DIR-ENTRY Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, ! 2005, 2006, 2007 The GSL Team. Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with the Invariant Sections being "GNU General Public License" and "Free Software Needs Free Documentation", the Front-Cover text being "A GNU Manual", --- 7,16 ---- END-INFO-DIR-ENTRY Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, ! 2005, 2006, 2007, 2008 The GSL Team. Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "GNU General Public License" and "Free Software Needs Free Documentation", the Front-Cover text being "A GNU Manual", *************** *** 22,27 **** --- 22,96 ---- this GNU Manual."  + File: gsl-ref.info, Node: Sorting objects, Next: Sorting vectors, Up: Sorting + + 11.1 Sorting objects + ==================== + + The following function provides a simple alternative to the standard + library function `qsort'. It is intended for systems lacking `qsort', + not as a replacement for it. The function `qsort' should be used + whenever possible, as it will be faster and can provide stable ordering + of equal elements. Documentation for `qsort' is available in the `GNU + C Library Reference Manual'. + + The functions described in this section are defined in the header + file `gsl_heapsort.h'. + + -- Function: void gsl_heapsort (void * ARRAY, size_t COUNT, size_t + SIZE, gsl_comparison_fn_t COMPARE) + This function sorts the COUNT elements of the array ARRAY, each of + size SIZE, into ascending order using the comparison function + COMPARE. The type of the comparison function is defined by, + + int (*gsl_comparison_fn_t) (const void * a, + const void * b) + + A comparison function should return a negative integer if the first + argument is less than the second argument, `0' if the two arguments + are equal and a positive integer if the first argument is greater + than the second argument. + + For example, the following function can be used to sort doubles + into ascending numerical order. + + int + compare_doubles (const double * a, + const double * b) + { + if (*a > *b) + return 1; + else if (*a < *b) + return -1; + else + return 0; + } + + The appropriate function call to perform the sort is, + + gsl_heapsort (array, count, sizeof(double), + compare_doubles); + + Note that unlike `qsort' the heapsort algorithm cannot be made into + a stable sort by pointer arithmetic. The trick of comparing + pointers for equal elements in the comparison function does not + work for the heapsort algorithm. The heapsort algorithm performs + an internal rearrangement of the data which destroys its initial + ordering. + + -- Function: int gsl_heapsort_index (size_t * P, const void * ARRAY, + size_t COUNT, size_t SIZE, gsl_comparison_fn_t COMPARE) + This function indirectly sorts the COUNT elements of the array + ARRAY, each of size SIZE, into ascending order using the + comparison function COMPARE. The resulting permutation is stored + in P, an array of length N. The elements of P give the index of + the array element which would have been stored in that position if + the array had been sorted in place. The first element of P gives + the index of the least element in ARRAY, and the last element of P + gives the index of the greatest element in ARRAY. The array + itself is not changed. + +  File: gsl-ref.info, Node: Sorting vectors, Next: Selecting the k smallest or largest elements, Prev: Sorting objects, Up: Sorting 11.2 Sorting vectors *************** *** 385,390 **** --- 454,463 ---- matrix-matrix multiply" and ZGEMM stands for "double-precision complex matrix-matrix multiply". + Note that the vector and matrix arguments to BLAS functions must not + be aliased, as the results are undefined when the underlying arrays + overlap (*note Aliasing of arrays::). + * Menu: * GSL BLAS Interface:: *************** *** 861,867 **** BETA, gsl_matrix_complex * C) These functions compute a rank-k update of the hermitian matrix C, C = \alpha A A^H + \beta C when TRANS is `CblasNoTrans' and C = ! \alpha A^H A + \beta C when TRANS is `CblasTrans'. Since the matrix C is hermitian only its upper half or lower half need to be stored. When UPLO is `CblasUpper' then the upper triangle and diagonal of C are used, and when UPLO is `CblasLower' then the --- 934,940 ---- BETA, gsl_matrix_complex * C) These functions compute a rank-k update of the hermitian matrix C, C = \alpha A A^H + \beta C when TRANS is `CblasNoTrans' and C = ! \alpha A^H A + \beta C when TRANS is `CblasConjTrans'. Since the matrix C is hermitian only its upper half or lower half need to be stored. When UPLO is `CblasUpper' then the upper triangle and diagonal of C are used, and when UPLO is `CblasLower' then the *************** *** 1080,1094 **** B, gsl_vector_complex * X) These functions solve the square system A x = b using the LU decomposition of A into (LU, P) given by `gsl_linalg_LU_decomp' or ! `gsl_linalg_complex_LU_decomp'. -- Function: int gsl_linalg_LU_svx (const gsl_matrix * LU, const gsl_permutation * P, gsl_vector * X) -- Function: int gsl_linalg_complex_LU_svx (const gsl_matrix_complex * LU, const gsl_permutation * P, gsl_vector_complex * X) These functions solve the square system A x = b in-place using the ! LU decomposition of A into (LU,P). On input X should contain the ! right-hand side b, which is replaced by the solution on output. -- Function: int gsl_linalg_LU_refine (const gsl_matrix * A, const gsl_matrix * LU, const gsl_permutation * P, const gsl_vector --- 1153,1168 ---- B, gsl_vector_complex * X) These functions solve the square system A x = b using the LU decomposition of A into (LU, P) given by `gsl_linalg_LU_decomp' or ! `gsl_linalg_complex_LU_decomp' as input. -- Function: int gsl_linalg_LU_svx (const gsl_matrix * LU, const gsl_permutation * P, gsl_vector * X) -- Function: int gsl_linalg_complex_LU_svx (const gsl_matrix_complex * LU, const gsl_permutation * P, gsl_vector_complex * X) These functions solve the square system A x = b in-place using the ! precomputed LU decomposition of A into (LU,P). On input X should ! contain the right-hand side b, which is replaced by the solution ! on output. -- Function: int gsl_linalg_LU_refine (const gsl_matrix * A, const gsl_matrix * LU, const gsl_permutation * P, const gsl_vector *************** *** 1098,1106 **** gsl_permutation * P, const gsl_vector_complex * B, gsl_vector_complex * X, gsl_vector_complex * RESIDUAL) These functions apply an iterative improvement to X, the solution ! of A x = b, using the LU decomposition of A into (LU,P). The ! initial residual r = A x - b is also computed and stored in ! RESIDUAL. -- Function: int gsl_linalg_LU_invert (const gsl_matrix * LU, const gsl_permutation * P, gsl_matrix * INVERSE) --- 1172,1180 ---- gsl_permutation * P, const gsl_vector_complex * B, gsl_vector_complex * X, gsl_vector_complex * RESIDUAL) These functions apply an iterative improvement to X, the solution ! of A x = b, from the precomputed LU decomposition of A into ! (LU,P). The initial residual r = A x - b is also computed and ! stored in RESIDUAL. -- Function: int gsl_linalg_LU_invert (const gsl_matrix * LU, const gsl_permutation * P, gsl_matrix * INVERSE) *************** *** 1178,1193 **** -- Function: int gsl_linalg_QR_solve (const gsl_matrix * QR, const gsl_vector * TAU, const gsl_vector * B, gsl_vector * X) This function solves the square system A x = b using the QR ! decomposition of A into (QR, TAU) given by `gsl_linalg_QR_decomp'. ! The least-squares solution for rectangular systems can be found ! using `gsl_linalg_QR_lssolve'. -- Function: int gsl_linalg_QR_svx (const gsl_matrix * QR, const gsl_vector * TAU, gsl_vector * X) This function solves the square system A x = b in-place using the ! QR decomposition of A into (QR,TAU) given by ! `gsl_linalg_QR_decomp'. On input X should contain the right-hand ! side b, which is replaced by the solution on output. -- Function: int gsl_linalg_QR_lssolve (const gsl_matrix * QR, const gsl_vector * TAU, const gsl_vector * B, gsl_vector * X, --- 1252,1269 ---- -- Function: int gsl_linalg_QR_solve (const gsl_matrix * QR, const gsl_vector * TAU, const gsl_vector * B, gsl_vector * X) This function solves the square system A x = b using the QR ! decomposition of A held in (QR, TAU) which must have been computed ! previously with `gsl_linalg_QR_decomp'. The least-squares ! solution for rectangular systems can be found using ! `gsl_linalg_QR_lssolve'. -- Function: int gsl_linalg_QR_svx (const gsl_matrix * QR, const gsl_vector * TAU, gsl_vector * X) This function solves the square system A x = b in-place using the ! QR decomposition of A held in (QR,TAU) which must have been ! computed previously by `gsl_linalg_QR_decomp'. On input X should ! contain the right-hand side b, which is replaced by the solution ! on output. -- Function: int gsl_linalg_QR_lssolve (const gsl_matrix * QR, const gsl_vector * TAU, const gsl_vector * B, gsl_vector * X, *************** *** 1195,1204 **** This function finds the least squares solution to the overdetermined system A x = b where the matrix A has more rows than columns. The least squares solution minimizes the Euclidean norm ! of the residual, ||Ax - b||.The routine uses the QR decomposition ! of A into (QR, TAU) given by `gsl_linalg_QR_decomp'. The solution ! is returned in X. The residual is computed as a by-product and ! stored in RESIDUAL. -- Function: int gsl_linalg_QR_QTvec (const gsl_matrix * QR, const gsl_vector * TAU, gsl_vector * V) --- 1271,1280 ---- This function finds the least squares solution to the overdetermined system A x = b where the matrix A has more rows than columns. The least squares solution minimizes the Euclidean norm ! of the residual, ||Ax - b||.The routine requires as input the QR ! decomposition of A into (QR, TAU) given by `gsl_linalg_QR_decomp'. ! The solution is returned in X. The residual is computed as a ! by-product and stored in RESIDUAL. -- Function: int gsl_linalg_QR_QTvec (const gsl_matrix * QR, const gsl_vector * TAU, gsl_vector * V) *************** *** 1250,1256 **** -- Function: int gsl_linalg_QR_update (gsl_matrix * Q, gsl_matrix * R, gsl_vector * W, const gsl_vector * V) This function performs a rank-1 update w v^T of the QR ! decomposition (Q, R). The update is given by Q'R' = Q R + w v^T where the output matrices Q' and R' are also orthogonal and right triangular. Note that W is destroyed by the update. --- 1326,1332 ---- -- Function: int gsl_linalg_QR_update (gsl_matrix * Q, gsl_matrix * R, gsl_vector * W, const gsl_vector * V) This function performs a rank-1 update w v^T of the QR ! decomposition (Q, R). The update is given by Q'R' = Q (R + w v^T) where the output matrices Q' and R' are also orthogonal and right triangular. Note that W is destroyed by the update. *************** *** 1315,1327 **** gsl_vector * TAU, const gsl_permutation * P, const gsl_vector * B, gsl_vector * X) This function solves the square system A x = b using the QRP^T ! decomposition of A into (QR, TAU, P) given by ! `gsl_linalg_QRPT_decomp'. -- Function: int gsl_linalg_QRPT_svx (const gsl_matrix * QR, const gsl_vector * TAU, const gsl_permutation * P, gsl_vector * X) This function solves the square system A x = b in-place using the ! QRP^T decomposition of A into (QR,TAU,P). On input X should contain the right-hand side b, which is replaced by the solution on output. --- 1391,1403 ---- gsl_vector * TAU, const gsl_permutation * P, const gsl_vector * B, gsl_vector * X) This function solves the square system A x = b using the QRP^T ! decomposition of A held in (QR, TAU, P) which must have been ! computed previously by `gsl_linalg_QRPT_decomp'. -- Function: int gsl_linalg_QRPT_svx (const gsl_matrix * QR, const gsl_vector * TAU, const gsl_permutation * P, gsl_vector * X) This function solves the square system A x = b in-place using the ! QRP^T decomposition of A held in (QR,TAU,P). On input X should contain the right-hand side b, which is replaced by the solution on output. *************** *** 1333,1344 **** unpacked form as (Q, R). -- Function: int gsl_linalg_QRPT_update (gsl_matrix * Q, gsl_matrix * ! R, const gsl_permutation * P, gsl_vector * U, const gsl_vector * V) This function performs a rank-1 update w v^T of the QRP^T ! decomposition (Q, R, P). The update is given by Q'R' = Q R + w v^T ! where the output matrices Q' and R' are also orthogonal and right ! triangular. Note that W is destroyed by the update. The permutation P is not changed. -- Function: int gsl_linalg_QRPT_Rsolve (const gsl_matrix * QR, const --- 1409,1420 ---- unpacked form as (Q, R). -- Function: int gsl_linalg_QRPT_update (gsl_matrix * Q, gsl_matrix * ! R, const gsl_permutation * P, gsl_vector * W, const gsl_vector * V) This function performs a rank-1 update w v^T of the QRP^T ! decomposition (Q, R, P). The update is given by Q'R' = Q (R + w ! v^T P) where the output matrices Q' and R' are also orthogonal and ! right triangular. Note that W is destroyed by the update. The permutation P is not changed. -- Function: int gsl_linalg_QRPT_Rsolve (const gsl_matrix * QR, const *************** *** 1383,1388 **** --- 1459,1470 ---- range of A is given by columns of U corresponding to the non-zero singular values. + Note that the routines here compute the "thin" version of the SVD + with U as M-by-N orthogonal matrix. This allows in-place computation + and is the most commonly-used form in practice. Mathematically, the + "full" SVD is defined with U as an M-by-M orthogonal matrix and S as an + M-by-N diagonal matrix (with additional rows of zeros). + -- Function: int gsl_linalg_SV_decomp (gsl_matrix * A, gsl_matrix * V, gsl_vector * S, gsl_vector * WORK) This function factorizes the M-by-N matrix A into the singular *************** *** 1412,1418 **** -- Function: int gsl_linalg_SV_solve (gsl_matrix * U, gsl_matrix * V, gsl_vector * S, const gsl_vector * B, gsl_vector * X) This function solves the system A x = b using the singular value ! decomposition (U, S, V) of A given by `gsl_linalg_SV_decomp'. Only non-zero singular values are used in computing the solution. The parts of the solution corresponding to singular values of zero --- 1494,1501 ---- -- Function: int gsl_linalg_SV_solve (gsl_matrix * U, gsl_matrix * V, gsl_vector * S, const gsl_vector * B, gsl_vector * X) This function solves the system A x = b using the singular value ! decomposition (U, S, V) held in A which must have been computed ! previously by `gsl_linalg_SV_decomp'. Only non-zero singular values are used in computing the solution. The parts of the solution corresponding to singular values of zero *************** *** 1464,1471 **** gsl_matrix_complex * CHOLESKY, const gsl_vector_complex * B, gsl_vector_complex * X) These functions solve the system A x = b using the Cholesky ! decomposition of A into the matrix CHOLESKY given by ! `gsl_linalg_cholesky_decomp' or `gsl_linalg_complex_cholesky_decomp'. -- Function: int gsl_linalg_cholesky_svx (const gsl_matrix * CHOLESKY, --- 1547,1554 ---- gsl_matrix_complex * CHOLESKY, const gsl_vector_complex * B, gsl_vector_complex * X) These functions solve the system A x = b using the Cholesky ! decomposition of A held in the matrix CHOLESKY which must have ! been previously computed by `gsl_linalg_cholesky_decomp' or `gsl_linalg_complex_cholesky_decomp'. -- Function: int gsl_linalg_cholesky_svx (const gsl_matrix * CHOLESKY, *************** *** 1473,1483 **** -- Function: int gsl_linalg_complex_cholesky_svx (const gsl_matrix_complex * CHOLESKY, gsl_vector_complex * X) These functions solve the system A x = b in-place using the ! Cholesky decomposition of A into the matrix CHOLESKY given by ! `gsl_linalg_cholesky_decomp' or `gsl_linalg_complex_cholesky_decomp'. On input X should contain the right-hand side b, which is replaced by the solution on output.  File: gsl-ref.info, Node: Tridiagonal Decomposition of Real Symmetric Matrices, Next: Tridiagonal Decomposition of Hermitian Matrices, Prev: Cholesky Decomposition, Up: Linear Algebra --- 1556,1572 ---- -- Function: int gsl_linalg_complex_cholesky_svx (const gsl_matrix_complex * CHOLESKY, gsl_vector_complex * X) These functions solve the system A x = b in-place using the ! Cholesky decomposition of A held in the matrix CHOLESKY which must ! have been previously computed by by `gsl_linalg_cholesky_decomp' or `gsl_linalg_complex_cholesky_decomp'. On input X should contain the right-hand side b, which is replaced by the solution on output. + -- Function: int gsl_linalg_cholesky_invert (gsl_matrix * CHOLESKY) + This function computes the inverse of the matrix CHOLESKY which + must have been previously computed by `gsl_linalg_cholesky_decomp'. + The inverse of the original matrix A is stored in CHOLESKY on + output. +  File: gsl-ref.info, Node: Tridiagonal Decomposition of Real Symmetric Matrices, Next: Tridiagonal Decomposition of Hermitian Matrices, Prev: Cholesky Decomposition, Up: Linear Algebra *************** *** 1658,1664 **** -- Function: int gsl_linalg_bidiag_unpack (const gsl_matrix * A, const gsl_vector * TAU_U, gsl_matrix * U, const gsl_vector * TAU_V, gsl_matrix * V, gsl_vector * DIAG, gsl_vector * SUPERDIAG) ! This function unpacks the bidiagonal decomposition of A given by `gsl_linalg_bidiag_decomp', (A, TAU_U, TAU_V) into the separate orthogonal matrices U, V and the diagonal vector DIAG and superdiagonal SUPERDIAG. Note that U is stored as a compact --- 1747,1753 ---- -- Function: int gsl_linalg_bidiag_unpack (const gsl_matrix * A, const gsl_vector * TAU_U, gsl_matrix * U, const gsl_vector * TAU_V, gsl_matrix * V, gsl_vector * DIAG, gsl_vector * SUPERDIAG) ! This function unpacks the bidiagonal decomposition of A produced by `gsl_linalg_bidiag_decomp', (A, TAU_U, TAU_V) into the separate orthogonal matrices U, V and the diagonal vector DIAG and superdiagonal SUPERDIAG. Note that U is stored as a compact *************** *** 1666,1672 **** -- Function: int gsl_linalg_bidiag_unpack2 (gsl_matrix * A, gsl_vector * TAU_U, gsl_vector * TAU_V, gsl_matrix * V) ! This function unpacks the bidiagonal decomposition of A given by `gsl_linalg_bidiag_decomp', (A, TAU_U, TAU_V) into the separate orthogonal matrices U, V and the diagonal vector DIAG and superdiagonal SUPERDIAG. The matrix U is stored in-place in A. --- 1755,1761 ---- -- Function: int gsl_linalg_bidiag_unpack2 (gsl_matrix * A, gsl_vector * TAU_U, gsl_vector * TAU_V, gsl_matrix * V) ! This function unpacks the bidiagonal decomposition of A produced by `gsl_linalg_bidiag_decomp', (A, TAU_U, TAU_V) into the separate orthogonal matrices U, V and the diagonal vector DIAG and superdiagonal SUPERDIAG. The matrix U is stored in-place in A. *************** *** 1674,1681 **** -- Function: int gsl_linalg_bidiag_unpack_B (const gsl_matrix * A, gsl_vector * DIAG, gsl_vector * SUPERDIAG) This function unpacks the diagonal and superdiagonal of the ! bidiagonal decomposition of A given by `gsl_linalg_bidiag_decomp', ! into the diagonal vector DIAG and superdiagonal vector SUPERDIAG.  File: gsl-ref.info, Node: Householder Transformations, Next: Householder solver for linear systems, Prev: Bidiagonalization, Up: Linear Algebra --- 1763,1770 ---- -- Function: int gsl_linalg_bidiag_unpack_B (const gsl_matrix * A, gsl_vector * DIAG, gsl_vector * SUPERDIAG) This function unpacks the diagonal and superdiagonal of the ! bidiagonal decomposition of A from `gsl_linalg_bidiag_decomp', into ! the diagonal vector DIAG and superdiagonal vector SUPERDIAG.  File: gsl-ref.info, Node: Householder Transformations, Next: Householder solver for linear systems, Prev: Bidiagonalization, Up: Linear Algebra *************** *** 1949,1955 **** J.C. Nash, "A one-sided transformation method for the singular value decomposition and algebraic eigenproblem", `Computer ! Journal', Volume 18, Number 1 (1973), p 74-76 James Demmel, Kresimir Veselic, "Jacobi's Method is more accurate than QR", `Lapack Working Note 15' (LAWN-15), October 1989. --- 2038,2048 ---- J.C. Nash, "A one-sided transformation method for the singular value decomposition and algebraic eigenproblem", `Computer ! Journal', Volume 18, Number 1 (1975), p 74-76 ! ! J.C. Nash and S. Shlien "Simple algorithms for the partial singular ! value decomposition", `Computer Journal', Volume 30 (1987), p ! 268-275. James Demmel, Kresimir Veselic, "Jacobi's Method is more accurate than QR", `Lapack Working Note 15' (LAWN-15), October 1989. *************** *** 2131,2137 **** the matrix prior to computing eigenvalues. This transformation is designed to make the rows and columns of the matrix have comparable norms, and can result in more accurate eigenvalues for matrices ! whose entries vary widely in magnitude. See *Note Balancing:: for more information. Note that the balancing transformation does not preserve the orthogonality of the Schur vectors, so if you wish to compute the Schur vectors with `gsl_eigen_nonsymm_Z' you will --- 2224,2230 ---- the matrix prior to computing eigenvalues. This transformation is designed to make the rows and columns of the matrix have comparable norms, and can result in more accurate eigenvalues for matrices ! whose entries vary widely in magnitude. See *note Balancing:: for more information. Note that the balancing transformation does not preserve the orthogonality of the Schur vectors, so if you wish to compute the Schur vectors with `gsl_eigen_nonsymm_Z' you will *************** *** 3304,3310 **** The following table shows the correspondence between the output DATA and the equivalent results obtained by considering the input ! data as a complex sequence with zero imaginary part, complex[0].real = data[0] complex[0].imag = 0 --- 3397,3404 ---- The following table shows the correspondence between the output DATA and the equivalent results obtained by considering the input ! data as a complex sequence with zero imaginary part (assuming ! STRIDE=1), complex[0].real = data[0] complex[0].imag = 0 *************** *** 3323,3330 **** complex[N-1].real = data[1] complex[N-1].imag = -data[N-1] Note that the output data can be converted into the full complex ! sequence using the function `gsl_fft_halfcomplex_unpack' described ! in the next section. The radix-2 FFT functions for halfcomplex data are declared in the header file `gsl_fft_halfcomplex.h'. --- 3417,3424 ---- complex[N-1].real = data[1] complex[N-1].imag = -data[N-1] Note that the output data can be converted into the full complex ! sequence using the function `gsl_fft_halfcomplex_radix2_unpack' ! described below. The radix-2 FFT functions for halfcomplex data are declared in the header file `gsl_fft_halfcomplex.h'. *************** *** 3339,3344 **** --- 3433,3472 ---- `gsl_fft_real_radix2'. The result is a real array stored in natural order. + -- Function: int gsl_fft_halfcomplex_radix2_unpack (const double + HALFCOMPLEX_COEFFICIENT[], gsl_complex_packed_array + COMPLEX_COEFFICIENT, size_t STRIDE, size_t N) + This function converts HALFCOMPLEX_COEFFICIENT, an array of + half-complex coefficients as returned by + `gsl_fft_real_radix2_transform', into an ordinary complex array, + COMPLEX_COEFFICIENT. It fills in the complex array using the + symmetry z_k = z_{N-k}^* to reconstruct the redundant elements. + The algorithm for the conversion is, + + complex_coefficient[0].real + = halfcomplex_coefficient[0]; + complex_coefficient[0].imag + = 0.0; + + for (i = 1; i < n - i; i++) + { + double hc_real + = halfcomplex_coefficient[i*stride]; + double hc_imag + = halfcomplex_coefficient[(n-i)*stride]; + complex_coefficient[i*stride].real = hc_real; + complex_coefficient[i*stride].imag = hc_imag; + complex_coefficient[(n - i)*stride].real = hc_real; + complex_coefficient[(n - i)*stride].imag = -hc_imag; + } + + if (i == n - i) + { + complex_coefficient[i*stride].real + = halfcomplex_coefficient[(n - 1)*stride]; + complex_coefficient[i*stride].imag + = 0.0; + }  File: gsl-ref.info, Node: Mixed-radix FFT routines for real data, Next: FFT References and Further Reading, Prev: Radix-2 FFT routines for real data, Up: Fast Fourier Transforms *************** *** 3486,3494 **** for (i = 0; i < n; i++) { ! complex_coefficient[i].real ! = real_coefficient[i]; ! complex_coefficient[i].imag = 0.0; } --- 3614,3622 ---- for (i = 0; i < n; i++) { ! complex_coefficient[i*stride].real ! = real_coefficient[i*stride]; ! complex_coefficient[i*stride].imag = 0.0; } *************** *** 3510,3529 **** for (i = 1; i < n - i; i++) { double hc_real ! = halfcomplex_coefficient[2 * i - 1]; double hc_imag ! = halfcomplex_coefficient[2 * i]; ! complex_coefficient[i].real = hc_real; ! complex_coefficient[i].imag = hc_imag; ! complex_coefficient[n - i].real = hc_real; ! complex_coefficient[n - i].imag = -hc_imag; } if (i == n - i) { ! complex_coefficient[i].real ! = halfcomplex_coefficient[n - 1]; ! complex_coefficient[i].imag = 0.0; } --- 3638,3657 ---- for (i = 1; i < n - i; i++) { double hc_real ! = halfcomplex_coefficient[(2 * i - 1)*stride]; double hc_imag ! = halfcomplex_coefficient[(2 * i)*stride]; ! complex_coefficient[i*stride].real = hc_real; ! complex_coefficient[i*stride].imag = hc_imag; ! complex_coefficient[(n - i)*stride].real = hc_real; ! complex_coefficient[(n - i)*stride].imag = -hc_imag; } if (i == n - i) { ! complex_coefficient[i*stride].real ! = halfcomplex_coefficient[(n - 1)*stride]; ! complex_coefficient[i*stride].imag = 0.0; } *************** *** 4481,4493 **** generator. If the generator is seeded with the same value of S on two different runs, the same stream of random numbers will be generated by successive calls to the routines below. If different ! values of S are supplied, then the generated streams of random numbers should be completely different. If the seed S is zero then the standard seed from the original implementation is used instead. For example, the original Fortran source code for the `ranlux' generator used a seed of 314159265, and so choosing S equal to zero reproduces this when using `gsl_rng_ranlux'. -- Function: void gsl_rng_free (gsl_rng * R) This function frees all the memory associated with the generator R. --- 4609,4629 ---- generator. If the generator is seeded with the same value of S on two different runs, the same stream of random numbers will be generated by successive calls to the routines below. If different ! values of S >= 1 are supplied, then the generated streams of random numbers should be completely different. If the seed S is zero then the standard seed from the original implementation is used instead. For example, the original Fortran source code for the `ranlux' generator used a seed of 314159265, and so choosing S equal to zero reproduces this when using `gsl_rng_ranlux'. + When using multiple seeds with the same generator, choose seed + values greater than zero to avoid collisions with the default + setting. + + Note that the most generators only accept 32-bit seeds, with higher + values being reduced modulo 2^32. For generators with smaller + ranges the maximum seed value will typically be lower. + -- Function: void gsl_rng_free (gsl_rng * R) This function frees all the memory associated with the generator R. *************** *** 4710,4716 **** ====================================================== The library provides functions for reading and writing the random ! number state to a file as binary data or formatted text. -- Function: int gsl_rng_fwrite (FILE * STREAM, const gsl_rng * R) This function writes the random number state of the random number --- 4846,4852 ---- ====================================================== The library provides functions for reading and writing the random ! number state to a file as binary data. -- Function: int gsl_rng_fwrite (FILE * STREAM, const gsl_rng * R) This function writes the random number state of the random number *************** *** 5489,5495 **** valid up to 40 dimensions. -- Generator: gsl_qrng_halton ! -- Generator: gsl_qrng_reverse_halton These generators use the Halton and reverse Halton sequences described in J.H. Halton, `Numerische Mathematik' 2, 84-90 (1960) and B. Vandewoestyne and R. Cools `Computational and Applied --- 5625,5631 ---- valid up to 40 dimensions. -- Generator: gsl_qrng_halton ! -- Generator: gsl_qrng_reversehalton These generators use the Halton and reverse Halton sequences described in J.H. Halton, `Numerische Mathematik' 2, 84-90 (1960) and B. Vandewoestyne and R. Cools `Computational and Applied *************** *** 6822,6951 **** These functions compute the cumulative distribution functions P(k), Q(k) for the geometric distribution with parameter P. -  - File: gsl-ref.info, Node: The Hypergeometric Distribution, Next: The Logarithmic Distribution, Prev: The Geometric Distribution, Up: Random Number Distributions - - 19.36 The Hypergeometric Distribution - ===================================== - - -- Function: unsigned int gsl_ran_hypergeometric (const gsl_rng * R, - unsigned int N1, unsigned int N2, unsigned int T) - This function returns a random integer from the hypergeometric - distribution. The probability distribution for hypergeometric - random variates is, - - p(k) = C(n_1, k) C(n_2, t - k) / C(n_1 + n_2, t) - - where C(a,b) = a!/(b!(a-b)!) and t <= n_1 + n_2. The domain of k - is max(0,t-n_2), ..., min(t,n_1). - - If a population contains n_1 elements of "type 1" and n_2 elements - of "type 2" then the hypergeometric distribution gives the - probability of obtaining k elements of "type 1" in t samples from - the population without replacement. - - -- Function: double gsl_ran_hypergeometric_pdf (unsigned int K, - unsigned int N1, unsigned int N2, unsigned int T) - This function computes the probability p(k) of obtaining K from a - hypergeometric distribution with parameters N1, N2, T, using the - formula given above. - - - -- Function: double gsl_cdf_hypergeometric_P (unsigned int K, unsigned - int N1, unsigned int N2, unsigned int T) - -- Function: double gsl_cdf_hypergeometric_Q (unsigned int K, unsigned - int N1, unsigned int N2, unsigned int T) - These functions compute the cumulative distribution functions - P(k), Q(k) for the hypergeometric distribution with parameters N1, - N2 and T. - -  - File: gsl-ref.info, Node: The Logarithmic Distribution, Next: Shuffling and Sampling, Prev: The Hypergeometric Distribution, Up: Random Number Distributions - - 19.37 The Logarithmic Distribution - ================================== - - -- Function: unsigned int gsl_ran_logarithmic (const gsl_rng * R, - double P) - This function returns a random integer from the logarithmic - distribution. The probability distribution for logarithmic random - variates is, - - p(k) = {-1 \over \log(1-p)} {(p^k \over k)} - - for k >= 1. - - -- Function: double gsl_ran_logarithmic_pdf (unsigned int K, double P) - This function computes the probability p(k) of obtaining K from a - logarithmic distribution with probability parameter P, using the - formula given above. - - -  - File: gsl-ref.info, Node: Shuffling and Sampling, Next: Random Number Distribution Examples, Prev: The Logarithmic Distribution, Up: Random Number Distributions - - 19.38 Shuffling and Sampling - ============================ - - 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 period. For more information see Knuth, v2, 3rd ed, Section - 3.4.2, "Random Sampling and Shuffling". - - -- Function: void gsl_ran_shuffle (const gsl_rng * R, void * BASE, - size_t N, size_t SIZE) - This function randomly shuffles the order of N objects, each of - size SIZE, stored in the array BASE[0..N-1]. The output of the - random number generator R is used to produce the permutation. The - algorithm generates all possible n! permutations with equal - probability, assuming a perfect source of random numbers. - - The following code shows how to shuffle the numbers from 0 to 51, - - int a[52]; - - for (i = 0; i < 52; i++) - { - a[i] = i; - } - - gsl_ran_shuffle (r, a, 52, sizeof (int)); - - - -- Function: int gsl_ran_choose (const gsl_rng * R, void * DEST, - size_t K, void * SRC, size_t N, size_t SIZE) - This function fills the array DEST[k] with K objects taken - randomly from the N elements of the array SRC[0..N-1]. The - objects are each of size SIZE. The output of the random number - generator R is used to make the selection. The algorithm ensures - all possible samples are equally likely, assuming a perfect source - of randomness. - - The objects are sampled _without_ replacement, thus each object can - only appear once in DEST[k]. It is required that K be less than - or equal to `n'. The objects in DEST will be in the same relative - order as those in SRC. You will need to call `gsl_ran_shuffle(r, - dest, n, size)' if you want to randomize the order. - - The following code shows how to select a random sample of three - unique numbers from the set 0 to 99, - - double a[3], b[100]; - - for (i = 0; i < 100; i++) - { - b[i] = (double) i; - } - - gsl_ran_choose (r, a, 3, b, 100, sizeof (double)); - - - -- Function: void gsl_ran_sample (const gsl_rng * R, void * DEST, - size_t K, void * SRC, size_t N, size_t SIZE) - This function is like `gsl_ran_choose' but samples K items from - the original array of N items SRC with replacement, so the same - object can appear more than once in the output sequence DEST. - There is no requirement that K be less than N in this case. - --- 6958,6960 ---- diff -a -rc -C 2 -P gsl-1.11/doc/gsl-ref.info-3 gsl-1.12/doc/gsl-ref.info-3 *** gsl-1.11/doc/gsl-ref.info-3 Sat Mar 29 15:07:29 2008 --- gsl-1.12/doc/gsl-ref.info-3 Mon Dec 15 15:28:50 2008 *************** *** 1,4 **** ! This is gsl-ref.info, produced by makeinfo version 4.8 from gsl-ref.texi. INFO-DIR-SECTION Scientific software --- 1,4 ---- ! This is gsl-ref.info, produced by makeinfo version 4.11 from gsl-ref.texi. INFO-DIR-SECTION Scientific software *************** *** 7,16 **** END-INFO-DIR-ENTRY Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, ! 2005, 2006, 2007 The GSL Team. Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with the Invariant Sections being "GNU General Public License" and "Free Software Needs Free Documentation", the Front-Cover text being "A GNU Manual", --- 7,16 ---- END-INFO-DIR-ENTRY Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, ! 2005, 2006, 2007, 2008 The GSL Team. Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "GNU General Public License" and "Free Software Needs Free Documentation", the Front-Cover text being "A GNU Manual", *************** *** 22,27 **** --- 22,154 ---- this GNU Manual."  + File: gsl-ref.info, Node: The Hypergeometric Distribution, Next: The Logarithmic Distribution, Prev: The Geometric Distribution, Up: Random Number Distributions + + 19.36 The Hypergeometric Distribution + ===================================== + + -- Function: unsigned int gsl_ran_hypergeometric (const gsl_rng * R, + unsigned int N1, unsigned int N2, unsigned int T) + This function returns a random integer from the hypergeometric + distribution. The probability distribution for hypergeometric + random variates is, + + p(k) = C(n_1, k) C(n_2, t - k) / C(n_1 + n_2, t) + + where C(a,b) = a!/(b!(a-b)!) and t <= n_1 + n_2. The domain of k + is max(0,t-n_2), ..., min(t,n_1). + + If a population contains n_1 elements of "type 1" and n_2 elements + of "type 2" then the hypergeometric distribution gives the + probability of obtaining k elements of "type 1" in t samples from + the population without replacement. + + -- Function: double gsl_ran_hypergeometric_pdf (unsigned int K, + unsigned int N1, unsigned int N2, unsigned int T) + This function computes the probability p(k) of obtaining K from a + hypergeometric distribution with parameters N1, N2, T, using the + formula given above. + + + -- Function: double gsl_cdf_hypergeometric_P (unsigned int K, unsigned + int N1, unsigned int N2, unsigned int T) + -- Function: double gsl_cdf_hypergeometric_Q (unsigned int K, unsigned + int N1, unsigned int N2, unsigned int T) + These functions compute the cumulative distribution functions + P(k), Q(k) for the hypergeometric distribution with parameters N1, + N2 and T. + +  + File: gsl-ref.info, Node: The Logarithmic Distribution, Next: Shuffling and Sampling, Prev: The Hypergeometric Distribution, Up: Random Number Distributions + + 19.37 The Logarithmic Distribution + ================================== + + -- Function: unsigned int gsl_ran_logarithmic (const gsl_rng * R, + double P) + This function returns a random integer from the logarithmic + distribution. The probability distribution for logarithmic random + variates is, + + p(k) = {-1 \over \log(1-p)} {(p^k \over k)} + + for k >= 1. + + -- Function: double gsl_ran_logarithmic_pdf (unsigned int K, double P) + This function computes the probability p(k) of obtaining K from a + logarithmic distribution with probability parameter P, using the + formula given above. + + +  + File: gsl-ref.info, Node: Shuffling and Sampling, Next: Random Number Distribution Examples, Prev: The Logarithmic Distribution, Up: Random Number Distributions + + 19.38 Shuffling and Sampling + ============================ + + 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 period. For more information see Knuth, v2, 3rd ed, Section + 3.4.2, "Random Sampling and Shuffling". + + -- Function: void gsl_ran_shuffle (const gsl_rng * R, void * BASE, + size_t N, size_t SIZE) + This function randomly shuffles the order of N objects, each of + size SIZE, stored in the array BASE[0..N-1]. The output of the + random number generator R is used to produce the permutation. The + algorithm generates all possible n! permutations with equal + probability, assuming a perfect source of random numbers. + + The following code shows how to shuffle the numbers from 0 to 51, + + int a[52]; + + for (i = 0; i < 52; i++) + { + a[i] = i; + } + + gsl_ran_shuffle (r, a, 52, sizeof (int)); + + + -- Function: int gsl_ran_choose (const gsl_rng * R, void * DEST, + size_t K, void * SRC, size_t N, size_t SIZE) + This function fills the array DEST[k] with K objects taken + randomly from the N elements of the array SRC[0..N-1]. The + objects are each of size SIZE. The output of the random number + generator R is used to make the selection. The algorithm ensures + all possible samples are equally likely, assuming a perfect source + of randomness. + + The objects are sampled _without_ replacement, thus each object can + only appear once in DEST[k]. It is required that K be less than + or equal to `n'. The objects in DEST will be in the same relative + order as those in SRC. You will need to call `gsl_ran_shuffle(r, + dest, n, size)' if you want to randomize the order. + + The following code shows how to select a random sample of three + unique numbers from the set 0 to 99, + + double a[3], b[100]; + + for (i = 0; i < 100; i++) + { + b[i] = (double) i; + } + + gsl_ran_choose (r, a, 3, b, 100, sizeof (double)); + + + -- Function: void gsl_ran_sample (const gsl_rng * R, void * DEST, + size_t K, void * SRC, size_t N, size_t SIZE) + This function is like `gsl_ran_choose' but samples K items from + the original array of N items SRC with replacement, so the same + object can appear more than once in the output sequence DEST. + There is no requirement that K be less than N in this case. + +  File: gsl-ref.info, Node: Random Number Distribution Examples, Next: Random Number Distribution References and Further Reading, Prev: Shuffling and Sampling, Up: Random Number Distributions 19.39 Examples *************** *** 691,699 **** Thus the minimum value of the array (`data[0*stride]') is given by F equal to zero, the maximum value (`data[(n-1)*stride]') is given by F equal to one and the median value is given by F equal to 0.5. ! Since the algorithm for computing quantiles involves ! interpolation this function always returns a floating-point ! number, even for integer data types.  File: gsl-ref.info, Node: Example statistical programs, Next: Statistics References and Further Reading, Prev: Median and Percentiles, Up: Statistics --- 818,826 ---- Thus the minimum value of the array (`data[0*stride]') is given by F equal to zero, the maximum value (`data[(n-1)*stride]') is given by F equal to one and the median value is given by F equal to 0.5. ! Since the algorithm for computing quantiles involves interpolation ! this function always returns a floating-point number, even for ! integer data types.  File: gsl-ref.info, Node: Example statistical programs, Next: Statistics References and Further Reading, Prev: Median and Percentiles, Up: Statistics *************** *** 1529,1541 **** These functions find the upper and lower range limits of the I-th and J-th bins in the x and y directions of the histogram H. The range limits are stored in XLOWER and XUPPER or YLOWER and YUPPER. ! The lower limits are inclusive (i.e. events with these ! coordinates are included in the bin) and the upper limits are ! exclusive (i.e. events with the value of the upper limit are not ! included and fall in the neighboring higher bin, if it exists). ! The functions return 0 to indicate success. If I or J lies ! outside the valid range of indices for the histogram then the ! error handler is called with an error code of `GSL_EDOM'. -- Function: double gsl_histogram2d_xmax (const gsl_histogram2d * H) -- Function: double gsl_histogram2d_xmin (const gsl_histogram2d * H) --- 1656,1668 ---- These functions find the upper and lower range limits of the I-th and J-th bins in the x and y directions of the histogram H. The range limits are stored in XLOWER and XUPPER or YLOWER and YUPPER. ! The lower limits are inclusive (i.e. events with these coordinates ! are included in the bin) and the upper limits are exclusive (i.e. ! events with the value of the upper limit are not included and fall ! in the neighboring higher bin, if it exists). The functions ! return 0 to indicate success. If I or J lies outside the valid ! range of indices for the histogram then the error handler is ! called with an error code of `GSL_EDOM'. -- Function: double gsl_histogram2d_xmax (const gsl_histogram2d * H) -- Function: double gsl_histogram2d_xmin (const gsl_histogram2d * H) *************** *** 4344,4352 **** * Chebyshev Definitions:: * Creation and Calculation of Chebyshev Series:: * Chebyshev Series Evaluation:: * Derivatives and Integrals:: ! * Chebyshev Approximation examples:: * Chebyshev Approximation References and Further Reading::  --- 4471,4480 ---- * Chebyshev Definitions:: * Creation and Calculation of Chebyshev Series:: + * Auxiliary Functions for Chebyshev Series:: * Chebyshev Series Evaluation:: * Derivatives and Integrals:: ! * Chebyshev Approximation Examples:: * Chebyshev Approximation References and Further Reading::  *************** *** 4375,4381 **** which is needed when accessing the coefficients directly.  ! File: gsl-ref.info, Node: Creation and Calculation of Chebyshev Series, Next: Chebyshev Series Evaluation, Prev: Chebyshev Definitions, Up: Chebyshev Approximations 28.2 Creation and Calculation of Chebyshev Series ================================================= --- 4503,4509 ---- which is needed when accessing the coefficients directly.  ! File: gsl-ref.info, Node: Creation and Calculation of Chebyshev Series, Next: Auxiliary Functions for Chebyshev Series, Prev: Chebyshev Definitions, Up: Chebyshev Approximations 28.2 Creation and Calculation of Chebyshev Series ================================================= *************** *** 4395,4403 **** process, and requires n function evaluations.  ! File: gsl-ref.info, Node: Chebyshev Series Evaluation, Next: Derivatives and Integrals, Prev: Creation and Calculation of Chebyshev Series, Up: Chebyshev Approximations ! 28.3 Chebyshev Series Evaluation ================================ -- Function: double gsl_cheb_eval (const gsl_cheb_series * CS, double --- 4523,4549 ---- process, and requires n function evaluations.  ! File: gsl-ref.info, Node: Auxiliary Functions for Chebyshev Series, Next: Chebyshev Series Evaluation, Prev: Creation and Calculation of Chebyshev Series, Up: Chebyshev Approximations ! ! 28.3 Auxiliary Functions ! ======================== ! ! The following functions provide information about an existing Chebyshev ! series. ! ! -- Function: size_t gsl_cheb_order (const gsl_cheb_series * CS) ! This function returns the order of Chebyshev series CS. ! ! -- Function: size_t gsl_cheb_size (const gsl_cheb_series * CS) ! -- Function: double * gsl_cheb_coeffs (const gsl_cheb_series * CS) ! These functions return the size of the Chebyshev coefficient array ! `c[]' and a pointer to its location in memory for the Chebyshev ! series CS. ! !  ! File: gsl-ref.info, Node: Chebyshev Series Evaluation, Next: Derivatives and Integrals, Prev: Auxiliary Functions for Chebyshev Series, Up: Chebyshev Approximations ! 28.4 Chebyshev Series Evaluation ================================ -- Function: double gsl_cheb_eval (const gsl_cheb_series * CS, double *************** *** 4425,4433 **** from the first neglected term in the series.  ! File: gsl-ref.info, Node: Derivatives and Integrals, Next: Chebyshev Approximation examples, Prev: Chebyshev Series Evaluation, Up: Chebyshev Approximations ! 28.4 Derivatives and Integrals ============================== The following functions allow a Chebyshev series to be differentiated or --- 4571,4579 ---- from the first neglected term in the series.  ! File: gsl-ref.info, Node: Derivatives and Integrals, Next: Chebyshev Approximation Examples, Prev: Chebyshev Series Evaluation, Up: Chebyshev Approximations ! 28.5 Derivatives and Integrals ============================== The following functions allow a Chebyshev series to be differentiated or *************** *** 4452,4460 **** end of the range A.  ! File: gsl-ref.info, Node: Chebyshev Approximation examples, Next: Chebyshev Approximation References and Further Reading, Prev: Derivatives and Integrals, Up: Chebyshev Approximations ! 28.5 Examples ============= The following example program computes Chebyshev approximations to a --- 4598,4606 ---- end of the range A.  ! File: gsl-ref.info, Node: Chebyshev Approximation Examples, Next: Chebyshev Approximation References and Further Reading, Prev: Derivatives and Integrals, Up: Chebyshev Approximations ! 28.6 Examples ============= The following example program computes Chebyshev approximations to a *************** *** 4510,4518 **** 0.001 in x.  ! File: gsl-ref.info, Node: Chebyshev Approximation References and Further Reading, Prev: Chebyshev Approximation examples, Up: Chebyshev Approximations ! 28.6 References and Further Reading =================================== The following paper describes the use of Chebyshev series, --- 4656,4664 ---- 0.001 in x.  ! File: gsl-ref.info, Node: Chebyshev Approximation References and Further Reading, Prev: Chebyshev Approximation Examples, Up: Chebyshev Approximations ! 28.7 References and Further Reading =================================== The following paper describes the use of Chebyshev series, *************** *** 7339,7345 **** * Providing a function to minimize:: * Multimin Iteration:: * Multimin Stopping Criteria:: ! * Multimin Algorithms:: * Multimin Examples:: * Multimin References and Further Reading:: --- 7485,7492 ---- * Providing a function to minimize:: * Multimin Iteration:: * Multimin Stopping Criteria:: ! * Multimin Algorithms with Derivatives:: ! * Multimin Algorithms without Derivatives:: * Multimin Examples:: * Multimin References and Further Reading:: *************** *** 7367,7377 **** and the whole process repeated until the true n-dimensional minimum is found. ! The Nelder-Mead Simplex algorithm applies a different strategy. It maintains n+1 trial parameter vectors as the vertices of a ! n-dimensional simplex. In each iteration step it tries to improve the ! worst vertex by a simple geometrical transformation until the size of ! the simplex falls below a given tolerance. Both types of algorithms use a standard framework. The user provides a high-level driver for the algorithms, and the library provides the --- 7514,7526 ---- and the whole process repeated until the true n-dimensional minimum is found. ! Algorithms which do not require the gradient of the function use ! different strategies. For example, the Nelder-Mead Simplex algorithm maintains n+1 trial parameter vectors as the vertices of a ! n-dimensional simplex. On each iteration it tries to improve the worst ! vertex of the simplex by geometrical transformations. The iterations ! are continued until the overall size of the simplex has decreased ! sufficiently. Both types of algorithms use a standard framework. The user provides a high-level driver for the algorithms, and the library provides the *************** *** 7390,7472 **** `gsl_multimin_fdfminimizer' struct or a `gsl_multimin_fminimizer' struct. -  - File: gsl-ref.info, Node: Multimin Caveats, Next: Initializing the Multidimensional Minimizer, Prev: Multimin Overview, Up: Multidimensional Minimization - - 35.2 Caveats - ============ - - Note that the minimization algorithms can only search for one local - minimum at a time. When there are several local minima in the search - area, the first minimum to be found will be returned; however it is - difficult to predict which of the minima this will be. In most cases, - no error will be reported if you try to find a local minimum in an area - where there is more than one. - - It is also important to note that the minimization algorithms find - local minima; there is no way to determine whether a minimum is a global - minimum of the function in question. - -  - File: gsl-ref.info, Node: Initializing the Multidimensional Minimizer, Next: Providing a function to minimize, Prev: Multimin Caveats, Up: Multidimensional Minimization - - 35.3 Initializing the Multidimensional Minimizer - ================================================ - - The following function initializes a multidimensional minimizer. The - minimizer itself depends only on the dimension of the problem and the - algorithm and can be reused for different problems. - - -- Function: gsl_multimin_fdfminimizer * - gsl_multimin_fdfminimizer_alloc (const gsl_multimin_fdfminimizer_type * - T, size_t N) - -- Function: gsl_multimin_fminimizer * gsl_multimin_fminimizer_alloc - (const gsl_multimin_fminimizer_type * T, size_t N) - This function returns a pointer to a newly allocated instance of a - minimizer of type T for an N-dimension function. If there is - insufficient memory to create the minimizer then the function - returns a null pointer and the error handler is invoked with an - error code of `GSL_ENOMEM'. - - -- Function: int gsl_multimin_fdfminimizer_set - (gsl_multimin_fdfminimizer * S, gsl_multimin_function_fdf * - FDF, const gsl_vector * X, double STEP_SIZE, double TOL) - This function initializes the minimizer S to minimize the function - FDF starting from the initial point X. The size of the first - trial step is given by STEP_SIZE. The accuracy of the line - minimization is specified by TOL. The precise meaning of this - parameter depends on the method used. Typically the line - minimization is considered successful if the gradient of the - function g is orthogonal to the current search direction p to a - relative accuracy of TOL, where dot(p,g) < tol |p| |g|. A TOL - value of 0.1 is suitable for most purposes, since line - minimization only needs to be carried out approximately. Note - that setting TOL to zero will force the use of "exact" - line-searches, which are extremely expensive. - - -- Function: int gsl_multimin_fminimizer_set (gsl_multimin_fminimizer - * S, gsl_multimin_function * F, const gsl_vector * X, const - gsl_vector * STEP_SIZE) - This function initializes the minimizer S to minimize the function - F, starting from the initial point X. The size of the initial - trial steps is given in vector STEP_SIZE. The precise meaning of - this parameter depends on the method used. - - -- Function: void gsl_multimin_fdfminimizer_free - (gsl_multimin_fdfminimizer * S) - -- Function: void gsl_multimin_fminimizer_free - (gsl_multimin_fminimizer * S) - This function frees all the memory associated with the minimizer S. - - -- Function: const char * gsl_multimin_fdfminimizer_name (const - gsl_multimin_fdfminimizer * S) - -- Function: const char * gsl_multimin_fminimizer_name (const - gsl_multimin_fminimizer * S) - This function returns a pointer to the name of the minimizer. For - example, - - printf ("s is a '%s' minimizer\n", - gsl_multimin_fdfminimizer_name (s)); - - would print something like `s is a 'conjugate_pr' minimizer'. - --- 7539,7541 ---- diff -a -rc -C 2 -P gsl-1.11/doc/gsl-ref.info-4 gsl-1.12/doc/gsl-ref.info-4 *** gsl-1.11/doc/gsl-ref.info-4 Sat Mar 29 15:07:29 2008 --- gsl-1.12/doc/gsl-ref.info-4 Mon Dec 15 15:28:50 2008 *************** *** 1,4 **** ! This is gsl-ref.info, produced by makeinfo version 4.8 from gsl-ref.texi. INFO-DIR-SECTION Scientific software --- 1,4 ---- ! This is gsl-ref.info, produced by makeinfo version 4.11 from gsl-ref.texi. INFO-DIR-SECTION Scientific software *************** *** 7,16 **** END-INFO-DIR-ENTRY Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, ! 2005, 2006, 2007 The GSL Team. Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with the Invariant Sections being "GNU General Public License" and "Free Software Needs Free Documentation", the Front-Cover text being "A GNU Manual", --- 7,16 ---- END-INFO-DIR-ENTRY Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, ! 2005, 2006, 2007, 2008 The GSL Team. Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "GNU General Public License" and "Free Software Needs Free Documentation", the Front-Cover text being "A GNU Manual", *************** *** 22,27 **** --- 22,107 ---- this GNU Manual."  + File: gsl-ref.info, Node: Multimin Caveats, Next: Initializing the Multidimensional Minimizer, Prev: Multimin Overview, Up: Multidimensional Minimization + + 35.2 Caveats + ============ + + Note that the minimization algorithms can only search for one local + minimum at a time. When there are several local minima in the search + area, the first minimum to be found will be returned; however it is + difficult to predict which of the minima this will be. In most cases, + no error will be reported if you try to find a local minimum in an area + where there is more than one. + + It is also important to note that the minimization algorithms find + local minima; there is no way to determine whether a minimum is a global + minimum of the function in question. + +  + File: gsl-ref.info, Node: Initializing the Multidimensional Minimizer, Next: Providing a function to minimize, Prev: Multimin Caveats, Up: Multidimensional Minimization + + 35.3 Initializing the Multidimensional Minimizer + ================================================ + + The following function initializes a multidimensional minimizer. The + minimizer itself depends only on the dimension of the problem and the + algorithm and can be reused for different problems. + + -- Function: gsl_multimin_fdfminimizer * + gsl_multimin_fdfminimizer_alloc (const gsl_multimin_fdfminimizer_type * + T, size_t N) + -- Function: gsl_multimin_fminimizer * gsl_multimin_fminimizer_alloc + (const gsl_multimin_fminimizer_type * T, size_t N) + This function returns a pointer to a newly allocated instance of a + minimizer of type T for an N-dimension function. If there is + insufficient memory to create the minimizer then the function + returns a null pointer and the error handler is invoked with an + error code of `GSL_ENOMEM'. + + -- Function: int gsl_multimin_fdfminimizer_set + (gsl_multimin_fdfminimizer * S, gsl_multimin_function_fdf * + FDF, const gsl_vector * X, double STEP_SIZE, double TOL) + This function initializes the minimizer S to minimize the function + FDF starting from the initial point X. The size of the first + trial step is given by STEP_SIZE. The accuracy of the line + minimization is specified by TOL. The precise meaning of this + parameter depends on the method used. Typically the line + minimization is considered successful if the gradient of the + function g is orthogonal to the current search direction p to a + relative accuracy of TOL, where dot(p,g) < tol |p| |g|. A TOL + value of 0.1 is suitable for most purposes, since line + minimization only needs to be carried out approximately. Note + that setting TOL to zero will force the use of "exact" + line-searches, which are extremely expensive. + + -- Function: int gsl_multimin_fminimizer_set (gsl_multimin_fminimizer + * S, gsl_multimin_function * F, const gsl_vector * X, const + gsl_vector * STEP_SIZE) + This function initializes the minimizer S to minimize the function + F, starting from the initial point X. The size of the initial + trial steps is given in vector STEP_SIZE. The precise meaning of + this parameter depends on the method used. + + -- Function: void gsl_multimin_fdfminimizer_free + (gsl_multimin_fdfminimizer * S) + -- Function: void gsl_multimin_fminimizer_free + (gsl_multimin_fminimizer * S) + This function frees all the memory associated with the minimizer S. + + -- Function: const char * gsl_multimin_fdfminimizer_name (const + gsl_multimin_fdfminimizer * S) + -- Function: const char * gsl_multimin_fminimizer_name (const + gsl_multimin_fminimizer * S) + This function returns a pointer to the name of the minimizer. For + example, + + printf ("s is a '%s' minimizer\n", + gsl_multimin_fdfminimizer_name (s)); + + would print something like `s is a 'conjugate_pr' minimizer'. + +  File: gsl-ref.info, Node: Providing a function to minimize, Next: Multimin Iteration, Prev: Initializing the Multidimensional Minimizer, Up: Multidimensional Minimization 35.4 Providing a function to minimize *************** *** 182,188 **** new starting point.  ! File: gsl-ref.info, Node: Multimin Stopping Criteria, Next: Multimin Algorithms, Prev: Multimin Iteration, Up: Multidimensional Minimization 35.6 Stopping Criteria ====================== --- 262,268 ---- new starting point.  ! File: gsl-ref.info, Node: Multimin Stopping Criteria, Next: Multimin Algorithms with Derivatives, Prev: Multimin Iteration, Up: Multidimensional Minimization 35.6 Stopping Criteria ====================== *************** *** 221,235 **** than tolerance, otherwise `GSL_CONTINUE' is returned.  ! File: gsl-ref.info, Node: Multimin Algorithms, Next: Multimin Examples, Prev: Multimin Stopping Criteria, Up: Multidimensional Minimization ! 35.7 Algorithms ! =============== 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 its gradient at each evaluation point, except for ! the Simplex algorithm which uses function values only. -- Minimizer: gsl_multimin_fdfminimizer_conjugate_fr This is the Fletcher-Reeves conjugate gradient algorithm. The --- 301,315 ---- than tolerance, otherwise `GSL_CONTINUE' is returned.  ! File: gsl-ref.info, Node: Multimin Algorithms with Derivatives, Next: Multimin Algorithms without Derivatives, Prev: Multimin Stopping Criteria, Up: Multidimensional Minimization ! 35.7 Algorithms with Derivatives ! ================================ There are several minimization methods available. The best choice of ! algorithm depends on the problem. The algorithms described in this ! section use the value of the function and its gradient at each ! evaluation point. -- Minimizer: gsl_multimin_fdfminimizer_conjugate_fr This is the Fletcher-Reeves conjugate gradient algorithm. The *************** *** 286,295 **** method is inefficient and is included only for demonstration purposes. -- Minimizer: gsl_multimin_fminimizer_nmsimplex ! This is the Simplex algorithm of Nelder and Mead. It constructs n ! vectors p_i from the starting vector X and the vector STEP_SIZE as ! follows: p_0 = (x_0, x_1, ... , x_n) p_1 = (x_0 + step_size_0, x_1, ... , x_n) --- 366,385 ---- method is inefficient and is included only for demonstration purposes. +  + File: gsl-ref.info, Node: Multimin Algorithms without Derivatives, Next: Multimin Examples, Prev: Multimin Algorithms with Derivatives, Up: Multidimensional Minimization + + 35.8 Algorithms without Derivatives + =================================== + + The algorithms described in this section use only the value of the + function at each evaluation point. + + -- Minimizer: gsl_multimin_fminimizer_nmsimplex2 -- Minimizer: gsl_multimin_fminimizer_nmsimplex ! These methods use the Simplex algorithm of Nelder and Mead. They ! construct n vectors p_i from the starting vector X and the vector ! STEP_SIZE as follows: p_0 = (x_0, x_1, ... , x_n) p_1 = (x_0 + step_size_0, x_1, ... , x_n) *************** *** 309,324 **** to the nature of the algorithm not every step improves the current best parameter vector. Usually several iterations are required. ! The routine calculates the minimizer specific characteristic size ! as the average distance from the geometrical center of the simplex ! to all its vertices. This size can be used as a stopping ! criteria, as the simplex contracts itself near the minimum. The ! size is returned by the function `gsl_multimin_fminimizer_size'.  ! File: gsl-ref.info, Node: Multimin Examples, Next: Multimin References and Further Reading, Prev: Multimin Algorithms, Up: Multidimensional Minimization ! 35.8 Examples ============= This example program finds the minimum of the paraboloid function --- 399,420 ---- to the nature of the algorithm not every step improves the current best parameter vector. Usually several iterations are required. ! The minimizer-specific characteristic size is calculated as the ! average distance from the geometrical center of the simplex to all ! its vertices. This size can be used as a stopping criteria, as the ! simplex contracts itself near the minimum. The size is returned by ! the function `gsl_multimin_fminimizer_size'. ! ! The `nmsimplex2' version of this minimiser is a new O(N) ! implementation of the earlier O(N^2) `nmsimplex' minimiser. It ! calculates the size of simplex as the RMS distance of each vertex ! from the center rather than the mean distance, which has the ! advantage of allowing a linear update.  ! File: gsl-ref.info, Node: Multimin Examples, Next: Multimin References and Further Reading, Prev: Multimin Algorithms without Derivatives, Up: Multidimensional Minimization ! 35.9 Examples ============= This example program finds the minimum of the paraboloid function *************** *** 424,430 **** double par[5] = {1.0, 2.0, 10.0, 20.0, 30.0}; const gsl_multimin_fminimizer_type *T = ! gsl_multimin_fminimizer_nmsimplex; gsl_multimin_fminimizer *s = NULL; gsl_vector *ss, *x; gsl_multimin_function minex_func; --- 520,526 ---- double par[5] = {1.0, 2.0, 10.0, 20.0, 30.0}; const gsl_multimin_fminimizer_type *T = ! gsl_multimin_fminimizer_nmsimplex2; gsl_multimin_fminimizer *s = NULL; gsl_vector *ss, *x; gsl_multimin_function minex_func; *************** *** 466,472 **** printf ("converged to minimum at\n"); } ! printf ("%5d %10.3e %10.3ef f() = %7.3f size = %.3f\n", iter, gsl_vector_get (s->x, 0), gsl_vector_get (s->x, 1), --- 562,568 ---- printf ("converged to minimum at\n"); } ! printf ("%5d %10.3e %10.3e f() = %7.3f size = %.3f\n", iter, gsl_vector_get (s->x, 0), gsl_vector_get (s->x, 1), *************** *** 484,515 **** The minimum search stops when the Simplex size drops to 0.01. The output is shown below. ! 1 6.500e+00 5.000e+00 f() = 512.500 size = 1.082 ! 2 5.250e+00 4.000e+00 f() = 290.625 size = 1.372 ! 3 5.250e+00 4.000e+00 f() = 290.625 size = 1.372 ! 4 5.500e+00 1.000e+00 f() = 252.500 size = 1.372 ! 5 2.625e+00 3.500e+00 f() = 101.406 size = 1.823 ! 6 3.469e+00 1.375e+00 f() = 98.760 size = 1.526 ! 7 1.820e+00 3.156e+00 f() = 63.467 size = 1.105 ! 8 1.820e+00 3.156e+00 f() = 63.467 size = 1.105 ! 9 1.016e+00 2.812e+00 f() = 43.206 size = 1.105 ! 10 2.041e+00 2.008e+00 f() = 40.838 size = 0.645 ! 11 1.236e+00 1.664e+00 f() = 32.816 size = 0.645 ! 12 1.236e+00 1.664e+00 f() = 32.816 size = 0.447 ! 13 5.225e-01 1.980e+00 f() = 32.288 size = 0.447 ! 14 1.103e+00 2.073e+00 f() = 30.214 size = 0.345 ! 15 1.103e+00 2.073e+00 f() = 30.214 size = 0.264 ! 16 1.103e+00 2.073e+00 f() = 30.214 size = 0.160 ! 17 9.864e-01 1.934e+00 f() = 30.090 size = 0.132 ! 18 9.190e-01 1.987e+00 f() = 30.069 size = 0.092 ! 19 1.028e+00 2.017e+00 f() = 30.013 size = 0.056 ! 20 1.028e+00 2.017e+00 f() = 30.013 size = 0.046 ! 21 1.028e+00 2.017e+00 f() = 30.013 size = 0.033 ! 22 9.874e-01 1.985e+00 f() = 30.006 size = 0.028 ! 23 9.846e-01 1.995e+00 f() = 30.003 size = 0.023 ! 24 1.007e+00 2.003e+00 f() = 30.001 size = 0.012 converged to minimum at ! 25 1.007e+00 2.003e+00 f() = 30.001 size = 0.010 The simplex size first increases, while the simplex moves towards the minimum. After a while the size begins to decrease as the simplex --- 580,610 ---- The minimum search stops when the Simplex size drops to 0.01. The output is shown below. ! 1 6.500e+00 5.000e+00 f() = 512.500 size = 1.130 ! 2 5.250e+00 4.000e+00 f() = 290.625 size = 1.409 ! 3 5.250e+00 4.000e+00 f() = 290.625 size = 1.409 ! 4 5.500e+00 1.000e+00 f() = 252.500 size = 1.409 ! 5 2.625e+00 3.500e+00 f() = 101.406 size = 1.847 ! 6 2.625e+00 3.500e+00 f() = 101.406 size = 1.847 ! 7 0.000e+00 3.000e+00 f() = 60.000 size = 1.847 ! 8 2.094e+00 1.875e+00 f() = 42.275 size = 1.321 ! 9 2.578e-01 1.906e+00 f() = 35.684 size = 1.069 ! 10 5.879e-01 2.445e+00 f() = 35.664 size = 0.841 ! 11 1.258e+00 2.025e+00 f() = 30.680 size = 0.476 ! 12 1.258e+00 2.025e+00 f() = 30.680 size = 0.367 ! 13 1.093e+00 1.849e+00 f() = 30.539 size = 0.300 ! 14 8.830e-01 2.004e+00 f() = 30.137 size = 0.172 ! 15 8.830e-01 2.004e+00 f() = 30.137 size = 0.126 ! 16 9.582e-01 2.060e+00 f() = 30.090 size = 0.106 ! 17 1.022e+00 2.004e+00 f() = 30.005 size = 0.063 ! 18 1.022e+00 2.004e+00 f() = 30.005 size = 0.043 ! 19 1.022e+00 2.004e+00 f() = 30.005 size = 0.043 ! 20 1.022e+00 2.004e+00 f() = 30.005 size = 0.027 ! 21 1.022e+00 2.004e+00 f() = 30.005 size = 0.022 ! 22 9.920e-01 1.997e+00 f() = 30.001 size = 0.016 ! 23 9.920e-01 1.997e+00 f() = 30.001 size = 0.013 converged to minimum at ! 24 9.920e-01 1.997e+00 f() = 30.001 size = 0.008 The simplex size first increases, while the simplex moves towards the minimum. After a while the size begins to decrease as the simplex *************** *** 518,525 ****  File: gsl-ref.info, Node: Multimin References and Further Reading, Prev: Multimin Examples, Up: Multidimensional Minimization ! 35.9 References and Further Reading ! =================================== The conjugate gradient and BFGS methods are described in detail in the following book, --- 613,620 ----  File: gsl-ref.info, Node: Multimin References and Further Reading, Prev: Multimin Examples, Up: Multidimensional Minimization ! 35.10 References and Further Reading ! ==================================== The conjugate gradient and BFGS methods are described in detail in the following book, *************** *** 1503,1509 **** \sigma^2 C. This estimates the statistical error on the best-fit parameters from the scatter of the underlying data. ! For more information about covariance matrices see *Note Fitting Overview::.  --- 1598,1604 ---- \sigma^2 C. This estimates the statistical error on the best-fit parameters from the scatter of the underlying data. ! For more information about covariance matrices see *note Fitting Overview::.  *************** *** 1792,1797 **** --- 1887,1893 ---- * Initializing the B-splines solver:: * Constructing the knots vector:: * Evaluation of B-spline basis functions:: + * Evaluation of B-spline basis function derivatives:: * Example programs for B-splines:: * References and Further Reading:: *************** *** 1832,1837 **** --- 1928,1935 ---- 38.2 Initializing the B-splines solver ====================================== + Using B-splines requires a gsl_bspline_workspace: + -- Function: gsl_bspline_workspace * gsl_bspline_alloc (const size_t K, const size_t NBREAK) This function allocates a workspace for computing B-splines of *************** *** 1842,1847 **** --- 1940,1959 ---- -- Function: void gsl_bspline_free (gsl_bspline_workspace * W) This function frees the memory associated with the workspace W. + Evaluation of B-spline basis function derivatives additionally + requires a `gsl_bspline_deriv_workspace': + + -- Function: gsl_bspline_deriv_workspace * gsl_bspline_deriv_alloc + (const size_t K) + This function allocates a workspace for computing the derivatives + of a B-spline basis function of order K. The size of the workspace + is O(2k^2). + + -- Function: void gsl_bspline_deriv_free (gsl_bspline_deriv_workspace + * W) + This function frees the memory associated with the derivative + workspace W. +  File: gsl-ref.info, Node: Constructing the knots vector, Next: Evaluation of B-spline basis functions, Prev: Initializing the B-splines solver, Up: Basis Splines *************** *** 1860,1866 **** specified NBREAK parameter. The knots are stored in `w->knots'.  ! File: gsl-ref.info, Node: Evaluation of B-spline basis functions, Next: Example programs for B-splines, Prev: Constructing the knots vector, Up: Basis Splines 38.4 Evaluation of B-splines ============================ --- 1972,1978 ---- specified NBREAK parameter. The knots are stored in `w->knots'.  ! File: gsl-ref.info, Node: Evaluation of B-spline basis functions, Next: Evaluation of B-spline basis function derivatives, Prev: Constructing the knots vector, Up: Basis Splines 38.4 Evaluation of B-splines ============================ *************** *** 1875,1888 **** compute them individually, due to the nature of the defining recurrence relation. -- Function: size_t gsl_bspline_ncoeffs (gsl_bspline_workspace * W) This function returns the number of B-spline coefficients given by n = nbreak + k - 2.  ! File: gsl-ref.info, Node: Example programs for B-splines, Next: References and Further Reading, Prev: Evaluation of B-spline basis functions, Up: Basis Splines ! 38.5 Example programs for B-splines =================================== The following program computes a linear least squares fit to data using --- 1987,2045 ---- compute them individually, due to the nature of the defining recurrence relation. + -- Function: int gsl_bspline_eval_nonzero (const double X, gsl_vector + * BK, size_t * ISTART, size_t * IEND, gsl_bspline_workspace * + W) + This function evaluates all potentially nonzero B-spline basis + functions at the position X and stores them in BK, so that the ith + element of BK is B_(istart+i)(x). The last element of BK is + B_(iend)(x). BK must be of length k. Only returning nonzero + basis functions allows users to more cheaply perform tasks + requiring linear combinations of the basis functions, e.g. when + evaluating an interpolated function. + -- Function: size_t gsl_bspline_ncoeffs (gsl_bspline_workspace * W) This function returns the number of B-spline coefficients given by n = nbreak + k - 2.  ! File: gsl-ref.info, Node: Evaluation of B-spline basis function derivatives, Next: Example programs for B-splines, Prev: Evaluation of B-spline basis functions, Up: Basis Splines ! ! 38.5 Evaluation of B-spline derivatives ! ======================================= ! ! -- Function: int gsl_bspline_deriv_eval (const double X, const size_t ! NDERIV, gsl_matrix * DB, gsl_bspline_workspace * W, ! gsl_bspline_deriv_workspace * DW) ! This function evaluates all B-spline basis function derivatives of ! orders 0 through nderiv (inclusive) at the position X and stores ! them in DB. The (i,j)th element of DB is d^j/dx^j B_i(x). DB ! must be of size n = nbreak + k - 2 by nderiv + 1. The value n may ! also be obtained by calling `gsl_bspline_ncoeffs'. Note that ! function evaluations are included as the 0th order derivatives in ! DB. It is far more efficient to compute all of the basis ! functions derivatives at once than to compute them individually, ! due to the nature of the defining recurrence relation. ! ! -- Function: int gsl_bspline_deriv_eval_nonzero (const double X, const ! size_t NDERIV, gsl_matrix * DB, size_t * ISTART, size_t * ! IEND, gsl_bspline_workspace * W, gsl_bspline_deriv_workspace ! * DW) ! This function evaluates all potentially nonzero B-spline basis ! function derivatives of orders 0 through nderiv (inclusive) at the ! position X and stores them in DB. The (i,j)th element of DB is ! d^j/dx^j B_(istart+i)(x). The last row of DB contains d^j/dx^j ! B_(iend)(x). DB must be of size k by at least nderiv + 1. Note ! that function evaluations are included as the 0th order ! derivatives in DB. Only returning nonzero basis functions allows ! users to more cheaply perform tasks requiring linear combinations ! of the basis functions, e.g. when evaluating an interpolated ! function. ! !  ! File: gsl-ref.info, Node: Example programs for B-splines, Next: References and Further Reading, Prev: Evaluation of B-spline basis function derivatives, Up: Basis Splines ! 38.6 Example programs for B-splines =================================== The following program computes a linear least squares fit to data using *************** *** 2024,2030 ****  File: gsl-ref.info, Node: References and Further Reading, Prev: Example programs for B-splines, Up: Basis Splines ! 38.6 References and Further Reading =================================== Further information on the algorithms described in this section can be --- 2181,2187 ----  File: gsl-ref.info, Node: References and Further Reading, Prev: Example programs for B-splines, Up: Basis Splines ! 38.7 References and Further Reading =================================== Further information on the algorithms described in this section can be *************** *** 2034,2040 **** ISBN 0-387-90356-9. A large collection of B-spline routines is available in the PPPACK ! library available at `http://www.netlib.org/pppack'.  File: gsl-ref.info, Node: Physical Constants, Next: IEEE floating-point arithmetic, Prev: Basis Splines, Up: Top --- 2191,2198 ---- ISBN 0-387-90356-9. A large collection of B-spline routines is available in the PPPACK ! library available at `http://www.netlib.org/pppack', which is also part ! of SLATEC.  File: gsl-ref.info, Node: Physical Constants, Next: IEEE floating-point arithmetic, Prev: Basis Splines, Up: Top *************** *** 3144,3151 **** gcc -ansi -pedantic -Werror -Wall -W -Wmissing-prototypes -Wstrict-prototypes ! -Wtraditional -Wconversion -Wshadow ! -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-externs -fshort-enums -fno-common -Dinline= -g -O2 --- 3302,3309 ---- gcc -ansi -pedantic -Werror -Wall -W -Wmissing-prototypes -Wstrict-prototypes ! -Wconversion -Wshadow -Wpointer-arith ! -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-externs -fshort-enums -fno-common -Dinline= -g -O2 *************** *** 5043,5054 **** GNU Free Documentation License ****************************** ! Version 1.2, November 2002 ! Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. ! 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA ! Everyone is permitted to copy and distribute verbatim copies of this license ! document, but changing it is not allowed. 0. PREAMBLE --- 5201,5212 ---- GNU Free Documentation License ****************************** ! Version 1.3, 3 November 2008 ! Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. ! `http://fsf.org/' ! Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is ! not allowed. 0. PREAMBLE *************** *** 5147,5152 **** --- 5305,5313 ---- Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. + The "publisher" means any person or entity that distributes copies + of the Document to the public. + A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ *************** *** 5412,5423 **** 9. TERMINATION You may not copy, modify, sublicense, or distribute the Document ! except as expressly provided for under this License. Any other ! attempt to copy, modify, sublicense or distribute the Document is ! void, and will automatically terminate your rights under this ! License. However, parties who have received copies, or rights, ! from you under this License will not have their licenses ! terminated so long as such parties remain in full compliance. 10. FUTURE REVISIONS OF THIS LICENSE --- 5573,5601 ---- 9. TERMINATION You may not copy, modify, sublicense, or distribute the Document ! except as expressly provided under this License. Any attempt ! otherwise to copy, modify, sublicense, or distribute it is void, ! and will automatically terminate your rights under this License. ! ! However, if you cease all violation of this License, then your ! license from a particular copyright holder is reinstated (a) ! provisionally, unless and until the copyright holder explicitly ! and finally terminates your license, and (b) permanently, if the ! copyright holder fails to notify you of the violation by some ! reasonable means prior to 60 days after the cessation. ! ! Moreover, your license from a particular copyright holder is ! reinstated permanently if the copyright holder notifies you of the ! violation by some reasonable means, this is the first time you have ! received notice of violation of this License (for any work) from ! that copyright holder, and you cure the violation prior to 30 days ! after your receipt of the notice. ! ! Termination of your rights under this section does not terminate ! the licenses of parties who have received copies or rights from ! you under this License. If your rights have been terminated and ! not permanently reinstated, receipt of a copy of some or all of ! the same material does not give you any rights to use it. 10. FUTURE REVISIONS OF THIS LICENSE *************** *** 5435,5441 **** published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the ! Free Software Foundation. ADDENDUM: How to use this License for your documents ==================================================== --- 5613,5653 ---- published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the ! Free Software Foundation. If the Document specifies that a proxy ! can decide which future versions of this License can be used, that ! proxy's public statement of acceptance of a version permanently ! authorizes you to choose that version for the Document. ! ! 11. RELICENSING ! ! "Massive Multiauthor Collaboration Site" (or "MMC Site") means any ! World Wide Web server that publishes copyrightable works and also ! provides prominent facilities for anybody to edit those works. A ! public wiki that anybody can edit is an example of such a server. ! A "Massive Multiauthor Collaboration" (or "MMC") contained in the ! site means any set of copyrightable works thus published on the MMC ! site. ! ! "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 ! license published by Creative Commons Corporation, a not-for-profit ! corporation with a principal place of business in San Francisco, ! California, as well as future copyleft versions of that license ! published by that same organization. ! ! "Incorporate" means to publish or republish a Document, in whole or ! in part, as part of another Document. ! ! An MMC is "eligible for relicensing" if it is licensed under this ! License, and if all works that were first published under this ! License somewhere other than this MMC, and subsequently ! incorporated in whole or in part into the MMC, (1) had no cover ! texts or invariant sections, and (2) were thus incorporated prior ! to November 1, 2008. ! ! The operator of an MMC Site may republish an MMC contained in the ! site under CC-BY-SA on the same site at any time before August 1, ! 2009, provided the MMC is eligible for relicensing. ! ADDENDUM: How to use this License for your documents ==================================================== *************** *** 5444,5453 **** the License in the document and put the following copyright and license notices just after the title page: ! Copyright (C) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free ! Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in --- 5656,5665 ---- the License in the document and put the following copyright and license notices just after the title page: ! Copyright (C) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free ! Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in diff -a -rc -C 2 -P gsl-1.11/doc/gsl-ref.info-5 gsl-1.12/doc/gsl-ref.info-5 *** gsl-1.11/doc/gsl-ref.info-5 Sat Mar 29 15:07:29 2008 --- gsl-1.12/doc/gsl-ref.info-5 Mon Dec 15 15:28:50 2008 *************** *** 1,4 **** ! This is gsl-ref.info, produced by makeinfo version 4.8 from gsl-ref.texi. INFO-DIR-SECTION Scientific software --- 1,4 ---- ! This is gsl-ref.info, produced by makeinfo version 4.11 from gsl-ref.texi. INFO-DIR-SECTION Scientific software *************** *** 7,16 **** END-INFO-DIR-ENTRY Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, ! 2005, 2006, 2007 The GSL Team. Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with the Invariant Sections being "GNU General Public License" and "Free Software Needs Free Documentation", the Front-Cover text being "A GNU Manual", --- 7,16 ---- END-INFO-DIR-ENTRY Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, ! 2005, 2006, 2007, 2008 The GSL Team. Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "GNU General Public License" and "Free Software Needs Free Documentation", the Front-Cover text being "A GNU Manual", *************** *** 546,562 **** * gsl_block_fwrite: Reading and writing blocks. (line 10) * gsl_bspline_alloc: Initializing the B-splines solver. ! (line 8) * gsl_bspline_eval: Evaluation of B-spline basis functions. (line 8) * gsl_bspline_free: Initializing the B-splines solver. ! (line 14) * gsl_bspline_knots: Constructing the knots vector. (line 8) * gsl_bspline_knots_uniform: Constructing the knots vector. (line 13) * gsl_bspline_ncoeffs: Evaluation of B-spline basis functions. ! (line 17) * gsl_cdf_beta_P: The Beta Distribution. (line 22) * gsl_cdf_beta_Pinv: The Beta Distribution. --- 546,572 ---- * gsl_block_fwrite: Reading and writing blocks. (line 10) * gsl_bspline_alloc: Initializing the B-splines solver. ! (line 10) ! * gsl_bspline_deriv_alloc: Initializing the B-splines solver. ! (line 23) ! * gsl_bspline_deriv_eval: Evaluation of B-spline basis function derivatives. ! (line 9) ! * gsl_bspline_deriv_eval_nonzero: Evaluation of B-spline basis function derivatives. ! (line 23) ! * gsl_bspline_deriv_free: Initializing the B-splines solver. ! (line 29) * gsl_bspline_eval: Evaluation of B-spline basis functions. (line 8) + * gsl_bspline_eval_nonzero: Evaluation of B-spline basis functions. + (line 19) * gsl_bspline_free: Initializing the B-splines solver. ! (line 16) * gsl_bspline_knots: Constructing the knots vector. (line 8) * gsl_bspline_knots_uniform: Constructing the knots vector. (line 13) * gsl_bspline_ncoeffs: Evaluation of B-spline basis functions. ! (line 28) * gsl_cdf_beta_P: The Beta Distribution. (line 22) * gsl_cdf_beta_Pinv: The Beta Distribution. *************** *** 727,732 **** --- 737,744 ---- (line 14) * gsl_cheb_calc_integ: Derivatives and Integrals. (line 21) + * gsl_cheb_coeffs: Auxiliary Functions for Chebyshev Series. + (line 14) * gsl_cheb_eval: Chebyshev Series Evaluation. (line 8) * gsl_cheb_eval_err: Chebyshev Series Evaluation. *************** *** 739,744 **** --- 751,760 ---- (line 11) * gsl_cheb_init: Creation and Calculation of Chebyshev Series. (line 15) + * gsl_cheb_order: Auxiliary Functions for Chebyshev Series. + (line 10) + * gsl_cheb_size: Auxiliary Functions for Chebyshev Series. + (line 13) * gsl_combination_alloc: Combination allocation. (line 8) * gsl_combination_calloc: Combination allocation. *************** *** 861,874 **** (line 31) * gsl_complex_negative: Complex arithmetic operators. (line 63) ! * gsl_complex_polar: Complex numbers. (line 30) * gsl_complex_poly_complex_eval: Polynomial Evaluation. (line 23) * gsl_complex_pow: Elementary Complex Functions. (line 16) * gsl_complex_pow_real: Elementary Complex Functions. (line 21) ! * gsl_complex_rect: Complex numbers. (line 25) * gsl_complex_sec: Complex Trigonometric Functions. (line 19) * gsl_complex_sech: Complex Hyperbolic Functions. --- 877,892 ---- (line 31) * gsl_complex_negative: Complex arithmetic operators. (line 63) ! * gsl_complex_polar: Representation of complex numbers. ! (line 30) * gsl_complex_poly_complex_eval: Polynomial Evaluation. (line 23) * gsl_complex_pow: Elementary Complex Functions. (line 16) * gsl_complex_pow_real: Elementary Complex Functions. (line 21) ! * gsl_complex_rect: Representation of complex numbers. ! (line 25) * gsl_complex_sec: Complex Trigonometric Functions. (line 19) * gsl_complex_sech: Complex Hyperbolic Functions. *************** *** 1052,1060 **** * gsl_fft_complex_workspace_free: Mixed-radix FFT routines for complex data. (line 112) * gsl_fft_halfcomplex_radix2_backward: Radix-2 FFT routines for real data. ! (line 58) * gsl_fft_halfcomplex_radix2_inverse: Radix-2 FFT routines for real data. ! (line 56) * gsl_fft_halfcomplex_transform: Mixed-radix FFT routines for real data. (line 125) * gsl_fft_halfcomplex_unpack: Mixed-radix FFT routines for real data. --- 1070,1080 ---- * gsl_fft_complex_workspace_free: Mixed-radix FFT routines for complex data. (line 112) * gsl_fft_halfcomplex_radix2_backward: Radix-2 FFT routines for real data. ! (line 59) * gsl_fft_halfcomplex_radix2_inverse: Radix-2 FFT routines for real data. ! (line 57) ! * gsl_fft_halfcomplex_radix2_unpack: Radix-2 FFT routines for real data. ! (line 68) * gsl_fft_halfcomplex_transform: Mixed-radix FFT routines for real data. (line 125) * gsl_fft_halfcomplex_unpack: Mixed-radix FFT routines for real data. *************** *** 1266,1272 **** (line 84) * gsl_ieee_printf_float: Representation of floating point numbers. (line 83) ! * GSL_IMAG: Complex numbers. (line 36) * gsl_integration_qag: QAG adaptive integration. (line 28) * gsl_integration_qagi: QAGI adaptive integration on infinite intervals. --- 1286,1293 ---- (line 84) * gsl_ieee_printf_float: Representation of floating point numbers. (line 83) ! * GSL_IMAG: Representation of complex numbers. ! (line 36) * gsl_integration_qag: QAG adaptive integration. (line 28) * gsl_integration_qagi: QAGI adaptive integration on infinite intervals. *************** *** 1362,1367 **** --- 1383,1390 ---- * gsl_linalg_bidiag_unpack_B: Bidiagonalization. (line 44) * gsl_linalg_cholesky_decomp: Cholesky Decomposition. (line 19) + * gsl_linalg_cholesky_invert: Cholesky Decomposition. + (line 56) * gsl_linalg_cholesky_solve: Cholesky Decomposition. (line 37) * gsl_linalg_cholesky_svx: Cholesky Decomposition. *************** *** 1381,1391 **** * gsl_linalg_complex_householder_transform: Householder Transformations. (line 20) * gsl_linalg_complex_LU_decomp: LU Decomposition. (line 22) ! * gsl_linalg_complex_LU_det: LU Decomposition. (line 85) ! * gsl_linalg_complex_LU_invert: LU Decomposition. (line 73) ! * gsl_linalg_complex_LU_lndet: LU Decomposition. (line 93) ! * gsl_linalg_complex_LU_refine: LU Decomposition. (line 63) ! * gsl_linalg_complex_LU_sgndet: LU Decomposition. (line 101) * gsl_linalg_complex_LU_solve: LU Decomposition. (line 44) * gsl_linalg_complex_LU_svx: LU Decomposition. (line 52) * gsl_linalg_hermtd_decomp: Tridiagonal Decomposition of Hermitian Matrices. --- 1404,1414 ---- * gsl_linalg_complex_householder_transform: Householder Transformations. (line 20) * gsl_linalg_complex_LU_decomp: LU Decomposition. (line 22) ! * gsl_linalg_complex_LU_det: LU Decomposition. (line 86) ! * gsl_linalg_complex_LU_invert: LU Decomposition. (line 74) ! * gsl_linalg_complex_LU_lndet: LU Decomposition. (line 94) ! * gsl_linalg_complex_LU_refine: LU Decomposition. (line 64) ! * gsl_linalg_complex_LU_sgndet: LU Decomposition. (line 102) * gsl_linalg_complex_LU_solve: LU Decomposition. (line 44) * gsl_linalg_complex_LU_svx: LU Decomposition. (line 52) * gsl_linalg_hermtd_decomp: Tridiagonal Decomposition of Hermitian Matrices. *************** *** 1417,1441 **** * gsl_linalg_householder_transform: Householder Transformations. (line 18) * gsl_linalg_LU_decomp: LU Decomposition. (line 20) ! * gsl_linalg_LU_det: LU Decomposition. (line 83) ! * gsl_linalg_LU_invert: LU Decomposition. (line 70) ! * gsl_linalg_LU_lndet: LU Decomposition. (line 91) ! * gsl_linalg_LU_refine: LU Decomposition. (line 59) ! * gsl_linalg_LU_sgndet: LU Decomposition. (line 99) * gsl_linalg_LU_solve: LU Decomposition. (line 41) * gsl_linalg_LU_svx: LU Decomposition. (line 50) * gsl_linalg_QR_decomp: QR Decomposition. (line 21) ! * gsl_linalg_QR_lssolve: QR Decomposition. (line 53) ! * gsl_linalg_QR_QRsolve: QR Decomposition. (line 104) ! * gsl_linalg_QR_QTmat: QR Decomposition. (line 78) ! * gsl_linalg_QR_QTvec: QR Decomposition. (line 63) ! * gsl_linalg_QR_Qvec: QR Decomposition. (line 71) ! * gsl_linalg_QR_Rsolve: QR Decomposition. (line 86) ! * gsl_linalg_QR_Rsvx: QR Decomposition. (line 92) * gsl_linalg_QR_solve: QR Decomposition. (line 38) ! * gsl_linalg_QR_svx: QR Decomposition. (line 45) ! * gsl_linalg_QR_unpack: QR Decomposition. (line 99) ! * gsl_linalg_QR_update: QR Decomposition. (line 110) * gsl_linalg_QRPT_decomp: QR Decomposition with Column Pivoting. (line 20) * gsl_linalg_QRPT_decomp2: QR Decomposition with Column Pivoting. --- 1440,1464 ---- * gsl_linalg_householder_transform: Householder Transformations. (line 18) * gsl_linalg_LU_decomp: LU Decomposition. (line 20) ! * gsl_linalg_LU_det: LU Decomposition. (line 84) ! * gsl_linalg_LU_invert: LU Decomposition. (line 71) ! * gsl_linalg_LU_lndet: LU Decomposition. (line 92) ! * gsl_linalg_LU_refine: LU Decomposition. (line 60) ! * gsl_linalg_LU_sgndet: LU Decomposition. (line 100) * gsl_linalg_LU_solve: LU Decomposition. (line 41) * gsl_linalg_LU_svx: LU Decomposition. (line 50) * gsl_linalg_QR_decomp: QR Decomposition. (line 21) ! * gsl_linalg_QR_lssolve: QR Decomposition. (line 55) ! * gsl_linalg_QR_QRsolve: QR Decomposition. (line 106) ! * gsl_linalg_QR_QTmat: QR Decomposition. (line 80) ! * gsl_linalg_QR_QTvec: QR Decomposition. (line 65) ! * gsl_linalg_QR_Qvec: QR Decomposition. (line 73) ! * gsl_linalg_QR_Rsolve: QR Decomposition. (line 88) ! * gsl_linalg_QR_Rsvx: QR Decomposition. (line 94) * gsl_linalg_QR_solve: QR Decomposition. (line 38) ! * gsl_linalg_QR_svx: QR Decomposition. (line 46) ! * gsl_linalg_QR_unpack: QR Decomposition. (line 101) ! * gsl_linalg_QR_update: QR Decomposition. (line 112) * gsl_linalg_QRPT_decomp: QR Decomposition with Column Pivoting. (line 20) * gsl_linalg_QRPT_decomp2: QR Decomposition with Column Pivoting. *************** *** 1452,1471 **** (line 55) * gsl_linalg_QRPT_update: QR Decomposition with Column Pivoting. (line 70) ! * gsl_linalg_R_solve: QR Decomposition. (line 117) ! * gsl_linalg_R_svx: QR Decomposition. (line 122) * gsl_linalg_solve_cyc_tridiag: Tridiagonal Systems. (line 43) * gsl_linalg_solve_symm_cyc_tridiag: Tridiagonal Systems. (line 57) * gsl_linalg_solve_symm_tridiag: Tridiagonal Systems. (line 30) * gsl_linalg_solve_tridiag: Tridiagonal Systems. (line 16) * gsl_linalg_SV_decomp: Singular Value Decomposition. ! (line 33) * gsl_linalg_SV_decomp_jacobi: Singular Value Decomposition. ! (line 52) * gsl_linalg_SV_decomp_mod: Singular Value Decomposition. ! (line 46) * gsl_linalg_SV_solve: Singular Value Decomposition. ! (line 59) * gsl_linalg_symmtd_decomp: Tridiagonal Decomposition of Real Symmetric Matrices. (line 15) * gsl_linalg_symmtd_unpack: Tridiagonal Decomposition of Real Symmetric Matrices. --- 1475,1494 ---- (line 55) * gsl_linalg_QRPT_update: QR Decomposition with Column Pivoting. (line 70) ! * gsl_linalg_R_solve: QR Decomposition. (line 119) ! * gsl_linalg_R_svx: QR Decomposition. (line 124) * gsl_linalg_solve_cyc_tridiag: Tridiagonal Systems. (line 43) * gsl_linalg_solve_symm_cyc_tridiag: Tridiagonal Systems. (line 57) * gsl_linalg_solve_symm_tridiag: Tridiagonal Systems. (line 30) * gsl_linalg_solve_tridiag: Tridiagonal Systems. (line 16) * gsl_linalg_SV_decomp: Singular Value Decomposition. ! (line 39) * gsl_linalg_SV_decomp_jacobi: Singular Value Decomposition. ! (line 58) * gsl_linalg_SV_decomp_mod: Singular Value Decomposition. ! (line 52) * gsl_linalg_SV_solve: Singular Value Decomposition. ! (line 65) * gsl_linalg_symmtd_decomp: Tridiagonal Decomposition of Real Symmetric Matrices. (line 15) * gsl_linalg_symmtd_unpack: Tridiagonal Decomposition of Real Symmetric Matrices. *************** *** 1519,1528 **** (line 21) * gsl_matrix_get_row: Copying rows and columns. (line 15) ! * gsl_matrix_isneg: Matrix properties. (line 9) ! * gsl_matrix_isnonneg: Matrix properties. (line 10) ! * gsl_matrix_isnull: Matrix properties. (line 7) ! * gsl_matrix_ispos: Matrix properties. (line 8) * gsl_matrix_max: Finding maximum and minimum elements of matrices. (line 9) * gsl_matrix_max_index: Finding maximum and minimum elements of matrices. --- 1542,1551 ---- (line 21) * gsl_matrix_get_row: Copying rows and columns. (line 15) ! * gsl_matrix_isneg: Matrix properties. (line 13) ! * gsl_matrix_isnonneg: Matrix properties. (line 14) ! * gsl_matrix_isnull: Matrix properties. (line 11) ! * gsl_matrix_ispos: Matrix properties. (line 12) * gsl_matrix_max: Finding maximum and minimum elements of matrices. (line 9) * gsl_matrix_max_index: Finding maximum and minimum elements of matrices. *************** *** 1580,1596 **** * gsl_matrix_view_vector: Matrix views. (line 103) * gsl_matrix_view_vector_with_tda: Matrix views. (line 127) * GSL_MAX: Maximum and Minimum functions. ! (line 7) * GSL_MAX_DBL: Maximum and Minimum functions. ! (line 15) * GSL_MAX_INT: Maximum and Minimum functions. ! (line 29) * GSL_MAX_LDBL: Maximum and Minimum functions. ! (line 37) * GSL_MIN: Maximum and Minimum functions. ! (line 11) * GSL_MIN_DBL: Maximum and Minimum functions. ! (line 22) * gsl_min_fminimizer_alloc: Initializing the Minimizer. (line 8) * gsl_min_fminimizer_brent: Minimization Algorithms. --- 1603,1619 ---- * gsl_matrix_view_vector: Matrix views. (line 103) * gsl_matrix_view_vector_with_tda: Matrix views. (line 127) * GSL_MAX: Maximum and Minimum functions. ! (line 11) * GSL_MAX_DBL: Maximum and Minimum functions. ! (line 19) * GSL_MAX_INT: Maximum and Minimum functions. ! (line 33) * GSL_MAX_LDBL: Maximum and Minimum functions. ! (line 41) * GSL_MIN: Maximum and Minimum functions. ! (line 15) * GSL_MIN_DBL: Maximum and Minimum functions. ! (line 26) * gsl_min_fminimizer_alloc: Initializing the Minimizer. (line 8) * gsl_min_fminimizer_brent: Minimization Algorithms. *************** *** 1620,1628 **** * gsl_min_fminimizer_x_upper: Minimization Iteration. (line 36) * GSL_MIN_INT: Maximum and Minimum functions. ! (line 30) * GSL_MIN_LDBL: Maximum and Minimum functions. ! (line 39) * gsl_min_test_interval: Minimization Stopping Parameters. (line 20) * gsl_monte_miser_alloc: MISER. (line 47) --- 1643,1651 ---- * gsl_min_fminimizer_x_upper: Minimization Iteration. (line 36) * GSL_MIN_INT: Maximum and Minimum functions. ! (line 34) * GSL_MIN_LDBL: Maximum and Minimum functions. ! (line 43) * gsl_min_test_interval: Minimization Stopping Parameters. (line 20) * gsl_monte_miser_alloc: MISER. (line 47) *************** *** 1691,1699 **** (line 85) * gsl_multimin_fdfminimizer_alloc: Initializing the Multidimensional Minimizer. (line 13) ! * gsl_multimin_fdfminimizer_conjugate_fr: Multimin Algorithms. (line 12) ! * gsl_multimin_fdfminimizer_conjugate_pr: Multimin Algorithms. (line 29) * gsl_multimin_fdfminimizer_free: Initializing the Multidimensional Minimizer. (line 47) --- 1714,1722 ---- (line 85) * gsl_multimin_fdfminimizer_alloc: Initializing the Multidimensional Minimizer. (line 13) ! * gsl_multimin_fdfminimizer_conjugate_fr: Multimin Algorithms with Derivatives. (line 12) ! * gsl_multimin_fdfminimizer_conjugate_pr: Multimin Algorithms with Derivatives. (line 29) * gsl_multimin_fdfminimizer_free: Initializing the Multidimensional Minimizer. (line 47) *************** *** 1705,1714 **** * gsl_multimin_fdfminimizer_restart: Multimin Iteration. (line 42) * gsl_multimin_fdfminimizer_set: Initializing the Multidimensional Minimizer. (line 24) ! * gsl_multimin_fdfminimizer_steepest_descent: Multimin Algorithms. (line 57) ! * gsl_multimin_fdfminimizer_vector_bfgs: Multimin Algorithms. (line 37) ! * gsl_multimin_fdfminimizer_vector_bfgs2: Multimin Algorithms. (line 36) * gsl_multimin_fdfminimizer_x: Multimin Iteration. (line 25) * gsl_multimin_fminimizer_alloc: Initializing the Multidimensional Minimizer. --- 1728,1738 ---- * gsl_multimin_fdfminimizer_restart: Multimin Iteration. (line 42) * gsl_multimin_fdfminimizer_set: Initializing the Multidimensional Minimizer. (line 24) ! * gsl_multimin_fdfminimizer_steepest_descent: Multimin Algorithms with Derivatives. (line 57) ! * gsl_multimin_fdfminimizer_vector_bfgs: Multimin Algorithms with Derivatives. ! (line 37) ! * gsl_multimin_fdfminimizer_vector_bfgs2: Multimin Algorithms with Derivatives. (line 36) * gsl_multimin_fdfminimizer_x: Multimin Iteration. (line 25) * gsl_multimin_fminimizer_alloc: Initializing the Multidimensional Minimizer. *************** *** 1719,1725 **** * gsl_multimin_fminimizer_minimum: Multimin Iteration. (line 31) * gsl_multimin_fminimizer_name: Initializing the Multidimensional Minimizer. (line 55) ! * gsl_multimin_fminimizer_nmsimplex: Multimin Algorithms. (line 67) * gsl_multimin_fminimizer_set: Initializing the Multidimensional Minimizer. (line 40) * gsl_multimin_fminimizer_size: Multimin Iteration. (line 35) --- 1743,1752 ---- * gsl_multimin_fminimizer_minimum: Multimin Iteration. (line 31) * gsl_multimin_fminimizer_name: Initializing the Multidimensional Minimizer. (line 55) ! * gsl_multimin_fminimizer_nmsimplex: Multimin Algorithms without Derivatives. ! (line 11) ! * gsl_multimin_fminimizer_nmsimplex2: Multimin Algorithms without Derivatives. ! (line 10) * gsl_multimin_fminimizer_set: Initializing the Multidimensional Minimizer. (line 40) * gsl_multimin_fminimizer_size: Multimin Iteration. (line 35) *************** *** 1946,1952 **** (line 7) * gsl_qrng_niederreiter_2: Quasi-random number generator algorithms. (line 9) ! * gsl_qrng_reverse_halton: Quasi-random number generator algorithms. (line 20) * gsl_qrng_size: Auxiliary quasi-random number generator functions. (line 10) --- 1973,1979 ---- (line 7) * gsl_qrng_niederreiter_2: Quasi-random number generator algorithms. (line 9) ! * gsl_qrng_reversehalton: Quasi-random number generator algorithms. (line 20) * gsl_qrng_size: Auxiliary quasi-random number generator functions. (line 10) *************** *** 2124,2130 **** (line 8) * gsl_ran_weibull_pdf: The Weibull Distribution. (line 16) ! * GSL_REAL: Complex numbers. (line 35) * gsl_rng_alloc: Random number generator initialization. (line 7) * gsl_rng_borosh13: Other random number generators. --- 2151,2158 ---- (line 8) * gsl_ran_weibull_pdf: The Weibull Distribution. (line 16) ! * GSL_REAL: Representation of complex numbers. ! (line 35) * gsl_rng_alloc: Random number generator initialization. (line 7) * gsl_rng_borosh13: Other random number generators. *************** *** 2146,2152 **** * gsl_rng_fread: Reading and writing random number generator state. (line 18) * gsl_rng_free: Random number generator initialization. ! (line 38) * gsl_rng_fwrite: Reading and writing random number generator state. (line 10) * gsl_rng_get: Sampling from a random number generator. --- 2174,2180 ---- * gsl_rng_fread: Reading and writing random number generator state. (line 18) * gsl_rng_free: Random number generator initialization. ! (line 46) * gsl_rng_fwrite: Reading and writing random number generator state. (line 10) * gsl_rng_get: Sampling from a random number generator. *************** *** 2287,2297 **** (line 21) * gsl_root_test_residual: Search Stopping Parameters. (line 53) ! * GSL_SET_COMPLEX: Complex numbers. (line 40) * gsl_set_error_handler: Error Handlers. (line 44) * gsl_set_error_handler_off: Error Handlers. (line 68) ! * GSL_SET_IMAG: Complex numbers. (line 50) ! * GSL_SET_REAL: Complex numbers. (line 49) * gsl_sf_airy_Ai: Airy Functions. (line 7) * gsl_sf_airy_Ai_deriv: Derivatives of Airy Functions. (line 7) --- 2315,2328 ---- (line 21) * gsl_root_test_residual: Search Stopping Parameters. (line 53) ! * GSL_SET_COMPLEX: Representation of complex numbers. ! (line 40) * gsl_set_error_handler: Error Handlers. (line 44) * gsl_set_error_handler_off: Error Handlers. (line 68) ! * GSL_SET_IMAG: Representation of complex numbers. ! (line 50) ! * GSL_SET_REAL: Representation of complex numbers. ! (line 49) * gsl_sf_airy_Ai: Airy Functions. (line 7) * gsl_sf_airy_Ai_deriv: Derivatives of Airy Functions. (line 7) *************** *** 3223,3230 **** (line 24) * gsl_sum_levin_utrunc_free: Acceleration functions without error estimation. (line 30) ! * gsl_vector_add: Vector operations. (line 9) ! * gsl_vector_add_constant: Vector operations. (line 34) * gsl_vector_alloc: Vector allocation. (line 15) * gsl_vector_calloc: Vector allocation. (line 22) * gsl_vector_complex_const_imag: Vector views. (line 110) --- 3254,3261 ---- (line 24) * gsl_sum_levin_utrunc_free: Acceleration functions without error estimation. (line 30) ! * gsl_vector_add: Vector operations. (line 7) ! * gsl_vector_add_constant: Vector operations. (line 32) * gsl_vector_alloc: Vector allocation. (line 15) * gsl_vector_calloc: Vector allocation. (line 22) * gsl_vector_complex_const_imag: Vector views. (line 110) *************** *** 3237,3243 **** * gsl_vector_const_subvector_with_stride: Vector views. (line 62) * gsl_vector_const_view_array: Vector views. (line 121) * gsl_vector_const_view_array_with_stride: Vector views. (line 145) ! * gsl_vector_div: Vector operations. (line 24) * gsl_vector_fprintf: Reading and writing vectors. (line 28) * gsl_vector_fread: Reading and writing vectors. --- 3268,3274 ---- * gsl_vector_const_subvector_with_stride: Vector views. (line 62) * gsl_vector_const_view_array: Vector views. (line 121) * gsl_vector_const_view_array_with_stride: Vector views. (line 145) ! * gsl_vector_div: Vector operations. (line 22) * gsl_vector_fprintf: Reading and writing vectors. (line 28) * gsl_vector_fread: Reading and writing vectors. *************** *** 3249,3276 **** (line 11) * gsl_vector_get: Accessing vector elements. (line 29) ! * gsl_vector_isneg: Vector properties. (line 9) ! * gsl_vector_isnonneg: Vector properties. (line 10) ! * gsl_vector_isnull: Vector properties. (line 7) ! * gsl_vector_ispos: Vector properties. (line 8) * gsl_vector_max: Finding maximum and minimum elements of vectors. ! (line 7) * gsl_vector_max_index: Finding maximum and minimum elements of vectors. ! (line 18) * gsl_vector_memcpy: Copying vectors. (line 14) * gsl_vector_min: Finding maximum and minimum elements of vectors. ! (line 10) * gsl_vector_min_index: Finding maximum and minimum elements of vectors. ! (line 23) * gsl_vector_minmax: Finding maximum and minimum elements of vectors. ! (line 14) * gsl_vector_minmax_index: Finding maximum and minimum elements of vectors. ! (line 29) ! * gsl_vector_mul: Vector operations. (line 19) * gsl_vector_ptr: Accessing vector elements. (line 41) * gsl_vector_reverse: Exchanging elements. (line 15) ! * gsl_vector_scale: Vector operations. (line 29) * gsl_vector_set: Accessing vector elements. (line 35) * gsl_vector_set_all: Initializing vector elements. --- 3280,3307 ---- (line 11) * gsl_vector_get: Accessing vector elements. (line 29) ! * gsl_vector_isneg: Vector properties. (line 13) ! * gsl_vector_isnonneg: Vector properties. (line 14) ! * gsl_vector_isnull: Vector properties. (line 11) ! * gsl_vector_ispos: Vector properties. (line 12) * gsl_vector_max: Finding maximum and minimum elements of vectors. ! (line 9) * gsl_vector_max_index: Finding maximum and minimum elements of vectors. ! (line 20) * gsl_vector_memcpy: Copying vectors. (line 14) * gsl_vector_min: Finding maximum and minimum elements of vectors. ! (line 12) * gsl_vector_min_index: Finding maximum and minimum elements of vectors. ! (line 25) * gsl_vector_minmax: Finding maximum and minimum elements of vectors. ! (line 16) * gsl_vector_minmax_index: Finding maximum and minimum elements of vectors. ! (line 31) ! * gsl_vector_mul: Vector operations. (line 17) * gsl_vector_ptr: Accessing vector elements. (line 41) * gsl_vector_reverse: Exchanging elements. (line 15) ! * gsl_vector_scale: Vector operations. (line 27) * gsl_vector_set: Accessing vector elements. (line 35) * gsl_vector_set_all: Initializing vector elements. *************** *** 3279,3285 **** (line 13) * gsl_vector_set_zero: Initializing vector elements. (line 10) ! * gsl_vector_sub: Vector operations. (line 14) * gsl_vector_subvector: Vector views. (line 29) * gsl_vector_subvector_with_stride: Vector views. (line 59) * gsl_vector_swap: Copying vectors. (line 18) --- 3310,3316 ---- (line 13) * gsl_vector_set_zero: Initializing vector elements. (line 10) ! * gsl_vector_sub: Vector operations. (line 12) * gsl_vector_subvector: Vector views. (line 29) * gsl_vector_subvector_with_stride: Vector views. (line 59) * gsl_vector_swap: Copying vectors. (line 18) *************** *** 3361,3367 **** [index] * Menu: ! * gsl_complex: Complex numbers. (line 6) * gsl_error_handler_t: Error Handlers. (line 24) * gsl_fft_complex_wavetable: Mixed-radix FFT routines for complex data. (line 79) --- 3392,3399 ---- [index] * Menu: ! * gsl_complex: Representation of complex numbers. ! (line 6) * gsl_error_handler_t: Error Handlers. (line 24) * gsl_fft_complex_wavetable: Mixed-radix FFT routines for complex data. (line 79) diff -a -rc -C 2 -P gsl-1.11/doc/gsl-ref.info-6 gsl-1.12/doc/gsl-ref.info-6 *** gsl-1.11/doc/gsl-ref.info-6 Sat Mar 29 15:07:29 2008 --- gsl-1.12/doc/gsl-ref.info-6 Mon Dec 15 15:28:50 2008 *************** *** 1,4 **** ! This is gsl-ref.info, produced by makeinfo version 4.8 from gsl-ref.texi. INFO-DIR-SECTION Scientific software --- 1,4 ---- ! This is gsl-ref.info, produced by makeinfo version 4.11 from gsl-ref.texi. INFO-DIR-SECTION Scientific software *************** *** 7,16 **** END-INFO-DIR-ENTRY Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, ! 2005, 2006, 2007 The GSL Team. Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with the Invariant Sections being "GNU General Public License" and "Free Software Needs Free Documentation", the Front-Cover text being "A GNU Manual", --- 7,16 ---- END-INFO-DIR-ENTRY Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, ! 2005, 2006, 2007, 2008 The GSL Team. Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "GNU General Public License" and "Free Software Needs Free Documentation", the Front-Cover text being "A GNU Manual", *************** *** 93,98 **** --- 93,100 ---- (line 6) * Basic Linear Algebra Subroutines (BLAS): BLAS Support. (line 6) * basis splines, B-splines: Basis Splines. (line 6) + * basis splines, derivatives: Evaluation of B-spline basis function derivatives. + (line 6) * basis splines, evaluation: Evaluation of B-spline basis functions. (line 6) * basis splines, examples: Example programs for B-splines. *************** *** 113,119 **** * Beta function: Beta Functions. (line 9) * Beta function, incomplete normalized: Incomplete Beta Function. (line 9) ! * BFGS algorithm, minimization: Multimin Algorithms. (line 37) * Bi(x): Airy Functions and Derivatives. (line 6) * bias, IEEE format: Representation of floating point numbers. --- 115,122 ---- * Beta function: Beta Functions. (line 9) * Beta function, incomplete normalized: Incomplete Beta Function. (line 9) ! * BFGS algorithm, minimization: Multimin Algorithms with Derivatives. ! (line 37) * Bi(x): Airy Functions and Derivatives. (line 6) * bias, IEEE format: Representation of floating point numbers. *************** *** 148,153 **** --- 151,157 ---- * C extensions, compatible use of: Using the library. (line 6) * C++, compatibility: Compatibility with C++. (line 6) + * C99, inline keyword: Inline functions. (line 6) * Carlson forms of Elliptic integrals: Definition of Carlson Forms. (line 6) * Cash-Karp, Runge-Kutta method: Stepping Functions. (line 82) *************** *** 213,219 **** (line 6) * conical functions: Legendre Functions and Spherical Harmonics. (line 6) ! * Conjugate gradient algorithm, minimization: Multimin Algorithms. (line 12) * conjugate of complex number: Complex arithmetic operators. (line 55) --- 217,223 ---- (line 6) * conical functions: Legendre Functions and Spherical Harmonics. (line 6) ! * Conjugate gradient algorithm, minimization: Multimin Algorithms with Derivatives. (line 12) * conjugate of complex number: Complex arithmetic operators. (line 55) *************** *** 270,276 **** * derivatives, calculating numerically: Numerical Differentiation. (line 6) * determinant of a matrix, by LU decomposition: LU Decomposition. ! (line 82) * Deuflhard and Bader, Bulirsch-Stoer method.: Stepping Functions. (line 94) * DFTs, see FFT: Fast Fourier Transforms. --- 274,280 ---- * derivatives, calculating numerically: Numerical Differentiation. (line 6) * determinant of a matrix, by LU decomposition: LU Decomposition. ! (line 83) * Deuflhard and Bader, Bulirsch-Stoer method.: Stepping Functions. (line 94) * DFTs, see FFT: Fast Fourier Transforms. *************** *** 385,390 **** --- 389,395 ---- (line 18) * exponentiation of complex number: Elementary Complex Functions. (line 16) + * extern inline: Inline functions. (line 6) * F-distribution: The F-distribution. (line 16) * factorial: Factorials. (line 6) * factorization of matrices: Linear Algebra. (line 6) *************** *** 392,399 **** (line 33) * Fast Fourier Transforms, see FFT: Fast Fourier Transforms. (line 6) - * FDL, GNU Free Documentation License: GNU Free Documentation License. - (line 6) * Fehlberg method, differential equations: Stepping Functions. (line 78) * Fermi-Dirac function: Fermi-Dirac Function. --- 397,402 ---- *************** *** 432,438 **** (line 6) * flat distribution: The Flat (Uniform) Distribution. (line 8) ! * Fletcher-Reeves conjugate gradient algorithm, minimization: Multimin Algorithms. (line 12) * floating point numbers, approximate comparison: Approximate Comparison of Floating Point Numbers. (line 13) --- 435,441 ---- (line 6) * flat distribution: The Flat (Uniform) Distribution. (line 8) ! * Fletcher-Reeves conjugate gradient algorithm, minimization: Multimin Algorithms with Derivatives. (line 12) * floating point numbers, approximate comparison: Approximate Comparison of Floating Point Numbers. (line 13) *************** *** 505,510 **** --- 508,514 ---- * GNU General Public License: Introduction. (line 6) * golden section algorithm for finding minima: Minimization Algorithms. (line 14) + * GSL_C99_INLINE: Inline functions. (line 6) * gsl_sf_result: The gsl_sf_result struct. (line 6) * gsl_sf_result_e10: The gsl_sf_result struct. *************** *** 646,652 **** (line 37) * inverse hyperbolic tangent: Elementary Functions. (line 41) ! * inverse of a matrix, by LU decomposition: LU Decomposition. (line 68) * inverting a permutation: Permutation functions. (line 11) * Irregular Cylindrical Bessel Functions: Irregular Cylindrical Bessel Functions. --- 650,656 ---- (line 37) * inverse hyperbolic tangent: Elementary Functions. (line 41) ! * inverse of a matrix, by LU decomposition: LU Decomposition. (line 69) * inverting a permutation: Permutation functions. (line 11) * Irregular Cylindrical Bessel Functions: Irregular Cylindrical Bessel Functions. *************** *** 664,670 **** * iterating through permutations: Permutation functions. (line 15) * iterative refinement of solutions in linear systems: LU Decomposition. ! (line 56) * Jacobi elliptic functions: Elliptic Functions (Jacobi). (line 6) * knots: Constructing the knots vector. --- 668,674 ---- * iterating through permutations: Permutation functions. (line 15) * iterative refinement of solutions in linear systems: LU Decomposition. ! (line 57) * Jacobi elliptic functions: Elliptic Functions (Jacobi). (line 6) * knots: Constructing the knots vector. *************** *** 710,716 **** * linear algebra, BLAS: BLAS Support. (line 6) * linear interpolation: Interpolation Types. (line 9) * linear regression: Linear regression. (line 6) ! * linear systems, refinement of solutions: LU Decomposition. (line 56) * linear systems, solution of: LU Decomposition. (line 39) * linking with GSL libraries: Linking programs with the library. (line 6) --- 714,720 ---- * linear algebra, BLAS: BLAS Support. (line 6) * linear interpolation: Interpolation Types. (line 9) * linear regression: Linear regression. (line 6) ! * linear systems, refinement of solutions: LU Decomposition. (line 57) * linear systems, solution of: LU Decomposition. (line 39) * linking with GSL libraries: Linking programs with the library. (line 6) *************** *** 732,738 **** * logarithm of Pochhammer symbol: Pochhammer Symbol. (line 17) * logarithm of sinh function, special functions: Hyperbolic Trigonometric Functions. (line 8) ! * logarithm of the determinant of a matrix: LU Decomposition. (line 90) * logarithm, computed accurately near 1: Elementary Functions. (line 13) * Logarithmic random variates: The Logarithmic Distribution. --- 736,742 ---- * logarithm of Pochhammer symbol: Pochhammer Symbol. (line 17) * logarithm of sinh function, special functions: Hyperbolic Trigonometric Functions. (line 8) ! * logarithm of the determinant of a matrix: LU Decomposition. (line 91) * logarithm, computed accurately near 1: Elementary Functions. (line 13) * Logarithmic random variates: The Logarithmic Distribution. *************** *** 770,780 **** (line 6) * matrices, range-checking: Accessing matrix elements. (line 6) ! * matrix determinant: LU Decomposition. (line 82) * matrix diagonal: Creating row and column views. (line 62) * matrix factorization: Linear Algebra. (line 6) ! * matrix inverse: LU Decomposition. (line 68) * matrix square root, Cholesky decomposition: Cholesky Decomposition. (line 6) * matrix subdiagonal: Creating row and column views. --- 774,784 ---- (line 6) * matrices, range-checking: Accessing matrix elements. (line 6) ! * matrix determinant: LU Decomposition. (line 83) * matrix diagonal: Creating row and column views. (line 62) * matrix factorization: Linear Algebra. (line 6) ! * matrix inverse: LU Decomposition. (line 69) * matrix square root, Cholesky decomposition: Cholesky Decomposition. (line 6) * matrix subdiagonal: Creating row and column views. *************** *** 793,799 **** * maximization, see minimization: One dimensional Minimization. (line 6) * maximum of two numbers: Maximum and Minimum functions. ! (line 7) * maximum value, from histogram: Histogram Statistics. (line 6) * mean: Statistics. (line 6) --- 797,803 ---- * maximization, see minimization: One dimensional Minimization. (line 6) * maximum of two numbers: Maximum and Minimum functions. ! (line 11) * maximum value, from histogram: Histogram Statistics. (line 6) * mean: Statistics. (line 6) *************** *** 802,811 **** * Mill's ratio, inverse: Probability functions. (line 19) * min: Statistics. (line 6) ! * minimization, BFGS algorithm: Multimin Algorithms. (line 37) * minimization, caveats: Minimization Caveats. (line 6) ! * minimization, conjugate gradient algorithm: Multimin Algorithms. (line 12) * minimization, multidimensional: Multidimensional Minimization. (line 6) --- 806,816 ---- * Mill's ratio, inverse: Probability functions. (line 19) * min: Statistics. (line 6) ! * minimization, BFGS algorithm: Multimin Algorithms with Derivatives. ! (line 37) * minimization, caveats: Minimization Caveats. (line 6) ! * minimization, conjugate gradient algorithm: Multimin Algorithms with Derivatives. (line 12) * minimization, multidimensional: Multidimensional Minimization. (line 6) *************** *** 813,823 **** (line 6) * minimization, overview: Minimization Overview. (line 6) ! * minimization, Polak-Ribiere algorithm: Multimin Algorithms. (line 29) * minimization, providing a function to minimize: Providing the function to minimize. (line 6) ! * minimization, simplex algorithm: Multimin Algorithms. (line 67) ! * minimization, steepest descent algorithm: Multimin Algorithms. (line 57) * minimization, stopping parameters: Minimization Stopping Parameters. (line 6) --- 818,830 ---- (line 6) * minimization, overview: Minimization Overview. (line 6) ! * minimization, Polak-Ribiere algorithm: Multimin Algorithms with Derivatives. ! (line 29) * minimization, providing a function to minimize: Providing the function to minimize. (line 6) ! * minimization, simplex algorithm: Multimin Algorithms without Derivatives. ! (line 11) ! * minimization, steepest descent algorithm: Multimin Algorithms with Derivatives. (line 57) * minimization, stopping parameters: Minimization Stopping Parameters. (line 6) *************** *** 826,832 **** * minimum finding, golden section algorithm: Minimization Algorithms. (line 14) * minimum of two numbers: Maximum and Minimum functions. ! (line 11) * minimum value, from histogram: Histogram Statistics. (line 6) * MINPACK, minimization algorithms <1>: Minimization Algorithms using Derivatives. --- 833,839 ---- * minimum finding, golden section algorithm: Minimization Algorithms. (line 14) * minimum of two numbers: Maximum and Minimum functions. ! (line 15) * minimum value, from histogram: Histogram Statistics. (line 6) * MINPACK, minimization algorithms <1>: Minimization Algorithms using Derivatives. *************** *** 879,886 **** (line 6) * Negative Binomial distribution, random variates: The Negative Binomial Distribution. (line 8) ! * Nelder-Mead simplex algorithm for minimization: Multimin Algorithms. ! (line 67) * Newton algorithm, discrete: Algorithms without Derivatives. (line 26) * Newton algorithm, globally convergent: Algorithms using Derivatives. --- 886,893 ---- (line 6) * Negative Binomial distribution, random variates: The Negative Binomial Distribution. (line 8) ! * Nelder-Mead simplex algorithm for minimization: Multimin Algorithms without Derivatives. ! (line 11) * Newton algorithm, discrete: Algorithms without Derivatives. (line 26) * Newton algorithm, globally convergent: Algorithms using Derivatives. *************** *** 953,960 **** * Pochhammer symbol: Pochhammer Symbol. (line 9) * Poisson random numbers: The Poisson Distribution. (line 8) ! * Polak-Ribiere algorithm, minimization: Multimin Algorithms. (line 29) ! * polar form of complex numbers: Complex numbers. (line 6) * polar to rectangular conversion: Conversion Functions. (line 6) * polygamma functions: Psi (Digamma) Function. --- 960,969 ---- * Pochhammer symbol: Pochhammer Symbol. (line 9) * Poisson random numbers: The Poisson Distribution. (line 8) ! * Polak-Ribiere algorithm, minimization: Multimin Algorithms with Derivatives. ! (line 29) ! * polar form of complex numbers: Representation of complex numbers. ! (line 6) * polar to rectangular conversion: Conversion Functions. (line 6) * polygamma functions: Psi (Digamma) Function. *************** *** 1065,1071 **** * reduction of angular variables: Restriction Functions. (line 6) * refinement of solutions in linear systems: LU Decomposition. ! (line 56) * regression, least squares: Least-Squares Fitting. (line 6) * Regular Bessel Functions, Fractional Order: Regular Bessel Function - Fractional Order. --- 1074,1080 ---- * reduction of angular variables: Restriction Functions. (line 6) * refinement of solutions in linear systems: LU Decomposition. ! (line 57) * regression, least squares: Least-Squares Fitting. (line 6) * Regular Bessel Functions, Fractional Order: Regular Bessel Function - Fractional Order. *************** *** 1085,1091 **** * Regulated Gamma function: Gamma Functions. (line 41) * relative Pochhammer symbol: Pochhammer Symbol. (line 31) * reporting bugs in GSL: Reporting Bugs. (line 6) ! * representations of complex numbers: Complex numbers. (line 6) * resampling from histograms: Resampling from histograms. (line 6) * residual, in nonlinear systems of equations <1>: Search Stopping Parameters for Minimization Algorithms. --- 1094,1101 ---- * Regulated Gamma function: Gamma Functions. (line 41) * relative Pochhammer symbol: Pochhammer Symbol. (line 31) * reporting bugs in GSL: Reporting Bugs. (line 6) ! * representations of complex numbers: Representation of complex numbers. ! (line 6) * resampling from histograms: Resampling from histograms. (line 6) * residual, in nonlinear systems of equations <1>: Search Stopping Parameters for Minimization Algorithms. *************** *** 1165,1172 **** (line 6) * sign bit, IEEE format: Representation of floating point numbers. (line 6) ! * sign of the determinant of a matrix: LU Decomposition. (line 98) ! * simplex algorithm, minimization: Multimin Algorithms. (line 67) * simulated annealing: Simulated Annealing. (line 6) * sin, of complex number: Complex Trigonometric Functions. (line 7) --- 1175,1183 ---- (line 6) * sign bit, IEEE format: Representation of floating point numbers. (line 6) ! * sign of the determinant of a matrix: LU Decomposition. (line 99) ! * simplex algorithm, minimization: Multimin Algorithms without Derivatives. ! (line 11) * simulated annealing: Simulated Annealing. (line 6) * sin, of complex number: Complex Trigonometric Functions. (line 7) *************** *** 1224,1230 **** * statistics: Statistics. (line 6) * statistics, from histogram: Histogram Statistics. (line 6) ! * steepest descent algorithm, minimization: Multimin Algorithms. (line 57) * Steffenson's method for finding roots: Root Finding Algorithms using Derivatives. (line 61) --- 1235,1241 ---- * statistics: Statistics. (line 6) * statistics, from histogram: Histogram Statistics. (line 6) ! * steepest descent algorithm, minimization: Multimin Algorithms with Derivatives. (line 57) * Steffenson's method for finding roots: Root Finding Algorithms using Derivatives. (line 61) diff -a -rc -C 2 -P gsl-1.11/doc/gsl-ref.texi gsl-1.12/doc/gsl-ref.texi *** gsl-1.11/doc/gsl-ref.texi Tue Feb 5 13:25:16 2008 --- gsl-1.12/doc/gsl-ref.texi Mon Dec 15 15:28:47 2008 *************** *** 131,140 **** @set GSL @i{GNU Scientific Library} @copying ! Copyright @copyright{} 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 The GSL Team. Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with the Invariant Sections being ``GNU General Public License'' and ``Free Software Needs Free Documentation'', the Front-Cover text being ``A GNU Manual'', --- 131,140 ---- @set GSL @i{GNU Scientific Library} @copying ! Copyright @copyright{} 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The GSL Team. Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being ``GNU General Public License'' and ``Free Software Needs Free Documentation'', the Front-Cover text being ``A GNU Manual'', diff -a -rc -C 2 -P gsl-1.11/doc/linalg.texi gsl-1.12/doc/linalg.texi *** gsl-1.11/doc/linalg.texi Tue Feb 5 13:22:10 2008 --- gsl-1.12/doc/linalg.texi Thu Nov 27 20:03:28 2008 *************** *** 86,98 **** @deftypefunx int gsl_linalg_complex_LU_solve (const gsl_matrix_complex * @var{LU}, const gsl_permutation * @var{p}, const gsl_vector_complex * @var{b}, gsl_vector_complex * @var{x}) These functions solve the square system @math{A x = b} using the @math{LU} decomposition of @math{A} into (@var{LU}, @var{p}) given by ! @code{gsl_linalg_LU_decomp} or @code{gsl_linalg_complex_LU_decomp}. @end deftypefun @deftypefun int gsl_linalg_LU_svx (const gsl_matrix * @var{LU}, const gsl_permutation * @var{p}, gsl_vector * @var{x}) @deftypefunx int gsl_linalg_complex_LU_svx (const gsl_matrix_complex * @var{LU}, const gsl_permutation * @var{p}, gsl_vector_complex * @var{x}) These functions solve the square system @math{A x = b} in-place using the ! @math{LU} decomposition of @math{A} into (@var{LU},@var{p}). On input @var{x} should contain the right-hand side @math{b}, which is replaced by the solution on output. @end deftypefun --- 86,98 ---- @deftypefunx int gsl_linalg_complex_LU_solve (const gsl_matrix_complex * @var{LU}, const gsl_permutation * @var{p}, const gsl_vector_complex * @var{b}, gsl_vector_complex * @var{x}) These functions solve the square system @math{A x = b} using the @math{LU} decomposition of @math{A} into (@var{LU}, @var{p}) given by ! @code{gsl_linalg_LU_decomp} or @code{gsl_linalg_complex_LU_decomp} as input. @end deftypefun @deftypefun int gsl_linalg_LU_svx (const gsl_matrix * @var{LU}, const gsl_permutation * @var{p}, gsl_vector * @var{x}) @deftypefunx int gsl_linalg_complex_LU_svx (const gsl_matrix_complex * @var{LU}, const gsl_permutation * @var{p}, gsl_vector_complex * @var{x}) These functions solve the square system @math{A x = b} in-place using the ! precomputed @math{LU} decomposition of @math{A} into (@var{LU},@var{p}). On input @var{x} should contain the right-hand side @math{b}, which is replaced by the solution on output. @end deftypefun *************** *** 103,109 **** @deftypefun int gsl_linalg_LU_refine (const gsl_matrix * @var{A}, const gsl_matrix * @var{LU}, const gsl_permutation * @var{p}, const gsl_vector * @var{b}, gsl_vector * @var{x}, gsl_vector * @var{residual}) @deftypefunx int gsl_linalg_complex_LU_refine (const gsl_matrix_complex * @var{A}, const gsl_matrix_complex * @var{LU}, const gsl_permutation * @var{p}, const gsl_vector_complex * @var{b}, gsl_vector_complex * @var{x}, gsl_vector_complex * @var{residual}) These functions apply an iterative improvement to @var{x}, the solution ! of @math{A x = b}, using the @math{LU} decomposition of @math{A} into (@var{LU},@var{p}). The initial residual @math{r = A x - b} is also computed and stored in @var{residual}. @end deftypefun --- 103,109 ---- @deftypefun int gsl_linalg_LU_refine (const gsl_matrix * @var{A}, const gsl_matrix * @var{LU}, const gsl_permutation * @var{p}, const gsl_vector * @var{b}, gsl_vector * @var{x}, gsl_vector * @var{residual}) @deftypefunx int gsl_linalg_complex_LU_refine (const gsl_matrix_complex * @var{A}, const gsl_matrix_complex * @var{LU}, const gsl_permutation * @var{p}, const gsl_vector_complex * @var{b}, gsl_vector_complex * @var{x}, gsl_vector_complex * @var{residual}) These functions apply an iterative improvement to @var{x}, the solution ! of @math{A x = b}, from the precomputed @math{LU} decomposition of @math{A} into (@var{LU},@var{p}). The initial residual @math{r = A x - b} is also computed and stored in @var{residual}. @end deftypefun *************** *** 199,213 **** @deftypefun int gsl_linalg_QR_solve (const gsl_matrix * @var{QR}, const gsl_vector * @var{tau}, const gsl_vector * @var{b}, gsl_vector * @var{x}) This function solves the square system @math{A x = b} using the @math{QR} ! decomposition of @math{A} into (@var{QR}, @var{tau}) given by ! @code{gsl_linalg_QR_decomp}. The least-squares solution for rectangular systems can ! be found using @code{gsl_linalg_QR_lssolve}. @end deftypefun @deftypefun int gsl_linalg_QR_svx (const gsl_matrix * @var{QR}, const gsl_vector * @var{tau}, gsl_vector * @var{x}) ! This function solves the square system @math{A x = b} in-place using the ! @math{QR} decomposition of @math{A} into (@var{QR},@var{tau}) given by ! @code{gsl_linalg_QR_decomp}. On input @var{x} should contain the right-hand side @math{b}, which is replaced by the solution on output. @end deftypefun --- 199,215 ---- @deftypefun int gsl_linalg_QR_solve (const gsl_matrix * @var{QR}, const gsl_vector * @var{tau}, const gsl_vector * @var{b}, gsl_vector * @var{x}) This function solves the square system @math{A x = b} using the @math{QR} ! decomposition of @math{A} held in (@var{QR}, @var{tau}) which must ! have been computed previously with @code{gsl_linalg_QR_decomp}. ! The least-squares solution for ! rectangular systems can be found using @code{gsl_linalg_QR_lssolve}. @end deftypefun @deftypefun int gsl_linalg_QR_svx (const gsl_matrix * @var{QR}, const gsl_vector * @var{tau}, gsl_vector * @var{x}) ! This function solves the square system @math{A x = b} in-place using ! the @math{QR} decomposition of @math{A} held in (@var{QR},@var{tau}) ! which must have been computed previously by ! @code{gsl_linalg_QR_decomp}. On input @var{x} should contain the right-hand side @math{b}, which is replaced by the solution on output. @end deftypefun *************** *** 215,221 **** This function finds the least squares solution to the overdetermined system @math{A x = b} where the matrix @var{A} has more rows than columns. The least squares solution minimizes the Euclidean norm of the ! residual, @math{||Ax - b||}.The routine uses the @math{QR} decomposition of @math{A} into (@var{QR}, @var{tau}) given by @code{gsl_linalg_QR_decomp}. The solution is returned in @var{x}. The residual is computed as a by-product and stored in @var{residual}. --- 217,224 ---- This function finds the least squares solution to the overdetermined system @math{A x = b} where the matrix @var{A} has more rows than columns. The least squares solution minimizes the Euclidean norm of the ! residual, @math{||Ax - b||}.The routine requires as input ! the @math{QR} decomposition of @math{A} into (@var{QR}, @var{tau}) given by @code{gsl_linalg_QR_decomp}. The solution is returned in @var{x}. The residual is computed as a by-product and stored in @var{residual}. *************** *** 274,280 **** @deftypefun int gsl_linalg_QR_update (gsl_matrix * @var{Q}, gsl_matrix * @var{R}, gsl_vector * @var{w}, const gsl_vector * @var{v}) This function performs a rank-1 update @math{w v^T} of the @math{QR} decomposition (@var{Q}, @var{R}). 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 destroyed by the update. @end deftypefun --- 277,283 ---- @deftypefun int gsl_linalg_QR_update (gsl_matrix * @var{Q}, gsl_matrix * @var{R}, gsl_vector * @var{w}, const gsl_vector * @var{v}) This function performs a rank-1 update @math{w v^T} of the @math{QR} decomposition (@var{Q}, @var{R}). 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 destroyed by the update. @end deftypefun *************** *** 350,362 **** @deftypefun int gsl_linalg_QRPT_solve (const gsl_matrix * @var{QR}, const gsl_vector * @var{tau}, const gsl_permutation * @var{p}, const gsl_vector * @var{b}, gsl_vector * @var{x}) This function solves the square system @math{A x = b} using the @math{QRP^T} ! decomposition of @math{A} into (@var{QR}, @var{tau}, @var{p}) given by ! @code{gsl_linalg_QRPT_decomp}. @end deftypefun @deftypefun int gsl_linalg_QRPT_svx (const gsl_matrix * @var{QR}, const gsl_vector * @var{tau}, const gsl_permutation * @var{p}, gsl_vector * @var{x}) This function solves the square system @math{A x = b} in-place using the ! @math{QRP^T} decomposition of @math{A} into (@var{QR},@var{tau},@var{p}). On input @var{x} should contain the right-hand side @math{b}, which is replaced by the solution on output. @end deftypefun --- 353,365 ---- @deftypefun int gsl_linalg_QRPT_solve (const gsl_matrix * @var{QR}, const gsl_vector * @var{tau}, const gsl_permutation * @var{p}, const gsl_vector * @var{b}, gsl_vector * @var{x}) This function solves the square system @math{A x = b} using the @math{QRP^T} ! decomposition of @math{A} held in (@var{QR}, @var{tau}, @var{p}) which must ! have been computed previously by @code{gsl_linalg_QRPT_decomp}. @end deftypefun @deftypefun int gsl_linalg_QRPT_svx (const gsl_matrix * @var{QR}, const gsl_vector * @var{tau}, const gsl_permutation * @var{p}, gsl_vector * @var{x}) This function solves the square system @math{A x = b} in-place using the ! @math{QRP^T} decomposition of @math{A} held in (@var{QR},@var{tau},@var{p}). On input @var{x} should contain the right-hand side @math{b}, which is replaced by the solution on output. @end deftypefun *************** *** 367,376 **** 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 destroyed by the update. The permutation @var{p} is not changed. @end deftypefun --- 370,379 ---- 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{w}, 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 P)} where the output matrices @math{Q'} and @math{R'} are also orthogonal and right triangular. Note that @var{w} is destroyed by the update. The permutation @var{p} is not changed. @end deftypefun *************** *** 417,423 **** @math{\sigma_i = S_@{ii@}} are all non-negative and are generally chosen to form a non-increasing sequence @c{$\sigma_1 \ge \sigma_2 \ge ... \ge \sigma_N \ge 0$} ! @math{\sigma_1 >= \sigma_2 >= ... >= \sigma_N >= 0}. The singular value decomposition of a matrix has many practical uses. The condition number of the matrix is given by the ratio of the largest --- 420,426 ---- @math{\sigma_i = S_@{ii@}} are all non-negative and are generally chosen to form a non-increasing sequence @c{$\sigma_1 \ge \sigma_2 \ge ... \ge \sigma_N \ge 0$} ! @math{\sigma_1 >= \sigma_2 >= ... >= \sigma_N >= 0}. The singular value decomposition of a matrix has many practical uses. The condition number of the matrix is given by the ratio of the largest *************** *** 434,439 **** --- 437,449 ---- Similarly, the range of @math{A} is given by columns of @math{U} corresponding to the non-zero singular values. + Note that the routines here compute the ``thin'' version of the SVD + with @math{U} as @math{M}-by-@math{N} orthogonal matrix. This allows + in-place computation and is the most commonly-used form in practice. + Mathematically, the ``full'' SVD is defined with @math{U} as an + @math{M}-by-@math{M} orthogonal matrix and @math{S} as an + @math{M}-by-@math{N} diagonal matrix (with additional rows of zeros). + @deftypefun int gsl_linalg_SV_decomp (gsl_matrix * @var{A}, gsl_matrix * @var{V}, gsl_vector * @var{S}, gsl_vector * @var{work}) This function factorizes the @math{M}-by-@math{N} matrix @var{A} into the singular value decomposition @math{A = U S V^T} for @c{$M \ge N$} *************** *** 446,452 **** transpose of @var{V}. A workspace of length @var{N} is required in @var{work}. ! This routine uses the Golub-Reinsch SVD algorithm. @end deftypefun @deftypefun int gsl_linalg_SV_decomp_mod (gsl_matrix * @var{A}, gsl_matrix * @var{X}, gsl_matrix * @var{V}, gsl_vector * @var{S}, gsl_vector * @var{work}) --- 456,462 ---- transpose of @var{V}. A workspace of length @var{N} is required in @var{work}. ! This routine uses the Golub-Reinsch SVD algorithm. @end deftypefun @deftypefun int gsl_linalg_SV_decomp_mod (gsl_matrix * @var{A}, gsl_matrix * @var{X}, gsl_matrix * @var{V}, gsl_vector * @var{S}, gsl_vector * @var{work}) *************** *** 466,473 **** @deftypefun int gsl_linalg_SV_solve (gsl_matrix * @var{U}, gsl_matrix * @var{V}, gsl_vector * @var{S}, const gsl_vector * @var{b}, gsl_vector * @var{x}) This function solves the system @math{A x = b} using the singular value ! decomposition (@var{U}, @var{S}, @var{V}) of @math{A} given by ! @code{gsl_linalg_SV_decomp}. Only non-zero singular values are used in computing the solution. The parts of the solution corresponding to singular values of zero are --- 476,483 ---- @deftypefun int gsl_linalg_SV_solve (gsl_matrix * @var{U}, gsl_matrix * @var{V}, gsl_vector * @var{S}, const gsl_vector * @var{b}, gsl_vector * @var{x}) This function solves the system @math{A x = b} using the singular value ! decomposition (@var{U}, @var{S}, @var{V}) held in @math{A} which must ! have been computed previously by @code{gsl_linalg_SV_decomp}. Only non-zero singular values are used in computing the solution. The parts of the solution corresponding to singular values of zero are *************** *** 530,548 **** @deftypefun int gsl_linalg_cholesky_solve (const gsl_matrix * @var{cholesky}, const gsl_vector * @var{b}, gsl_vector * @var{x}) @deftypefunx int gsl_linalg_complex_cholesky_solve (const gsl_matrix_complex * @var{cholesky}, const gsl_vector_complex * @var{b}, gsl_vector_complex * @var{x}) These functions solve the system @math{A x = b} using the Cholesky ! decomposition of @math{A} into the matrix @var{cholesky} given by ! @code{gsl_linalg_cholesky_decomp} or @code{gsl_linalg_complex_cholesky_decomp}. @end deftypefun @deftypefun int gsl_linalg_cholesky_svx (const gsl_matrix * @var{cholesky}, gsl_vector * @var{x}) @deftypefunx int gsl_linalg_complex_cholesky_svx (const gsl_matrix_complex * @var{cholesky}, gsl_vector_complex * @var{x}) These functions solve the system @math{A x = b} in-place using the ! Cholesky decomposition of @math{A} into the matrix @var{cholesky} given ! by @code{gsl_linalg_cholesky_decomp} or ! @code{gsl_linalg_complex_cholesky_decomp}. On input @var{x} should contain ! the right-hand side @math{b}, which is replaced by the solution on ! output. @end deftypefun @node Tridiagonal Decomposition of Real Symmetric Matrices --- 540,566 ---- @deftypefun int gsl_linalg_cholesky_solve (const gsl_matrix * @var{cholesky}, const gsl_vector * @var{b}, gsl_vector * @var{x}) @deftypefunx int gsl_linalg_complex_cholesky_solve (const gsl_matrix_complex * @var{cholesky}, const gsl_vector_complex * @var{b}, gsl_vector_complex * @var{x}) These functions solve the system @math{A x = b} using the Cholesky ! decomposition of @math{A} held in the matrix @var{cholesky} which must ! have been previously computed by @code{gsl_linalg_cholesky_decomp} or @code{gsl_linalg_complex_cholesky_decomp}. @end deftypefun @deftypefun int gsl_linalg_cholesky_svx (const gsl_matrix * @var{cholesky}, gsl_vector * @var{x}) @deftypefunx int gsl_linalg_complex_cholesky_svx (const gsl_matrix_complex * @var{cholesky}, gsl_vector_complex * @var{x}) These functions solve the system @math{A x = b} in-place using the ! Cholesky decomposition of @math{A} held in the matrix @var{cholesky} ! which must have been previously computed by by ! @code{gsl_linalg_cholesky_decomp} or ! @code{gsl_linalg_complex_cholesky_decomp}. On input @var{x} should ! contain the right-hand side @math{b}, which is replaced by the ! solution on output. ! @end deftypefun ! ! @deftypefun int gsl_linalg_cholesky_invert (gsl_matrix * @var{cholesky}) ! This function computes the inverse of the matrix @var{cholesky} which ! must have been previously computed by @code{gsl_linalg_cholesky_decomp}. ! The inverse of the original matrix @math{A} is stored in @var{cholesky} ! on output. @end deftypefun @node Tridiagonal Decomposition of Real Symmetric Matrices *************** *** 780,786 **** @end deftypefun @deftypefun int gsl_linalg_bidiag_unpack (const gsl_matrix * @var{A}, const gsl_vector * @var{tau_U}, gsl_matrix * @var{U}, const gsl_vector * @var{tau_V}, gsl_matrix * @var{V}, gsl_vector * @var{diag}, gsl_vector * @var{superdiag}) ! This function unpacks the bidiagonal decomposition of @var{A} given by @code{gsl_linalg_bidiag_decomp}, (@var{A}, @var{tau_U}, @var{tau_V}) into the separate orthogonal matrices @var{U}, @var{V} and the diagonal vector @var{diag} and superdiagonal @var{superdiag}. Note that @var{U} --- 798,804 ---- @end deftypefun @deftypefun int gsl_linalg_bidiag_unpack (const gsl_matrix * @var{A}, const gsl_vector * @var{tau_U}, gsl_matrix * @var{U}, const gsl_vector * @var{tau_V}, gsl_matrix * @var{V}, gsl_vector * @var{diag}, gsl_vector * @var{superdiag}) ! This function unpacks the bidiagonal decomposition of @var{A} produced by @code{gsl_linalg_bidiag_decomp}, (@var{A}, @var{tau_U}, @var{tau_V}) into the separate orthogonal matrices @var{U}, @var{V} and the diagonal vector @var{diag} and superdiagonal @var{superdiag}. Note that @var{U} *************** *** 789,795 **** @end deftypefun @deftypefun int gsl_linalg_bidiag_unpack2 (gsl_matrix * @var{A}, gsl_vector * @var{tau_U}, gsl_vector * @var{tau_V}, gsl_matrix * @var{V}) ! This function unpacks the bidiagonal decomposition of @var{A} given by @code{gsl_linalg_bidiag_decomp}, (@var{A}, @var{tau_U}, @var{tau_V}) into the separate orthogonal matrices @var{U}, @var{V} and the diagonal vector @var{diag} and superdiagonal @var{superdiag}. The matrix @var{U} --- 807,813 ---- @end deftypefun @deftypefun int gsl_linalg_bidiag_unpack2 (gsl_matrix * @var{A}, gsl_vector * @var{tau_U}, gsl_vector * @var{tau_V}, gsl_matrix * @var{V}) ! This function unpacks the bidiagonal decomposition of @var{A} produced by @code{gsl_linalg_bidiag_decomp}, (@var{A}, @var{tau_U}, @var{tau_V}) into the separate orthogonal matrices @var{U}, @var{V} and the diagonal vector @var{diag} and superdiagonal @var{superdiag}. The matrix @var{U} *************** *** 798,804 **** @deftypefun int gsl_linalg_bidiag_unpack_B (const gsl_matrix * @var{A}, gsl_vector * @var{diag}, gsl_vector * @var{superdiag}) This function unpacks the diagonal and superdiagonal of the bidiagonal ! decomposition of @var{A} given by @code{gsl_linalg_bidiag_decomp}, into the diagonal vector @var{diag} and superdiagonal vector @var{superdiag}. @end deftypefun --- 816,822 ---- @deftypefun int gsl_linalg_bidiag_unpack_B (const gsl_matrix * @var{A}, gsl_vector * @var{diag}, gsl_vector * @var{superdiag}) This function unpacks the diagonal and superdiagonal of the bidiagonal ! decomposition of @var{A} from @code{gsl_linalg_bidiag_decomp}, into the diagonal vector @var{diag} and superdiagonal vector @var{superdiag}. @end deftypefun *************** *** 1164,1170 **** @item J.C. Nash, ``A one-sided transformation method for the singular value decomposition and algebraic eigenproblem'', @cite{Computer Journal}, ! Volume 18, Number 1 (1973), p 74--76 @item James Demmel, Kresimir Veselic, ``Jacobi's Method is more accurate than --- 1182,1193 ---- @item J.C. Nash, ``A one-sided transformation method for the singular value decomposition and algebraic eigenproblem'', @cite{Computer Journal}, ! Volume 18, Number 1 (1975), p 74--76 ! ! @item ! J.C. Nash and S. Shlien ``Simple algorithms for the partial singular ! value decomposition'', @cite{Computer Journal}, Volume 30 (1987), p ! 268--275. @item James Demmel, Kresimir Veselic, ``Jacobi's Method is more accurate than diff -a -rc -C 2 -P gsl-1.11/doc/math.texi gsl-1.12/doc/math.texi *** gsl-1.11/doc/math.texi Tue Feb 5 13:22:10 2008 --- gsl-1.12/doc/math.texi Thu Nov 27 20:03:28 2008 *************** *** 118,124 **** @deftypefun int gsl_isinf (const double @var{x}) This function returns @math{+1} if @var{x} is positive infinity, ! @math{-1} if @var{x} is negative infinity and 0 otherwise. @end deftypefun @deftypefun int gsl_finite (const double @var{x}) --- 118,131 ---- @deftypefun int gsl_isinf (const double @var{x}) This function returns @math{+1} if @var{x} is positive infinity, ! @math{-1} if @var{x} is negative infinity and 0 ! otherwise.@footnote{Note that the C99 standard only requires the ! system @code{isinf} function to return a non-zero value, without the ! sign of the infinity. The implementation in some earlier versions of ! GSL used the system @code{isinf} function and may have this behavior ! on some platforms. Therefore, it is advisable to test the sign of ! @var{x} separately, if needed, rather than relying the sign of the ! return value from @code{gsl_isinf()}.} @end deftypefun @deftypefun int gsl_finite (const double @var{x}) *************** *** 274,283 **** @node Maximum and Minimum functions @section Maximum and Minimum functions @defmac GSL_MAX (a, b) @cindex maximum of two numbers ! This macro returns the maximum of @var{a} and @var{b}. It is defined as ! @code{((a) > (b) ? (a):(b))}. @end defmac @defmac GSL_MIN (a, b) --- 281,294 ---- @node Maximum and Minimum functions @section Maximum and Minimum functions + Note that the following macros perform multiple evaluations of their + arguments, so they should not be used with arguments that have side + effects (such as a call to a random number generator). + @defmac GSL_MAX (a, b) @cindex maximum of two numbers ! This macro returns the maximum of @var{a} and @var{b}. It is defined ! as @code{((a) > (b) ? (a):(b))}. @end defmac @defmac GSL_MIN (a, b) diff -a -rc -C 2 -P gsl-1.11/doc/mdate-sh gsl-1.12/doc/mdate-sh *** gsl-1.11/doc/mdate-sh Thu Aug 4 17:41:46 2005 --- gsl-1.12/doc/mdate-sh Mon Feb 4 13:53:53 2008 *************** *** 1,9 **** #!/bin/sh # Get modification time of a file or directory and pretty-print it. ! scriptversion=2005-06-29.22 ! # Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005 Free Software # Foundation, Inc. # written by Ulrich Drepper , June 1995 # --- 1,9 ---- #!/bin/sh # Get modification time of a file or directory and pretty-print it. ! scriptversion=2007-03-30.02 ! # Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007 Free Software # Foundation, Inc. # written by Ulrich Drepper , June 1995 # *************** *** 75,80 **** --- 75,84 ---- else ls_command='ls -l -d' fi + # Avoid user/group names that might have spaces, when possible. + if ls -n /dev/null 1>/dev/null 2>&1; then + ls_command="$ls_command -n" + fi # A `ls -l' line looks as follows on OS/2. # drwxrwx--- 0 Aug 11 2001 foo *************** *** 89,95 **** # words should be skipped to get the date. # On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below. ! set x`ls -l -d /` # Find which argument is the month. month= --- 93,99 ---- # words should be skipped to get the date. # On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below. ! set x`$ls_command /` # Find which argument is the month. month= diff -a -rc -C 2 -P gsl-1.11/doc/multimin.texi gsl-1.12/doc/multimin.texi *** gsl-1.11/doc/multimin.texi Thu Feb 21 11:21:26 2008 --- gsl-1.12/doc/multimin.texi Sat Nov 29 17:33:53 2008 *************** *** 15,28 **** minimization functions and related declarations. @menu ! * Multimin Overview:: ! * Multimin Caveats:: * Initializing the Multidimensional Minimizer:: * Providing a function to minimize:: ! * Multimin Iteration:: * Multimin Stopping Criteria:: ! * Multimin Algorithms:: ! * Multimin Examples:: * Multimin References and Further Reading:: @end menu --- 15,29 ---- minimization functions and related declarations. @menu ! * Multimin Overview:: ! * Multimin Caveats:: * Initializing the Multidimensional Minimizer:: * Providing a function to minimize:: ! * Multimin Iteration:: * Multimin Stopping Criteria:: ! * Multimin Algorithms with Derivatives:: ! * Multimin Algorithms without Derivatives:: ! * Multimin Examples:: * Multimin References and Further Reading:: @end menu *************** *** 60,70 **** and the whole process repeated until the true @math{n}-dimensional minimum is found. ! The Nelder-Mead Simplex algorithm applies a different strategy. It maintains @math{n+1} trial parameter vectors as the vertices of a ! @math{n}-dimensional simplex. In each iteration step it tries to ! improve the worst vertex by a simple geometrical transformation until ! the size of the simplex falls below a given tolerance. Both types of algorithms use a standard framework. The user provides a high-level driver for the algorithms, and the library provides the --- 61,73 ---- and the whole process repeated until the true @math{n}-dimensional minimum is found. ! Algorithms which do not require the gradient of the function use ! different strategies. For example, the Nelder-Mead Simplex algorithm maintains @math{n+1} trial parameter vectors as the vertices of a ! @math{n}-dimensional simplex. On each iteration it tries to improve ! the worst vertex of the simplex by geometrical transformations. The ! iterations are continued until the overall size of the simplex has ! decreased sufficiently. Both types of algorithms use a standard framework. The user provides a high-level driver for the algorithms, and the library provides the *************** *** 342,354 **** otherwise @code{GSL_CONTINUE} is returned. @end deftypefun ! @node Multimin Algorithms ! @section Algorithms 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 its gradient at each evaluation point, except for ! the Simplex algorithm which uses function values only. @deffn {Minimizer} gsl_multimin_fdfminimizer_conjugate_fr @cindex Fletcher-Reeves conjugate gradient algorithm, minimization --- 345,357 ---- otherwise @code{GSL_CONTINUE} is returned. @end deftypefun ! @node Multimin Algorithms with Derivatives ! @section Algorithms with Derivatives There are several minimization methods available. The best choice of ! algorithm depends on the problem. The algorithms described in this ! section use the value of the function and its gradient at each ! evaluation point. @deffn {Minimizer} gsl_multimin_fdfminimizer_conjugate_fr @cindex Fletcher-Reeves conjugate gradient algorithm, minimization *************** *** 417,427 **** inefficient and is included only for demonstration purposes. @end deffn ! @deffn {Minimizer} gsl_multimin_fminimizer_nmsimplex @cindex Nelder-Mead simplex algorithm for minimization @cindex simplex algorithm, minimization @cindex minimization, simplex algorithm ! This is the Simplex algorithm of Nelder and Mead. It constructs @math{n} vectors @math{p_i} from the starting vector @var{x} and the vector @var{step_size} as follows: @tex --- 420,437 ---- inefficient and is included only for demonstration purposes. @end deffn ! @node Multimin Algorithms without Derivatives ! @section Algorithms without Derivatives ! ! The algorithms described in this section use only the value of the function ! at each evaluation point. ! ! @deffn {Minimizer} gsl_multimin_fminimizer_nmsimplex2 ! @deffnx {Minimizer} gsl_multimin_fminimizer_nmsimplex @cindex Nelder-Mead simplex algorithm for minimization @cindex simplex algorithm, minimization @cindex minimization, simplex algorithm ! These methods use the Simplex algorithm of Nelder and Mead. They construct @math{n} vectors @math{p_i} from the starting vector @var{x} and the vector @var{step_size} as follows: @tex *************** *** 461,471 **** the nature of the algorithm not every step improves the current best parameter vector. Usually several iterations are required. ! The routine calculates the minimizer specific characteristic size as the average distance from the geometrical center of the simplex to all its ! vertices. This size can be used as a stopping criteria, as the simplex ! contracts itself near the minimum. The size is returned by the function ! @code{gsl_multimin_fminimizer_size}. @end deffn @node Multimin Examples --- 471,487 ---- the nature of the algorithm not every step improves the current best parameter vector. Usually several iterations are required. ! The minimizer-specific characteristic size is calculated as the average distance from the geometrical center of the simplex to all its ! vertices. This size can be used as a stopping criteria, as the ! simplex contracts itself near the minimum. The size is returned by the ! function @code{gsl_multimin_fminimizer_size}. ! ! The @code{nmsimplex2} version of this minimiser is a new @math{O(N)} ! implementation of the earlier @math{O(N^2)} @code{nmsimplex} ! minimiser. It calculates the size of simplex as the @sc{rms} distance ! of each vertex from the center rather than the mean distance, which ! has the advantage of allowing a linear update. @end deffn @node Multimin Examples diff -a -rc -C 2 -P gsl-1.11/doc/qrng.texi gsl-1.12/doc/qrng.texi *** gsl-1.11/doc/qrng.texi Tue Feb 5 13:22:10 2008 --- gsl-1.12/doc/qrng.texi Thu Nov 27 20:03:28 2008 *************** *** 109,115 **** @end deffn @deffn {Generator} gsl_qrng_halton ! @deffnx {Generator} gsl_qrng_reverse_halton These generators use the Halton and reverse Halton sequences described in J.H. Halton, @cite{Numerische Mathematik} 2, 84-90 (1960) and B. Vandewoestyne and R. Cools @cite{Computational and Applied --- 109,115 ---- @end deffn @deffn {Generator} gsl_qrng_halton ! @deffnx {Generator} gsl_qrng_reversehalton These generators use the Halton and reverse Halton sequences described in J.H. Halton, @cite{Numerische Mathematik} 2, 84-90 (1960) and B. Vandewoestyne and R. Cools @cite{Computational and Applied diff -a -rc -C 2 -P gsl-1.11/doc/rng.texi gsl-1.12/doc/rng.texi *** gsl-1.11/doc/rng.texi Tue Feb 5 13:22:10 2008 --- gsl-1.12/doc/rng.texi Thu Nov 27 20:03:28 2008 *************** *** 121,133 **** This function initializes (or `seeds') the random number generator. If the generator is seeded with the same value of @var{s} on two different runs, the same stream of random numbers will be generated by successive ! calls to the routines below. If different values of @var{s} are ! supplied, then the generated streams of random numbers should be ! completely different. If the seed @var{s} is zero then the standard seed ! from the original implementation is used instead. For example, the ! original Fortran source code for the @code{ranlux} generator used a seed ! of 314159265, and so choosing @var{s} equal to zero reproduces this when ! using @code{gsl_rng_ranlux}. @end deftypefun @deftypefun void gsl_rng_free (gsl_rng * @var{r}) --- 121,142 ---- This function initializes (or `seeds') the random number generator. If the generator is seeded with the same value of @var{s} on two different runs, the same stream of random numbers will be generated by successive ! calls to the routines below. If different values of @c{$@var{s} \geq 1$} ! @math{@var{s} >= 1} are supplied, then the generated streams of random ! numbers should be completely different. If the seed @var{s} is zero ! then the standard seed from the original implementation is used ! instead. For example, the original Fortran source code for the ! @code{ranlux} generator used a seed of 314159265, and so choosing ! @var{s} equal to zero reproduces this when using ! @code{gsl_rng_ranlux}. ! ! When using multiple seeds with the same generator, choose seed values ! greater than zero to avoid collisions with the default setting. ! ! Note that the most generators only accept 32-bit seeds, with higher ! values being reduced modulo @c{$2^{32}$} ! @math{2^32}. For generators ! with smaller ranges the maximum seed value will typically be lower. @end deftypefun @deftypefun void gsl_rng_free (gsl_rng * @var{r}) *************** *** 346,352 **** @section Reading and writing random number generator state The library provides functions for reading and writing the random ! number state to a file as binary data or formatted text. @deftypefun int gsl_rng_fwrite (FILE * @var{stream}, const gsl_rng * @var{r}) This function writes the random number state of the random number --- 355,361 ---- @section Reading and writing random number generator state The library provides functions for reading and writing the random ! number state to a file as binary data. @deftypefun int gsl_rng_fwrite (FILE * @var{stream}, const gsl_rng * @var{r}) This function writes the random number state of the random number diff -a -rc -C 2 -P gsl-1.11/doc/stamp-vti gsl-1.12/doc/stamp-vti *** gsl-1.11/doc/stamp-vti Sat Mar 29 21:19:42 2008 --- gsl-1.12/doc/stamp-vti Mon Dec 15 15:28:49 2008 *************** *** 1,4 **** ! @set UPDATED 5 February 2008 ! @set UPDATED-MONTH February 2008 ! @set EDITION 1.11 ! @set VERSION 1.11 --- 1,4 ---- ! @set UPDATED 15 December 2008 ! @set UPDATED-MONTH December 2008 ! @set EDITION 1.12 ! @set VERSION 1.12 diff -a -rc -C 2 -P gsl-1.11/doc/usage.texi gsl-1.12/doc/usage.texi *** gsl-1.11/doc/usage.texi Tue Feb 5 13:22:10 2008 --- gsl-1.12/doc/usage.texi Thu Nov 27 20:03:28 2008 *************** *** 226,237 **** @cindex inline functions @cindex HAVE_INLINE The @code{inline} keyword is not part of the original ANSI C standard ! (C89) and the library does not export any inline function definitions by ! default. However, the library provides optional inline versions of ! performance-critical functions by conditional compilation. The inline ! versions of these functions can be included by defining the macro ! @code{HAVE_INLINE} when compiling an application, @example $ gcc -Wall -c -DHAVE_INLINE example.c --- 226,245 ---- @cindex inline functions @cindex HAVE_INLINE + @cindex GSL_C99_INLINE + @cindex C99, inline keyword + @cindex @code{extern inline} The @code{inline} keyword is not part of the original ANSI C standard ! (C89) so the library does not export any inline function definitions ! by default. Inline functions were introduced officially in the newer ! C99 standard but most C89 compilers have also included @code{inline} as ! an extension for a long time. ! ! To allow the use of inline functions, the library provides optional ! inline versions of performance-critical routines by conditional ! compilation in the exported header files. The inline versions of these ! functions can be included by defining the macro @code{HAVE_INLINE} ! when compiling an application, @example $ gcc -Wall -c -DHAVE_INLINE example.c *************** *** 242,251 **** you do not define the macro @code{HAVE_INLINE} then the slower non-inlined versions of the functions will be used instead. ! Note that the actual usage of the inline keyword is @code{extern ! inline}, which eliminates unnecessary function definitions in @sc{gcc}. ! If the form @code{extern inline} causes problems with other compilers a ! stricter autoconf test can be used, see @ref{Autoconf Macros}. @node Long double @section Long double --- 250,266 ---- you do not define the macro @code{HAVE_INLINE} then the slower non-inlined versions of the functions will be used instead. ! By default, the actual form of the inline keyword is @code{extern ! inline}, which is a @code{gcc} extension that eliminates unnecessary ! function definitions. If the form @code{extern inline} causes ! problems with other compilers a stricter autoconf test can be used, ! see @ref{Autoconf Macros}. ! ! When compiling with @code{gcc} in C99 mode (@code{gcc -std=c99}) the ! header files automatically switch to C99-compatible inline function ! declarations instead of @code{extern inline}. With other C99 ! compilers, define the macro @code{GSL_C99_INLINE} to use these ! declarations. @node Long double @section Long double diff -a -rc -C 2 -P gsl-1.11/doc/vectors.texi gsl-1.12/doc/vectors.texi *** gsl-1.11/doc/vectors.texi Tue Feb 5 13:22:10 2008 --- gsl-1.12/doc/vectors.texi Thu Nov 27 20:03:28 2008 *************** *** 664,671 **** @node Vector operations @subsection Vector operations - The following operations are only defined for real vectors. - @deftypefun int gsl_vector_add (gsl_vector * @var{a}, const gsl_vector * @var{b}) This function adds the elements of vector @var{b} to the elements of vector @var{a}, @math{a'_i = a_i + b_i}. The two vectors must have the --- 664,669 ---- *************** *** 703,708 **** --- 701,708 ---- @node Finding maximum and minimum elements of vectors @subsection Finding maximum and minimum elements of vectors + The following operations are only defined for real vectors. + @deftypefun double gsl_vector_max (const gsl_vector * @var{v}) This function returns the maximum value in the vector @var{v}. @end deftypefun *************** *** 738,743 **** --- 738,747 ---- @node Vector properties @subsection Vector properties + The following functions are defined for real and complex vectors. For + complex vectors both the real and imaginary parts must satisfy the + conditions. + @deftypefun int gsl_vector_isnull (const gsl_vector * @var{v}) @deftypefunx int gsl_vector_ispos (const gsl_vector * @var{v}) @deftypefunx int gsl_vector_isneg (const gsl_vector * @var{v}) *************** *** 1537,1542 **** --- 1541,1550 ---- @node Matrix properties @subsection Matrix properties + The following functions are defined for real and complex matrices. + For complex matrices both the real and imaginary parts must satisfy + the conditions. + @deftypefun int gsl_matrix_isnull (const gsl_matrix * @var{m}) @deftypefunx int gsl_matrix_ispos (const gsl_matrix * @var{m}) @deftypefunx int gsl_matrix_isneg (const gsl_matrix * @var{m}) diff -a -rc -C 2 -P gsl-1.11/doc/version-ref.texi gsl-1.12/doc/version-ref.texi *** gsl-1.11/doc/version-ref.texi Sat Mar 29 15:07:28 2008 --- gsl-1.12/doc/version-ref.texi Mon Dec 15 15:28:49 2008 *************** *** 1,4 **** ! @set UPDATED 5 February 2008 ! @set UPDATED-MONTH February 2008 ! @set EDITION 1.11 ! @set VERSION 1.11 --- 1,4 ---- ! @set UPDATED 15 December 2008 ! @set UPDATED-MONTH December 2008 ! @set EDITION 1.12 ! @set VERSION 1.12 diff -a -rc -C 2 -P gsl-1.11/eigen/ChangeLog gsl-1.12/eigen/ChangeLog *** gsl-1.11/eigen/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/eigen/ChangeLog Thu Nov 27 20:03:28 2008 *************** *** 1,3 **** --- 1,7 ---- + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + 2007-08-30 Brian Gough * test.c (test_eigen_symm): added new test case for underflow diff -a -rc -C 2 -P gsl-1.11/eigen/Makefile.am gsl-1.12/eigen/Makefile.am *** gsl-1.11/eigen/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/eigen/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 4,10 **** pkginclude_HEADERS = gsl_eigen.h libgsleigen_la_SOURCES = jacobi.c symm.c symmv.c nonsymm.c nonsymmv.c herm.c hermv.c gensymm.c gensymmv.c genherm.c genhermv.c gen.c genv.c sort.c francis.c schur.c ! INCLUDES= -I$(top_builddir) noinst_HEADERS = qrstep.c --- 4,11 ---- pkginclude_HEADERS = gsl_eigen.h libgsleigen_la_SOURCES = jacobi.c symm.c symmv.c nonsymm.c nonsymmv.c herm.c hermv.c gensymm.c gensymmv.c genherm.c genhermv.c gen.c genv.c sort.c francis.c schur.c ! ! INCLUDES = -I$(top_srcdir) noinst_HEADERS = qrstep.c diff -a -rc -C 2 -P gsl-1.11/eigen/Makefile.in gsl-1.12/eigen/Makefile.in *** gsl-1.11/eigen/Makefile.in Sun Mar 30 12:07:03 2008 --- gsl-1.12/eigen/Makefile.in Mon Dec 15 14:55:10 2008 *************** *** 139,144 **** --- 139,145 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 146,152 **** --- 147,156 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 212,218 **** noinst_LTLIBRARIES = libgsleigen.la pkginclude_HEADERS = gsl_eigen.h libgsleigen_la_SOURCES = jacobi.c symm.c symmv.c nonsymm.c nonsymmv.c herm.c hermv.c gensymm.c gensymmv.c genherm.c genhermv.c gen.c genv.c sort.c francis.c schur.c ! INCLUDES = -I$(top_builddir) 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 ../rng/libgslrng.la ../sort/libgslsort.la --- 216,222 ---- noinst_LTLIBRARIES = libgsleigen.la pkginclude_HEADERS = gsl_eigen.h libgsleigen_la_SOURCES = jacobi.c symm.c symmv.c nonsymm.c nonsymmv.c herm.c hermv.c gensymm.c gensymmv.c genherm.c genhermv.c gen.c genv.c sort.c francis.c schur.c ! INCLUDES = -I$(top_srcdir) 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 ../rng/libgslrng.la ../sort/libgslsort.la diff -a -rc -C 2 -P gsl-1.11/eigen/gen.c gsl-1.12/eigen/gen.c *** gsl-1.11/eigen/gen.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/eigen/gen.c Thu Nov 27 20:03:28 2008 *************** *** 118,124 **** GSL_EINVAL); } ! w = calloc (1, sizeof (gsl_eigen_gen_workspace)); if (w == 0) { --- 118,124 ---- GSL_EINVAL); } ! w = (gsl_eigen_gen_workspace *) calloc (1, sizeof (gsl_eigen_gen_workspace)); if (w == 0) { diff -a -rc -C 2 -P gsl-1.11/eigen/genherm.c gsl-1.12/eigen/genherm.c *** gsl-1.11/eigen/genherm.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/eigen/genherm.c Thu Nov 27 20:03:28 2008 *************** *** 57,63 **** GSL_EINVAL); } ! w = calloc (1, sizeof (gsl_eigen_genherm_workspace)); if (w == 0) { --- 57,63 ---- GSL_EINVAL); } ! w = (gsl_eigen_genherm_workspace *) calloc (1, sizeof (gsl_eigen_genherm_workspace)); if (w == 0) { diff -a -rc -C 2 -P gsl-1.11/eigen/genhermv.c gsl-1.12/eigen/genhermv.c *** gsl-1.11/eigen/genhermv.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/eigen/genhermv.c Thu Nov 27 20:03:28 2008 *************** *** 59,65 **** GSL_EINVAL); } ! w = calloc (1, sizeof (gsl_eigen_genhermv_workspace)); if (w == 0) { --- 59,65 ---- GSL_EINVAL); } ! w = (gsl_eigen_genhermv_workspace *) calloc (1, sizeof (gsl_eigen_genhermv_workspace)); if (w == 0) { diff -a -rc -C 2 -P gsl-1.11/eigen/gensymm.c gsl-1.12/eigen/gensymm.c *** gsl-1.11/eigen/gensymm.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/eigen/gensymm.c Thu Nov 27 20:03:28 2008 *************** *** 55,61 **** GSL_EINVAL); } ! w = calloc (1, sizeof (gsl_eigen_gensymm_workspace)); if (w == 0) { --- 55,61 ---- GSL_EINVAL); } ! w = (gsl_eigen_gensymm_workspace *) calloc (1, sizeof (gsl_eigen_gensymm_workspace)); if (w == 0) { diff -a -rc -C 2 -P gsl-1.11/eigen/gensymmv.c gsl-1.12/eigen/gensymmv.c *** gsl-1.11/eigen/gensymmv.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/eigen/gensymmv.c Thu Nov 27 20:03:28 2008 *************** *** 57,63 **** GSL_EINVAL); } ! w = calloc (1, sizeof (gsl_eigen_gensymmv_workspace)); if (w == 0) { --- 57,63 ---- GSL_EINVAL); } ! w = (gsl_eigen_gensymmv_workspace *) calloc (1, sizeof (gsl_eigen_gensymmv_workspace)); if (w == 0) { diff -a -rc -C 2 -P gsl-1.11/eigen/genv.c gsl-1.12/eigen/genv.c *** gsl-1.11/eigen/genv.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/eigen/genv.c Thu Nov 27 20:03:28 2008 *************** *** 68,74 **** GSL_EINVAL); } ! w = calloc (1, sizeof (gsl_eigen_genv_workspace)); if (w == 0) { --- 68,74 ---- GSL_EINVAL); } ! w = (gsl_eigen_genv_workspace *) calloc (1, sizeof (gsl_eigen_genv_workspace)); if (w == 0) { diff -a -rc -C 2 -P gsl-1.11/eigen/test.c gsl-1.12/eigen/test.c *** gsl-1.11/eigen/test.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/eigen/test.c Thu Nov 27 20:03:28 2008 *************** *** 507,513 **** = gsl_matrix_complex_const_column(evec, j); gsl_complex vivj; gsl_blas_zdotc (&vi.vector, &vj.vector, &vivj); ! gsl_test_abs (gsl_complex_abs(vivj), 0.0, N * GSL_DBL_EPSILON, "%s, orthogonal(%d,%d), %s", desc, i, j, desc2); } } --- 507,513 ---- = gsl_matrix_complex_const_column(evec, j); gsl_complex vivj; gsl_blas_zdotc (&vi.vector, &vj.vector, &vivj); ! gsl_test_abs (gsl_complex_abs(vivj), 0.0, 10.0 * N * GSL_DBL_EPSILON, "%s, orthogonal(%d,%d), %s", desc, i, j, desc2); } } *************** *** 1058,1064 **** { test_eigen_gen_workspace *w; ! w = calloc(1, sizeof(test_eigen_gen_workspace)); w->A = gsl_matrix_alloc(n, n); w->B = gsl_matrix_alloc(n, n); --- 1058,1064 ---- { test_eigen_gen_workspace *w; ! w = (test_eigen_gen_workspace *) calloc(1, sizeof(test_eigen_gen_workspace)); w->A = gsl_matrix_alloc(n, n); w->B = gsl_matrix_alloc(n, n); diff -a -rc -C 2 -P gsl-1.11/err/Makefile.in gsl-1.12/err/Makefile.in *** gsl-1.11/err/Makefile.in Sun Mar 30 12:07:04 2008 --- gsl-1.12/err/Makefile.in Mon Dec 15 14:55:11 2008 *************** *** 131,136 **** --- 131,137 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 138,144 **** --- 139,148 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ diff -a -rc -C 2 -P gsl-1.11/fft/ChangeLog gsl-1.12/fft/ChangeLog *** gsl-1.11/fft/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/fft/ChangeLog Thu Nov 27 20:03:28 2008 *************** *** 1,3 **** --- 1,7 ---- + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + 2006-03-16 Brian Gough * changed to gsl_fft_forward and gsl_fft_backward enums throughout diff -a -rc -C 2 -P gsl-1.11/fft/Makefile.am gsl-1.12/fft/Makefile.am *** gsl-1.11/fft/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/fft/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 2,8 **** pkginclude_HEADERS = gsl_fft.h gsl_fft_complex.h gsl_fft_halfcomplex.h gsl_fft_real.h gsl_dft_complex.h gsl_dft_complex_float.h gsl_fft_complex_float.h gsl_fft_halfcomplex_float.h gsl_fft_real_float.h ! INCLUDES= -I$(top_builddir) -I$(top_srcdir) libgslfft_la_SOURCES = dft.c fft.c --- 2,8 ---- pkginclude_HEADERS = gsl_fft.h gsl_fft_complex.h gsl_fft_halfcomplex.h gsl_fft_real.h gsl_dft_complex.h gsl_dft_complex_float.h gsl_fft_complex_float.h gsl_fft_halfcomplex_float.h gsl_fft_real_float.h ! INCLUDES = -I$(top_srcdir) libgslfft_la_SOURCES = dft.c fft.c diff -a -rc -C 2 -P gsl-1.11/fft/Makefile.in gsl-1.12/fft/Makefile.in *** gsl-1.11/fft/Makefile.in Sun Mar 30 12:07:04 2008 --- gsl-1.12/fft/Makefile.in Mon Dec 15 14:55:11 2008 *************** *** 132,137 **** --- 132,138 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 139,145 **** --- 140,149 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 204,210 **** top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslfft.la pkginclude_HEADERS = gsl_fft.h gsl_fft_complex.h gsl_fft_halfcomplex.h gsl_fft_real.h gsl_dft_complex.h gsl_dft_complex_float.h gsl_fft_complex_float.h gsl_fft_halfcomplex_float.h gsl_fft_real_float.h ! INCLUDES = -I$(top_builddir) -I$(top_srcdir) libgslfft_la_SOURCES = dft.c fft.c 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_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) --- 208,214 ---- top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslfft.la pkginclude_HEADERS = gsl_fft.h gsl_fft_complex.h gsl_fft_halfcomplex.h gsl_fft_real.h gsl_dft_complex.h gsl_dft_complex_float.h gsl_fft_complex_float.h gsl_fft_halfcomplex_float.h gsl_fft_real_float.h ! INCLUDES = -I$(top_srcdir) libgslfft_la_SOURCES = dft.c fft.c 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_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) diff -a -rc -C 2 -P gsl-1.11/fit/ChangeLog gsl-1.12/fit/ChangeLog *** gsl-1.11/fit/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/fit/ChangeLog Thu Nov 27 20:03:28 2008 *************** *** 1,3 **** --- 1,7 ---- + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + 2007-05-23 Brian Gough * gsl_fit.h linear.c (gsl_fit_mul_est, gsl_fit_linear_est): made diff -a -rc -C 2 -P gsl-1.11/fit/Makefile.am gsl-1.12/fit/Makefile.am *** gsl-1.11/fit/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/fit/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 2,8 **** pkginclude_HEADERS = gsl_fit.h ! INCLUDES= -I$(top_builddir) libgslfit_la_SOURCES = linear.c --- 2,8 ---- pkginclude_HEADERS = gsl_fit.h ! INCLUDES = -I$(top_srcdir) libgslfit_la_SOURCES = linear.c diff -a -rc -C 2 -P gsl-1.11/fit/Makefile.in gsl-1.12/fit/Makefile.in *** gsl-1.11/fit/Makefile.in Sun Mar 30 12:07:04 2008 --- gsl-1.12/fit/Makefile.in Mon Dec 15 14:55:11 2008 *************** *** 132,137 **** --- 132,138 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 139,145 **** --- 140,149 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 204,210 **** top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslfit.la pkginclude_HEADERS = gsl_fit.h ! INCLUDES = -I$(top_builddir) libgslfit_la_SOURCES = linear.c TESTS = $(check_PROGRAMS) test_SOURCES = test.c --- 208,214 ---- top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslfit.la pkginclude_HEADERS = gsl_fit.h ! INCLUDES = -I$(top_srcdir) libgslfit_la_SOURCES = linear.c TESTS = $(check_PROGRAMS) test_SOURCES = test.c diff -a -rc -C 2 -P gsl-1.11/gsl/Makefile.in gsl-1.12/gsl/Makefile.in *** gsl-1.11/gsl/Makefile.in Sun Mar 30 12:07:04 2008 --- gsl-1.12/gsl/Makefile.in Mon Dec 15 14:55:11 2008 *************** *** 98,103 **** --- 98,104 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 105,111 **** --- 106,115 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ diff -a -rc -C 2 -P gsl-1.11/gsl_inline.h gsl-1.12/gsl_inline.h *** gsl-1.11/gsl_inline.h Thu Jan 1 00:00:00 1970 --- gsl-1.12/gsl_inline.h Thu Nov 27 20:03:28 2008 *************** *** 0 **** --- 1,67 ---- + /* gsl_inline.h + * + * Copyright (C) 2008 Brian Gough + * + * 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + + #ifndef __GSL_INLINE_H__ + #define __GSL_INLINE_H__ + + /* In recent versiions of GCC, the inline keyword has two different + forms: GNU and C99. + + In GNU mode we can use 'extern inline' to make inline functions + work like macros. The function is only inlined--it is never output + as a definition in an object file. + + In the new C99 mode 'extern inline' has a different meaning--it + causes the definition of the function to be output in each object + file where it is used. This will result in multiple-definition + errors on linking. The 'inline' keyword on its own (without + extern) has the same behavior as the original GNU 'extern inline'. + + The C99 style is the default with -std=c99 in GCC 4.3. + + This header file allows either form of inline to be used by + redefining the macros INLINE_DECL and INLINE_FUN. These are used + in the public header files as + + INLINE_DECL double gsl_foo (double x); + #ifdef HAVE_INLINE + INLINE_FUN double gsl_foo (double x) { return x+1.0; } ; + #endif + + */ + + #ifdef HAVE_INLINE + # if defined(__GNUC_STDC_INLINE__) || defined(GSL_C99_INLINE) + # define INLINE_DECL inline /* use C99 inline */ + # define INLINE_FUN inline + # else + # define INLINE_DECL /* use GNU extern inline */ + # define INLINE_FUN extern inline + # endif + #else + # define INLINE_DECL /* */ + #endif + + /* Range checking conditions in headers do not require any run-time + tests of the global variable gsl_check_range. They are enabled or + disabled in user code at compile time with GSL_RANGE_CHECK macro. + See also build.h. */ + #define GSL_RANGE_COND(x) (x) + + #endif /* __GSL_INLINE_H__ */ diff -a -rc -C 2 -P gsl-1.11/gsl_math.h gsl-1.12/gsl_math.h *** gsl-1.11/gsl_math.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/gsl_math.h Thu Nov 27 20:03:28 2008 *************** *** 21,30 **** --- 21,32 ---- #define __GSL_MATH_H__ #include #include + #include #include #include #include #include + #include #ifndef M_E #define M_E 2.71828182845904523536028747135 /* e */ *************** *** 116,185 **** /* Return nonzero if x is a real number, i.e. non NaN or infinite. */ #define GSL_IS_REAL(x) (gsl_finite(x)) - /* Define MAX and MIN macros/functions if they don't exist. */ - - /* plain old macros for general use */ - #define GSL_MAX(a,b) ((a) > (b) ? (a) : (b)) - #define GSL_MIN(a,b) ((a) < (b) ? (a) : (b)) - - /* function versions of the above, in case they are needed */ - double gsl_max (double a, double b); - double gsl_min (double a, double b); - - /* inline-friendly strongly typed versions */ - #ifdef HAVE_INLINE - - extern inline int GSL_MAX_INT (int a, int b); - extern inline int GSL_MIN_INT (int a, int b); - extern inline double GSL_MAX_DBL (double a, double b); - extern inline double GSL_MIN_DBL (double a, double b); - extern inline long double GSL_MAX_LDBL (long double a, long double b); - extern inline long double GSL_MIN_LDBL (long double a, long double b); - - extern inline int - GSL_MAX_INT (int a, int b) - { - return GSL_MAX (a, b); - } - - extern inline int - GSL_MIN_INT (int a, int b) - { - return GSL_MIN (a, b); - } - - extern inline double - GSL_MAX_DBL (double a, double b) - { - return GSL_MAX (a, b); - } - - extern inline double - GSL_MIN_DBL (double a, double b) - { - return GSL_MIN (a, b); - } - - extern inline long double - GSL_MAX_LDBL (long double a, long double b) - { - return GSL_MAX (a, b); - } - - extern inline long double - GSL_MIN_LDBL (long double a, long double b) - { - return GSL_MIN (a, b); - } - #else - #define GSL_MAX_INT(a,b) GSL_MAX(a,b) - #define GSL_MIN_INT(a,b) GSL_MIN(a,b) - #define GSL_MAX_DBL(a,b) GSL_MAX(a,b) - #define GSL_MIN_DBL(a,b) GSL_MIN(a,b) - #define GSL_MAX_LDBL(a,b) GSL_MAX(a,b) - #define GSL_MIN_LDBL(a,b) GSL_MIN(a,b) - #endif /* HAVE_INLINE */ - /* Definition of an arbitrary function with parameters */ struct gsl_function_struct --- 118,123 ---- diff -a -rc -C 2 -P gsl-1.11/gsl_minmax.h gsl-1.12/gsl_minmax.h *** gsl-1.11/gsl_minmax.h Thu Jan 1 00:00:00 1970 --- gsl-1.12/gsl_minmax.h Thu Nov 27 20:03:28 2008 *************** *** 0 **** --- 1,102 ---- + /* gsl_minmax.h + * + * Copyright (C) 2008 Gerard Jungman, Brian Gough + * + * 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + + #ifndef __GSL_MINMAX_H__ + #define __GSL_MINMAX_H__ + #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 + + /* Define MAX and MIN macros/functions if they don't exist. */ + + /* plain old macros for general use */ + #define GSL_MAX(a,b) ((a) > (b) ? (a) : (b)) + #define GSL_MIN(a,b) ((a) < (b) ? (a) : (b)) + + /* function versions of the above, in case they are needed */ + double gsl_max (double a, double b); + double gsl_min (double a, double b); + + /* inline-friendly strongly typed versions */ + #ifdef HAVE_INLINE + + INLINE_FUN int GSL_MAX_INT (int a, int b); + INLINE_FUN int GSL_MIN_INT (int a, int b); + INLINE_FUN double GSL_MAX_DBL (double a, double b); + INLINE_FUN double GSL_MIN_DBL (double a, double b); + INLINE_FUN long double GSL_MAX_LDBL (long double a, long double b); + INLINE_FUN long double GSL_MIN_LDBL (long double a, long double b); + + INLINE_FUN int + GSL_MAX_INT (int a, int b) + { + return GSL_MAX (a, b); + } + + INLINE_FUN int + GSL_MIN_INT (int a, int b) + { + return GSL_MIN (a, b); + } + + INLINE_FUN double + GSL_MAX_DBL (double a, double b) + { + return GSL_MAX (a, b); + } + + INLINE_FUN double + GSL_MIN_DBL (double a, double b) + { + return GSL_MIN (a, b); + } + + INLINE_FUN long double + GSL_MAX_LDBL (long double a, long double b) + { + return GSL_MAX (a, b); + } + + INLINE_FUN long double + GSL_MIN_LDBL (long double a, long double b) + { + return GSL_MIN (a, b); + } + #else + #define GSL_MAX_INT(a,b) GSL_MAX(a,b) + #define GSL_MIN_INT(a,b) GSL_MIN(a,b) + #define GSL_MAX_DBL(a,b) GSL_MAX(a,b) + #define GSL_MIN_DBL(a,b) GSL_MIN(a,b) + #define GSL_MAX_LDBL(a,b) GSL_MAX(a,b) + #define GSL_MIN_LDBL(a,b) GSL_MIN(a,b) + #endif /* HAVE_INLINE */ + + __END_DECLS + + #endif /* __GSL_POW_INT_H__ */ diff -a -rc -C 2 -P gsl-1.11/gsl_mode.h gsl-1.12/gsl_mode.h *** gsl-1.11/gsl_mode.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/gsl_mode.h Thu Nov 27 20:03:28 2008 *************** *** 21,26 **** --- 21,27 ---- #ifndef __GSL_MODE_H__ #define __GSL_MODE_H__ + #include #undef __BEGIN_DECLS #undef __END_DECLS *************** *** 67,75 **** #define GSL_PREC_APPROX 2 #ifdef HAVE_INLINE ! extern inline unsigned int GSL_MODE_PREC(gsl_mode_t mt); ! extern inline unsigned int GSL_MODE_PREC(gsl_mode_t mt) { return (mt & (unsigned int)7); } #else /* HAVE_INLINE */ --- 68,76 ---- #define GSL_PREC_APPROX 2 #ifdef HAVE_INLINE ! INLINE_FUN unsigned int GSL_MODE_PREC(gsl_mode_t mt); ! INLINE_FUN unsigned int GSL_MODE_PREC(gsl_mode_t mt) { return (mt & (unsigned int)7); } #else /* HAVE_INLINE */ diff -a -rc -C 2 -P gsl-1.11/gsl_pow_int.h gsl-1.12/gsl_pow_int.h *** gsl-1.11/gsl_pow_int.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/gsl_pow_int.h Thu Nov 27 20:03:28 2008 *************** *** 19,24 **** --- 19,25 ---- #ifndef __GSL_POW_INT_H__ #define __GSL_POW_INT_H__ + #include #undef __BEGIN_DECLS #undef __END_DECLS *************** *** 32,64 **** __BEGIN_DECLS #ifdef HAVE_INLINE ! extern inline double gsl_pow_2(const double x); ! extern inline double gsl_pow_3(const double x); ! extern inline double gsl_pow_4(const double x); ! extern inline double gsl_pow_5(const double x); ! extern inline double gsl_pow_6(const double x); ! extern inline double gsl_pow_7(const double x); ! extern inline double gsl_pow_8(const double x); ! extern inline double gsl_pow_9(const double x); ! ! extern inline double gsl_pow_2(const double x) { return x*x; } ! extern inline double gsl_pow_3(const double x) { return x*x*x; } ! extern inline double gsl_pow_4(const double x) { double x2 = x*x; return x2*x2; } ! extern inline double gsl_pow_5(const double x) { double x2 = x*x; return x2*x2*x; } ! extern inline double gsl_pow_6(const double x) { double x2 = x*x; return x2*x2*x2; } ! extern inline double gsl_pow_7(const double x) { double x3 = x*x*x; return x3*x3*x; } ! extern inline double gsl_pow_8(const double x) { double x2 = x*x; double x4 = x2*x2; return x4*x4; } ! extern inline double gsl_pow_9(const double x) { double x3 = x*x*x; return x3*x3*x3; } ! #else ! double gsl_pow_2(const double x); ! double gsl_pow_3(const double x); ! double gsl_pow_4(const double x); ! double gsl_pow_5(const double x); ! double gsl_pow_6(const double x); ! double gsl_pow_7(const double x); ! double gsl_pow_8(const double x); ! double gsl_pow_9(const double x); #endif double gsl_pow_int(double x, int n); --- 33,56 ---- __BEGIN_DECLS + INLINE_DECL double gsl_pow_2(const double x); + INLINE_DECL double gsl_pow_3(const double x); + INLINE_DECL double gsl_pow_4(const double x); + INLINE_DECL double gsl_pow_5(const double x); + INLINE_DECL double gsl_pow_6(const double x); + INLINE_DECL double gsl_pow_7(const double x); + INLINE_DECL double gsl_pow_8(const double x); + INLINE_DECL double gsl_pow_9(const double x); + #ifdef HAVE_INLINE ! INLINE_FUN double gsl_pow_2(const double x) { return x*x; } ! INLINE_FUN double gsl_pow_3(const double x) { return x*x*x; } ! INLINE_FUN double gsl_pow_4(const double x) { double x2 = x*x; return x2*x2; } ! INLINE_FUN double gsl_pow_5(const double x) { double x2 = x*x; return x2*x2*x; } ! INLINE_FUN double gsl_pow_6(const double x) { double x2 = x*x; return x2*x2*x2; } ! INLINE_FUN double gsl_pow_7(const double x) { double x3 = x*x*x; return x3*x3*x; } ! INLINE_FUN double gsl_pow_8(const double x) { double x2 = x*x; double x4 = x2*x2; return x4*x4; } ! INLINE_FUN double gsl_pow_9(const double x) { double x3 = x*x*x; return x3*x3*x3; } #endif double gsl_pow_int(double x, int n); diff -a -rc -C 2 -P gsl-1.11/gsl_version.h gsl-1.12/gsl_version.h *** gsl-1.11/gsl_version.h Sun Mar 30 12:07:31 2008 --- gsl-1.12/gsl_version.h Mon Dec 15 14:55:53 2008 *************** *** 15,21 **** __BEGIN_DECLS ! #define GSL_VERSION "1.11" GSL_VAR const char * gsl_version; --- 15,21 ---- __BEGIN_DECLS ! #define GSL_VERSION "1.12" GSL_VAR const char * gsl_version; diff -a -rc -C 2 -P gsl-1.11/histogram/ChangeLog gsl-1.12/histogram/ChangeLog *** gsl-1.11/histogram/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/histogram/ChangeLog Thu Nov 27 20:03:28 2008 *************** *** 1,3 **** --- 1,7 ---- + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + 2004-11-28 Brian Gough * init2d.c (make_uniform): compute uniform range without diff -a -rc -C 2 -P gsl-1.11/histogram/Makefile.am gsl-1.12/histogram/Makefile.am *** gsl-1.11/histogram/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/histogram/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 2,8 **** pkginclude_HEADERS = gsl_histogram.h gsl_histogram2d.h ! INCLUDES= -I$(top_builddir) libgslhistogram_la_SOURCES = add.c get.c init.c params.c reset.c file.c pdf.c gsl_histogram.h add2d.c get2d.c init2d.c params2d.c reset2d.c file2d.c pdf2d.c gsl_histogram2d.h calloc_range.c calloc_range2d.c copy.c copy2d.c maxval.c maxval2d.c oper.c oper2d.c stat.c stat2d.c --- 2,8 ---- pkginclude_HEADERS = gsl_histogram.h gsl_histogram2d.h ! INCLUDES = -I$(top_srcdir) libgslhistogram_la_SOURCES = add.c get.c init.c params.c reset.c file.c pdf.c gsl_histogram.h add2d.c get2d.c init2d.c params2d.c reset2d.c file2d.c pdf2d.c gsl_histogram2d.h calloc_range.c calloc_range2d.c copy.c copy2d.c maxval.c maxval2d.c oper.c oper2d.c stat.c stat2d.c diff -a -rc -C 2 -P gsl-1.11/histogram/Makefile.in gsl-1.12/histogram/Makefile.in *** gsl-1.11/histogram/Makefile.in Sun Mar 30 12:07:05 2008 --- gsl-1.12/histogram/Makefile.in Mon Dec 15 14:55:12 2008 *************** *** 138,143 **** --- 138,144 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 145,151 **** --- 146,155 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 210,216 **** top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslhistogram.la pkginclude_HEADERS = gsl_histogram.h gsl_histogram2d.h ! INCLUDES = -I$(top_builddir) libgslhistogram_la_SOURCES = add.c get.c init.c params.c reset.c file.c pdf.c gsl_histogram.h add2d.c get2d.c init2d.c params2d.c reset2d.c file2d.c pdf2d.c gsl_histogram2d.h calloc_range.c calloc_range2d.c copy.c copy2d.c maxval.c maxval2d.c oper.c oper2d.c stat.c stat2d.c noinst_HEADERS = urand.c find.c find2d.c TESTS = $(check_PROGRAMS) --- 214,220 ---- top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslhistogram.la pkginclude_HEADERS = gsl_histogram.h gsl_histogram2d.h ! INCLUDES = -I$(top_srcdir) libgslhistogram_la_SOURCES = add.c get.c init.c params.c reset.c file.c pdf.c gsl_histogram.h add2d.c get2d.c init2d.c params2d.c reset2d.c file2d.c pdf2d.c gsl_histogram2d.h calloc_range.c calloc_range2d.c copy.c copy2d.c maxval.c maxval2d.c oper.c oper2d.c stat.c stat2d.c noinst_HEADERS = urand.c find.c find2d.c TESTS = $(check_PROGRAMS) diff -a -rc -C 2 -P gsl-1.11/ieee-utils/ChangeLog gsl-1.12/ieee-utils/ChangeLog *** gsl-1.11/ieee-utils/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/ieee-utils/ChangeLog Thu Nov 27 20:03:28 2008 *************** *** 1,3 **** --- 1,7 ---- + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + 2007-06-21 Brian Gough * fp.c: allow universal binaries by checking __ppc__ and __i386__ diff -a -rc -C 2 -P gsl-1.11/ieee-utils/Makefile.am gsl-1.12/ieee-utils/Makefile.am *** gsl-1.11/ieee-utils/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/ieee-utils/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 6,12 **** noinst_HEADERS = fp-aix.c fp-darwin.c fp-darwin86.c fp-hpux.c fp-hpux11.c fp-irix.c fp-gnum68k.c fp-gnuppc.c fp-solaris.c fp-gnusparc.c fp-sunos4.c fp-tru64.c fp-unknown.c fp-gnux86.c fp-freebsd.c fp-os2emx.c fp-netbsd.c fp-openbsd.c fp-gnuc99.c endian.c standardize.c ! INCLUDES= -I$(top_builddir) TESTS = $(check_PROGRAMS) check_PROGRAMS = test --- 6,12 ---- noinst_HEADERS = fp-aix.c fp-darwin.c fp-darwin86.c fp-hpux.c fp-hpux11.c fp-irix.c fp-gnum68k.c fp-gnuppc.c fp-solaris.c fp-gnusparc.c fp-sunos4.c fp-tru64.c fp-unknown.c fp-gnux86.c fp-freebsd.c fp-os2emx.c fp-netbsd.c fp-openbsd.c fp-gnuc99.c endian.c standardize.c ! INCLUDES = -I$(top_srcdir) TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -a -rc -C 2 -P gsl-1.11/ieee-utils/Makefile.in gsl-1.12/ieee-utils/Makefile.in *** gsl-1.11/ieee-utils/Makefile.in Sun Mar 30 12:07:05 2008 --- gsl-1.12/ieee-utils/Makefile.in Mon Dec 15 14:55:12 2008 *************** *** 132,137 **** --- 132,138 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 139,145 **** --- 140,149 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 206,212 **** pkginclude_HEADERS = gsl_ieee_utils.h libgslieeeutils_la_SOURCES = print.c make_rep.c gsl_ieee_utils.h env.c fp.c read.c noinst_HEADERS = fp-aix.c fp-darwin.c fp-darwin86.c fp-hpux.c fp-hpux11.c fp-irix.c fp-gnum68k.c fp-gnuppc.c fp-solaris.c fp-gnusparc.c fp-sunos4.c fp-tru64.c fp-unknown.c fp-gnux86.c fp-freebsd.c fp-os2emx.c fp-netbsd.c fp-openbsd.c fp-gnuc99.c endian.c standardize.c ! INCLUDES = -I$(top_builddir) TESTS = $(check_PROGRAMS) test_LDADD = libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la test_SOURCES = test.c --- 210,216 ---- pkginclude_HEADERS = gsl_ieee_utils.h libgslieeeutils_la_SOURCES = print.c make_rep.c gsl_ieee_utils.h env.c fp.c read.c noinst_HEADERS = fp-aix.c fp-darwin.c fp-darwin86.c fp-hpux.c fp-hpux11.c fp-irix.c fp-gnum68k.c fp-gnuppc.c fp-solaris.c fp-gnusparc.c fp-sunos4.c fp-tru64.c fp-unknown.c fp-gnux86.c fp-freebsd.c fp-os2emx.c fp-netbsd.c fp-openbsd.c fp-gnuc99.c endian.c standardize.c ! INCLUDES = -I$(top_srcdir) TESTS = $(check_PROGRAMS) test_LDADD = libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la test_SOURCES = test.c diff -a -rc -C 2 -P gsl-1.11/integration/ChangeLog gsl-1.12/integration/ChangeLog *** gsl-1.11/integration/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/integration/ChangeLog Thu Nov 27 20:03:28 2008 *************** *** 1,3 **** --- 1,7 ---- + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + 2003-01-12 Brian Gough * qawc.c (gsl_integration_qawc): fixed bisection condition to diff -a -rc -C 2 -P gsl-1.11/integration/Makefile.am gsl-1.12/integration/Makefile.am *** gsl-1.11/integration/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/integration/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 1,6 **** noinst_LTLIBRARIES = libgslintegration.la ! INCLUDES= -I$(top_builddir) libgslintegration_la_SOURCES = qk15.c qk21.c qk31.c qk41.c qk51.c qk61.c qk.c qng.c qng.h qag.c qags.c qagp.c workspace.c qcheb.c qawc.c qmomo.c qaws.c qmomof.c qawo.c qawf.c --- 1,6 ---- noinst_LTLIBRARIES = libgslintegration.la ! INCLUDES = -I$(top_srcdir) libgslintegration_la_SOURCES = qk15.c qk21.c qk31.c qk41.c qk51.c qk61.c qk.c qng.c qng.h qag.c qags.c qagp.c workspace.c qcheb.c qawc.c qmomo.c qaws.c qmomof.c qawo.c qawf.c diff -a -rc -C 2 -P gsl-1.11/integration/Makefile.in gsl-1.12/integration/Makefile.in *** gsl-1.11/integration/Makefile.in Sun Mar 30 12:07:05 2008 --- gsl-1.12/integration/Makefile.in Mon Dec 15 14:55:12 2008 *************** *** 135,140 **** --- 135,141 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 142,148 **** --- 143,152 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 206,212 **** top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslintegration.la ! INCLUDES = -I$(top_builddir) libgslintegration_la_SOURCES = qk15.c qk21.c qk31.c qk41.c qk51.c qk61.c qk.c qng.c qng.h qag.c qags.c qagp.c workspace.c qcheb.c qawc.c qmomo.c qaws.c qmomof.c qawo.c qawf.c pkginclude_HEADERS = gsl_integration.h 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 --- 210,216 ---- top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslintegration.la ! INCLUDES = -I$(top_srcdir) libgslintegration_la_SOURCES = qk15.c qk21.c qk31.c qk41.c qk51.c qk61.c qk.c qng.c qng.h qag.c qags.c qagp.c workspace.c qcheb.c qawc.c qmomo.c qaws.c qmomof.c qawo.c qawf.c pkginclude_HEADERS = gsl_integration.h 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 diff -a -rc -C 2 -P gsl-1.11/interpolation/ChangeLog gsl-1.12/interpolation/ChangeLog *** gsl-1.11/interpolation/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/interpolation/ChangeLog Thu Nov 27 20:03:28 2008 *************** *** 1,3 **** --- 1,18 ---- + 2008-09-05 Brian Gough + + * gsl_interp.h (gsl_interp_accel_find): corrected condition for + x>=xa. + + 2008-07-03 Brian Gough + + * gsl_interp.h: added inline declarations + + * accel.c: moved gsl_interp_accel_find to inline.c + + * bsearch.h bsearch.c: removed, moved to inline.c + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + 2007-03-14 Brian Gough * interp.c (gsl_interp_init): added check for monotonically diff -a -rc -C 2 -P gsl-1.11/interpolation/Makefile.am gsl-1.12/interpolation/Makefile.am *** gsl-1.11/interpolation/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/interpolation/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 4,14 **** pkginclude_HEADERS = gsl_interp.h gsl_spline.h ! libgslinterpolation_la_SOURCES = accel.c akima.c bsearch.c cspline.c interp.c linear.c integ_eval.h spline.c poly.c ! noinst_HEADERS = bsearch.h ! ! INCLUDES= -I$(top_builddir) TESTS = $(check_PROGRAMS) --- 4,12 ---- pkginclude_HEADERS = gsl_interp.h gsl_spline.h ! libgslinterpolation_la_SOURCES = accel.c akima.c cspline.c interp.c linear.c integ_eval.h spline.c poly.c inline.c ! INCLUDES = -I$(top_srcdir) TESTS = $(check_PROGRAMS) diff -a -rc -C 2 -P gsl-1.11/interpolation/Makefile.in gsl-1.12/interpolation/Makefile.in *** gsl-1.11/interpolation/Makefile.in Sun Mar 30 12:07:05 2008 --- gsl-1.12/interpolation/Makefile.in Mon Dec 15 14:55:13 2008 *************** *** 35,42 **** host_triplet = @host@ check_PROGRAMS = test$(EXEEXT) subdir = interpolation ! DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ ! $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog TODO ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ --- 35,42 ---- host_triplet = @host@ check_PROGRAMS = test$(EXEEXT) subdir = interpolation ! DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ ! $(srcdir)/Makefile.in ChangeLog TODO ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ *************** *** 46,53 **** CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libgslinterpolation_la_LIBADD = ! am_libgslinterpolation_la_OBJECTS = accel.lo akima.lo bsearch.lo \ ! cspline.lo interp.lo linear.lo spline.lo poly.lo libgslinterpolation_la_OBJECTS = $(am_libgslinterpolation_la_OBJECTS) am_test_OBJECTS = test.$(OBJEXT) test_OBJECTS = $(am_test_OBJECTS) --- 46,53 ---- CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libgslinterpolation_la_LIBADD = ! am_libgslinterpolation_la_OBJECTS = accel.lo akima.lo cspline.lo \ ! interp.lo linear.lo spline.lo poly.lo inline.lo libgslinterpolation_la_OBJECTS = $(am_libgslinterpolation_la_OBJECTS) am_test_OBJECTS = test.$(OBJEXT) test_OBJECTS = $(am_test_OBJECTS) *************** *** 80,86 **** am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(pkgincludedir)" pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER) ! HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) --- 80,86 ---- am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(pkgincludedir)" pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER) ! HEADERS = $(pkginclude_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) *************** *** 137,142 **** --- 137,143 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 144,150 **** --- 145,154 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 209,217 **** top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslinterpolation.la pkginclude_HEADERS = gsl_interp.h gsl_spline.h ! libgslinterpolation_la_SOURCES = accel.c akima.c bsearch.c cspline.c interp.c linear.c integ_eval.h spline.c poly.c ! noinst_HEADERS = bsearch.h ! 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 test_SOURCES = test.c --- 213,220 ---- top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslinterpolation.la pkginclude_HEADERS = gsl_interp.h gsl_spline.h ! libgslinterpolation_la_SOURCES = accel.c akima.c cspline.c interp.c linear.c integ_eval.h spline.c poly.c inline.c ! INCLUDES = -I$(top_srcdir) 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 test_SOURCES = test.c diff -a -rc -C 2 -P gsl-1.11/interpolation/accel.c gsl-1.12/interpolation/accel.c *** gsl-1.11/interpolation/accel.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/interpolation/accel.c Thu Nov 27 20:03:28 2008 *************** *** 50,80 **** return GSL_SUCCESS; } - #ifndef HIDE_INLINE_STATIC - size_t - gsl_interp_accel_find (gsl_interp_accel * a, const double xa[], size_t len, double x) - { - size_t x_index = a->cache; - - if (x < xa[x_index]) - { - a->miss_count++; - a->cache = gsl_interp_bsearch (xa, x, 0, x_index); - } - else if (x > xa[x_index + 1]) - { - a->miss_count++; - a->cache = gsl_interp_bsearch (xa, x, x_index, len - 1); - } - else - { - a->hit_count++; - } - - return a->cache; - } - #endif - void gsl_interp_accel_free (gsl_interp_accel * a) { --- 50,55 ---- Only in gsl-1.11/interpolation: bsearch.c Only in gsl-1.11/interpolation: bsearch.h diff -a -rc -C 2 -P gsl-1.11/interpolation/gsl_interp.h gsl-1.12/interpolation/gsl_interp.h *** gsl-1.11/interpolation/gsl_interp.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/interpolation/gsl_interp.h Thu Nov 27 20:03:28 2008 *************** *** 22,27 **** --- 22,28 ---- #ifndef __GSL_INTERP_H__ #define __GSL_INTERP_H__ #include + #include #include #undef __BEGIN_DECLS *************** *** 81,89 **** gsl_interp_accel * gsl_interp_accel_alloc(void); - size_t - gsl_interp_accel_find(gsl_interp_accel * a, const double x_array[], size_t size, double x); - int gsl_interp_accel_reset (gsl_interp_accel * a); --- 82,87 ---- *************** *** 148,162 **** void gsl_interp_free(gsl_interp * interp); ! size_t gsl_interp_bsearch(const double x_array[], double x, ! size_t index_lo, size_t index_hi); ! ! #ifdef HAVE_INLINE ! extern inline size_t gsl_interp_bsearch(const double x_array[], double x, size_t index_lo, size_t index_hi); ! extern inline size_t gsl_interp_bsearch(const double x_array[], double x, size_t index_lo, size_t index_hi) { --- 146,180 ---- void gsl_interp_free(gsl_interp * interp); ! INLINE_DECL size_t gsl_interp_bsearch(const double x_array[], double x, size_t index_lo, size_t index_hi); ! #ifdef HAVE_INLINE ! ! /* Perform a binary search of an array of values. ! * ! * The parameters index_lo and index_hi provide an initial bracket, ! * and it is assumed that index_lo < index_hi. The resulting index ! * is guaranteed to be strictly less than index_hi and greater than ! * or equal to index_lo, so that the implicit bracket [index, index+1] ! * always corresponds to a region within the implicit value range of ! * the value array. ! * ! * Note that this means the relationship of 'x' to x_array[index] ! * and x_array[index+1] depends on the result region, i.e. the ! * behaviour at the boundaries may not correspond to what you ! * expect. We have the following complete specification of the ! * behaviour. ! * Suppose the input is x_array[] = { x0, x1, ..., xN } ! * if ( x == x0 ) then index == 0 ! * if ( x > x0 && x <= x1 ) then index == 0, and sim. for other interior pts ! * if ( x == xN ) then index == N-1 ! * if ( x > xN ) then index == N-1 ! * if ( x < x0 ) then index == 0 ! */ ! ! INLINE_FUN size_t gsl_interp_bsearch(const double x_array[], double x, size_t index_lo, size_t index_hi) { *************** *** 174,181 **** } #endif #ifdef HAVE_INLINE ! extern inline size_t gsl_interp_accel_find(gsl_interp_accel * a, const double xa[], size_t len, double x) { size_t x_index = a->cache; --- 192,202 ---- } #endif + INLINE_DECL size_t + gsl_interp_accel_find(gsl_interp_accel * a, const double x_array[], size_t size, double x); + #ifdef HAVE_INLINE ! INLINE_FUN size_t gsl_interp_accel_find(gsl_interp_accel * a, const double xa[], size_t len, double x) { size_t x_index = a->cache; *************** *** 184,190 **** a->miss_count++; a->cache = gsl_interp_bsearch(xa, x, 0, x_index); } ! else if(x > xa[x_index + 1]) { a->miss_count++; a->cache = gsl_interp_bsearch(xa, x, x_index, len-1); } --- 205,211 ---- a->miss_count++; a->cache = gsl_interp_bsearch(xa, x, 0, x_index); } ! else if(x >= xa[x_index + 1]) { a->miss_count++; a->cache = gsl_interp_bsearch(xa, x, x_index, len-1); } diff -a -rc -C 2 -P gsl-1.11/interpolation/inline.c gsl-1.12/interpolation/inline.c *** gsl-1.11/interpolation/inline.c Thu Jan 1 00:00:00 1970 --- gsl-1.12/interpolation/inline.c Thu Nov 27 20:03:28 2008 *************** *** 0 **** --- 1,30 ---- + /* interpolation/bsearch.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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + + /* Author: G. Jungman + */ + #include + #include + + /* Compile all the inline functions */ + + #define COMPILE_INLINE_STATIC + #include "build.h" + #include + diff -a -rc -C 2 -P gsl-1.11/interpolation/test.c gsl-1.12/interpolation/test.c *** gsl-1.11/interpolation/test.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/interpolation/test.c Thu Nov 27 20:03:28 2008 *************** *** 74,79 **** --- 74,113 ---- status += s; gsl_test (s, "out of bounds bsearch -"); + /* Test the accelerator */ + + { + size_t i, j, k1 = 0, k2 = 0; + int t = 0; + double x = 0; + double r[16] = { -0.2, 0.0, 0.1, 0.7, + 1.0, 1.3, 1.9, + 2.0, 2.2, 2.7, + 3.0, 3.1, 3.6, + 4.0, 4.1, 4.9 }; + + gsl_interp_accel *a = gsl_interp_accel_alloc (); + + /* Run through all the pairs of points */ + + while (k1 < 16 && k2 < 16) { + + x = r[t ? k1 : k2]; + t = !t; + + if (t == 0) { + k1 = (k1 + 1) % 16; + if (k1 == 0) k2++; + }; + + i = gsl_interp_accel_find(a, x_array, 5, x); + j = gsl_interp_bsearch(x_array, x, 0, 4); + gsl_test(i != j, "(%u,%u) accelerated lookup vs bsearch (x = %g)", i, j, x); + } + + gsl_interp_accel_free(a); + } + return status; } diff -a -rc -C 2 -P gsl-1.11/linalg/ChangeLog gsl-1.12/linalg/ChangeLog *** gsl-1.11/linalg/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/linalg/ChangeLog Thu Nov 27 20:03:28 2008 *************** *** 1,3 **** --- 1,53 ---- + 2008-10-20 Brian Gough + + * svd.c (gsl_linalg_SV_decomp_jacobi): change use of + gsl_coerce_double to macro so it is not called unnecessarily + + 2008-08-30 Brian Gough + + * tridiag.c (solve_cyc_tridiag_nonsym): use x_stride when storing + in x[] (fixes bug #24162) + + 2008-08-26 Brian Gough + + * test.c (test_QRPT_update_dim): added tests for + gsl_linalg_QRPT_update + + * qrpt.c (gsl_linalg_QRPT_update): handle rectangular matrices + + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + + 2008-04-28 Brian Gough + + * bidiag.c (gsl_linalg_bidiag_unpack, gsl_linalg_bidiag_unpack2): + use new descending loop convention + + * hermtd.c (gsl_linalg_hermtd_unpack): use new descending loop + convention + + * hh.c (gsl_linalg_HH_svx): use new descending loop convention + + * lq.c (gsl_linalg_LQ_vecQ, gsl_linalg_LQ_unpack): use new + descending loop convention + + * qr.c (gsl_linalg_QR_Qvec, gsl_linalg_QR_unpack): use new + descending loop convention + + * svd.c (gsl_linalg_SV_decomp_mod): use new descending loop + convention + + * svdstep.c (chase_out_trailing_zero): use new descending loop + convention + + * symmtd.c (gsl_linalg_symmtd_unpack): use new descending loop + convention + + 2008-04-03 Brian Gough + + * qr.c lq.c: removed unused definition of REAL + 2007-08-27 Brian Gough * tridiag.c: use GSL_ERROR for failed allocation, signal diff -a -rc -C 2 -P gsl-1.11/linalg/Makefile.am gsl-1.12/linalg/Makefile.am *** gsl-1.11/linalg/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/linalg/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 2,8 **** pkginclude_HEADERS = gsl_linalg.h ! 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 hessenberg.c hesstri.c cholesky.c choleskyc.c symmtd.c hermtd.c bidiag.c balance.c balancemat.c --- 2,8 ---- pkginclude_HEADERS = gsl_linalg.h ! INCLUDES = -I$(top_srcdir) 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 hessenberg.c hesstri.c cholesky.c choleskyc.c symmtd.c hermtd.c bidiag.c balance.c balancemat.c diff -a -rc -C 2 -P gsl-1.11/linalg/Makefile.in gsl-1.12/linalg/Makefile.in *** gsl-1.11/linalg/Makefile.in Sun Mar 30 12:07:06 2008 --- gsl-1.12/linalg/Makefile.in Mon Dec 15 14:55:13 2008 *************** *** 139,144 **** --- 139,145 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 146,152 **** --- 147,156 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 211,217 **** top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgsllinalg.la pkginclude_HEADERS = gsl_linalg.h ! 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 hessenberg.c hesstri.c cholesky.c choleskyc.c symmtd.c hermtd.c bidiag.c balance.c balancemat.c noinst_HEADERS = givens.c apply_givens.c svdstep.c tridiag.h TESTS = $(check_PROGRAMS) --- 215,221 ---- top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgsllinalg.la pkginclude_HEADERS = gsl_linalg.h ! INCLUDES = -I$(top_srcdir) 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 hessenberg.c hesstri.c cholesky.c choleskyc.c symmtd.c hermtd.c bidiag.c balance.c balancemat.c noinst_HEADERS = givens.c apply_givens.c svdstep.c tridiag.h TESTS = $(check_PROGRAMS) diff -a -rc -C 2 -P gsl-1.11/linalg/bidiag.c gsl-1.12/linalg/bidiag.c *** gsl-1.11/linalg/bidiag.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/linalg/bidiag.c Thu Nov 27 20:03:28 2008 *************** *** 208,214 **** gsl_matrix_set_identity (V); ! for (i = N - 1; i > 0 && i--;) { /* Householder row transformation to accumulate V */ gsl_vector_const_view r = gsl_matrix_const_row (A, i); --- 208,214 ---- gsl_matrix_set_identity (V); ! for (i = N - 1; i-- > 0;) { /* Householder row transformation to accumulate V */ gsl_vector_const_view r = gsl_matrix_const_row (A, i); *************** *** 227,233 **** gsl_matrix_set_identity (U); ! for (j = N; j > 0 && j--;) { /* Householder column transformation to accumulate U */ gsl_vector_const_view c = gsl_matrix_const_column (A, j); --- 227,233 ---- gsl_matrix_set_identity (U); ! for (j = N; j-- > 0;) { /* Householder column transformation to accumulate U */ gsl_vector_const_view c = gsl_matrix_const_column (A, j); *************** *** 279,285 **** gsl_matrix_set_identity (V); ! for (i = N - 1; i > 0 && i--;) { /* Householder row transformation to accumulate V */ gsl_vector_const_view r = gsl_matrix_const_row (A, i); --- 279,285 ---- gsl_matrix_set_identity (V); ! for (i = N - 1; i-- > 0;) { /* Householder row transformation to accumulate V */ gsl_vector_const_view r = gsl_matrix_const_row (A, i); *************** *** 305,311 **** /* Allow U to be unpacked into the same memory as A, copy diagonal into tau_U */ ! for (j = N; j > 0 && j--;) { /* Householder column transformation to accumulate U */ double tj = gsl_vector_get (tau_U, j); --- 305,311 ---- /* Allow U to be unpacked into the same memory as A, copy diagonal into tau_U */ ! for (j = N; j-- > 0;) { /* Householder column transformation to accumulate U */ double tj = gsl_vector_get (tau_U, j); diff -a -rc -C 2 -P gsl-1.11/linalg/cholesky.c gsl-1.12/linalg/cholesky.c *** gsl-1.11/linalg/cholesky.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/linalg/cholesky.c Thu Nov 27 20:03:28 2008 *************** *** 224,229 **** --- 224,321 ---- } } + /* + gsl_linalg_cholesky_invert() + Compute the inverse of a symmetric positive definite matrix in + Cholesky form. + + Inputs: LLT - matrix in cholesky form on input + A^{-1} = L^{-t} L^{-1} on output + + Return: success or error + */ + + int + gsl_linalg_cholesky_invert(gsl_matrix * LLT) + { + if (LLT->size1 != LLT->size2) + { + GSL_ERROR ("cholesky matrix must be square", GSL_ENOTSQR); + } + else + { + size_t N = LLT->size1; + size_t i, j; + double sum; + gsl_vector_view v1, v2; + + /* invert the lower triangle of LLT */ + for (i = 0; i < N; ++i) + { + double ajj; + + j = N - i - 1; + + gsl_matrix_set(LLT, j, j, 1.0 / gsl_matrix_get(LLT, j, j)); + ajj = -gsl_matrix_get(LLT, j, j); + + if (j < N - 1) + { + gsl_matrix_view m; + + m = gsl_matrix_submatrix(LLT, j + 1, j + 1, + N - j - 1, N - j - 1); + v1 = gsl_matrix_subcolumn(LLT, j, j + 1, N - j - 1); + + gsl_blas_dtrmv(CblasLower, CblasNoTrans, CblasNonUnit, + &m.matrix, &v1.vector); + + gsl_blas_dscal(ajj, &v1.vector); + } + } /* for (i = 0; i < N; ++i) */ + + /* + * The lower triangle of LLT now contains L^{-1}. Now compute + * A^{-1} = L^{-t} L^{-1} + * + * The (ij) element of A^{-1} is column i of L^{-1} dotted into + * column j of L^{-1} + */ + + for (i = 0; i < N; ++i) + { + for (j = i + 1; j < N; ++j) + { + v1 = gsl_matrix_subcolumn(LLT, i, j, N - j); + v2 = gsl_matrix_subcolumn(LLT, j, j, N - j); + + /* compute Ainv_{ij} = sum_k Linv_{ki} Linv_{kj} */ + gsl_blas_ddot(&v1.vector, &v2.vector, &sum); + + /* store in upper triangle */ + gsl_matrix_set(LLT, i, j, sum); + } + + /* now compute the diagonal element */ + v1 = gsl_matrix_subcolumn(LLT, i, i, N - i); + gsl_blas_ddot(&v1.vector, &v1.vector, &sum); + gsl_matrix_set(LLT, i, i, sum); + } + + /* copy the transposed upper triangle to the lower triangle */ + + for (j = 1; j < N; j++) + { + for (i = 0; i < j; i++) + { + double A_ij = gsl_matrix_get (LLT, i, j); + gsl_matrix_set (LLT, j, i, A_ij); + } + } + + return GSL_SUCCESS; + } + } /* gsl_linalg_cholesky_invert() */ int gsl_linalg_cholesky_decomp_unit(gsl_matrix * A, gsl_vector * D) diff -a -rc -C 2 -P gsl-1.11/linalg/gsl_linalg.h gsl-1.12/linalg/gsl_linalg.h *** gsl-1.11/linalg/gsl_linalg.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/linalg/gsl_linalg.h Thu Nov 27 20:03:28 2008 *************** *** 429,434 **** --- 429,435 ---- int gsl_linalg_cholesky_svx (const gsl_matrix * cholesky, gsl_vector * x); + int gsl_linalg_cholesky_invert(gsl_matrix * cholesky); /* Cholesky decomposition with unit-diagonal triangular parts. * A = L D L^T, where diag(L) = (1,1,...,1). diff -a -rc -C 2 -P gsl-1.11/linalg/hermtd.c gsl-1.12/linalg/hermtd.c *** gsl-1.11/linalg/hermtd.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/linalg/hermtd.c Thu Nov 27 20:03:28 2008 *************** *** 161,167 **** gsl_matrix_complex_set_identity (Q); ! for (i = N - 1; i > 0 && i--;) { gsl_complex ti = gsl_vector_complex_get (tau, i); --- 161,167 ---- gsl_matrix_complex_set_identity (Q); ! for (i = N - 1; i-- > 0;) { gsl_complex ti = gsl_vector_complex_get (tau, i); diff -a -rc -C 2 -P gsl-1.11/linalg/hh.c gsl-1.12/linalg/hh.c *** gsl-1.11/linalg/hh.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/linalg/hh.c Thu Nov 27 20:03:28 2008 *************** *** 160,166 **** /* Perform back-substitution. */ ! for (i = N; i > 0 && i--;) { REAL xi = gsl_vector_get (x, i); REAL sum = 0.0; --- 160,166 ---- /* Perform back-substitution. */ ! for (i = N; i-- > 0;) { REAL xi = gsl_vector_get (x, i); REAL sum = 0.0; diff -a -rc -C 2 -P gsl-1.11/linalg/lq.c gsl-1.12/linalg/lq.c *** gsl-1.11/linalg/lq.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/linalg/lq.c Thu Nov 27 20:03:28 2008 *************** *** 28,35 **** #include - #define REAL double - #include "givens.c" #include "apply_givens.c" --- 28,33 ---- *************** *** 385,391 **** /* 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), --- 383,389 ---- /* compute v Q^T */ ! for (i = GSL_MIN (M, N); i-- > 0;) { gsl_vector_const_view c = gsl_matrix_const_row (LQ, i); gsl_vector_const_view h = gsl_vector_const_subvector (&(c.vector), *************** *** 427,433 **** 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, --- 425,431 ---- gsl_matrix_set_identity (Q); ! for (i = GSL_MIN (M, N); i-- > 0;) { gsl_vector_const_view c = gsl_matrix_const_row (LQ, i); gsl_vector_const_view h = gsl_vector_const_subvector (&c.vector, *************** *** 497,503 **** 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); --- 495,501 ---- 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--) /* loop from k = M-1 to 1 */ { double c, s; double wk = gsl_vector_get (w, k); diff -a -rc -C 2 -P gsl-1.11/linalg/qr.c gsl-1.12/linalg/qr.c *** gsl-1.11/linalg/qr.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/linalg/qr.c Thu Nov 27 20:03:28 2008 *************** *** 29,36 **** #include - #define REAL double - #include "givens.c" #include "apply_givens.c" --- 29,34 ---- *************** *** 385,391 **** /* compute Q^T v */ ! for (i = GSL_MIN (M, N); i > 0 && i--;) { gsl_vector_const_view c = gsl_matrix_const_column (QR, i); gsl_vector_const_view h = gsl_vector_const_subvector (&(c.vector), --- 383,389 ---- /* compute Q^T v */ ! for (i = GSL_MIN (M, N); i-- > 0;) { gsl_vector_const_view c = gsl_matrix_const_column (QR, i); gsl_vector_const_view h = gsl_vector_const_subvector (&(c.vector), *************** *** 461,467 **** gsl_matrix_set_identity (Q); ! for (i = GSL_MIN (M, N); i > 0 && i--;) { gsl_vector_const_view c = gsl_matrix_const_column (QR, i); gsl_vector_const_view h = gsl_vector_const_subvector (&c.vector, --- 459,465 ---- gsl_matrix_set_identity (Q); ! for (i = GSL_MIN (M, N); i-- > 0;) { gsl_vector_const_view c = gsl_matrix_const_column (QR, i); gsl_vector_const_view h = gsl_vector_const_subvector (&c.vector, *************** *** 530,536 **** simultaneously applied to R, H = J_1^T ... J^T_(n-1) R 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); --- 528,534 ---- simultaneously applied to R, H = J_1^T ... J^T_(n-1) R so that H is upper Hessenberg. (12.5.2) */ ! for (k = M - 1; k > 0; k--) /* loop from k = M-1 to 1 */ { double c, s; double wk = gsl_vector_get (w, k); diff -a -rc -C 2 -P gsl-1.11/linalg/qrpt.c gsl-1.12/linalg/qrpt.c *** gsl-1.11/linalg/qrpt.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/linalg/qrpt.c Thu Nov 27 20:03:28 2008 *************** *** 423,441 **** const gsl_permutation * p, gsl_vector * w, const gsl_vector * v) { ! if (Q->size1 != Q->size2 || R->size1 != R->size2) { ! return GSL_ENOTSQR; } ! else if (R->size1 != Q->size2 || v->size != Q->size2 || w->size != Q->size2) { ! return GSL_EBADLEN; } else { size_t j, k; - const size_t M = Q->size1; - const size_t N = Q->size2; double w0; /* Apply Given's rotations to reduce w to (|w|, 0, 0, ... , 0) --- 423,446 ---- const gsl_permutation * p, gsl_vector * w, const gsl_vector * v) { ! const size_t M = R->size1; ! const size_t N = R->size2; ! ! if (Q->size1 != M || Q->size2 != M) ! { ! GSL_ERROR ("Q matrix must be M x M if R is M x N", GSL_ENOTSQR); ! } ! else if (w->size != M) { ! GSL_ERROR ("w must be length M if R is M x N", GSL_EBADLEN); } ! else if (v->size != N) { ! GSL_ERROR ("v must be length N if R 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) *************** *** 445,451 **** simultaneously applied to R, H = J_1^T ... J^T_(n-1) R so that H is upper Hessenberg. (12.5.2) */ ! for (k = N - 1; k > 0; k--) { double c, s; double wk = gsl_vector_get (w, k); --- 450,456 ---- simultaneously applied to R, H = J_1^T ... J^T_(n-1) R 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); *************** *** 471,477 **** /* Apply Givens transformations R' = 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 (R, k - 1, k - 1); --- 476,482 ---- /* Apply Givens transformations R' = 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 (R, k - 1, k - 1); *************** *** 479,484 **** --- 484,491 ---- create_givens (diag, offdiag, &c, &s); apply_givens_qr (M, N, Q, R, k - 1, k, c, s); + + gsl_matrix_set (R, k, k - 1, 0.0); /* exact zero of G^T */ } return GSL_SUCCESS; diff -a -rc -C 2 -P gsl-1.11/linalg/svd.c gsl-1.12/linalg/svd.c *** gsl-1.11/linalg/svd.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/linalg/svd.c Thu Nov 27 20:03:28 2008 *************** *** 323,329 **** /* Convert A into an orthogonal matrix L */ ! for (j = N; j > 0 && j--;) { /* Householder column transformation to accumulate L */ double tj = gsl_vector_get (S, j); --- 323,329 ---- /* Convert A into an orthogonal matrix L */ ! for (j = N; j-- > 0;) { /* Householder column transformation to accumulate L */ double tj = gsl_vector_get (S, j); *************** *** 533,540 **** abserr_a = gsl_vector_get(S,j); abserr_b = gsl_vector_get(S,k); ! sorted = (gsl_coerce_double(a) >= gsl_coerce_double(b)); ! orthog = (fabs (p) <= tolerance * gsl_coerce_double(a * b)); noisya = (a < abserr_a); noisyb = (b < abserr_b); --- 533,540 ---- abserr_a = gsl_vector_get(S,j); abserr_b = gsl_vector_get(S,k); ! sorted = (GSL_COERCE_DBL(a) >= GSL_COERCE_DBL(b)); ! orthog = (fabs (p) <= tolerance * GSL_COERCE_DBL(a * b)); noisya = (a < abserr_a); noisyb = (b < abserr_b); diff -a -rc -C 2 -P gsl-1.11/linalg/svdstep.c gsl-1.12/linalg/svdstep.c *** gsl-1.11/linalg/svdstep.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/linalg/svdstep.c Thu Nov 27 20:03:28 2008 *************** *** 323,329 **** x = gsl_vector_get (d, n - 2); y = gsl_vector_get (f, n - 2); ! for (k = n - 1; k > 0 && k--;) { create_givens (x, y, &c, &s); --- 323,329 ---- x = gsl_vector_get (d, n - 2); y = gsl_vector_get (f, n - 2); ! for (k = n - 1; k-- > 0;) { create_givens (x, y, &c, &s); diff -a -rc -C 2 -P gsl-1.11/linalg/symmtd.c gsl-1.12/linalg/symmtd.c *** gsl-1.11/linalg/symmtd.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/linalg/symmtd.c Thu Nov 27 20:03:28 2008 *************** *** 157,163 **** gsl_matrix_set_identity (Q); ! for (i = N - 2; i > 0 && i--;) { gsl_vector_const_view c = gsl_matrix_const_column (A, i); gsl_vector_const_view h = gsl_vector_const_subvector (&c.vector, i + 1, N - (i+1)); --- 157,163 ---- gsl_matrix_set_identity (Q); ! for (i = N - 2; i-- > 0;) { gsl_vector_const_view c = gsl_matrix_const_column (A, i); gsl_vector_const_view h = gsl_vector_const_subvector (&c.vector, i + 1, N - (i+1)); diff -a -rc -C 2 -P gsl-1.11/linalg/test.c gsl-1.12/linalg/test.c *** gsl-1.11/linalg/test.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/linalg/test.c Fri Dec 12 10:55:36 2008 *************** *** 62,67 **** --- 62,69 ---- int test_QRPT_decomp(void); int test_QR_update_dim(const gsl_matrix * m, double eps); int test_QR_update(void); + int test_QRPT_update_dim(const gsl_matrix * m, double eps); + int test_QRPT_update(void); int test_LQ_solve_dim(const gsl_matrix * m, const double * actual, double eps); int test_LQ_solve(void); *************** *** 92,97 **** --- 94,101 ---- int test_cholesky_solve(void); int test_cholesky_decomp_dim(const gsl_matrix * m, double eps); int test_cholesky_decomp(void); + int test_cholesky_invert_dim(const gsl_matrix * m, double eps); + int test_cholesky_invert(void); int test_HH_solve_dim(const gsl_matrix * m, const double * actual, double eps); int test_HH_solve(void); int test_TDS_solve_dim(unsigned long dim, double d, double od, const double * actual, double eps); *************** *** 123,128 **** --- 127,156 ---- } } + + gsl_vector * + vector_alloc (size_t n) + { + size_t p[5] = {3, 5, 7, 11, 13}; + static size_t k = 0; + + size_t stride = p[k]; + k = (k + 1) % 5; + + { + gsl_block * b = gsl_block_alloc (n * stride); + gsl_vector * v = gsl_vector_alloc_from_block (b, 0, n, stride); + v->owner = 1; + return v; + } + } + + void + vector_free (gsl_vector * v) + { + gsl_vector_free (v); + } + gsl_matrix * create_hilbert_matrix(unsigned long size) { *************** *** 1227,1233 **** int s = 0; unsigned long i,j,k, M = m->size1, N = m->size2; - gsl_vector * rhs = gsl_vector_alloc(N); gsl_matrix * qr1 = gsl_matrix_alloc(M,N); gsl_matrix * qr2 = gsl_matrix_alloc(M,N); gsl_matrix * q1 = gsl_matrix_alloc(M,M); --- 1255,1260 ---- *************** *** 1243,1249 **** gsl_matrix_memcpy(qr1,m); gsl_matrix_memcpy(qr2,m); ! for(i=0; isize1, N = m->size2; + + gsl_matrix * qr1 = gsl_matrix_alloc(M,N); + gsl_matrix * qr2 = gsl_matrix_alloc(M,N); + gsl_matrix * q1 = gsl_matrix_alloc(M,M); + gsl_matrix * r1 = gsl_matrix_alloc(M,N); + gsl_matrix * q2 = gsl_matrix_alloc(M,M); + gsl_matrix * r2 = gsl_matrix_alloc(M,N); + gsl_vector * d = 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_vector * norm = gsl_vector_alloc(N); + gsl_permutation * perm = gsl_permutation_alloc(N); + + gsl_matrix_memcpy(qr1,m); + gsl_matrix_memcpy(qr2,m); + for(i=0; isize1; + + gsl_matrix * v = gsl_matrix_alloc(N, N); + gsl_matrix * c = gsl_matrix_alloc(N, N); + + gsl_matrix_memcpy(v,m); + + s += gsl_linalg_cholesky_decomp(v); + s += gsl_linalg_cholesky_invert(v); + + gsl_blas_dsymm(CblasLeft, CblasUpper, 1.0, m, v, 0.0, c); + + /* c should be the identity matrix */ + + for (i = 0; i < N; ++i) + { + for (j = 0; j < N; ++j) + { + int foo; + double cij = gsl_matrix_get(c, i, j); + double expected; + + if (i == j) + expected = 1.0; + else + expected = 0.0; + + foo = check(cij, expected, eps); + + if (foo) + printf("(%3lu,%3lu)[%lu,%lu]: %22.18g %22.18g\n", N, N, i,j, cij, expected); + + s += foo; + } + } + + gsl_matrix_free(v); + gsl_matrix_free(c); + + return s; + } + + int + test_cholesky_invert(void) + { + int f; + int s = 0; + + f = test_cholesky_invert_dim(hilb2, 2 * 8.0 * GSL_DBL_EPSILON); + gsl_test(f, " cholesky_invert hilbert(2)"); + s += f; + + f = test_cholesky_invert_dim(hilb3, 2 * 64.0 * GSL_DBL_EPSILON); + gsl_test(f, " cholesky_invert hilbert(3)"); + s += f; + + f = test_cholesky_invert_dim(hilb4, 2 * 1024.0 * GSL_DBL_EPSILON); + gsl_test(f, " cholesky_invert hilbert(4)"); + s += f; + + return s; + } + int test_cholesky_decomp_unit_dim(const gsl_matrix * m, double eps) *************** *** 3404,3413 **** int s = 0; unsigned long i; ! gsl_vector * offdiag = gsl_vector_alloc(dim-1); ! gsl_vector * diag = gsl_vector_alloc(dim); ! gsl_vector * rhs = gsl_vector_alloc(dim); ! gsl_vector * x = gsl_vector_alloc(dim); for(i=0; i, 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. --- 1,6 ---- # Generated from ltmain.m4sh. ! # ltmain.sh (GNU libtool) 2.2.6 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. *************** *** 65,71 **** # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) ! # $progname: (GNU libtool) 2.2 # automake: $automake_version # autoconf: $autoconf_version # --- 65,71 ---- # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) ! # $progname: (GNU libtool) 2.2.6 # automake: $automake_version # autoconf: $autoconf_version # *************** *** 73,81 **** PROGRAM=ltmain.sh PACKAGE=libtool ! VERSION=2.2 TIMESTAMP="" ! package_revision=1.2599 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then --- 73,81 ---- PROGRAM=ltmain.sh PACKAGE=libtool ! VERSION=2.2.6 TIMESTAMP="" ! package_revision=1.3012 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then *************** *** 95,106 **** --- 95,110 ---- # Only set LANG and LC_ALL to C if already set. # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). + lt_user_locale= + lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var + lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" + lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done *************** *** 120,126 **** : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} ! : ${SED="/usr/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} --- 124,130 ---- : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} ! : ${SED="/opt/local/bin/gsed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} *************** *** 140,145 **** --- 144,175 ---- dirname="s,/[^/]*$,," basename="s,^.*/,," + # func_dirname_and_basename file append nondir_replacement + # perform func_basename and func_dirname in a single function + # call: + # dirname: Compute the dirname of FILE. If nonempty, + # add APPEND to the result, otherwise set result + # to NONDIR_REPLACEMENT. + # value returned in "$func_dirname_result" + # basename: Compute filename of FILE. + # value retuned in "$func_basename_result" + # Implementation must be kept synchronized with func_dirname + # and func_basename. For efficiency, we do not delegate to + # those functions but instead duplicate the functionality here. + func_dirname_and_basename () + { + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` + } + + # Generated shell functions inserted here. + # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special *************** *** 150,162 **** # The name of this program: # In the unlikely event $progname began with a '-', it would play havoc with # func_echo (imagine progname=-n), so we prepend ./ in that case: ! progname=`$ECHO "X$progpath" | $Xsed -e "$basename" -e 's,^-,./-,'` # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) ! progdir=`$ECHO "X$progpath" | $Xsed -e "$dirname"` progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; --- 180,196 ---- # The name of this program: # In the unlikely event $progname began with a '-', it would play havoc with # func_echo (imagine progname=-n), so we prepend ./ in that case: ! func_dirname_and_basename "$progpath" ! progname=$func_basename_result ! case $progname in ! -*) progname=./$progname ;; ! esac # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) ! progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *************** *** 202,207 **** --- 236,242 ---- opt_help=false opt_quiet=false opt_verbose=false + opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode *************** *** 234,240 **** # Echo program name prefixed warning message to standard error. func_warning () { ! $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 } # func_fatal_error arg... --- 269,278 ---- # Echo program name prefixed warning message to standard error. func_warning () { ! $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 ! ! # bash bug again: ! : } # func_fatal_error arg... *************** *** 425,430 **** --- 463,494 ---- } + # func_show_eval_locale cmd [fail_exp] + # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is + # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP + # is given, then evaluate it. Use the saved locale for evaluation. + func_show_eval_locale () + { + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$lt_user_locale + $my_cmd" + my_status=$? + eval "$lt_safe_locale" + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi + } + + *************** *** 628,818 **** esac } - - func_mode_help () - { - # We need to display help for each of the modes. - case $mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. - func_help - ;; - - clean) - $ECHO \ - "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - - Remove files from the build directory. - - RM is the name of the program to use to delete files associated with each FILE - (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed - to RM. - - If FILE is a libtool library, object or program, all the files associated - with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - - compile) - $ECHO \ - "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - - Compile a source file into a libtool library object. - - This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking - - COMPILE-COMMAND is a command to be used in creating a \`standard' object file - from the given SOURCEFILE. - - The output file name is determined by removing the directory component from - SOURCEFILE, then substituting the C source code suffix \`.c' with the - library object suffix, \`.lo'." - ;; - - execute) - $ECHO \ - "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... - - Automatically set library path, then run a program. - - This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - - This mode sets the library path environment variable according to \`-dlopen' - flags. - - If any of the ARGS are libtool executable wrappers, then they are translated - into their corresponding uninstalled binary, and any of their required library - directories are added to the library path. - - Then, COMMAND is executed, with ARGS as arguments." - ;; - - finish) - $ECHO \ - "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... - - Complete the installation of libtool libraries. - - Each LIBDIR is a directory that contains libtool libraries. - - The commands that this mode executes may require superuser privileges. Use - the \`--dry-run' option if you just want to see what would be executed." - ;; - - install) - $ECHO \ - "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... - - Install executables or libraries. - - INSTALL-COMMAND is the installation command. The first component should be - either the \`install' or \`cp' program. - - The following components of INSTALL-COMMAND are treated specially: - - -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation - - The rest of the components are interpreted as arguments to that command (only - BSD-compatible install options are recognized)." - ;; - - link) - $ECHO \ - "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... - - Link object files or libraries together to form another library, or to - create an executable program. - - LINK-COMMAND is a command using the C compiler that you would use to create - a program from several object files. - - The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -shared only do dynamic linking of libtool libraries - -shrext SUFFIX override the standard shared library file extension - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -weak LIBNAME declare that the target provides the LIBNAME interface - - All other options (arguments beginning with \`-') are ignored. - - Every other argument is treated as a filename. Files ending in \`.la' are - treated as uninstalled libtool libraries, other files are standard or library - object files. - - If the OUTPUT-FILE ends in \`.la', then a libtool library is created, - only library objects (\`.lo' files) may be specified, and \`-rpath' is - required, except when creating a convenience library. - - If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created - using \`ar' and \`ranlib', or on Windows using \`lib'. - - If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file - is created, otherwise an executable program is created." - ;; - - uninstall) - $ECHO \ - "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - - Remove libraries from an installation directory. - - RM is the name of the program to use to delete files associated with each FILE - (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed - to RM. - - If FILE is a libtool library, all the files associated with it are deleted. - Otherwise, only FILE itself is deleted using RM." - ;; - - *) - func_fatal_help "invalid operation mode \`$mode'" - ;; - esac - - $ECHO - $ECHO "Try \`$progname --help' for more information about other modes." - - exit $? - } - - # Generated shell functions inserted here. - - # Parse options once, thoroughly. This comes as soon as possible in # the script to make things like `libtool --version' happen quickly. { --- 692,697 ---- *************** *** 924,934 **** esac done - # Now that we've collected a possible --mode arg, show help if necessary - $opt_help && func_mode_help case $host in ! *cygwin* | *mingw* | *pw32*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; --- 803,811 ---- esac done case $host in ! *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *************** *** 982,988 **** ## Main. ## ## ----------- ## ! { # Sanity checks first: func_check_version_match --- 859,865 ---- ## Main. ## ## ----------- ## ! $opt_help || { # Sanity checks first: func_check_version_match *************** *** 1016,1023 **** # determined imposters. func_lalib_p () { ! $SED -e 4q "$1" 2>/dev/null \ ! | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file --- 893,901 ---- # determined imposters. func_lalib_p () { ! test -f "$1" && ! $SED -e 4q "$1" 2>/dev/null \ ! | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file *************** *** 1030,1036 **** func_lalib_unsafe_p () { lalib_p=no ! if test -r "$1" && exec 5<&1 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line --- 908,914 ---- func_lalib_unsafe_p () { lalib_p=no ! if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line *************** *** 1038,1044 **** \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done ! exec 1<&5 5<&- fi test "$lalib_p" = yes } --- 916,922 ---- \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done ! exec 0<&5 5<&- fi test "$lalib_p" = yes } *************** *** 1123,1184 **** } ! # func_win32_libid arg ! # return the library type of file 'arg' ! # ! # Need a lot of goo to handle *both* DLLs and import libs ! # Has to be a shell function in order to 'eat' the argument ! # that is supplied when $file_magic_command is called. ! func_win32_libid () ! { ! $opt_debug ! win32_libid_type="unknown" ! win32_fileres=`file -L $1 2>/dev/null` ! case $win32_fileres in ! *ar\ archive\ import\ library*) # definitely import ! win32_libid_type="x86 archive import" ! ;; ! *ar\ archive*) # could be an import, or static ! if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | ! $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then ! win32_nmres=`eval $NM -f posix -A $1 | ! $SED -n -e ' ! 1,100{ ! / I /{ ! s,.*,import, ! p ! q ! } ! }'` ! case $win32_nmres in ! import*) win32_libid_type="x86 archive import";; ! *) win32_libid_type="x86 archive static";; ! esac ! fi ! ;; ! *DLL*) ! win32_libid_type="x86 DLL" ! ;; ! *executable*) # but shell scripts are "executable" too... ! case $win32_fileres in ! *MS\ Windows\ PE\ Intel*) ! win32_libid_type="x86 DLL" ! ;; ! esac ! ;; ! esac ! $ECHO "$win32_libid_type" ! } ! ! ! ! # func_infer_tag arg ! # Infer tagged configuration to use if any are available and ! # if one wasn't chosen via the "--tag" command line option. ! # Only attempt this if the compiler in the base compile ! # command doesn't match the default compiler. ! # arg is usually of the form 'gcc ...' ! func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then --- 1001,1013 ---- } ! # func_infer_tag arg ! # Infer tagged configuration to use if any are available and ! # if one wasn't chosen via the "--tag" command line option. ! # Only attempt this if the compiler in the base compile ! # command doesn't match the default compiler. ! # arg is usually of the form 'gcc ...' ! func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then *************** *** 1231,1995 **** ! # func_generate_dlsyms outputname originator pic_p ! # Extract symbols from dlprefiles and create ${outputname}S.o with ! # a dlpreopen symbol table. ! func_generate_dlsyms () { ! $opt_debug ! my_outputname="$1" ! my_originator="$2" ! my_pic_p="${3-no}" ! my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` ! my_dlsyms= ! ! if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then ! if test -n "$NM" && test -n "$global_symbol_pipe"; then ! my_dlsyms="${my_outputname}S.c" ! else ! func_error "not configured to extract global symbols from dlpreopened files" ! fi fi ! if test -n "$my_dlsyms"; then ! case $my_dlsyms in ! "") ;; ! *.c) ! # Discover the nlist of each of the dlfiles. ! nlist="$output_objdir/${my_outputname}.nm" ! ! func_show_eval "$RM $nlist ${nlist}S ${nlist}T" ! # Parse the name list into a source file. ! func_verbose "creating $output_objdir/$my_dlsyms" ! $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ ! /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ ! /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ ! #ifdef __cplusplus ! extern \"C\" { ! #endif ! /* External symbol declarations for the compiler. */\ ! " ! if test "$dlself" = yes; then ! func_verbose "generating symbol list for \`$output'" ! $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" ! # Add our own program objects to the symbol list. ! progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` ! for progfile in $progfiles; do ! func_verbose "extracting global C symbols from \`$progfile'" ! $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" ! done ! if test -n "$exclude_expsyms"; then ! $opt_dry_run || { ! eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' ! eval '$MV "$nlist"T "$nlist"' ! } ! fi ! if test -n "$export_symbols_regex"; then ! $opt_dry_run || { ! eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' ! eval '$MV "$nlist"T "$nlist"' ! } ! fi ! # Prepare the list of exported symbols ! if test -z "$export_symbols"; then ! export_symbols="$output_objdir/$outputname.exp" ! $opt_dry_run || { ! $RM $export_symbols ! eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' ! case $host in ! *cygwin* | *mingw* ) ! eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' ! eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ! ;; ! esac ! } ! else ! $opt_dry_run || { ! eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' ! eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' ! eval '$MV "$nlist"T "$nlist"' ! case $host in ! *cygwin | *mingw* ) ! eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' ! eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ! ;; ! esac ! } ! fi ! fi ! for dlprefile in $dlprefiles; do ! func_verbose "extracting global C symbols from \`$dlprefile'" ! func_basename "$dlprefile" ! name="$func_basename_result" ! $opt_dry_run || { ! eval '$ECHO ": $name " >> "$nlist"' ! eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" ! } ! done ! $opt_dry_run || { ! # Make sure we have at least an empty file. ! test -f "$nlist" || : > "$nlist" ! if test -n "$exclude_expsyms"; then ! $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T ! $MV "$nlist"T "$nlist" ! fi ! # Try sorting and uniquifying the output. ! if $GREP -v "^: " < "$nlist" | ! if sort -k 3 /dev/null 2>&1; then ! sort -k 3 ! else ! sort +2 ! fi | ! uniq > "$nlist"S; then ! : ! else ! $GREP -v "^: " < "$nlist" > "$nlist"S ! fi ! if test -f "$nlist"S; then ! eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' ! else ! $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" ! fi ! $ECHO >> "$output_objdir/$my_dlsyms" "\ ! /* The mapping between symbol names and symbols. */ ! typedef struct { ! const char *name; ! void *address; ! } lt_dlsymlist; ! " ! case $host in ! *cygwin* | *mingw* ) ! $ECHO >> "$output_objdir/$my_dlsyms" "\ ! /* DATA imports from DLLs on WIN32 con't be const, because ! runtime relocations are performed -- see ld's documentation ! on pseudo-relocs. */" ! lt_dlsym_const= ;; ! *osf5*) ! echo >> "$output_objdir/$my_dlsyms" "\ ! /* This system does not cope well with relocations in const data */" ! lt_dlsym_const= ;; ! *) ! lt_dlsym_const=const ;; ! esac ! ! $ECHO >> "$output_objdir/$my_dlsyms" "\ ! extern $lt_dlsym_const lt_dlsymlist ! lt_${my_prefix}_LTX_preloaded_symbols[]; ! $lt_dlsym_const lt_dlsymlist ! lt_${my_prefix}_LTX_preloaded_symbols[] = ! {\ ! { \"$my_originator\", (void *) 0 }," ! ! case $need_lib_prefix in ! no) ! eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ! ;; ! *) ! eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ! ;; ! esac ! $ECHO >> "$output_objdir/$my_dlsyms" "\ ! {0, (void *) 0} ! }; ! /* This works around a problem in FreeBSD linker */ ! #ifdef FREEBSD_WORKAROUND ! static const void *lt_preloaded_setup() { ! return lt_${my_prefix}_LTX_preloaded_symbols; ! } ! #endif ! #ifdef __cplusplus ! } ! #endif\ ! " ! } # !$opt_dry_run ! pic_flag_for_symtable= ! case "$compile_command " in ! *" -static "*) ;; ! *) ! case $host in ! # compiling the symbol table file with pic_flag works around ! # a FreeBSD bug that causes programs to crash when -lm is ! # linked before any other PIC object. But we must not use ! # pic_flag when linking with -static. The problem exists in ! # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. ! *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) ! pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; ! *-*-hpux*) ! pic_flag_for_symtable=" $pic_flag" ;; ! *) ! if test "X$my_pic_p" != Xno; then ! pic_flag_for_symtable=" $pic_flag" ! fi ! ;; ! esac ! ;; ! esac ! symtab_cflags= ! for arg in $LTCFLAGS; do ! case $arg in ! -pie | -fpie | -fPIE) ;; ! *) symtab_cflags="$symtab_cflags $arg" ;; ! esac ! done ! # Now compile the dynamic symbol file. ! func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' ! # Clean up the generated files. ! func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' ! # Transform the symbol file into the correct name. ! symfileobj="$output_objdir/${my_outputname}S.$objext" ! case $host in ! *cygwin* | *mingw* ) ! if test -f "$output_objdir/$my_outputname.def"; then ! compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` ! finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` ! else ! compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` ! finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` ! fi ! ;; ! *) ! compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` ! finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` ! ;; ! esac ;; ! *) ! func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else ! # We keep going just in case the user didn't refer to ! # lt_preloaded_symbols. The linker will fail if global_symbol_pipe ! # really was required. ! # Nullify the symbol file. ! compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` ! finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi - } ! # func_extract_an_archive dir oldlib ! func_extract_an_archive () ! { ! $opt_debug ! f_ex_an_ar_dir="$1"; shift ! f_ex_an_ar_oldlib="$1" ! func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' ! if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then ! : else ! func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi - } ! # func_extract_archives gentop oldlib ... ! func_extract_archives () ! { ! $opt_debug ! my_gentop="$1"; shift ! my_oldlibs=${1+"$@"} ! my_oldobjs="" ! my_xlib="" ! my_xabs="" ! my_xdir="" ! for my_xlib in $my_oldlibs; do ! # Extract the objects. ! case $my_xlib in ! [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; ! *) my_xabs=`pwd`"/$my_xlib" ;; ! esac ! func_basename "$my_xlib" ! my_xlib="$func_basename_result" ! my_xlib_u=$my_xlib ! while :; do ! case " $extracted_archives " in ! *" $my_xlib_u "*) ! extracted_serial=`expr $extracted_serial + 1` ! my_xlib_u=lt$extracted_serial-$my_xlib ;; ! *) break ;; ! esac ! done ! extracted_archives="$extracted_archives $my_xlib_u" ! my_xdir="$my_gentop/$my_xlib_u" ! func_mkdir_p "$my_xdir" ! case $host in ! *-darwin*) ! func_verbose "Extracting $my_xabs" ! # Do not bother doing anything if just a dry run ! $opt_dry_run || { ! darwin_orig_dir=`pwd` ! cd $my_xdir || exit $? ! darwin_archive=$my_xabs ! darwin_curdir=`pwd` ! darwin_base_archive=`basename "$darwin_archive"` ! darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` ! if test -n "$darwin_arches"; then ! darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` ! darwin_arch= ! func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" ! for darwin_arch in $darwin_arches ; do ! func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" ! lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" ! cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" ! func_extract_an_archive "`pwd`" "${darwin_base_archive}" ! cd "$darwin_curdir" ! $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" ! done # $darwin_arches ! ## Okay now we've a bunch of thin objects, gotta fatten them up :) ! darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` ! darwin_file= ! darwin_files= ! for darwin_file in $darwin_filelist; do ! darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` ! lipo -create -output "$darwin_file" $darwin_files ! done # $darwin_filelist ! $RM -rf unfat-$$ ! cd "$darwin_orig_dir" ! else ! cd $darwin_orig_dir ! func_extract_an_archive "$my_xdir" "$my_xabs" ! fi # $darwin_arches ! } # !$opt_dry_run ! ;; ! *) ! func_extract_an_archive "$my_xdir" "$my_xabs" ! ;; ! esac ! my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` ! done ! func_extract_archives_result="$my_oldobjs" ! } ! # func_write_libtool_object output_name pic_name nonpic_name ! # Create a libtool object file (analogous to a ".la" file), ! # but don't create it if we're doing a dry run. ! func_write_libtool_object () ! { ! write_libobj=${1} ! if test "$build_libtool_libs" = yes; then ! write_lobj=\'${2}\' ! else ! write_lobj=none fi if test "$build_old_libs" = yes; then ! write_oldobj=\'${3}\' ! else ! write_oldobj=none fi $opt_dry_run || { ! cat >${write_libobj}T <?"'"'"' &()|`$[]' \ ! && func_warning "libobj name \`$libobj' may not contain shell special characters." ! func_dirname_and_basename "$obj" "/" "" ! objname="$func_basename_result" ! xdir="$func_dirname_result" ! lobj=${xdir}$objdir/$objname ! test -z "$base_compile" && \ ! func_fatal_help "you must specify a compilation command" ! # Delete any leftover library objects. ! if test "$build_old_libs" = yes; then ! removelist="$obj $lobj $libobj ${libobj}T" ! else ! removelist="$lobj $libobj ${libobj}T" ! fi ! $opt_dry_run || $RM $removelist ! trap "$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE" 1 2 15 ! # On Cygwin there's no "real" PIC flag so we must build both object types ! case $host_os in ! cygwin* | mingw* | pw32* | os2*) ! pic_mode=default ! ;; ! esac ! if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then ! # non-PIC code in shared libraries is not supported ! pic_mode=default ! fi ! # Calculate the filename of the output object if compiler does ! # not support -o with -c ! if test "$compiler_c_o" = no; then ! output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} ! lockfile="$output_obj.lock" ! removelist="$removelist $output_obj $lockfile" ! trap "$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE" 1 2 15 ! else ! output_obj= ! need_locks=no ! lockfile= ! fi ! # Lock this critical section if it is needed ! # We use this script file to make the link, it avoids creating a new file ! if test "$need_locks" = yes; then ! until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do ! func_echo "Waiting for $lockfile to be removed" ! sleep 2 ! done ! elif test "$need_locks" = warn; then ! if test -f "$lockfile"; then ! $ECHO "\ ! *** ERROR, $lockfile exists and contains: ! `cat $lockfile 2>/dev/null` ! This indicates that another process is trying to use the same ! temporary object file, and libtool could not work around it because ! your compiler does not support \`-c' and \`-o' together. If you ! repeat this compilation, it may succeed, by chance, but you had better ! avoid parallel builds (make -j) in this platform, or get a better ! compiler." ! $opt_dry_run || $RM $removelist ! exit $EXIT_FAILURE ! fi ! $ECHO "$srcfile" > "$lockfile" ! fi ! if test -n "$fix_srcfile_path"; then ! eval srcfile=\"$fix_srcfile_path\" ! fi ! func_quote_for_eval "$srcfile" ! qsrcfile=$func_quote_for_eval_result ! $opt_dry_run || $RM "$libobj" "${libobj}T" ! # Only build a PIC object if we are building libtool libraries. ! if test "$build_libtool_libs" = yes; then ! # Without this assignment, base_compile gets emptied. ! fbsd_hideous_sh_bug=$base_compile ! if test "$pic_mode" != no; then ! command="$base_compile $qsrcfile $pic_flag" ! else ! # Don't build PIC code ! command="$base_compile $qsrcfile" ! fi ! func_mkdir_p "$xdir$objdir" ! if test -z "$output_obj"; then ! # Place PIC objects in $objdir ! command="$command -o $lobj" ! fi ! $opt_dry_run || $RM "$lobj" "$output_obj" ! func_show_eval "$command" \ ! 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' ! if test "$need_locks" = warn && ! test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then ! $ECHO "\ ! *** ERROR, $lockfile contains: ! `cat $lockfile 2>/dev/null` ! but it should contain: ! $srcfile ! This indicates that another process is trying to use the same ! temporary object file, and libtool could not work around it because ! your compiler does not support \`-c' and \`-o' together. If you ! repeat this compilation, it may succeed, by chance, but you had better ! avoid parallel builds (make -j) in this platform, or get a better ! compiler." ! $opt_dry_run || $RM $removelist ! exit $EXIT_FAILURE ! fi ! ! # Just move the object if needed, then go on to compile the next one ! if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then ! func_show_eval '$MV "$output_obj" "$lobj"' \ ! 'error=$?; $opt_dry_run || $RM $removelist; exit $error' ! fi ! ! # Allow error messages only from the first compilation. ! if test "$suppress_opt" = yes; then ! suppress_output=' >/dev/null 2>&1' ! fi ! fi ! ! # Only build a position-dependent object if we build old libraries. ! if test "$build_old_libs" = yes; then ! if test "$pic_mode" != yes; then ! # Don't build PIC code ! command="$base_compile $qsrcfile$pie_flag" ! else ! command="$base_compile $qsrcfile $pic_flag" ! fi ! if test "$compiler_c_o" = yes; then ! command="$command -o $obj" ! fi ! ! # Suppress compiler output if we already did a PIC compilation. ! command="$command$suppress_output" ! $opt_dry_run || $RM "$obj" "$output_obj" ! func_show_eval "$command" \ ! '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' ! ! if test "$need_locks" = warn && ! test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then ! $ECHO "\ ! *** ERROR, $lockfile contains: ! `cat $lockfile 2>/dev/null` ! ! but it should contain: ! $srcfile ! ! This indicates that another process is trying to use the same ! temporary object file, and libtool could not work around it because ! your compiler does not support \`-c' and \`-o' together. If you ! repeat this compilation, it may succeed, by chance, but you had better ! avoid parallel builds (make -j) in this platform, or get a better ! compiler." ! ! $opt_dry_run || $RM $removelist ! exit $EXIT_FAILURE ! fi ! ! # Just move the object if needed ! if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then ! func_show_eval '$MV "$output_obj" "$obj"' \ ! 'error=$?; $opt_dry_run || $RM $removelist; exit $error' ! fi ! fi ! $opt_dry_run || { ! func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" ! # Unlock the critical section if it was locked ! if test "$need_locks" != no; then ! $RM "$lockfile" ! fi ! } ! exit $EXIT_SUCCESS } ! test "$mode" = compile && func_mode_compile ${1+"$@"} # func_mode_execute arg... --- 1060,1636 ---- ! # func_write_libtool_object output_name pic_name nonpic_name ! # Create a libtool object file (analogous to a ".la" file), ! # but don't create it if we're doing a dry run. ! func_write_libtool_object () { ! write_libobj=${1} ! if test "$build_libtool_libs" = yes; then ! write_lobj=\'${2}\' ! else ! write_lobj=none fi ! if test "$build_old_libs" = yes; then ! write_oldobj=\'${3}\' ! else ! write_oldobj=none ! fi ! $opt_dry_run || { ! cat >${write_libobj}T <?"'"'"' &()|`$[]' \ + && func_warning "libobj name \`$libobj' may not contain shell special characters." + func_dirname_and_basename "$obj" "/" "" + objname="$func_basename_result" + xdir="$func_dirname_result" + lobj=${xdir}$objdir/$objname + + test -z "$base_compile" && \ + func_fatal_help "you must specify a compilation command" + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $lobj $libobj ${libobj}T" else ! removelist="$lobj $libobj ${libobj}T" ! fi ! # On Cygwin there's no "real" PIC flag so we must build both object types ! case $host_os in ! cygwin* | mingw* | pw32* | os2* | cegcc*) ! pic_mode=default ! ;; ! esac ! if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then ! # non-PIC code in shared libraries is not supported ! pic_mode=default fi ! # Calculate the filename of the output object if compiler does ! # not support -o with -c ! if test "$compiler_c_o" = no; then ! output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} ! lockfile="$output_obj.lock" else ! output_obj= ! need_locks=no ! lockfile= fi + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + $ECHO "\ + *** ERROR, $lockfile exists and contains: + `cat $lockfile 2>/dev/null` ! This indicates that another process is trying to use the same ! temporary object file, and libtool could not work around it because ! your compiler does not support \`-c' and \`-o' together. If you ! repeat this compilation, it may succeed, by chance, but you had better ! avoid parallel builds (make -j) in this platform, or get a better ! compiler." ! $opt_dry_run || $RM $removelist ! exit $EXIT_FAILURE ! fi ! removelist="$removelist $output_obj" ! $ECHO "$srcfile" > "$lockfile" ! fi ! $opt_dry_run || $RM $removelist ! removelist="$removelist $lockfile" ! trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 ! if test -n "$fix_srcfile_path"; then ! eval srcfile=\"$fix_srcfile_path\" ! fi ! func_quote_for_eval "$srcfile" ! qsrcfile=$func_quote_for_eval_result ! # Only build a PIC object if we are building libtool libraries. ! if test "$build_libtool_libs" = yes; then ! # Without this assignment, base_compile gets emptied. ! fbsd_hideous_sh_bug=$base_compile + if test "$pic_mode" != no; then + command="$base_compile $qsrcfile $pic_flag" + else + # Don't build PIC code + command="$base_compile $qsrcfile" + fi + func_mkdir_p "$xdir$objdir" ! if test -z "$output_obj"; then ! # Place PIC objects in $objdir ! command="$command -o $lobj" ! fi ! ! func_show_eval_locale "$command" \ ! 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' ! ! if test "$need_locks" = warn && ! test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then ! $ECHO "\ ! *** ERROR, $lockfile contains: ! `cat $lockfile 2>/dev/null` ! ! but it should contain: ! $srcfile ! ! This indicates that another process is trying to use the same ! temporary object file, and libtool could not work around it because ! your compiler does not support \`-c' and \`-o' together. If you ! repeat this compilation, it may succeed, by chance, but you had better ! avoid parallel builds (make -j) in this platform, or get a better ! compiler." ! ! $opt_dry_run || $RM $removelist ! exit $EXIT_FAILURE ! fi ! ! # Just move the object if needed, then go on to compile the next one ! if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then ! func_show_eval '$MV "$output_obj" "$lobj"' \ ! 'error=$?; $opt_dry_run || $RM $removelist; exit $error' ! fi ! ! # Allow error messages only from the first compilation. ! if test "$suppress_opt" = yes; then ! suppress_output=' >/dev/null 2>&1' ! fi fi + # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then ! if test "$pic_mode" != yes; then ! # Don't build PIC code ! command="$base_compile $qsrcfile$pie_flag" ! else ! command="$base_compile $qsrcfile $pic_flag" ! fi ! if test "$compiler_c_o" = yes; then ! command="$command -o $obj" ! fi ! ! # Suppress compiler output if we already did a PIC compilation. ! command="$command$suppress_output" ! func_show_eval_locale "$command" \ ! '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' ! ! if test "$need_locks" = warn && ! test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then ! $ECHO "\ ! *** ERROR, $lockfile contains: ! `cat $lockfile 2>/dev/null` ! ! but it should contain: ! $srcfile ! ! This indicates that another process is trying to use the same ! temporary object file, and libtool could not work around it because ! your compiler does not support \`-c' and \`-o' together. If you ! repeat this compilation, it may succeed, by chance, but you had better ! avoid parallel builds (make -j) in this platform, or get a better ! compiler." ! ! $opt_dry_run || $RM $removelist ! exit $EXIT_FAILURE ! fi ! ! # Just move the object if needed ! if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then ! func_show_eval '$MV "$output_obj" "$obj"' \ ! 'error=$?; $opt_dry_run || $RM $removelist; exit $error' ! fi fi $opt_dry_run || { ! func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" ! # Unlock the critical section if it was locked ! if test "$need_locks" != no; then ! removelist=$lockfile ! $RM "$lockfile" ! fi ! } ! exit $EXIT_SUCCESS ! } ! $opt_help || { ! test "$mode" = compile && func_mode_compile ${1+"$@"} } ! func_mode_help () { ! # We need to display help for each of the modes. ! case $mode in ! "") ! # Generic help is extracted from the usage comments ! # at the start of this file. ! func_help ! ;; ! clean) ! $ECHO \ ! "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... ! Remove files from the build directory. ! RM is the name of the program to use to delete files associated with each FILE ! (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed ! to RM. ! If FILE is a libtool library, object or program, all the files associated ! with it are deleted. Otherwise, only FILE itself is deleted using RM." ! ;; ! compile) ! $ECHO \ ! "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE ! Compile a source file into a libtool library object. ! This mode accepts the following additional options: ! -o OUTPUT-FILE set the output file name to OUTPUT-FILE ! -no-suppress do not suppress compiler output for multiple passes ! -prefer-pic try to building PIC objects only ! -prefer-non-pic try to building non-PIC objects only ! -shared do not build a \`.o' file suitable for static linking ! -static only build a \`.o' file suitable for static linking ! COMPILE-COMMAND is a command to be used in creating a \`standard' object file ! from the given SOURCEFILE. ! The output file name is determined by removing the directory component from ! SOURCEFILE, then substituting the C source code suffix \`.c' with the ! library object suffix, \`.lo'." ! ;; ! execute) ! $ECHO \ ! "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... ! Automatically set library path, then run a program. ! This mode accepts the following additional options: ! -dlopen FILE add the directory containing FILE to the library path ! This mode sets the library path environment variable according to \`-dlopen' ! flags. ! If any of the ARGS are libtool executable wrappers, then they are translated ! into their corresponding uninstalled binary, and any of their required library ! directories are added to the library path. ! Then, COMMAND is executed, with ARGS as arguments." ! ;; ! finish) ! $ECHO \ ! "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... ! Complete the installation of libtool libraries. ! Each LIBDIR is a directory that contains libtool libraries. ! The commands that this mode executes may require superuser privileges. Use ! the \`--dry-run' option if you just want to see what would be executed." ! ;; ! install) ! $ECHO \ ! "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... ! Install executables or libraries. ! INSTALL-COMMAND is the installation command. The first component should be ! either the \`install' or \`cp' program. ! The following components of INSTALL-COMMAND are treated specially: ! -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation ! The rest of the components are interpreted as arguments to that command (only ! BSD-compatible install options are recognized)." ! ;; ! link) ! $ECHO \ ! "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... ! Link object files or libraries together to form another library, or to ! create an executable program. ! LINK-COMMAND is a command using the C compiler that you would use to create ! a program from several object files. ! The following components of LINK-COMMAND are treated specially: ! -all-static do not do any dynamic linking at all ! -avoid-version do not add a version suffix if possible ! -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime ! -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols ! -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) ! -export-symbols SYMFILE ! try to export only the symbols listed in SYMFILE ! -export-symbols-regex REGEX ! try to export only the symbols matching REGEX ! -LLIBDIR search LIBDIR for required installed libraries ! -lNAME OUTPUT-FILE requires the installed library libNAME ! -module build a library that can dlopened ! -no-fast-install disable the fast-install mode ! -no-install link a not-installable executable ! -no-undefined declare that a library does not refer to external symbols ! -o OUTPUT-FILE create OUTPUT-FILE from the specified objects ! -objectlist FILE Use a list of object files found in FILE to specify objects ! -precious-files-regex REGEX ! don't remove output files matching REGEX ! -release RELEASE specify package release information ! -rpath LIBDIR the created library will eventually be installed in LIBDIR ! -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries ! -shared only do dynamic linking of libtool libraries ! -shrext SUFFIX override the standard shared library file extension ! -static do not do any dynamic linking of uninstalled libtool libraries ! -static-libtool-libs ! do not do any dynamic linking of libtool libraries ! -version-info CURRENT[:REVISION[:AGE]] ! specify library version info [each variable defaults to 0] ! -weak LIBNAME declare that the target provides the LIBNAME interface ! All other options (arguments beginning with \`-') are ignored. ! Every other argument is treated as a filename. Files ending in \`.la' are ! treated as uninstalled libtool libraries, other files are standard or library ! object files. ! If the OUTPUT-FILE ends in \`.la', then a libtool library is created, ! only library objects (\`.lo' files) may be specified, and \`-rpath' is ! required, except when creating a convenience library. ! If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created ! using \`ar' and \`ranlib', or on Windows using \`lib'. ! If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file ! is created, otherwise an executable program is created." ! ;; ! uninstall) ! $ECHO \ ! "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... ! Remove libraries from an installation directory. ! RM is the name of the program to use to delete files associated with each FILE ! (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed ! to RM. ! If FILE is a libtool library, all the files associated with it are deleted. ! Otherwise, only FILE itself is deleted using RM." ! ;; ! *) ! func_fatal_help "invalid operation mode \`$mode'" ! ;; ! esac ! $ECHO ! $ECHO "Try \`$progname --help' for more information about other modes." ! exit $? } ! # Now that we've collected a possible --mode arg, show help if necessary ! $opt_help && func_mode_help # func_mode_execute arg... *************** *** 2076,2087 **** # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" fi - # Transform arg to wrapped name. - file="$progdir/$program" ;; esac # Quote arguments (to preserve shell metacharacters). --- 1717,1730 ---- # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" + # Transform arg to wrapped name. + file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" + # Transform arg to wrapped name. + file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). *************** *** 2404,2410 **** 'exit $?' tstripme="$stripme" case $host_os in ! cygwin* | mingw* | pw32*) case $realname in *.dll.a) tstripme="" --- 2047,2053 ---- 'exit $?' tstripme="$stripme" case $host_os in ! cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" *************** *** 2510,2516 **** # Do a test to see if this is really a libtool program. case $host in ! *cygwin*|*mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result --- 2153,2159 ---- # Do a test to see if this is really a libtool program. case $host in ! *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result *************** *** 2625,2664 **** func_execute_cmds "$old_postinstall_cmds" 'exit $?' done ! test -n "$future_libdirs" && \ ! func_warning "remember to run \`$progname --finish$future_libdirs'" ! ! if test -n "$current_libdirs"; then ! # Maybe just do a dry run. ! $opt_dry_run && current_libdirs=" -n$current_libdirs" ! exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' ! else ! exit $EXIT_SUCCESS ! fi } - test "$mode" = install && func_mode_install ${1+"$@"} ! # func_emit_wrapper arg ! # ! # emit a libtool wrapper script on stdout ! # don't directly open a file because we may want to ! # incorporate the script contents within a cygwin/mingw ! # wrapper executable. Must ONLY be called from within ! # func_mode_link because it depends on a number of variable ! # set therein. # ! # arg is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR ! # variable will take. If 'yes', then the emitted script ! # will assume that the directory in which it is stored is ! # the '.lib' directory. This is a cygwin/mingw-specific ! # behavior. ! func_emit_wrapper () { ! func_emit_wrapper_arg1=no if test -n "$1" ; then ! func_emit_wrapper_arg1=$1 fi $ECHO "\ --- 2268,2707 ---- func_execute_cmds "$old_postinstall_cmds" 'exit $?' done ! test -n "$future_libdirs" && \ ! func_warning "remember to run \`$progname --finish$future_libdirs'" ! ! if test -n "$current_libdirs"; then ! # Maybe just do a dry run. ! $opt_dry_run && current_libdirs=" -n$current_libdirs" ! exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' ! else ! exit $EXIT_SUCCESS ! fi ! } ! ! test "$mode" = install && func_mode_install ${1+"$@"} ! ! ! # func_generate_dlsyms outputname originator pic_p ! # Extract symbols from dlprefiles and create ${outputname}S.o with ! # a dlpreopen symbol table. ! func_generate_dlsyms () ! { ! $opt_debug ! my_outputname="$1" ! my_originator="$2" ! my_pic_p="${3-no}" ! my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` ! my_dlsyms= ! ! if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then ! if test -n "$NM" && test -n "$global_symbol_pipe"; then ! my_dlsyms="${my_outputname}S.c" ! else ! func_error "not configured to extract global symbols from dlpreopened files" ! fi ! fi ! ! if test -n "$my_dlsyms"; then ! case $my_dlsyms in ! "") ;; ! *.c) ! # Discover the nlist of each of the dlfiles. ! nlist="$output_objdir/${my_outputname}.nm" ! ! func_show_eval "$RM $nlist ${nlist}S ${nlist}T" ! ! # Parse the name list into a source file. ! func_verbose "creating $output_objdir/$my_dlsyms" ! ! $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ ! /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ ! /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ ! ! #ifdef __cplusplus ! extern \"C\" { ! #endif ! ! /* External symbol declarations for the compiler. */\ ! " ! ! if test "$dlself" = yes; then ! func_verbose "generating symbol list for \`$output'" ! ! $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" ! ! # Add our own program objects to the symbol list. ! progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` ! for progfile in $progfiles; do ! func_verbose "extracting global C symbols from \`$progfile'" ! $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" ! done ! ! if test -n "$exclude_expsyms"; then ! $opt_dry_run || { ! eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' ! eval '$MV "$nlist"T "$nlist"' ! } ! fi ! ! if test -n "$export_symbols_regex"; then ! $opt_dry_run || { ! eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' ! eval '$MV "$nlist"T "$nlist"' ! } ! fi ! ! # Prepare the list of exported symbols ! if test -z "$export_symbols"; then ! export_symbols="$output_objdir/$outputname.exp" ! $opt_dry_run || { ! $RM $export_symbols ! eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' ! case $host in ! *cygwin* | *mingw* | *cegcc* ) ! eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' ! eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ! ;; ! esac ! } ! else ! $opt_dry_run || { ! eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' ! eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' ! eval '$MV "$nlist"T "$nlist"' ! case $host in ! *cygwin | *mingw* | *cegcc* ) ! eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' ! eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ! ;; ! esac ! } ! fi ! fi ! ! for dlprefile in $dlprefiles; do ! func_verbose "extracting global C symbols from \`$dlprefile'" ! func_basename "$dlprefile" ! name="$func_basename_result" ! $opt_dry_run || { ! eval '$ECHO ": $name " >> "$nlist"' ! eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" ! } ! done ! ! $opt_dry_run || { ! # Make sure we have at least an empty file. ! test -f "$nlist" || : > "$nlist" ! ! if test -n "$exclude_expsyms"; then ! $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T ! $MV "$nlist"T "$nlist" ! fi ! ! # Try sorting and uniquifying the output. ! if $GREP -v "^: " < "$nlist" | ! if sort -k 3 /dev/null 2>&1; then ! sort -k 3 ! else ! sort +2 ! fi | ! uniq > "$nlist"S; then ! : ! else ! $GREP -v "^: " < "$nlist" > "$nlist"S ! fi ! ! if test -f "$nlist"S; then ! eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' ! else ! $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" ! fi ! ! $ECHO >> "$output_objdir/$my_dlsyms" "\ ! ! /* The mapping between symbol names and symbols. */ ! typedef struct { ! const char *name; ! void *address; ! } lt_dlsymlist; ! " ! case $host in ! *cygwin* | *mingw* | *cegcc* ) ! $ECHO >> "$output_objdir/$my_dlsyms" "\ ! /* DATA imports from DLLs on WIN32 con't be const, because ! runtime relocations are performed -- see ld's documentation ! on pseudo-relocs. */" ! lt_dlsym_const= ;; ! *osf5*) ! echo >> "$output_objdir/$my_dlsyms" "\ ! /* This system does not cope well with relocations in const data */" ! lt_dlsym_const= ;; ! *) ! lt_dlsym_const=const ;; ! esac ! ! $ECHO >> "$output_objdir/$my_dlsyms" "\ ! extern $lt_dlsym_const lt_dlsymlist ! lt_${my_prefix}_LTX_preloaded_symbols[]; ! $lt_dlsym_const lt_dlsymlist ! lt_${my_prefix}_LTX_preloaded_symbols[] = ! {\ ! { \"$my_originator\", (void *) 0 }," ! ! case $need_lib_prefix in ! no) ! eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ! ;; ! *) ! eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ! ;; ! esac ! $ECHO >> "$output_objdir/$my_dlsyms" "\ ! {0, (void *) 0} ! }; ! ! /* This works around a problem in FreeBSD linker */ ! #ifdef FREEBSD_WORKAROUND ! static const void *lt_preloaded_setup() { ! return lt_${my_prefix}_LTX_preloaded_symbols; ! } ! #endif ! ! #ifdef __cplusplus ! } ! #endif\ ! " ! } # !$opt_dry_run ! ! pic_flag_for_symtable= ! case "$compile_command " in ! *" -static "*) ;; ! *) ! case $host in ! # compiling the symbol table file with pic_flag works around ! # a FreeBSD bug that causes programs to crash when -lm is ! # linked before any other PIC object. But we must not use ! # pic_flag when linking with -static. The problem exists in ! # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. ! *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) ! pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; ! *-*-hpux*) ! pic_flag_for_symtable=" $pic_flag" ;; ! *) ! if test "X$my_pic_p" != Xno; then ! pic_flag_for_symtable=" $pic_flag" ! fi ! ;; ! esac ! ;; ! esac ! symtab_cflags= ! for arg in $LTCFLAGS; do ! case $arg in ! -pie | -fpie | -fPIE) ;; ! *) symtab_cflags="$symtab_cflags $arg" ;; ! esac ! done ! ! # Now compile the dynamic symbol file. ! func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' ! ! # Clean up the generated files. ! func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' ! ! # Transform the symbol file into the correct name. ! symfileobj="$output_objdir/${my_outputname}S.$objext" ! case $host in ! *cygwin* | *mingw* | *cegcc* ) ! if test -f "$output_objdir/$my_outputname.def"; then ! compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` ! finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` ! else ! compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` ! finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` ! fi ! ;; ! *) ! compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` ! finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` ! ;; ! esac ! ;; ! *) ! func_fatal_error "unknown suffix for \`$my_dlsyms'" ! ;; ! esac ! else ! # We keep going just in case the user didn't refer to ! # lt_preloaded_symbols. The linker will fail if global_symbol_pipe ! # really was required. ! ! # Nullify the symbol file. ! compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` ! finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` ! fi ! } ! ! # func_win32_libid arg ! # return the library type of file 'arg' ! # ! # Need a lot of goo to handle *both* DLLs and import libs ! # Has to be a shell function in order to 'eat' the argument ! # that is supplied when $file_magic_command is called. ! func_win32_libid () ! { ! $opt_debug ! win32_libid_type="unknown" ! win32_fileres=`file -L $1 2>/dev/null` ! case $win32_fileres in ! *ar\ archive\ import\ library*) # definitely import ! win32_libid_type="x86 archive import" ! ;; ! *ar\ archive*) # could be an import, or static ! if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | ! $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then ! win32_nmres=`eval $NM -f posix -A $1 | ! $SED -n -e ' ! 1,100{ ! / I /{ ! s,.*,import, ! p ! q ! } ! }'` ! case $win32_nmres in ! import*) win32_libid_type="x86 archive import";; ! *) win32_libid_type="x86 archive static";; ! esac ! fi ! ;; ! *DLL*) ! win32_libid_type="x86 DLL" ! ;; ! *executable*) # but shell scripts are "executable" too... ! case $win32_fileres in ! *MS\ Windows\ PE\ Intel*) ! win32_libid_type="x86 DLL" ! ;; ! esac ! ;; ! esac ! $ECHO "$win32_libid_type" ! } ! ! ! ! # func_extract_an_archive dir oldlib ! func_extract_an_archive () ! { ! $opt_debug ! f_ex_an_ar_dir="$1"; shift ! f_ex_an_ar_oldlib="$1" ! func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' ! if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then ! : ! else ! func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" ! fi ! } ! ! ! # func_extract_archives gentop oldlib ... ! func_extract_archives () ! { ! $opt_debug ! my_gentop="$1"; shift ! my_oldlibs=${1+"$@"} ! my_oldobjs="" ! my_xlib="" ! my_xabs="" ! my_xdir="" ! ! for my_xlib in $my_oldlibs; do ! # Extract the objects. ! case $my_xlib in ! [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; ! *) my_xabs=`pwd`"/$my_xlib" ;; ! esac ! func_basename "$my_xlib" ! my_xlib="$func_basename_result" ! my_xlib_u=$my_xlib ! while :; do ! case " $extracted_archives " in ! *" $my_xlib_u "*) ! func_arith $extracted_serial + 1 ! extracted_serial=$func_arith_result ! my_xlib_u=lt$extracted_serial-$my_xlib ;; ! *) break ;; ! esac ! done ! extracted_archives="$extracted_archives $my_xlib_u" ! my_xdir="$my_gentop/$my_xlib_u" ! ! func_mkdir_p "$my_xdir" ! ! case $host in ! *-darwin*) ! func_verbose "Extracting $my_xabs" ! # Do not bother doing anything if just a dry run ! $opt_dry_run || { ! darwin_orig_dir=`pwd` ! cd $my_xdir || exit $? ! darwin_archive=$my_xabs ! darwin_curdir=`pwd` ! darwin_base_archive=`basename "$darwin_archive"` ! darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` ! if test -n "$darwin_arches"; then ! darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` ! darwin_arch= ! func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" ! for darwin_arch in $darwin_arches ; do ! func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" ! $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" ! cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" ! func_extract_an_archive "`pwd`" "${darwin_base_archive}" ! cd "$darwin_curdir" ! $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" ! done # $darwin_arches ! ## Okay now we've a bunch of thin objects, gotta fatten them up :) ! darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` ! darwin_file= ! darwin_files= ! for darwin_file in $darwin_filelist; do ! darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` ! $LIPO -create -output "$darwin_file" $darwin_files ! done # $darwin_filelist ! $RM -rf unfat-$$ ! cd "$darwin_orig_dir" ! else ! cd $darwin_orig_dir ! func_extract_an_archive "$my_xdir" "$my_xabs" ! fi # $darwin_arches ! } # !$opt_dry_run ! ;; ! *) ! func_extract_an_archive "$my_xdir" "$my_xabs" ! ;; ! esac ! my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` ! done ! ! func_extract_archives_result="$my_oldobjs" } ! # func_emit_wrapper_part1 [arg=no] # ! # Emit the first part of a libtool wrapper script on stdout. ! # For more information, see the description associated with ! # func_emit_wrapper(), below. ! func_emit_wrapper_part1 () { ! func_emit_wrapper_part1_arg1=no if test -n "$1" ; then ! func_emit_wrapper_part1_arg1=$1 fi $ECHO "\ *************** *** 2743,2752 **** file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. ! WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then --- 2786,2812 ---- file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done + " + } + # end: func_emit_wrapper_part1 + + # func_emit_wrapper_part2 [arg=no] + # + # Emit the second part of a libtool wrapper script on stdout. + # For more information, see the description associated with + # func_emit_wrapper(), below. + func_emit_wrapper_part2 () + { + func_emit_wrapper_part2_arg1=no + if test -n "$1" ; then + func_emit_wrapper_part2_arg1=$1 + fi + + $ECHO "\ # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. ! WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then *************** *** 2837,2843 **** " case $host in # Backslashes separate directories on plain windows ! *-*-mingw | *-*-os2*) $ECHO "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " --- 2897,2903 ---- " case $host in # Backslashes separate directories on plain windows ! *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " *************** *** 2850,2856 **** ;; esac $ECHO "\ ! \$ECHO \"\$0: cannot exec \$program \$*\" exit 1 fi else --- 2910,2916 ---- ;; esac $ECHO "\ ! \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 fi else *************** *** 2863,2869 **** fi\ " } ! # end: func_emit_wrapper # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout --- 2923,3129 ---- fi\ " } ! # end: func_emit_wrapper_part2 ! ! ! # func_emit_wrapper [arg=no] ! # ! # Emit a libtool wrapper script on stdout. ! # Don't directly open a file because we may want to ! # incorporate the script contents within a cygwin/mingw ! # wrapper executable. Must ONLY be called from within ! # func_mode_link because it depends on a number of variables ! # set therein. ! # ! # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR ! # variable will take. If 'yes', then the emitted script ! # will assume that the directory in which it is stored is ! # the $objdir directory. This is a cygwin/mingw-specific ! # behavior. ! func_emit_wrapper () ! { ! func_emit_wrapper_arg1=no ! if test -n "$1" ; then ! func_emit_wrapper_arg1=$1 ! fi ! ! # split this up so that func_emit_cwrapperexe_src ! # can call each part independently. ! func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" ! func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" ! } ! ! ! # func_to_host_path arg ! # ! # Convert paths to host format when used with build tools. ! # Intended for use with "native" mingw (where libtool itself ! # is running under the msys shell), or in the following cross- ! # build environments: ! # $build $host ! # mingw (msys) mingw [e.g. native] ! # cygwin mingw ! # *nix + wine mingw ! # where wine is equipped with the `winepath' executable. ! # In the native mingw case, the (msys) shell automatically ! # converts paths for any non-msys applications it launches, ! # but that facility isn't available from inside the cwrapper. ! # Similar accommodations are necessary for $host mingw and ! # $build cygwin. Calling this function does no harm for other ! # $host/$build combinations not listed above. ! # ! # ARG is the path (on $build) that should be converted to ! # the proper representation for $host. The result is stored ! # in $func_to_host_path_result. ! func_to_host_path () ! { ! func_to_host_path_result="$1" ! if test -n "$1" ; then ! case $host in ! *mingw* ) ! lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' ! case $build in ! *mingw* ) # actually, msys ! # awkward: cmd appends spaces to result ! lt_sed_strip_trailing_spaces="s/[ ]*\$//" ! func_to_host_path_tmp1=`( cmd //c echo "$1" |\ ! $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` ! func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ ! $SED -e "$lt_sed_naive_backslashify"` ! ;; ! *cygwin* ) ! func_to_host_path_tmp1=`cygpath -w "$1"` ! func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ ! $SED -e "$lt_sed_naive_backslashify"` ! ;; ! * ) ! # Unfortunately, winepath does not exit with a non-zero ! # error code, so we are forced to check the contents of ! # stdout. On the other hand, if the command is not ! # found, the shell will set an exit code of 127 and print ! # *an error message* to stdout. So we must check for both ! # error code of zero AND non-empty stdout, which explains ! # the odd construction: ! func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` ! if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then ! func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ ! $SED -e "$lt_sed_naive_backslashify"` ! else ! # Allow warning below. ! func_to_host_path_result="" ! fi ! ;; ! esac ! if test -z "$func_to_host_path_result" ; then ! func_error "Could not determine host path corresponding to" ! func_error " '$1'" ! func_error "Continuing, but uninstalled executables may not work." ! # Fallback: ! func_to_host_path_result="$1" ! fi ! ;; ! esac ! fi ! } ! # end: func_to_host_path ! ! # func_to_host_pathlist arg ! # ! # Convert pathlists to host format when used with build tools. ! # See func_to_host_path(), above. This function supports the ! # following $build/$host combinations (but does no harm for ! # combinations not listed here): ! # $build $host ! # mingw (msys) mingw [e.g. native] ! # cygwin mingw ! # *nix + wine mingw ! # ! # Path separators are also converted from $build format to ! # $host format. If ARG begins or ends with a path separator ! # character, it is preserved (but converted to $host format) ! # on output. ! # ! # ARG is a pathlist (on $build) that should be converted to ! # the proper representation on $host. The result is stored ! # in $func_to_host_pathlist_result. ! func_to_host_pathlist () ! { ! func_to_host_pathlist_result="$1" ! if test -n "$1" ; then ! case $host in ! *mingw* ) ! lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' ! # Remove leading and trailing path separator characters from ! # ARG. msys behavior is inconsistent here, cygpath turns them ! # into '.;' and ';.', and winepath ignores them completely. ! func_to_host_pathlist_tmp2="$1" ! # Once set for this call, this variable should not be ! # reassigned. It is used in tha fallback case. ! func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ ! $SED -e 's|^:*||' -e 's|:*$||'` ! case $build in ! *mingw* ) # Actually, msys. ! # Awkward: cmd appends spaces to result. ! lt_sed_strip_trailing_spaces="s/[ ]*\$//" ! func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ ! $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` ! func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ ! $SED -e "$lt_sed_naive_backslashify"` ! ;; ! *cygwin* ) ! func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` ! func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ ! $SED -e "$lt_sed_naive_backslashify"` ! ;; ! * ) ! # unfortunately, winepath doesn't convert pathlists ! func_to_host_pathlist_result="" ! func_to_host_pathlist_oldIFS=$IFS ! IFS=: ! for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do ! IFS=$func_to_host_pathlist_oldIFS ! if test -n "$func_to_host_pathlist_f" ; then ! func_to_host_path "$func_to_host_pathlist_f" ! if test -n "$func_to_host_path_result" ; then ! if test -z "$func_to_host_pathlist_result" ; then ! func_to_host_pathlist_result="$func_to_host_path_result" ! else ! func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" ! fi ! fi ! fi ! IFS=: ! done ! IFS=$func_to_host_pathlist_oldIFS ! ;; ! esac ! if test -z "$func_to_host_pathlist_result" ; then ! func_error "Could not determine the host path(s) corresponding to" ! func_error " '$1'" ! func_error "Continuing, but uninstalled executables may not work." ! # Fallback. This may break if $1 contains DOS-style drive ! # specifications. The fix is not to complicate the expression ! # below, but for the user to provide a working wine installation ! # with winepath so that path translation in the cross-to-mingw ! # case works properly. ! lt_replace_pathsep_nix_to_dos="s|:|;|g" ! func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ ! $SED -e "$lt_replace_pathsep_nix_to_dos"` ! fi ! # Now, add the leading and trailing path separators back ! case "$1" in ! :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" ! ;; ! esac ! case "$1" in ! *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" ! ;; ! esac ! ;; ! esac ! fi ! } ! # end: func_to_host_pathlist # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout *************** *** 2893,2901 **** --- 3153,3172 ---- #ifdef _MSC_VER # include # include + # include + # define setmode _setmode #else # include # include + # ifdef __CYGWIN__ + # include + # define HAVE_SETENV + # ifdef __STRICT_ANSI__ + char *realpath (const char *, char *); + int putenv (char *); + int setenv (const char *, const char *, int); + # endif + # endif #endif #include #include *************** *** 2903,2908 **** --- 3174,3180 ---- #include #include #include + #include #include #if defined(PATH_MAX) *************** *** 2936,2941 **** --- 3208,3214 ---- #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM + # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif *************** *** 2957,2962 **** --- 3230,3246 ---- # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ + #ifdef __CYGWIN__ + # define FOPEN_WB "wb" + #endif + + #ifndef FOPEN_WB + # define FOPEN_WB "w" + #endif + #ifndef _O_BINARY + # define _O_BINARY 0 + #endif + #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ *************** *** 2988,3016 **** int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_fatal (const char *message, ...); ! static const char *script_text = EOF ! func_emit_wrapper yes | $SED -e 's/\([\\"]\)/\\\1/g' \ -e 's/^/ "/' -e 's/$/\\n"/' echo ";" cat </dev/null || echo $SHELL` ! case $lt_newargv0 in ! *.exe | *.EXE) ;; ! *) lt_newargv0=$lt_newargv0.exe ;; ! esac ! ;; ! * ) lt_newargv0=$SHELL ;; esac - fi - - cat <"))); ! for (i = 0; i < newargc; i++) { ! LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); } EOF case $host_os in mingw*) ! cat <<"EOF" /* execv doesn't actually work on mingw as expected on unix */ ! rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); if (rval == -1) { /* failed to start process */ ! LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); return 127; } return rval; EOF ;; *) ! cat <<"EOF" ! execv (lt_argv_zero, newargz); return rval; /* =127, but avoids unused variable warning */ EOF ;; esac cat <<"EOF" + } void * xmalloc (size_t num) *************** *** 3430,3435 **** --- 3853,4029 ---- lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } + + void + lt_setenv (const char *name, const char *value) + { + LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", + (name ? name : ""), + (value ? value : ""))); + { + #ifdef HAVE_SETENV + /* always make a copy, for consistency with !HAVE_SETENV */ + char *str = xstrdup (value); + setenv (name, str, 1); + #else + int len = strlen (name) + 1 + strlen (value) + 1; + char *str = XMALLOC (char, len); + sprintf (str, "%s=%s", name, value); + if (putenv (str) != EXIT_SUCCESS) + { + XFREE (str); + } + #endif + } + } + + char * + lt_extend_str (const char *orig_value, const char *add, int to_end) + { + char *new_value; + if (orig_value && *orig_value) + { + int orig_value_len = strlen (orig_value); + int add_len = strlen (add); + new_value = XMALLOC (char, add_len + orig_value_len + 1); + if (to_end) + { + strcpy (new_value, orig_value); + strcpy (new_value + orig_value_len, add); + } + else + { + strcpy (new_value, add); + strcpy (new_value + add_len, orig_value); + } + } + else + { + new_value = xstrdup (add); + } + return new_value; + } + + int + lt_split_name_value (const char *arg, char** name, char** value) + { + const char *p; + int len; + if (!arg || !*arg) + return 1; + + p = strchr (arg, (int)'='); + + if (!p) + return 1; + + *value = xstrdup (++p); + + len = strlen (arg) - strlen (*value); + *name = XMALLOC (char, len); + strncpy (*name, arg, len-1); + (*name)[len - 1] = '\0'; + + return 0; + } + + void + lt_opt_process_env_set (const char *arg) + { + char *name = NULL; + char *value = NULL; + + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); + } + + lt_setenv (name, value); + XFREE (name); + XFREE (value); + } + + void + lt_opt_process_env_prepend (const char *arg) + { + char *name = NULL; + char *value = NULL; + char *new_value = NULL; + + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); + } + + new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + XFREE (name); + XFREE (value); + } + + void + lt_opt_process_env_append (const char *arg) + { + char *name = NULL; + char *value = NULL; + char *new_value = NULL; + + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); + } + + new_value = lt_extend_str (getenv (name), value, 1); + lt_setenv (name, new_value); + XFREE (new_value); + XFREE (name); + XFREE (value); + } + + void + lt_update_exe_path (const char *name, const char *value) + { + LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + (name ? name : ""), + (value ? value : ""))); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + /* some systems can't cope with a ':'-terminated path #' */ + int len = strlen (new_value); + while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) + { + new_value[len-1] = '\0'; + } + lt_setenv (name, new_value); + XFREE (new_value); + } + } + + void + lt_update_lib_path (const char *name, const char *value) + { + LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + (name ? name : ""), + (value ? value : ""))); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + } + } + + EOF } # end: func_emit_cwrapperexe_src *************** *** 3439,3445 **** { $opt_debug case $host in ! *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra --- 4033,4039 ---- { $opt_debug case $host in ! *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra *************** *** 3526,3534 **** fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static - # See comment for -static flag below, for more details. - func_append compile_command " $link_static_flag" - func_append finalize_command " $link_static_flag" fi prefer_static_libs=yes ;; --- 4120,4125 ---- *************** *** 3816,3822 **** case $arg in -all-static) ! # The effects of -all-static are defined in a previous loop. continue ;; --- 4407,4417 ---- case $arg in -all-static) ! if test -n "$link_static_flag"; then ! # See comment for -static flag below, for more details. ! func_append compile_command " $link_static_flag" ! func_append finalize_command " $link_static_flag" ! fi continue ;; *************** *** 3882,3887 **** --- 4477,4489 ---- -L*) func_stripname '-L' '' "$arg" dir=$func_stripname_result + if test -z "$dir"; then + if test "$#" -gt 0; then + func_fatal_error "require no space between \`-L' and \`$1'" + else + func_fatal_error "need path for \`-L' option" + fi + fi # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *************** *** 3900,3913 **** ;; esac case $host in ! *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; --- 4502,4517 ---- ;; esac case $host in ! *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; + ::) dllsearchpath=$dir;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; *************** *** 3918,3924 **** -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in ! *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; --- 4522,4528 ---- -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in ! *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) # These systems don't actually have a C or math library (as such) continue ;; *************** *** 3995,4001 **** -no-install) case $host in ! *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" --- 4599,4605 ---- -no-install) case $host in ! *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" *************** *** 4952,4958 **** if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in ! *cygwin* | *mingw*) # No point in relinking DLLs because paths are not encoded notinst_deplibs="$notinst_deplibs $lib" need_relink=no --- 5556,5562 ---- if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in ! *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded notinst_deplibs="$notinst_deplibs $lib" need_relink=no *************** *** 5022,5029 **** elif test -n "$soname_spec"; then # bleh windows case $host in ! *cygwin* | mingw*) ! major=`expr $current - $age` versuffix="-$major" ;; esac --- 5626,5634 ---- elif test -n "$soname_spec"; then # bleh windows case $host in ! *cygwin* | mingw* | *cegcc*) ! func_arith $current - $age ! major=$func_arith_result versuffix="-$major" ;; esac *************** *** 5315,5325 **** done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" ! darwin_install_name=`otool -L $depdepl | $SED -n -e '3q;2,2p' | $SED -e 's/(.*//'` ! darwin_install_name=`$ECHO $darwin_install_name` if test -z "$darwin_install_name"; then ! darwin_install_name=`otool64 -L $depdepl | $SED -n -e '3q;2,2p' | $SED -e 's/(.*//'` ! darwin_install_name=`$ECHO $darwin_install_name` fi compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" --- 5920,5928 ---- done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" ! darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then ! darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" *************** *** 5586,5592 **** # case $version_type in darwin|linux|osf|windows|none) ! current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" ;; --- 6189,6196 ---- # case $version_type in darwin|linux|osf|windows|none) ! func_arith $number_major + $number_minor ! current=$func_arith_result age="$number_minor" revision="$number_revision" ;; *************** *** 5596,5602 **** age="0" ;; irix|nonstopux) ! current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_minor" lt_irix_increment=no --- 6200,6207 ---- age="0" ;; irix|nonstopux) ! func_arith $number_major + $number_minor ! current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no *************** *** 5650,5659 **** darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header ! major=.`expr $current - $age` versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... ! minor_current=`expr $current + 1` xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; --- 6255,6266 ---- darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header ! func_arith $current - $age ! major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... ! func_arith $current + 1 ! minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; *************** *** 5670,5679 **** irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then ! major=`expr $current - $age` else ! major=`expr $current - $age + 1` fi case $version_type in nonstopux) verstring_prefix=nonstopux ;; --- 6277,6287 ---- irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then ! func_arith $current - $age else ! func_arith $current - $age + 1 fi + major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *************** *** 5684,5691 **** # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do ! iface=`expr $revision - $loop` ! loop=`expr $loop - 1` verstring="$verstring_prefix$major.$iface:$verstring" done --- 6292,6301 ---- # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do ! func_arith $revision - $loop ! iface=$func_arith_result ! func_arith $loop - 1 ! loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done *************** *** 5695,5714 **** ;; linux) ! major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) ! major=.`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do ! iface=`expr $current - $loop` ! loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done --- 6305,6328 ---- ;; linux) ! func_arith $current - $age ! major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) ! func_arith $current - $age ! major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do ! func_arith $current - $loop ! iface=$func_arith_result ! func_arith $loop - 1 ! loop=$func_arith_result verstring="$verstring:${iface}.0" done *************** *** 5729,5735 **** windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. ! major=`expr $current - $age` versuffix="-$major" ;; --- 6343,6350 ---- windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. ! func_arith $current - $age ! major=$func_arith_result versuffix="-$major" ;; *************** *** 5790,5796 **** tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in ! *.$objext) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then --- 6405,6411 ---- tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in ! *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then *************** *** 5861,5867 **** if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in ! *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) --- 6476,6482 ---- if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in ! *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) *************** *** 5925,5933 **** if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then ldd_output=`ldd conftest` for i in $deplibs; do ! name=`expr $i : '-l\(.*\)'` ! # If $name is empty we are operating on a -L argument. ! if test "$name" != "" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $i "*) --- 6540,6549 ---- if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then ldd_output=`ldd conftest` for i in $deplibs; do ! case $i in ! -l*) ! func_stripname -l '' "$i" ! name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $i "*) *************** *** 5954,5970 **** $ECHO "*** its dynamic dependency list that programs get resolved with at runtime." fi fi ! else newdeplibs="$newdeplibs $i" ! fi done else # Error occurred in the first compile. Let's try to salvage # the situation: Compile a separate program for each library. for i in $deplibs; do ! name=`expr $i : '-l\(.*\)'` ! # If $name is empty we are operating on a -L argument. ! if test "$name" != "" && test "$name" != "0"; then $opt_dry_run || $RM conftest if $LTCC $LTCFLAGS -o conftest conftest.c $i; then ldd_output=`ldd conftest` --- 6570,6589 ---- $ECHO "*** its dynamic dependency list that programs get resolved with at runtime." fi fi ! ;; ! *) newdeplibs="$newdeplibs $i" ! ;; ! esac done else # Error occurred in the first compile. Let's try to salvage # the situation: Compile a separate program for each library. for i in $deplibs; do ! case $i in ! -l*) ! func_stripname -l '' "$i" ! name=$func_stripname_result $opt_dry_run || $RM conftest if $LTCC $LTCFLAGS -o conftest conftest.c $i; then ldd_output=`ldd conftest` *************** *** 6002,6010 **** $ECHO "*** library that it depends on before this library will be fully" $ECHO "*** functional. Installing it before continuing would be even better." fi ! else newdeplibs="$newdeplibs $i" ! fi done fi ;; --- 6621,6631 ---- $ECHO "*** library that it depends on before this library will be fully" $ECHO "*** functional. Installing it before continuing would be even better." fi ! ;; ! *) newdeplibs="$newdeplibs $i" ! ;; ! esac done fi ;; *************** *** 6012,6020 **** set dummy $deplibs_check_method; shift file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do ! name=`expr $a_deplib : '-l\(.*\)'` ! # If $name is empty we are operating on a -L argument. ! if test "$name" != "" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) --- 6633,6642 ---- set dummy $deplibs_check_method; shift file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do ! case $a_deplib in ! -l*) ! func_stripname -l '' "$a_deplib" ! name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) *************** *** 6071,6089 **** $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ! else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ! fi done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do ! name=`expr $a_deplib : '-l\(.*\)'` ! # If $name is empty we are operating on a -L argument. ! if test -n "$name" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) --- 6693,6714 ---- $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ! ;; ! *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ! ;; ! esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do ! case $a_deplib in ! -l*) ! func_stripname -l '' "$a_deplib" ! name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) *************** *** 6122,6131 **** $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ! else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ! fi done # Gone through all deplibs. ;; none | unknown | *) --- 6747,6758 ---- $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ! ;; ! *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ! ;; ! esac done # Gone through all deplibs. ;; none | unknown | *) *************** *** 6348,6354 **** orig_export_symbols= case $host_os in ! cygwin* | mingw*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then --- 6975,6981 ---- orig_export_symbols= case $host_os in ! cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then *************** *** 6377,6384 **** for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" ! if len=`expr "X$cmd" : ".*"` && ! test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then func_show_eval "$cmd" 'exit $?' skipped_export=false else --- 7004,7012 ---- for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" ! func_len " $cmd" ! len=$func_len_result ! if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then func_show_eval "$cmd" 'exit $?' skipped_export=false else *************** *** 6481,6488 **** fi if test "X$skipped_export" != "X:" && ! len=`expr "X$test_cmds" : ".*" 2>/dev/null` && ! test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise --- 7109,7117 ---- fi if test "X$skipped_export" != "X:" && ! func_len " $test_cmds" && ! len=$func_len_result && ! test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise *************** *** 6542,6555 **** if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext # Loop over the list of objects to be linked. for obj in $save_libobjs do ! eval test_cmds=\"$reload_cmds $objlist $last_robj\" if test "X$objlist" = X || ! { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && ! test "$len" -le "$max_cmd_len"; }; then ! objlist="$objlist $obj" else # The command $test_cmds is almost too long, add a # command to the queue. --- 7171,7190 ---- if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext + eval test_cmds=\"$reload_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + # Loop over the list of objects to be linked. for obj in $save_libobjs do ! func_len " $obj" ! func_arith $len + $func_len_result ! len=$func_arith_result if test "X$objlist" = X || ! test "$len" -lt "$max_cmd_len"; then ! func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. *************** *** 6562,6571 **** eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext ! k=`expr $k + 1` output=$output_objdir/$output_la-${k}.$objext objlist=$obj ! len=1 fi done # Handle the remaining objects by creating one last --- 7197,7209 ---- eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext ! func_arith $k + 1 ! k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=$obj ! func_len " $last_robj" ! func_arith $len0 + $func_len_result ! len=$func_arith_result fi done # Handle the remaining objects by creating one last *************** *** 6962,6975 **** esac fi case $host in ! *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; --- 7600,7615 ---- esac fi case $host in ! *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; + ::) dllsearchpath=$libdir;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; *************** *** 7039,7044 **** --- 7679,7688 ---- wrappers_required=no fi ;; + *cegcc) + # Disable wrappers for cegcc, we are cross compiling anyway. + wrappers_required=no + ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no *************** *** 7191,7201 **** func_emit_cwrapperexe_src > $cwrappersource ! # we should really use a build-platform specific compiler ! # here, but OTOH, the wrappers (shell script and this C one) ! # are only useful if you want to execute the "real" binary. ! # Since the "real" binary is built for $host, then this ! # wrapper might as well be built for $host, too. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper --- 7835,7844 ---- func_emit_cwrapperexe_src > $cwrappersource ! # The wrapper executable is built using the $host compiler, ! # because it contains $host paths and files. If cross- ! # compiling, it, like the target executable, must be ! # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper *************** *** 7206,7212 **** $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { ! $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result } ;; * ) --- 7849,7860 ---- $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { ! # note: this script will not be executed, so do not chmod. ! if test "x$build" = "x$host" ; then ! $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result ! else ! func_emit_wrapper no > $func_ltwrapper_scriptname_result ! fi } ;; * ) *************** *** 7295,7301 **** # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase ! counter=`expr $counter + 1` case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; --- 7943,7950 ---- # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase ! func_arith $counter + 1 ! counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; *************** *** 7310,7317 **** fi eval cmds=\"$old_archive_cmds\" ! if len=`expr "X$cmds" : ".*" 2>/dev/null` && ! test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts --- 7959,7967 ---- fi eval cmds=\"$old_archive_cmds\" ! func_len " $cmds" ! len=$func_len_result ! if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts *************** *** 7321,7338 **** objlist= concat_cmds= save_oldobjs=$oldobjs # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done for obj in $save_oldobjs do ! oldobjs="$objlist $obj" ! objlist="$objlist $obj" ! eval test_cmds=\"$old_archive_cmds\" ! if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && ! test "$len" -le "$max_cmd_len"; then : else # the above command should be used before it gets too long --- 7971,7993 ---- objlist= concat_cmds= save_oldobjs=$oldobjs + oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done + eval test_cmds=\"$old_archive_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 for obj in $save_oldobjs do ! func_len " $obj" ! func_arith $len + $func_len_result ! len=$func_arith_result ! func_append objlist " $obj" ! if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long *************** *** 7343,7348 **** --- 7998,8004 ---- test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= + len=$len0 fi done RANLIB=$save_RANLIB *************** *** 7467,7473 **** # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in ! *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $ECHO > $output "\ # $outputname - a libtool library file --- 8123,8129 ---- # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in ! *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $ECHO > $output "\ # $outputname - a libtool library file diff -a -rc -C 2 -P gsl-1.11/matrix/ChangeLog gsl-1.12/matrix/ChangeLog *** gsl-1.11/matrix/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/matrix/ChangeLog Thu Nov 27 20:03:28 2008 *************** *** 1,3 **** --- 1,12 ---- + 2008-07-03 Brian Gough + + * matrix.c: compile all the inline matrix functions from header + + * gsl_matrix.h and all related files: use new inline declarations + + * Makefile.am (INCLUDES): use top_srcdir, remove top_builddir + (noinst_HEADERS): remove matrix_source.c + 2007-08-21 Brian Gough * prop_source.c (FUNCTION): added gsl_matrix_isnonneg diff -a -rc -C 2 -P gsl-1.11/matrix/Makefile.am gsl-1.12/matrix/Makefile.am *** gsl-1.11/matrix/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/matrix/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 4,10 **** pkginclude_HEADERS = gsl_matrix.h gsl_matrix_char.h gsl_matrix_complex_double.h gsl_matrix_complex_float.h gsl_matrix_complex_long_double.h gsl_matrix_double.h gsl_matrix_float.h gsl_matrix_int.h gsl_matrix_long.h gsl_matrix_long_double.h gsl_matrix_short.h gsl_matrix_uchar.h gsl_matrix_uint.h gsl_matrix_ulong.h gsl_matrix_ushort.h ! INCLUDES= -I$(top_builddir) -I$(top_srcdir) TESTS = $(check_PROGRAMS) --- 4,10 ---- pkginclude_HEADERS = gsl_matrix.h gsl_matrix_char.h gsl_matrix_complex_double.h gsl_matrix_complex_float.h gsl_matrix_complex_long_double.h gsl_matrix_double.h gsl_matrix_float.h gsl_matrix_int.h gsl_matrix_long.h gsl_matrix_long_double.h gsl_matrix_short.h gsl_matrix_uchar.h gsl_matrix_uint.h gsl_matrix_ulong.h gsl_matrix_ushort.h ! INCLUDES = -I$(top_srcdir) TESTS = $(check_PROGRAMS) *************** *** 17,23 **** CLEANFILES = test.txt test.dat ! noinst_HEADERS = matrix_source.c init_source.c file_source.c rowcol_source.c swap_source.c copy_source.c test_complex_source.c test_source.c minmax_source.c prop_source.c oper_source.c getset_source.c view_source.c submatrix_source.c oper_complex_source.c libgslmatrix_la_SOURCES = init.c matrix.c file.c rowcol.c swap.c copy.c minmax.c prop.c oper.c getset.c view.c submatrix.c view.h --- 17,23 ---- CLEANFILES = test.txt test.dat ! noinst_HEADERS = init_source.c file_source.c rowcol_source.c swap_source.c copy_source.c test_complex_source.c test_source.c minmax_source.c prop_source.c oper_source.c getset_source.c view_source.c submatrix_source.c oper_complex_source.c libgslmatrix_la_SOURCES = init.c matrix.c file.c rowcol.c swap.c copy.c minmax.c prop.c oper.c getset.c view.c submatrix.c view.h diff -a -rc -C 2 -P gsl-1.11/matrix/Makefile.in gsl-1.12/matrix/Makefile.in *** gsl-1.11/matrix/Makefile.in Sun Mar 30 12:07:06 2008 --- gsl-1.12/matrix/Makefile.in Mon Dec 15 14:55:13 2008 *************** *** 143,148 **** --- 143,149 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 150,156 **** --- 151,160 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 215,228 **** top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslmatrix.la pkginclude_HEADERS = gsl_matrix.h gsl_matrix_char.h gsl_matrix_complex_double.h gsl_matrix_complex_float.h gsl_matrix_complex_long_double.h gsl_matrix_double.h gsl_matrix_float.h gsl_matrix_int.h gsl_matrix_long.h gsl_matrix_long_double.h gsl_matrix_short.h gsl_matrix_uchar.h gsl_matrix_uint.h gsl_matrix_ulong.h gsl_matrix_ushort.h ! INCLUDES = -I$(top_builddir) -I$(top_srcdir) TESTS = $(check_PROGRAMS) test_LDADD = 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_static_LDADD = 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 test_static_SOURCES = test_static.c CLEANFILES = test.txt test.dat ! noinst_HEADERS = matrix_source.c init_source.c file_source.c rowcol_source.c swap_source.c copy_source.c test_complex_source.c test_source.c minmax_source.c prop_source.c oper_source.c getset_source.c view_source.c submatrix_source.c oper_complex_source.c libgslmatrix_la_SOURCES = init.c matrix.c file.c rowcol.c swap.c copy.c minmax.c prop.c oper.c getset.c view.c submatrix.c view.h all: all-am --- 219,232 ---- top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslmatrix.la pkginclude_HEADERS = gsl_matrix.h gsl_matrix_char.h gsl_matrix_complex_double.h gsl_matrix_complex_float.h gsl_matrix_complex_long_double.h gsl_matrix_double.h gsl_matrix_float.h gsl_matrix_int.h gsl_matrix_long.h gsl_matrix_long_double.h gsl_matrix_short.h gsl_matrix_uchar.h gsl_matrix_uint.h gsl_matrix_ulong.h gsl_matrix_ushort.h ! INCLUDES = -I$(top_srcdir) TESTS = $(check_PROGRAMS) test_LDADD = 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_static_LDADD = 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 test_static_SOURCES = test_static.c CLEANFILES = test.txt test.dat ! noinst_HEADERS = init_source.c file_source.c rowcol_source.c swap_source.c copy_source.c test_complex_source.c test_source.c minmax_source.c prop_source.c oper_source.c getset_source.c view_source.c submatrix_source.c oper_complex_source.c libgslmatrix_la_SOURCES = init.c matrix.c file.c rowcol.c swap.c copy.c minmax.c prop.c oper.c getset.c view.c submatrix.c view.h all: all-am diff -a -rc -C 2 -P gsl-1.11/matrix/gsl_matrix_char.h gsl-1.12/matrix/gsl_matrix_char.h *** gsl-1.11/matrix/gsl_matrix_char.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/matrix/gsl_matrix_char.h Thu Nov 27 20:03:28 2008 *************** *** 23,28 **** --- 23,29 ---- #include #include #include + #include #include #include *************** *** 204,215 **** /* Operations */ - char gsl_matrix_char_get(const gsl_matrix_char * m, const size_t i, const size_t j); - void gsl_matrix_char_set(gsl_matrix_char * m, const size_t i, const size_t j, const char x); - - char * gsl_matrix_char_ptr(gsl_matrix_char * m, const size_t i, const size_t j); - const char * gsl_matrix_char_const_ptr(const gsl_matrix_char * m, const size_t i, const size_t j); - void gsl_matrix_char_set_zero (gsl_matrix_char * m); void gsl_matrix_char_set_identity (gsl_matrix_char * m); void gsl_matrix_char_set_all (gsl_matrix_char * m, char x); --- 205,210 ---- *************** *** 256,328 **** int gsl_matrix_char_get_col(gsl_vector_char * v, const gsl_matrix_char * m, const size_t j); int gsl_matrix_char_set_row(gsl_matrix_char * m, const size_t i, const gsl_vector_char * v); int gsl_matrix_char_set_col(gsl_matrix_char * m, const size_t j, const gsl_vector_char * v); /* inline functions if you are using GCC */ #ifdef HAVE_INLINE ! extern inline char gsl_matrix_char_get(const gsl_matrix_char * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; } #endif return m->data[i * m->tda + j] ; } ! extern inline void gsl_matrix_char_set(gsl_matrix_char * m, const size_t i, const size_t j, const char x) { #if GSL_RANGE_CHECK ! if (i >= m->size1) { ! GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; } #endif m->data[i * m->tda + j] = x ; } ! extern inline char * gsl_matrix_char_ptr(gsl_matrix_char * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; } #endif return (char *) (m->data + (i * m->tda + j)) ; } ! extern inline const char * gsl_matrix_char_const_ptr(const gsl_matrix_char * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; } #endif return (const char *) (m->data + (i * m->tda + j)) ; --- 251,341 ---- int gsl_matrix_char_get_col(gsl_vector_char * v, const gsl_matrix_char * m, const size_t j); int gsl_matrix_char_set_row(gsl_matrix_char * m, const size_t i, const gsl_vector_char * v); int gsl_matrix_char_set_col(gsl_matrix_char * m, const size_t j, const gsl_vector_char * v); + /***********************************************************************/ /* inline functions if you are using GCC */ + INLINE_DECL char gsl_matrix_char_get(const gsl_matrix_char * m, const size_t i, const size_t j); + INLINE_DECL void gsl_matrix_char_set(gsl_matrix_char * m, const size_t i, const size_t j, const char x); + INLINE_DECL char * gsl_matrix_char_ptr(gsl_matrix_char * m, const size_t i, const size_t j); + INLINE_DECL const char * gsl_matrix_char_const_ptr(const gsl_matrix_char * m, const size_t i, const size_t j); + #ifdef HAVE_INLINE ! INLINE_FUN char gsl_matrix_char_get(const gsl_matrix_char * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; ! } } #endif return m->data[i * m->tda + j] ; } ! INLINE_FUN void gsl_matrix_char_set(gsl_matrix_char * m, const size_t i, const size_t j, const char x) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; ! } } #endif m->data[i * m->tda + j] = x ; } ! INLINE_FUN char * gsl_matrix_char_ptr(gsl_matrix_char * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; ! } } #endif return (char *) (m->data + (i * m->tda + j)) ; } ! INLINE_FUN const char * gsl_matrix_char_const_ptr(const gsl_matrix_char * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; ! } } #endif return (const char *) (m->data + (i * m->tda + j)) ; diff -a -rc -C 2 -P gsl-1.11/matrix/gsl_matrix_complex_double.h gsl-1.12/matrix/gsl_matrix_complex_double.h *** gsl-1.11/matrix/gsl_matrix_complex_double.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/matrix/gsl_matrix_complex_double.h Thu Nov 27 20:03:28 2008 *************** *** 205,216 **** /* Operations */ - gsl_complex gsl_matrix_complex_get(const gsl_matrix_complex * m, const size_t i, const size_t j); - void gsl_matrix_complex_set(gsl_matrix_complex * m, const size_t i, const size_t j, const gsl_complex x); - - gsl_complex * gsl_matrix_complex_ptr(gsl_matrix_complex * m, const size_t i, const size_t j); - const gsl_complex * gsl_matrix_complex_const_ptr(const gsl_matrix_complex * m, const size_t i, const size_t j); - void gsl_matrix_complex_set_zero (gsl_matrix_complex * m); void gsl_matrix_complex_set_identity (gsl_matrix_complex * m); void gsl_matrix_complex_set_all (gsl_matrix_complex * m, gsl_complex x); --- 205,210 ---- *************** *** 233,238 **** --- 227,233 ---- int gsl_matrix_complex_isnull (const gsl_matrix_complex * m); int gsl_matrix_complex_ispos (const gsl_matrix_complex * m); int gsl_matrix_complex_isneg (const gsl_matrix_complex * m); + int gsl_matrix_complex_isnonneg (const gsl_matrix_complex * m); int gsl_matrix_complex_add (gsl_matrix_complex * a, const gsl_matrix_complex * b); int gsl_matrix_complex_sub (gsl_matrix_complex * a, const gsl_matrix_complex * b); *************** *** 249,326 **** int gsl_matrix_complex_get_col(gsl_vector_complex * v, const gsl_matrix_complex * m, const size_t j); int gsl_matrix_complex_set_row(gsl_matrix_complex * m, const size_t i, const gsl_vector_complex * v); int gsl_matrix_complex_set_col(gsl_matrix_complex * m, const size_t j, const gsl_vector_complex * v); #ifdef HAVE_INLINE ! extern inline gsl_complex gsl_matrix_complex_get(const gsl_matrix_complex * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! gsl_complex zero = {{0,0}}; ! ! if (i >= m->size1) ! { ! GSL_ERROR_VAL("first index out of range", GSL_EINVAL, zero) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_VAL("second index out of range", GSL_EINVAL, zero) ; } #endif return *(gsl_complex *)(m->data + 2*(i * m->tda + j)) ; } ! extern inline void gsl_matrix_complex_set(gsl_matrix_complex * m, const size_t i, const size_t j, const gsl_complex x) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; } #endif *(gsl_complex *)(m->data + 2*(i * m->tda + j)) = x ; } ! extern inline gsl_complex * gsl_matrix_complex_ptr(gsl_matrix_complex * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; } #endif return (gsl_complex *)(m->data + 2*(i * m->tda + j)) ; } ! extern inline const gsl_complex * gsl_matrix_complex_const_ptr(const gsl_matrix_complex * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; } #endif return (const gsl_complex *)(m->data + 2*(i * m->tda + j)) ; --- 244,342 ---- int gsl_matrix_complex_get_col(gsl_vector_complex * v, const gsl_matrix_complex * m, const size_t j); int gsl_matrix_complex_set_row(gsl_matrix_complex * m, const size_t i, const gsl_vector_complex * v); int gsl_matrix_complex_set_col(gsl_matrix_complex * m, const size_t j, const gsl_vector_complex * v); + /***********************************************************************/ + + /* inline functions if you are using GCC */ + + INLINE_DECL gsl_complex gsl_matrix_complex_get(const gsl_matrix_complex * m, const size_t i, const size_t j); + INLINE_DECL void gsl_matrix_complex_set(gsl_matrix_complex * m, const size_t i, const size_t j, const gsl_complex x); + + INLINE_DECL gsl_complex * gsl_matrix_complex_ptr(gsl_matrix_complex * m, const size_t i, const size_t j); + INLINE_DECL const gsl_complex * gsl_matrix_complex_const_ptr(const gsl_matrix_complex * m, const size_t i, const size_t j); #ifdef HAVE_INLINE ! INLINE_FUN gsl_complex gsl_matrix_complex_get(const gsl_matrix_complex * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! gsl_complex zero = {{0,0}}; ! ! if (i >= m->size1) ! { ! GSL_ERROR_VAL("first index out of range", GSL_EINVAL, zero) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VAL("second index out of range", GSL_EINVAL, zero) ; ! } } #endif return *(gsl_complex *)(m->data + 2*(i * m->tda + j)) ; } ! INLINE_FUN void gsl_matrix_complex_set(gsl_matrix_complex * m, const size_t i, const size_t j, const gsl_complex x) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; ! } } #endif *(gsl_complex *)(m->data + 2*(i * m->tda + j)) = x ; } ! INLINE_FUN gsl_complex * gsl_matrix_complex_ptr(gsl_matrix_complex * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; ! } } #endif return (gsl_complex *)(m->data + 2*(i * m->tda + j)) ; } ! INLINE_FUN const gsl_complex * gsl_matrix_complex_const_ptr(const gsl_matrix_complex * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; ! } } #endif return (const gsl_complex *)(m->data + 2*(i * m->tda + j)) ; diff -a -rc -C 2 -P gsl-1.11/matrix/gsl_matrix_complex_float.h gsl-1.12/matrix/gsl_matrix_complex_float.h *** gsl-1.11/matrix/gsl_matrix_complex_float.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/matrix/gsl_matrix_complex_float.h Thu Nov 27 20:03:28 2008 *************** *** 205,216 **** /* Operations */ - gsl_complex_float gsl_matrix_complex_float_get(const gsl_matrix_complex_float * m, const size_t i, const size_t j); - void gsl_matrix_complex_float_set(gsl_matrix_complex_float * m, const size_t i, const size_t j, const gsl_complex_float x); - - gsl_complex_float * gsl_matrix_complex_float_ptr(gsl_matrix_complex_float * m, const size_t i, const size_t j); - const gsl_complex_float * gsl_matrix_complex_float_const_ptr(const gsl_matrix_complex_float * m, const size_t i, const size_t j); - void gsl_matrix_complex_float_set_zero (gsl_matrix_complex_float * m); void gsl_matrix_complex_float_set_identity (gsl_matrix_complex_float * m); void gsl_matrix_complex_float_set_all (gsl_matrix_complex_float * m, gsl_complex_float x); --- 205,210 ---- *************** *** 233,238 **** --- 227,233 ---- int gsl_matrix_complex_float_isnull (const gsl_matrix_complex_float * m); int gsl_matrix_complex_float_ispos (const gsl_matrix_complex_float * m); int gsl_matrix_complex_float_isneg (const gsl_matrix_complex_float * m); + int gsl_matrix_complex_float_isnonneg (const gsl_matrix_complex_float * m); int gsl_matrix_complex_float_add (gsl_matrix_complex_float * a, const gsl_matrix_complex_float * b); int gsl_matrix_complex_float_sub (gsl_matrix_complex_float * a, const gsl_matrix_complex_float * b); *************** *** 249,326 **** int gsl_matrix_complex_float_get_col(gsl_vector_complex_float * v, const gsl_matrix_complex_float * m, const size_t j); int gsl_matrix_complex_float_set_row(gsl_matrix_complex_float * m, const size_t i, const gsl_vector_complex_float * v); int gsl_matrix_complex_float_set_col(gsl_matrix_complex_float * m, const size_t j, const gsl_vector_complex_float * v); #ifdef HAVE_INLINE ! extern inline gsl_complex_float gsl_matrix_complex_float_get(const gsl_matrix_complex_float * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! gsl_complex_float zero = {{0,0}}; ! ! if (i >= m->size1) ! { ! GSL_ERROR_VAL("first index out of range", GSL_EINVAL, zero) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_VAL("second index out of range", GSL_EINVAL, zero) ; } #endif return *(gsl_complex_float *)(m->data + 2*(i * m->tda + j)) ; } ! extern inline void gsl_matrix_complex_float_set(gsl_matrix_complex_float * m, const size_t i, const size_t j, const gsl_complex_float x) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; } #endif *(gsl_complex_float *)(m->data + 2*(i * m->tda + j)) = x ; } ! extern inline gsl_complex_float * gsl_matrix_complex_float_ptr(gsl_matrix_complex_float * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; } #endif return (gsl_complex_float *)(m->data + 2*(i * m->tda + j)) ; } ! extern inline const gsl_complex_float * gsl_matrix_complex_float_const_ptr(const gsl_matrix_complex_float * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; } #endif return (const gsl_complex_float *)(m->data + 2*(i * m->tda + j)) ; --- 244,342 ---- int gsl_matrix_complex_float_get_col(gsl_vector_complex_float * v, const gsl_matrix_complex_float * m, const size_t j); int gsl_matrix_complex_float_set_row(gsl_matrix_complex_float * m, const size_t i, const gsl_vector_complex_float * v); int gsl_matrix_complex_float_set_col(gsl_matrix_complex_float * m, const size_t j, const gsl_vector_complex_float * v); + /***********************************************************************/ + + /* inline functions if you are using GCC */ + + INLINE_DECL gsl_complex_float gsl_matrix_complex_float_get(const gsl_matrix_complex_float * m, const size_t i, const size_t j); + INLINE_DECL void gsl_matrix_complex_float_set(gsl_matrix_complex_float * m, const size_t i, const size_t j, const gsl_complex_float x); + + INLINE_DECL gsl_complex_float * gsl_matrix_complex_float_ptr(gsl_matrix_complex_float * m, const size_t i, const size_t j); + INLINE_DECL const gsl_complex_float * gsl_matrix_complex_float_const_ptr(const gsl_matrix_complex_float * m, const size_t i, const size_t j); #ifdef HAVE_INLINE ! INLINE_FUN gsl_complex_float gsl_matrix_complex_float_get(const gsl_matrix_complex_float * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! gsl_complex_float zero = {{0,0}}; ! ! if (i >= m->size1) ! { ! GSL_ERROR_VAL("first index out of range", GSL_EINVAL, zero) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VAL("second index out of range", GSL_EINVAL, zero) ; ! } } #endif return *(gsl_complex_float *)(m->data + 2*(i * m->tda + j)) ; } ! INLINE_FUN void gsl_matrix_complex_float_set(gsl_matrix_complex_float * m, const size_t i, const size_t j, const gsl_complex_float x) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; ! } } #endif *(gsl_complex_float *)(m->data + 2*(i * m->tda + j)) = x ; } ! INLINE_FUN gsl_complex_float * gsl_matrix_complex_float_ptr(gsl_matrix_complex_float * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; ! } } #endif return (gsl_complex_float *)(m->data + 2*(i * m->tda + j)) ; } ! INLINE_FUN const gsl_complex_float * gsl_matrix_complex_float_const_ptr(const gsl_matrix_complex_float * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; ! } } #endif return (const gsl_complex_float *)(m->data + 2*(i * m->tda + j)) ; diff -a -rc -C 2 -P gsl-1.11/matrix/gsl_matrix_complex_long_double.h gsl-1.12/matrix/gsl_matrix_complex_long_double.h *** gsl-1.11/matrix/gsl_matrix_complex_long_double.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/matrix/gsl_matrix_complex_long_double.h Thu Nov 27 20:03:28 2008 *************** *** 205,216 **** /* Operations */ - gsl_complex_long_double gsl_matrix_complex_long_double_get(const gsl_matrix_complex_long_double * m, const size_t i, const size_t j); - void gsl_matrix_complex_long_double_set(gsl_matrix_complex_long_double * m, const size_t i, const size_t j, const gsl_complex_long_double x); - - gsl_complex_long_double * gsl_matrix_complex_long_double_ptr(gsl_matrix_complex_long_double * m, const size_t i, const size_t j); - const gsl_complex_long_double * gsl_matrix_complex_long_double_const_ptr(const gsl_matrix_complex_long_double * m, const size_t i, const size_t j); - void gsl_matrix_complex_long_double_set_zero (gsl_matrix_complex_long_double * m); void gsl_matrix_complex_long_double_set_identity (gsl_matrix_complex_long_double * m); void gsl_matrix_complex_long_double_set_all (gsl_matrix_complex_long_double * m, gsl_complex_long_double x); --- 205,210 ---- *************** *** 233,238 **** --- 227,233 ---- int gsl_matrix_complex_long_double_isnull (const gsl_matrix_complex_long_double * m); int gsl_matrix_complex_long_double_ispos (const gsl_matrix_complex_long_double * m); int gsl_matrix_complex_long_double_isneg (const gsl_matrix_complex_long_double * m); + int gsl_matrix_complex_long_double_isnonneg (const gsl_matrix_complex_long_double * m); int gsl_matrix_complex_long_double_add (gsl_matrix_complex_long_double * a, const gsl_matrix_complex_long_double * b); int gsl_matrix_complex_long_double_sub (gsl_matrix_complex_long_double * a, const gsl_matrix_complex_long_double * b); *************** *** 249,326 **** int gsl_matrix_complex_long_double_get_col(gsl_vector_complex_long_double * v, const gsl_matrix_complex_long_double * m, const size_t j); int gsl_matrix_complex_long_double_set_row(gsl_matrix_complex_long_double * m, const size_t i, const gsl_vector_complex_long_double * v); int gsl_matrix_complex_long_double_set_col(gsl_matrix_complex_long_double * m, const size_t j, const gsl_vector_complex_long_double * v); #ifdef HAVE_INLINE ! extern inline gsl_complex_long_double gsl_matrix_complex_long_double_get(const gsl_matrix_complex_long_double * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! gsl_complex_long_double zero = {{0,0}}; ! ! if (i >= m->size1) ! { ! GSL_ERROR_VAL("first index out of range", GSL_EINVAL, zero) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_VAL("second index out of range", GSL_EINVAL, zero) ; } #endif return *(gsl_complex_long_double *)(m->data + 2*(i * m->tda + j)) ; } ! extern inline void gsl_matrix_complex_long_double_set(gsl_matrix_complex_long_double * m, const size_t i, const size_t j, const gsl_complex_long_double x) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; } #endif *(gsl_complex_long_double *)(m->data + 2*(i * m->tda + j)) = x ; } ! extern inline gsl_complex_long_double * gsl_matrix_complex_long_double_ptr(gsl_matrix_complex_long_double * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; } #endif return (gsl_complex_long_double *)(m->data + 2*(i * m->tda + j)) ; } ! extern inline const gsl_complex_long_double * gsl_matrix_complex_long_double_const_ptr(const gsl_matrix_complex_long_double * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; } #endif return (const gsl_complex_long_double *)(m->data + 2*(i * m->tda + j)) ; --- 244,342 ---- int gsl_matrix_complex_long_double_get_col(gsl_vector_complex_long_double * v, const gsl_matrix_complex_long_double * m, const size_t j); int gsl_matrix_complex_long_double_set_row(gsl_matrix_complex_long_double * m, const size_t i, const gsl_vector_complex_long_double * v); int gsl_matrix_complex_long_double_set_col(gsl_matrix_complex_long_double * m, const size_t j, const gsl_vector_complex_long_double * v); + /***********************************************************************/ + + /* inline functions if you are using GCC */ + + INLINE_DECL gsl_complex_long_double gsl_matrix_complex_long_double_get(const gsl_matrix_complex_long_double * m, const size_t i, const size_t j); + INLINE_DECL void gsl_matrix_complex_long_double_set(gsl_matrix_complex_long_double * m, const size_t i, const size_t j, const gsl_complex_long_double x); + + INLINE_DECL gsl_complex_long_double * gsl_matrix_complex_long_double_ptr(gsl_matrix_complex_long_double * m, const size_t i, const size_t j); + INLINE_DECL const gsl_complex_long_double * gsl_matrix_complex_long_double_const_ptr(const gsl_matrix_complex_long_double * m, const size_t i, const size_t j); #ifdef HAVE_INLINE ! INLINE_FUN gsl_complex_long_double gsl_matrix_complex_long_double_get(const gsl_matrix_complex_long_double * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! gsl_complex_long_double zero = {{0,0}}; ! ! if (i >= m->size1) ! { ! GSL_ERROR_VAL("first index out of range", GSL_EINVAL, zero) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VAL("second index out of range", GSL_EINVAL, zero) ; ! } } #endif return *(gsl_complex_long_double *)(m->data + 2*(i * m->tda + j)) ; } ! INLINE_FUN void gsl_matrix_complex_long_double_set(gsl_matrix_complex_long_double * m, const size_t i, const size_t j, const gsl_complex_long_double x) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; ! } } #endif *(gsl_complex_long_double *)(m->data + 2*(i * m->tda + j)) = x ; } ! INLINE_FUN gsl_complex_long_double * gsl_matrix_complex_long_double_ptr(gsl_matrix_complex_long_double * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; ! } } #endif return (gsl_complex_long_double *)(m->data + 2*(i * m->tda + j)) ; } ! INLINE_FUN const gsl_complex_long_double * gsl_matrix_complex_long_double_const_ptr(const gsl_matrix_complex_long_double * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; ! } } #endif return (const gsl_complex_long_double *)(m->data + 2*(i * m->tda + j)) ; diff -a -rc -C 2 -P gsl-1.11/matrix/gsl_matrix_double.h gsl-1.12/matrix/gsl_matrix_double.h *** gsl-1.11/matrix/gsl_matrix_double.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/matrix/gsl_matrix_double.h Thu Nov 27 20:03:28 2008 *************** *** 23,28 **** --- 23,29 ---- #include #include #include + #include #include #include *************** *** 204,215 **** /* Operations */ - double gsl_matrix_get(const gsl_matrix * m, const size_t i, const size_t j); - void gsl_matrix_set(gsl_matrix * m, const size_t i, const size_t j, const double x); - - double * gsl_matrix_ptr(gsl_matrix * m, const size_t i, const size_t j); - const double * gsl_matrix_const_ptr(const gsl_matrix * m, const size_t i, const size_t j); - void gsl_matrix_set_zero (gsl_matrix * m); void gsl_matrix_set_identity (gsl_matrix * m); void gsl_matrix_set_all (gsl_matrix * m, double x); --- 205,210 ---- *************** *** 256,328 **** int gsl_matrix_get_col(gsl_vector * v, const gsl_matrix * m, const size_t j); int gsl_matrix_set_row(gsl_matrix * m, const size_t i, const gsl_vector * v); int gsl_matrix_set_col(gsl_matrix * m, const size_t j, const gsl_vector * v); /* inline functions if you are using GCC */ #ifdef HAVE_INLINE ! extern inline double gsl_matrix_get(const gsl_matrix * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; } #endif return m->data[i * m->tda + j] ; } ! extern inline void gsl_matrix_set(gsl_matrix * m, const size_t i, const size_t j, const double x) { #if GSL_RANGE_CHECK ! if (i >= m->size1) { ! GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; } #endif m->data[i * m->tda + j] = x ; } ! extern inline double * gsl_matrix_ptr(gsl_matrix * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; } #endif return (double *) (m->data + (i * m->tda + j)) ; } ! extern inline const double * gsl_matrix_const_ptr(const gsl_matrix * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; } #endif return (const double *) (m->data + (i * m->tda + j)) ; --- 251,341 ---- int gsl_matrix_get_col(gsl_vector * v, const gsl_matrix * m, const size_t j); int gsl_matrix_set_row(gsl_matrix * m, const size_t i, const gsl_vector * v); int gsl_matrix_set_col(gsl_matrix * m, const size_t j, const gsl_vector * v); + /***********************************************************************/ /* inline functions if you are using GCC */ + INLINE_DECL double gsl_matrix_get(const gsl_matrix * m, const size_t i, const size_t j); + INLINE_DECL void gsl_matrix_set(gsl_matrix * m, const size_t i, const size_t j, const double x); + INLINE_DECL double * gsl_matrix_ptr(gsl_matrix * m, const size_t i, const size_t j); + INLINE_DECL const double * gsl_matrix_const_ptr(const gsl_matrix * m, const size_t i, const size_t j); + #ifdef HAVE_INLINE ! INLINE_FUN double gsl_matrix_get(const gsl_matrix * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; ! } } #endif return m->data[i * m->tda + j] ; } ! INLINE_FUN void gsl_matrix_set(gsl_matrix * m, const size_t i, const size_t j, const double x) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; ! } } #endif m->data[i * m->tda + j] = x ; } ! INLINE_FUN double * gsl_matrix_ptr(gsl_matrix * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; ! } } #endif return (double *) (m->data + (i * m->tda + j)) ; } ! INLINE_FUN const double * gsl_matrix_const_ptr(const gsl_matrix * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; ! } } #endif return (const double *) (m->data + (i * m->tda + j)) ; diff -a -rc -C 2 -P gsl-1.11/matrix/gsl_matrix_float.h gsl-1.12/matrix/gsl_matrix_float.h *** gsl-1.11/matrix/gsl_matrix_float.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/matrix/gsl_matrix_float.h Thu Nov 27 20:03:28 2008 *************** *** 23,28 **** --- 23,29 ---- #include #include #include + #include #include #include *************** *** 204,215 **** /* Operations */ - float gsl_matrix_float_get(const gsl_matrix_float * m, const size_t i, const size_t j); - void gsl_matrix_float_set(gsl_matrix_float * m, const size_t i, const size_t j, const float x); - - float * gsl_matrix_float_ptr(gsl_matrix_float * m, const size_t i, const size_t j); - const float * gsl_matrix_float_const_ptr(const gsl_matrix_float * m, const size_t i, const size_t j); - void gsl_matrix_float_set_zero (gsl_matrix_float * m); void gsl_matrix_float_set_identity (gsl_matrix_float * m); void gsl_matrix_float_set_all (gsl_matrix_float * m, float x); --- 205,210 ---- *************** *** 256,328 **** int gsl_matrix_float_get_col(gsl_vector_float * v, const gsl_matrix_float * m, const size_t j); int gsl_matrix_float_set_row(gsl_matrix_float * m, const size_t i, const gsl_vector_float * v); int gsl_matrix_float_set_col(gsl_matrix_float * m, const size_t j, const gsl_vector_float * v); /* inline functions if you are using GCC */ #ifdef HAVE_INLINE ! extern inline float gsl_matrix_float_get(const gsl_matrix_float * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; } #endif return m->data[i * m->tda + j] ; } ! extern inline void gsl_matrix_float_set(gsl_matrix_float * m, const size_t i, const size_t j, const float x) { #if GSL_RANGE_CHECK ! if (i >= m->size1) { ! GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; } #endif m->data[i * m->tda + j] = x ; } ! extern inline float * gsl_matrix_float_ptr(gsl_matrix_float * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; } #endif return (float *) (m->data + (i * m->tda + j)) ; } ! extern inline const float * gsl_matrix_float_const_ptr(const gsl_matrix_float * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; } #endif return (const float *) (m->data + (i * m->tda + j)) ; --- 251,341 ---- int gsl_matrix_float_get_col(gsl_vector_float * v, const gsl_matrix_float * m, const size_t j); int gsl_matrix_float_set_row(gsl_matrix_float * m, const size_t i, const gsl_vector_float * v); int gsl_matrix_float_set_col(gsl_matrix_float * m, const size_t j, const gsl_vector_float * v); + /***********************************************************************/ /* inline functions if you are using GCC */ + INLINE_DECL float gsl_matrix_float_get(const gsl_matrix_float * m, const size_t i, const size_t j); + INLINE_DECL void gsl_matrix_float_set(gsl_matrix_float * m, const size_t i, const size_t j, const float x); + INLINE_DECL float * gsl_matrix_float_ptr(gsl_matrix_float * m, const size_t i, const size_t j); + INLINE_DECL const float * gsl_matrix_float_const_ptr(const gsl_matrix_float * m, const size_t i, const size_t j); + #ifdef HAVE_INLINE ! INLINE_FUN float gsl_matrix_float_get(const gsl_matrix_float * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; ! } } #endif return m->data[i * m->tda + j] ; } ! INLINE_FUN void gsl_matrix_float_set(gsl_matrix_float * m, const size_t i, const size_t j, const float x) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; ! } } #endif m->data[i * m->tda + j] = x ; } ! INLINE_FUN float * gsl_matrix_float_ptr(gsl_matrix_float * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; ! } } #endif return (float *) (m->data + (i * m->tda + j)) ; } ! INLINE_FUN const float * gsl_matrix_float_const_ptr(const gsl_matrix_float * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; ! } } #endif return (const float *) (m->data + (i * m->tda + j)) ; diff -a -rc -C 2 -P gsl-1.11/matrix/gsl_matrix_int.h gsl-1.12/matrix/gsl_matrix_int.h *** gsl-1.11/matrix/gsl_matrix_int.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/matrix/gsl_matrix_int.h Thu Nov 27 20:03:28 2008 *************** *** 23,28 **** --- 23,29 ---- #include #include #include + #include #include #include *************** *** 204,215 **** /* Operations */ - int gsl_matrix_int_get(const gsl_matrix_int * m, const size_t i, const size_t j); - void gsl_matrix_int_set(gsl_matrix_int * m, const size_t i, const size_t j, const int x); - - int * gsl_matrix_int_ptr(gsl_matrix_int * m, const size_t i, const size_t j); - const int * gsl_matrix_int_const_ptr(const gsl_matrix_int * m, const size_t i, const size_t j); - void gsl_matrix_int_set_zero (gsl_matrix_int * m); void gsl_matrix_int_set_identity (gsl_matrix_int * m); void gsl_matrix_int_set_all (gsl_matrix_int * m, int x); --- 205,210 ---- *************** *** 256,328 **** int gsl_matrix_int_get_col(gsl_vector_int * v, const gsl_matrix_int * m, const size_t j); int gsl_matrix_int_set_row(gsl_matrix_int * m, const size_t i, const gsl_vector_int * v); int gsl_matrix_int_set_col(gsl_matrix_int * m, const size_t j, const gsl_vector_int * v); /* inline functions if you are using GCC */ #ifdef HAVE_INLINE ! extern inline int gsl_matrix_int_get(const gsl_matrix_int * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; } #endif return m->data[i * m->tda + j] ; } ! extern inline void gsl_matrix_int_set(gsl_matrix_int * m, const size_t i, const size_t j, const int x) { #if GSL_RANGE_CHECK ! if (i >= m->size1) { ! GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; } #endif m->data[i * m->tda + j] = x ; } ! extern inline int * gsl_matrix_int_ptr(gsl_matrix_int * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; } #endif return (int *) (m->data + (i * m->tda + j)) ; } ! extern inline const int * gsl_matrix_int_const_ptr(const gsl_matrix_int * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; } #endif return (const int *) (m->data + (i * m->tda + j)) ; --- 251,341 ---- int gsl_matrix_int_get_col(gsl_vector_int * v, const gsl_matrix_int * m, const size_t j); int gsl_matrix_int_set_row(gsl_matrix_int * m, const size_t i, const gsl_vector_int * v); int gsl_matrix_int_set_col(gsl_matrix_int * m, const size_t j, const gsl_vector_int * v); + /***********************************************************************/ /* inline functions if you are using GCC */ + INLINE_DECL int gsl_matrix_int_get(const gsl_matrix_int * m, const size_t i, const size_t j); + INLINE_DECL void gsl_matrix_int_set(gsl_matrix_int * m, const size_t i, const size_t j, const int x); + INLINE_DECL int * gsl_matrix_int_ptr(gsl_matrix_int * m, const size_t i, const size_t j); + INLINE_DECL const int * gsl_matrix_int_const_ptr(const gsl_matrix_int * m, const size_t i, const size_t j); + #ifdef HAVE_INLINE ! INLINE_FUN int gsl_matrix_int_get(const gsl_matrix_int * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; ! } } #endif return m->data[i * m->tda + j] ; } ! INLINE_FUN void gsl_matrix_int_set(gsl_matrix_int * m, const size_t i, const size_t j, const int x) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; ! } } #endif m->data[i * m->tda + j] = x ; } ! INLINE_FUN int * gsl_matrix_int_ptr(gsl_matrix_int * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; ! } } #endif return (int *) (m->data + (i * m->tda + j)) ; } ! INLINE_FUN const int * gsl_matrix_int_const_ptr(const gsl_matrix_int * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; ! } } #endif return (const int *) (m->data + (i * m->tda + j)) ; diff -a -rc -C 2 -P gsl-1.11/matrix/gsl_matrix_long.h gsl-1.12/matrix/gsl_matrix_long.h *** gsl-1.11/matrix/gsl_matrix_long.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/matrix/gsl_matrix_long.h Thu Nov 27 20:03:28 2008 *************** *** 23,28 **** --- 23,29 ---- #include #include #include + #include #include #include *************** *** 204,215 **** /* Operations */ - long gsl_matrix_long_get(const gsl_matrix_long * m, const size_t i, const size_t j); - void gsl_matrix_long_set(gsl_matrix_long * m, const size_t i, const size_t j, const long x); - - long * gsl_matrix_long_ptr(gsl_matrix_long * m, const size_t i, const size_t j); - const long * gsl_matrix_long_const_ptr(const gsl_matrix_long * m, const size_t i, const size_t j); - void gsl_matrix_long_set_zero (gsl_matrix_long * m); void gsl_matrix_long_set_identity (gsl_matrix_long * m); void gsl_matrix_long_set_all (gsl_matrix_long * m, long x); --- 205,210 ---- *************** *** 256,328 **** int gsl_matrix_long_get_col(gsl_vector_long * v, const gsl_matrix_long * m, const size_t j); int gsl_matrix_long_set_row(gsl_matrix_long * m, const size_t i, const gsl_vector_long * v); int gsl_matrix_long_set_col(gsl_matrix_long * m, const size_t j, const gsl_vector_long * v); /* inline functions if you are using GCC */ #ifdef HAVE_INLINE ! extern inline long gsl_matrix_long_get(const gsl_matrix_long * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; } #endif return m->data[i * m->tda + j] ; } ! extern inline void gsl_matrix_long_set(gsl_matrix_long * m, const size_t i, const size_t j, const long x) { #if GSL_RANGE_CHECK ! if (i >= m->size1) { ! GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; } #endif m->data[i * m->tda + j] = x ; } ! extern inline long * gsl_matrix_long_ptr(gsl_matrix_long * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; } #endif return (long *) (m->data + (i * m->tda + j)) ; } ! extern inline const long * gsl_matrix_long_const_ptr(const gsl_matrix_long * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; } #endif return (const long *) (m->data + (i * m->tda + j)) ; --- 251,341 ---- int gsl_matrix_long_get_col(gsl_vector_long * v, const gsl_matrix_long * m, const size_t j); int gsl_matrix_long_set_row(gsl_matrix_long * m, const size_t i, const gsl_vector_long * v); int gsl_matrix_long_set_col(gsl_matrix_long * m, const size_t j, const gsl_vector_long * v); + /***********************************************************************/ /* inline functions if you are using GCC */ + INLINE_DECL long gsl_matrix_long_get(const gsl_matrix_long * m, const size_t i, const size_t j); + INLINE_DECL void gsl_matrix_long_set(gsl_matrix_long * m, const size_t i, const size_t j, const long x); + INLINE_DECL long * gsl_matrix_long_ptr(gsl_matrix_long * m, const size_t i, const size_t j); + INLINE_DECL const long * gsl_matrix_long_const_ptr(const gsl_matrix_long * m, const size_t i, const size_t j); + #ifdef HAVE_INLINE ! INLINE_FUN long gsl_matrix_long_get(const gsl_matrix_long * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; ! } } #endif return m->data[i * m->tda + j] ; } ! INLINE_FUN void gsl_matrix_long_set(gsl_matrix_long * m, const size_t i, const size_t j, const long x) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; ! } } #endif m->data[i * m->tda + j] = x ; } ! INLINE_FUN long * gsl_matrix_long_ptr(gsl_matrix_long * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; ! } } #endif return (long *) (m->data + (i * m->tda + j)) ; } ! INLINE_FUN const long * gsl_matrix_long_const_ptr(const gsl_matrix_long * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; ! } } #endif return (const long *) (m->data + (i * m->tda + j)) ; diff -a -rc -C 2 -P gsl-1.11/matrix/gsl_matrix_long_double.h gsl-1.12/matrix/gsl_matrix_long_double.h *** gsl-1.11/matrix/gsl_matrix_long_double.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/matrix/gsl_matrix_long_double.h Thu Nov 27 20:03:28 2008 *************** *** 23,28 **** --- 23,29 ---- #include #include #include + #include #include #include *************** *** 204,215 **** /* Operations */ - long double gsl_matrix_long_double_get(const gsl_matrix_long_double * m, const size_t i, const size_t j); - void gsl_matrix_long_double_set(gsl_matrix_long_double * m, const size_t i, const size_t j, const long double x); - - long double * gsl_matrix_long_double_ptr(gsl_matrix_long_double * m, const size_t i, const size_t j); - const long double * gsl_matrix_long_double_const_ptr(const gsl_matrix_long_double * m, const size_t i, const size_t j); - void gsl_matrix_long_double_set_zero (gsl_matrix_long_double * m); void gsl_matrix_long_double_set_identity (gsl_matrix_long_double * m); void gsl_matrix_long_double_set_all (gsl_matrix_long_double * m, long double x); --- 205,210 ---- *************** *** 256,328 **** int gsl_matrix_long_double_get_col(gsl_vector_long_double * v, const gsl_matrix_long_double * m, const size_t j); int gsl_matrix_long_double_set_row(gsl_matrix_long_double * m, const size_t i, const gsl_vector_long_double * v); int gsl_matrix_long_double_set_col(gsl_matrix_long_double * m, const size_t j, const gsl_vector_long_double * v); /* inline functions if you are using GCC */ #ifdef HAVE_INLINE ! extern inline long double gsl_matrix_long_double_get(const gsl_matrix_long_double * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; } #endif return m->data[i * m->tda + j] ; } ! extern inline void gsl_matrix_long_double_set(gsl_matrix_long_double * m, const size_t i, const size_t j, const long double x) { #if GSL_RANGE_CHECK ! if (i >= m->size1) { ! GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; } #endif m->data[i * m->tda + j] = x ; } ! extern inline long double * gsl_matrix_long_double_ptr(gsl_matrix_long_double * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; } #endif return (long double *) (m->data + (i * m->tda + j)) ; } ! extern inline const long double * gsl_matrix_long_double_const_ptr(const gsl_matrix_long_double * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; } #endif return (const long double *) (m->data + (i * m->tda + j)) ; --- 251,341 ---- int gsl_matrix_long_double_get_col(gsl_vector_long_double * v, const gsl_matrix_long_double * m, const size_t j); int gsl_matrix_long_double_set_row(gsl_matrix_long_double * m, const size_t i, const gsl_vector_long_double * v); int gsl_matrix_long_double_set_col(gsl_matrix_long_double * m, const size_t j, const gsl_vector_long_double * v); + /***********************************************************************/ /* inline functions if you are using GCC */ + INLINE_DECL long double gsl_matrix_long_double_get(const gsl_matrix_long_double * m, const size_t i, const size_t j); + INLINE_DECL void gsl_matrix_long_double_set(gsl_matrix_long_double * m, const size_t i, const size_t j, const long double x); + INLINE_DECL long double * gsl_matrix_long_double_ptr(gsl_matrix_long_double * m, const size_t i, const size_t j); + INLINE_DECL const long double * gsl_matrix_long_double_const_ptr(const gsl_matrix_long_double * m, const size_t i, const size_t j); + #ifdef HAVE_INLINE ! INLINE_FUN long double gsl_matrix_long_double_get(const gsl_matrix_long_double * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; ! } } #endif return m->data[i * m->tda + j] ; } ! INLINE_FUN void gsl_matrix_long_double_set(gsl_matrix_long_double * m, const size_t i, const size_t j, const long double x) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; ! } } #endif m->data[i * m->tda + j] = x ; } ! INLINE_FUN long double * gsl_matrix_long_double_ptr(gsl_matrix_long_double * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; ! } } #endif return (long double *) (m->data + (i * m->tda + j)) ; } ! INLINE_FUN const long double * gsl_matrix_long_double_const_ptr(const gsl_matrix_long_double * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; ! } } #endif return (const long double *) (m->data + (i * m->tda + j)) ; diff -a -rc -C 2 -P gsl-1.11/matrix/gsl_matrix_short.h gsl-1.12/matrix/gsl_matrix_short.h *** gsl-1.11/matrix/gsl_matrix_short.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/matrix/gsl_matrix_short.h Thu Nov 27 20:03:28 2008 *************** *** 23,28 **** --- 23,29 ---- #include #include #include + #include #include #include *************** *** 204,215 **** /* Operations */ - short gsl_matrix_short_get(const gsl_matrix_short * m, const size_t i, const size_t j); - void gsl_matrix_short_set(gsl_matrix_short * m, const size_t i, const size_t j, const short x); - - short * gsl_matrix_short_ptr(gsl_matrix_short * m, const size_t i, const size_t j); - const short * gsl_matrix_short_const_ptr(const gsl_matrix_short * m, const size_t i, const size_t j); - void gsl_matrix_short_set_zero (gsl_matrix_short * m); void gsl_matrix_short_set_identity (gsl_matrix_short * m); void gsl_matrix_short_set_all (gsl_matrix_short * m, short x); --- 205,210 ---- *************** *** 256,328 **** int gsl_matrix_short_get_col(gsl_vector_short * v, const gsl_matrix_short * m, const size_t j); int gsl_matrix_short_set_row(gsl_matrix_short * m, const size_t i, const gsl_vector_short * v); int gsl_matrix_short_set_col(gsl_matrix_short * m, const size_t j, const gsl_vector_short * v); /* inline functions if you are using GCC */ #ifdef HAVE_INLINE ! extern inline short gsl_matrix_short_get(const gsl_matrix_short * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; } #endif return m->data[i * m->tda + j] ; } ! extern inline void gsl_matrix_short_set(gsl_matrix_short * m, const size_t i, const size_t j, const short x) { #if GSL_RANGE_CHECK ! if (i >= m->size1) { ! GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; } #endif m->data[i * m->tda + j] = x ; } ! extern inline short * gsl_matrix_short_ptr(gsl_matrix_short * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; } #endif return (short *) (m->data + (i * m->tda + j)) ; } ! extern inline const short * gsl_matrix_short_const_ptr(const gsl_matrix_short * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; } #endif return (const short *) (m->data + (i * m->tda + j)) ; --- 251,341 ---- int gsl_matrix_short_get_col(gsl_vector_short * v, const gsl_matrix_short * m, const size_t j); int gsl_matrix_short_set_row(gsl_matrix_short * m, const size_t i, const gsl_vector_short * v); int gsl_matrix_short_set_col(gsl_matrix_short * m, const size_t j, const gsl_vector_short * v); + /***********************************************************************/ /* inline functions if you are using GCC */ + INLINE_DECL short gsl_matrix_short_get(const gsl_matrix_short * m, const size_t i, const size_t j); + INLINE_DECL void gsl_matrix_short_set(gsl_matrix_short * m, const size_t i, const size_t j, const short x); + INLINE_DECL short * gsl_matrix_short_ptr(gsl_matrix_short * m, const size_t i, const size_t j); + INLINE_DECL const short * gsl_matrix_short_const_ptr(const gsl_matrix_short * m, const size_t i, const size_t j); + #ifdef HAVE_INLINE ! INLINE_FUN short gsl_matrix_short_get(const gsl_matrix_short * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; ! } } #endif return m->data[i * m->tda + j] ; } ! INLINE_FUN void gsl_matrix_short_set(gsl_matrix_short * m, const size_t i, const size_t j, const short x) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; ! } } #endif m->data[i * m->tda + j] = x ; } ! INLINE_FUN short * gsl_matrix_short_ptr(gsl_matrix_short * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; ! } } #endif return (short *) (m->data + (i * m->tda + j)) ; } ! INLINE_FUN const short * gsl_matrix_short_const_ptr(const gsl_matrix_short * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; ! } } #endif return (const short *) (m->data + (i * m->tda + j)) ; diff -a -rc -C 2 -P gsl-1.11/matrix/gsl_matrix_uchar.h gsl-1.12/matrix/gsl_matrix_uchar.h *** gsl-1.11/matrix/gsl_matrix_uchar.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/matrix/gsl_matrix_uchar.h Thu Nov 27 20:03:28 2008 *************** *** 23,28 **** --- 23,29 ---- #include #include #include + #include #include #include *************** *** 204,215 **** /* Operations */ - unsigned char gsl_matrix_uchar_get(const gsl_matrix_uchar * m, const size_t i, const size_t j); - void gsl_matrix_uchar_set(gsl_matrix_uchar * m, const size_t i, const size_t j, const unsigned char x); - - unsigned char * gsl_matrix_uchar_ptr(gsl_matrix_uchar * m, const size_t i, const size_t j); - const unsigned char * gsl_matrix_uchar_const_ptr(const gsl_matrix_uchar * m, const size_t i, const size_t j); - void gsl_matrix_uchar_set_zero (gsl_matrix_uchar * m); void gsl_matrix_uchar_set_identity (gsl_matrix_uchar * m); void gsl_matrix_uchar_set_all (gsl_matrix_uchar * m, unsigned char x); --- 205,210 ---- *************** *** 256,328 **** int gsl_matrix_uchar_get_col(gsl_vector_uchar * v, const gsl_matrix_uchar * m, const size_t j); int gsl_matrix_uchar_set_row(gsl_matrix_uchar * m, const size_t i, const gsl_vector_uchar * v); int gsl_matrix_uchar_set_col(gsl_matrix_uchar * m, const size_t j, const gsl_vector_uchar * v); /* inline functions if you are using GCC */ #ifdef HAVE_INLINE ! extern inline unsigned char gsl_matrix_uchar_get(const gsl_matrix_uchar * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; } #endif return m->data[i * m->tda + j] ; } ! extern inline void gsl_matrix_uchar_set(gsl_matrix_uchar * m, const size_t i, const size_t j, const unsigned char x) { #if GSL_RANGE_CHECK ! if (i >= m->size1) { ! GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; } #endif m->data[i * m->tda + j] = x ; } ! extern inline unsigned char * gsl_matrix_uchar_ptr(gsl_matrix_uchar * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; } #endif return (unsigned char *) (m->data + (i * m->tda + j)) ; } ! extern inline const unsigned char * gsl_matrix_uchar_const_ptr(const gsl_matrix_uchar * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; } #endif return (const unsigned char *) (m->data + (i * m->tda + j)) ; --- 251,341 ---- int gsl_matrix_uchar_get_col(gsl_vector_uchar * v, const gsl_matrix_uchar * m, const size_t j); int gsl_matrix_uchar_set_row(gsl_matrix_uchar * m, const size_t i, const gsl_vector_uchar * v); int gsl_matrix_uchar_set_col(gsl_matrix_uchar * m, const size_t j, const gsl_vector_uchar * v); + /***********************************************************************/ /* inline functions if you are using GCC */ + INLINE_DECL unsigned char gsl_matrix_uchar_get(const gsl_matrix_uchar * m, const size_t i, const size_t j); + INLINE_DECL void gsl_matrix_uchar_set(gsl_matrix_uchar * m, const size_t i, const size_t j, const unsigned char x); + INLINE_DECL unsigned char * gsl_matrix_uchar_ptr(gsl_matrix_uchar * m, const size_t i, const size_t j); + INLINE_DECL const unsigned char * gsl_matrix_uchar_const_ptr(const gsl_matrix_uchar * m, const size_t i, const size_t j); + #ifdef HAVE_INLINE ! INLINE_FUN unsigned char gsl_matrix_uchar_get(const gsl_matrix_uchar * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; ! } } #endif return m->data[i * m->tda + j] ; } ! INLINE_FUN void gsl_matrix_uchar_set(gsl_matrix_uchar * m, const size_t i, const size_t j, const unsigned char x) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; ! } } #endif m->data[i * m->tda + j] = x ; } ! INLINE_FUN unsigned char * gsl_matrix_uchar_ptr(gsl_matrix_uchar * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; ! } } #endif return (unsigned char *) (m->data + (i * m->tda + j)) ; } ! INLINE_FUN const unsigned char * gsl_matrix_uchar_const_ptr(const gsl_matrix_uchar * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; ! } } #endif return (const unsigned char *) (m->data + (i * m->tda + j)) ; diff -a -rc -C 2 -P gsl-1.11/matrix/gsl_matrix_uint.h gsl-1.12/matrix/gsl_matrix_uint.h *** gsl-1.11/matrix/gsl_matrix_uint.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/matrix/gsl_matrix_uint.h Thu Nov 27 20:03:28 2008 *************** *** 23,28 **** --- 23,29 ---- #include #include #include + #include #include #include *************** *** 204,215 **** /* Operations */ - unsigned int gsl_matrix_uint_get(const gsl_matrix_uint * m, const size_t i, const size_t j); - void gsl_matrix_uint_set(gsl_matrix_uint * m, const size_t i, const size_t j, const unsigned int x); - - unsigned int * gsl_matrix_uint_ptr(gsl_matrix_uint * m, const size_t i, const size_t j); - const unsigned int * gsl_matrix_uint_const_ptr(const gsl_matrix_uint * m, const size_t i, const size_t j); - void gsl_matrix_uint_set_zero (gsl_matrix_uint * m); void gsl_matrix_uint_set_identity (gsl_matrix_uint * m); void gsl_matrix_uint_set_all (gsl_matrix_uint * m, unsigned int x); --- 205,210 ---- *************** *** 256,328 **** int gsl_matrix_uint_get_col(gsl_vector_uint * v, const gsl_matrix_uint * m, const size_t j); int gsl_matrix_uint_set_row(gsl_matrix_uint * m, const size_t i, const gsl_vector_uint * v); int gsl_matrix_uint_set_col(gsl_matrix_uint * m, const size_t j, const gsl_vector_uint * v); /* inline functions if you are using GCC */ #ifdef HAVE_INLINE ! extern inline unsigned int gsl_matrix_uint_get(const gsl_matrix_uint * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; } #endif return m->data[i * m->tda + j] ; } ! extern inline void gsl_matrix_uint_set(gsl_matrix_uint * m, const size_t i, const size_t j, const unsigned int x) { #if GSL_RANGE_CHECK ! if (i >= m->size1) { ! GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; } #endif m->data[i * m->tda + j] = x ; } ! extern inline unsigned int * gsl_matrix_uint_ptr(gsl_matrix_uint * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; } #endif return (unsigned int *) (m->data + (i * m->tda + j)) ; } ! extern inline const unsigned int * gsl_matrix_uint_const_ptr(const gsl_matrix_uint * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; } #endif return (const unsigned int *) (m->data + (i * m->tda + j)) ; --- 251,341 ---- int gsl_matrix_uint_get_col(gsl_vector_uint * v, const gsl_matrix_uint * m, const size_t j); int gsl_matrix_uint_set_row(gsl_matrix_uint * m, const size_t i, const gsl_vector_uint * v); int gsl_matrix_uint_set_col(gsl_matrix_uint * m, const size_t j, const gsl_vector_uint * v); + /***********************************************************************/ /* inline functions if you are using GCC */ + INLINE_DECL unsigned int gsl_matrix_uint_get(const gsl_matrix_uint * m, const size_t i, const size_t j); + INLINE_DECL void gsl_matrix_uint_set(gsl_matrix_uint * m, const size_t i, const size_t j, const unsigned int x); + INLINE_DECL unsigned int * gsl_matrix_uint_ptr(gsl_matrix_uint * m, const size_t i, const size_t j); + INLINE_DECL const unsigned int * gsl_matrix_uint_const_ptr(const gsl_matrix_uint * m, const size_t i, const size_t j); + #ifdef HAVE_INLINE ! INLINE_FUN unsigned int gsl_matrix_uint_get(const gsl_matrix_uint * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; ! } } #endif return m->data[i * m->tda + j] ; } ! INLINE_FUN void gsl_matrix_uint_set(gsl_matrix_uint * m, const size_t i, const size_t j, const unsigned int x) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; ! } } #endif m->data[i * m->tda + j] = x ; } ! INLINE_FUN unsigned int * gsl_matrix_uint_ptr(gsl_matrix_uint * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; ! } } #endif return (unsigned int *) (m->data + (i * m->tda + j)) ; } ! INLINE_FUN const unsigned int * gsl_matrix_uint_const_ptr(const gsl_matrix_uint * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; ! } } #endif return (const unsigned int *) (m->data + (i * m->tda + j)) ; diff -a -rc -C 2 -P gsl-1.11/matrix/gsl_matrix_ulong.h gsl-1.12/matrix/gsl_matrix_ulong.h *** gsl-1.11/matrix/gsl_matrix_ulong.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/matrix/gsl_matrix_ulong.h Thu Nov 27 20:03:28 2008 *************** *** 23,28 **** --- 23,29 ---- #include #include #include + #include #include #include *************** *** 204,215 **** /* Operations */ - unsigned long gsl_matrix_ulong_get(const gsl_matrix_ulong * m, const size_t i, const size_t j); - void gsl_matrix_ulong_set(gsl_matrix_ulong * m, const size_t i, const size_t j, const unsigned long x); - - unsigned long * gsl_matrix_ulong_ptr(gsl_matrix_ulong * m, const size_t i, const size_t j); - const unsigned long * gsl_matrix_ulong_const_ptr(const gsl_matrix_ulong * m, const size_t i, const size_t j); - void gsl_matrix_ulong_set_zero (gsl_matrix_ulong * m); void gsl_matrix_ulong_set_identity (gsl_matrix_ulong * m); void gsl_matrix_ulong_set_all (gsl_matrix_ulong * m, unsigned long x); --- 205,210 ---- *************** *** 256,328 **** int gsl_matrix_ulong_get_col(gsl_vector_ulong * v, const gsl_matrix_ulong * m, const size_t j); int gsl_matrix_ulong_set_row(gsl_matrix_ulong * m, const size_t i, const gsl_vector_ulong * v); int gsl_matrix_ulong_set_col(gsl_matrix_ulong * m, const size_t j, const gsl_vector_ulong * v); /* inline functions if you are using GCC */ #ifdef HAVE_INLINE ! extern inline unsigned long gsl_matrix_ulong_get(const gsl_matrix_ulong * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; } #endif return m->data[i * m->tda + j] ; } ! extern inline void gsl_matrix_ulong_set(gsl_matrix_ulong * m, const size_t i, const size_t j, const unsigned long x) { #if GSL_RANGE_CHECK ! if (i >= m->size1) { ! GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; } #endif m->data[i * m->tda + j] = x ; } ! extern inline unsigned long * gsl_matrix_ulong_ptr(gsl_matrix_ulong * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; } #endif return (unsigned long *) (m->data + (i * m->tda + j)) ; } ! extern inline const unsigned long * gsl_matrix_ulong_const_ptr(const gsl_matrix_ulong * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; } #endif return (const unsigned long *) (m->data + (i * m->tda + j)) ; --- 251,341 ---- int gsl_matrix_ulong_get_col(gsl_vector_ulong * v, const gsl_matrix_ulong * m, const size_t j); int gsl_matrix_ulong_set_row(gsl_matrix_ulong * m, const size_t i, const gsl_vector_ulong * v); int gsl_matrix_ulong_set_col(gsl_matrix_ulong * m, const size_t j, const gsl_vector_ulong * v); + /***********************************************************************/ /* inline functions if you are using GCC */ + INLINE_DECL unsigned long gsl_matrix_ulong_get(const gsl_matrix_ulong * m, const size_t i, const size_t j); + INLINE_DECL void gsl_matrix_ulong_set(gsl_matrix_ulong * m, const size_t i, const size_t j, const unsigned long x); + INLINE_DECL unsigned long * gsl_matrix_ulong_ptr(gsl_matrix_ulong * m, const size_t i, const size_t j); + INLINE_DECL const unsigned long * gsl_matrix_ulong_const_ptr(const gsl_matrix_ulong * m, const size_t i, const size_t j); + #ifdef HAVE_INLINE ! INLINE_FUN unsigned long gsl_matrix_ulong_get(const gsl_matrix_ulong * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; ! } } #endif return m->data[i * m->tda + j] ; } ! INLINE_FUN void gsl_matrix_ulong_set(gsl_matrix_ulong * m, const size_t i, const size_t j, const unsigned long x) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; ! } } #endif m->data[i * m->tda + j] = x ; } ! INLINE_FUN unsigned long * gsl_matrix_ulong_ptr(gsl_matrix_ulong * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; ! } } #endif return (unsigned long *) (m->data + (i * m->tda + j)) ; } ! INLINE_FUN const unsigned long * gsl_matrix_ulong_const_ptr(const gsl_matrix_ulong * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; ! } } #endif return (const unsigned long *) (m->data + (i * m->tda + j)) ; diff -a -rc -C 2 -P gsl-1.11/matrix/gsl_matrix_ushort.h gsl-1.12/matrix/gsl_matrix_ushort.h *** gsl-1.11/matrix/gsl_matrix_ushort.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/matrix/gsl_matrix_ushort.h Thu Nov 27 20:03:28 2008 *************** *** 23,28 **** --- 23,29 ---- #include #include #include + #include #include #include *************** *** 204,215 **** /* Operations */ - unsigned short gsl_matrix_ushort_get(const gsl_matrix_ushort * m, const size_t i, const size_t j); - void gsl_matrix_ushort_set(gsl_matrix_ushort * m, const size_t i, const size_t j, const unsigned short x); - - unsigned short * gsl_matrix_ushort_ptr(gsl_matrix_ushort * m, const size_t i, const size_t j); - const unsigned short * gsl_matrix_ushort_const_ptr(const gsl_matrix_ushort * m, const size_t i, const size_t j); - void gsl_matrix_ushort_set_zero (gsl_matrix_ushort * m); void gsl_matrix_ushort_set_identity (gsl_matrix_ushort * m); void gsl_matrix_ushort_set_all (gsl_matrix_ushort * m, unsigned short x); --- 205,210 ---- *************** *** 256,328 **** int gsl_matrix_ushort_get_col(gsl_vector_ushort * v, const gsl_matrix_ushort * m, const size_t j); int gsl_matrix_ushort_set_row(gsl_matrix_ushort * m, const size_t i, const gsl_vector_ushort * v); int gsl_matrix_ushort_set_col(gsl_matrix_ushort * m, const size_t j, const gsl_vector_ushort * v); /* inline functions if you are using GCC */ #ifdef HAVE_INLINE ! extern inline unsigned short gsl_matrix_ushort_get(const gsl_matrix_ushort * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; } #endif return m->data[i * m->tda + j] ; } ! extern inline void gsl_matrix_ushort_set(gsl_matrix_ushort * m, const size_t i, const size_t j, const unsigned short x) { #if GSL_RANGE_CHECK ! if (i >= m->size1) { ! GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; } #endif m->data[i * m->tda + j] = x ; } ! extern inline unsigned short * gsl_matrix_ushort_ptr(gsl_matrix_ushort * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; } #endif return (unsigned short *) (m->data + (i * m->tda + j)) ; } ! extern inline const unsigned short * gsl_matrix_ushort_const_ptr(const gsl_matrix_ushort * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; } #endif return (const unsigned short *) (m->data + (i * m->tda + j)) ; --- 251,341 ---- int gsl_matrix_ushort_get_col(gsl_vector_ushort * v, const gsl_matrix_ushort * m, const size_t j); int gsl_matrix_ushort_set_row(gsl_matrix_ushort * m, const size_t i, const gsl_vector_ushort * v); int gsl_matrix_ushort_set_col(gsl_matrix_ushort * m, const size_t j, const gsl_vector_ushort * v); + /***********************************************************************/ /* inline functions if you are using GCC */ + INLINE_DECL unsigned short gsl_matrix_ushort_get(const gsl_matrix_ushort * m, const size_t i, const size_t j); + INLINE_DECL void gsl_matrix_ushort_set(gsl_matrix_ushort * m, const size_t i, const size_t j, const unsigned short x); + INLINE_DECL unsigned short * gsl_matrix_ushort_ptr(gsl_matrix_ushort * m, const size_t i, const size_t j); + INLINE_DECL const unsigned short * gsl_matrix_ushort_const_ptr(const gsl_matrix_ushort * m, const size_t i, const size_t j); + #ifdef HAVE_INLINE ! INLINE_FUN unsigned short gsl_matrix_ushort_get(const gsl_matrix_ushort * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; ! } } #endif return m->data[i * m->tda + j] ; } ! INLINE_FUN void gsl_matrix_ushort_set(gsl_matrix_ushort * m, const size_t i, const size_t j, const unsigned short x) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; ! } } #endif m->data[i * m->tda + j] = x ; } ! INLINE_FUN unsigned short * gsl_matrix_ushort_ptr(gsl_matrix_ushort * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; ! } } #endif return (unsigned short *) (m->data + (i * m->tda + j)) ; } ! INLINE_FUN const unsigned short * gsl_matrix_ushort_const_ptr(const gsl_matrix_ushort * m, const size_t i, const size_t j) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(1)) { ! if (i >= m->size1) ! { ! GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; ! } ! else if (j >= m->size2) ! { ! GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; ! } } #endif return (const unsigned short *) (m->data + (i * m->tda + j)) ; diff -a -rc -C 2 -P gsl-1.11/matrix/matrix.c gsl-1.12/matrix/matrix.c *** gsl-1.11/matrix/matrix.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/matrix/matrix.c Thu Nov 27 20:03:28 2008 *************** *** 1,87 **** #include #include ! #include ! ! #define BASE_GSL_COMPLEX_LONG ! #include "templates_on.h" ! #include "matrix_source.c" ! #include "templates_off.h" ! #undef BASE_GSL_COMPLEX_LONG ! ! #define BASE_GSL_COMPLEX ! #include "templates_on.h" ! #include "matrix_source.c" ! #include "templates_off.h" ! #undef BASE_GSL_COMPLEX ! ! #define BASE_GSL_COMPLEX_FLOAT ! #include "templates_on.h" ! #include "matrix_source.c" ! #include "templates_off.h" ! #undef BASE_GSL_COMPLEX_FLOAT ! ! #define BASE_LONG_DOUBLE ! #include "templates_on.h" ! #include "matrix_source.c" ! #include "templates_off.h" ! #undef BASE_LONG_DOUBLE ! ! #define BASE_DOUBLE ! #include "templates_on.h" ! #include "matrix_source.c" ! #include "templates_off.h" ! #undef BASE_DOUBLE ! ! #define BASE_FLOAT ! #include "templates_on.h" ! #include "matrix_source.c" ! #include "templates_off.h" ! #undef BASE_FLOAT ! #define BASE_ULONG ! #include "templates_on.h" ! #include "matrix_source.c" ! #include "templates_off.h" ! #undef BASE_ULONG ! #define BASE_LONG ! #include "templates_on.h" ! #include "matrix_source.c" ! #include "templates_off.h" ! #undef BASE_LONG ! ! #define BASE_UINT ! #include "templates_on.h" ! #include "matrix_source.c" ! #include "templates_off.h" ! #undef BASE_UINT ! ! #define BASE_INT ! #include "templates_on.h" ! #include "matrix_source.c" ! #include "templates_off.h" ! #undef BASE_INT ! ! #define BASE_USHORT ! #include "templates_on.h" ! #include "matrix_source.c" ! #include "templates_off.h" ! #undef BASE_USHORT ! ! #define BASE_SHORT ! #include "templates_on.h" ! #include "matrix_source.c" ! #include "templates_off.h" ! #undef BASE_SHORT ! ! #define BASE_UCHAR ! #include "templates_on.h" ! #include "matrix_source.c" ! #include "templates_off.h" ! #undef BASE_UCHAR - #define BASE_CHAR - #include "templates_on.h" - #include "matrix_source.c" - #include "templates_off.h" - #undef BASE_CHAR --- 1,10 ---- #include #include ! #include ! /* Compile all the inline matrix functions */ ! #define COMPILE_INLINE_STATIC ! #include "build.h" ! #include Only in gsl-1.11/matrix: matrix_source.c diff -a -rc -C 2 -P gsl-1.11/matrix/rowcol_source.c gsl-1.12/matrix/rowcol_source.c *** gsl-1.11/matrix/rowcol_source.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/matrix/rowcol_source.c Thu Nov 27 20:03:28 2008 *************** *** 146,152 **** GSL_ERROR_VAL ("vector length n must be positive integer", GSL_EINVAL, view); } ! else if (offset + n > m->size1) { GSL_ERROR_VAL ("dimension n overflows matrix", GSL_EINVAL, view); } --- 146,152 ---- GSL_ERROR_VAL ("vector length n must be positive integer", GSL_EINVAL, view); } ! else if (offset + n > m->size2) { GSL_ERROR_VAL ("dimension n overflows matrix", GSL_EINVAL, view); } *************** *** 179,185 **** GSL_ERROR_VAL ("vector length n must be positive integer", GSL_EINVAL, view); } ! else if (offset + n > m->size2) { GSL_ERROR_VAL ("dimension n overflows matrix", GSL_EINVAL, view); } --- 179,185 ---- GSL_ERROR_VAL ("vector length n must be positive integer", GSL_EINVAL, view); } ! else if (offset + n > m->size1) { GSL_ERROR_VAL ("dimension n overflows matrix", GSL_EINVAL, view); } diff -a -rc -C 2 -P gsl-1.11/matrix/test_complex_source.c gsl-1.12/matrix/test_complex_source.c *** gsl-1.11/matrix/test_complex_source.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/matrix/test_complex_source.c Thu Nov 27 20:03:28 2008 *************** *** 590,595 **** --- 590,701 ---- gsl_test (status, NAME (gsl_matrix) "_div_elements division"); } + { + BASE s; + GSL_SET_COMPLEX(&s, 2.0, 3.0); + + FUNCTION (gsl_matrix, memcpy) (m, a); + FUNCTION (gsl_matrix, scale) (m, s); + + k = 0; + status = 0; + + for (i = 0; i < P; i++) + { + for (j = 0; j < Q; j++) + { + ATOMIC real = (ATOMIC) (-(ATOMIC)k - 30); + ATOMIC imag = (ATOMIC) (5 * (ATOMIC)k + 20); + BASE z = FUNCTION (gsl_matrix, get) (m, i, j); + if (GSL_REAL (z) != real || GSL_IMAG (z) != imag) + { + status = 1; + } + k++; + } + } + gsl_test (status, NAME (gsl_matrix) "_scale"); + } + + { + BASE s; + GSL_SET_COMPLEX(&s, 2.0, 3.0); + + FUNCTION (gsl_matrix, memcpy) (m, a); + FUNCTION (gsl_matrix, add_constant) (m, s); + + k = 0; + status = 0; + + for (i = 0; i < P; i++) + { + for (j = 0; j < Q; j++) + { + ATOMIC real = (ATOMIC) ((ATOMIC)k + 2); + ATOMIC imag = (ATOMIC) ((ATOMIC)k + 10 + 3); + BASE z = FUNCTION (gsl_matrix, get) (m, i, j); + if (GSL_REAL (z) != real || GSL_IMAG (z) != imag) + { + status = 1; + } + k++; + } + } + gsl_test (status, NAME (gsl_matrix) "_add_constant"); + } + + { + BASE s; + GSL_SET_COMPLEX(&s, 2.0, 3.0); + + FUNCTION (gsl_matrix, memcpy) (m, a); + FUNCTION (gsl_matrix, add_diagonal) (m, s); + + k = 0; + status = 0; + + for (i = 0; i < P; i++) + { + for (j = 0; j < Q; j++) + { + ATOMIC real = (ATOMIC) ((ATOMIC)k + ((i==j) ? 2 : 0)); + ATOMIC imag = (ATOMIC) ((ATOMIC)k + 10 +((i==j) ? 3 : 0)); + BASE z = FUNCTION (gsl_matrix, get) (m, i, j); + if (GSL_REAL (z) != real || GSL_IMAG (z) != imag) + { + status = 1; + } + k++; + } + } + gsl_test (status, NAME (gsl_matrix) "_add_diagonal"); + } + + { + FUNCTION (gsl_matrix, swap) (a, b); + + k = 0; + status = 0; + + for (i = 0; i < P; i++) + { + for (j = 0; j < Q; j++) + { + BASE x = FUNCTION (gsl_matrix, get) (a, i, j); + BASE y = FUNCTION (gsl_matrix, get) (b, i, j); + if (GSL_REAL (x) != (ATOMIC) (k + 5) || GSL_IMAG (x) != (ATOMIC) (k + 20) || + GSL_REAL (y) != (ATOMIC) (k) || GSL_IMAG (y) != (ATOMIC) (k + 10)) + { + status = 1; + } + k++; + } + } + gsl_test (status, NAME (gsl_matrix) "_swap"); + } + + + FUNCTION (gsl_matrix, free) (a); FUNCTION (gsl_matrix, free) (b); FUNCTION (gsl_matrix, free) (m); diff -a -rc -C 2 -P gsl-1.11/matrix/test_source.c gsl-1.12/matrix/test_source.c *** gsl-1.11/matrix/test_source.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/matrix/test_source.c Thu Nov 27 20:03:28 2008 *************** *** 506,516 **** } FUNCTION(gsl_matrix, free) (a); FUNCTION(gsl_matrix, free) (b); } - FUNCTION (gsl_matrix, free) (m); FUNCTION (gsl_vector, free) (v); } --- 506,594 ---- } + FUNCTION(gsl_matrix, memcpy) (m, a); + FUNCTION(gsl_matrix, scale) (m, 2.0); + + { + int status = 0; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE r = FUNCTION(gsl_matrix,get) (m,i,j); + BASE x = FUNCTION(gsl_matrix,get) (a,i,j); + if (r != (ATOMIC)(2*x)) + status = 1; + } + } + gsl_test (status, NAME (gsl_matrix) "_scale"); + } + + FUNCTION(gsl_matrix, memcpy) (m, a); + FUNCTION(gsl_matrix, add_constant) (m, 3.0); + + { + int status = 0; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE r = FUNCTION(gsl_matrix,get) (m,i,j); + BASE x = FUNCTION(gsl_matrix,get) (a,i,j); + BASE y = x + 3.0; + if (fabs(r - y) > 2 * GSL_FLT_EPSILON * fabs(y)) + status = 1; + } + } + gsl_test (status, NAME (gsl_matrix) "_add_constant"); + } + + FUNCTION(gsl_matrix, memcpy) (m, a); + FUNCTION(gsl_matrix, add_diagonal) (m, 5.0); + + { + int status = 0; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE r = FUNCTION(gsl_matrix,get) (m,i,j); + BASE x = FUNCTION(gsl_matrix,get) (a,i,j); + BASE y = (i == j) ? (x + 5.0) : x; + if (fabs(r - y) > 2 * GSL_FLT_EPSILON * fabs(y)) + status = 1; + } + } + gsl_test (status, NAME (gsl_matrix) "_add_diagonal"); + } + + + FUNCTION(gsl_matrix, swap) (a, b); + + { + int status = 0; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE x = FUNCTION(gsl_matrix,get) (a,i,j); + BASE y = FUNCTION(gsl_matrix,get) (b,i,j); + if (y != (BASE)(3 + i + 5 * j) || x != (BASE)(3 + 2 * i + 4 * j)) + status = 1; + } + } + gsl_test (status, NAME (gsl_matrix) "_swap"); + } + + FUNCTION(gsl_matrix, free) (a); FUNCTION(gsl_matrix, free) (b); } FUNCTION (gsl_matrix, free) (m); FUNCTION (gsl_vector, free) (v); } diff -a -rc -C 2 -P gsl-1.11/min/ChangeLog gsl-1.12/min/ChangeLog *** gsl-1.11/min/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/min/ChangeLog Thu Nov 27 20:03:28 2008 *************** *** 1,3 **** --- 1,7 ---- + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + 2008-01-09 Brian Gough * brent.c (brent_iterate): remove spurious early return diff -a -rc -C 2 -P gsl-1.11/min/Makefile.am gsl-1.12/min/Makefile.am *** gsl-1.11/min/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/min/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 4,10 **** noinst_HEADERS = min.h ! INCLUDES= -I$(top_builddir) libgslmin_la_SOURCES = fsolver.c golden.c brent.c convergence.c bracketing.c --- 4,10 ---- noinst_HEADERS = min.h ! INCLUDES = -I$(top_srcdir) libgslmin_la_SOURCES = fsolver.c golden.c brent.c convergence.c bracketing.c diff -a -rc -C 2 -P gsl-1.11/min/Makefile.in gsl-1.12/min/Makefile.in *** gsl-1.11/min/Makefile.in Sun Mar 30 12:07:06 2008 --- gsl-1.12/min/Makefile.in Mon Dec 15 14:55:14 2008 *************** *** 133,138 **** --- 133,139 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 140,146 **** --- 141,150 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 206,212 **** noinst_LTLIBRARIES = libgslmin.la pkginclude_HEADERS = gsl_min.h noinst_HEADERS = min.h ! INCLUDES = -I$(top_builddir) libgslmin_la_SOURCES = fsolver.c golden.c brent.c convergence.c bracketing.c TESTS = $(check_PROGRAMS) test_SOURCES = test.c test_funcs.c test.h --- 210,216 ---- noinst_LTLIBRARIES = libgslmin.la pkginclude_HEADERS = gsl_min.h noinst_HEADERS = min.h ! INCLUDES = -I$(top_srcdir) libgslmin_la_SOURCES = fsolver.c golden.c brent.c convergence.c bracketing.c TESTS = $(check_PROGRAMS) test_SOURCES = test.c test_funcs.c test.h diff -a -rc -C 2 -P gsl-1.11/monte/ChangeLog gsl-1.12/monte/ChangeLog *** gsl-1.11/monte/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/monte/ChangeLog Sat Nov 29 16:42:43 2008 *************** *** 1,3 **** --- 1,31 ---- + 2008-11-20 Brian Gough + + * vegas.c (gsl_monte_vegas_integrate): improve the chisq + calculation to avoid cancellation errors in the original + formula (fixes bug #24510) + + * test.c (MONTE_ERROR_TEST): added test cases for negative chisq + in vegas + + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + + 2008-04-26 Brian Gough + + * vegas.c (gsl_monte_vegas_integrate): compute running totals as + volatile double to prevent problems with excess precision, use + meaningful variable names for sum of squares, variance and sigma. + + * test_main.c: compute the ensemble mean more accurately for the tests + + * test.c: added a test for warm-start vegas, as well as cold-start + + * miser.c (gsl_monte_miser_integrate): catch zero weights to avoid + division by zero + + * test.c (main): added test for step-type function + 2004-06-02 Brian Gough * test_main.c: handle the case where sd==0 && error[i] !=0 more diff -a -rc -C 2 -P gsl-1.11/monte/Makefile.am gsl-1.12/monte/Makefile.am *** gsl-1.11/monte/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/monte/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 4,10 **** pkginclude_HEADERS = gsl_monte.h gsl_monte_vegas.h gsl_monte_miser.h gsl_monte_plain.h ! INCLUDES= -I$(top_builddir) -I$(top_srcdir) TESTS = $(check_PROGRAMS) --- 4,10 ---- pkginclude_HEADERS = gsl_monte.h gsl_monte_vegas.h gsl_monte_miser.h gsl_monte_plain.h ! INCLUDES = -I$(top_srcdir) TESTS = $(check_PROGRAMS) diff -a -rc -C 2 -P gsl-1.11/monte/Makefile.in gsl-1.12/monte/Makefile.in *** gsl-1.11/monte/Makefile.in Sun Mar 30 12:07:06 2008 --- gsl-1.12/monte/Makefile.in Mon Dec 15 14:55:14 2008 *************** *** 132,137 **** --- 132,138 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 139,145 **** --- 140,149 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 205,211 **** noinst_LTLIBRARIES = libgslmonte.la libgslmonte_la_SOURCES = miser.c plain.c gsl_monte_vegas.h gsl_monte_miser.h gsl_monte_plain.h gsl_monte.h vegas.c pkginclude_HEADERS = gsl_monte.h gsl_monte_vegas.h gsl_monte_miser.h gsl_monte_plain.h ! INCLUDES = -I$(top_builddir) -I$(top_srcdir) TESTS = $(check_PROGRAMS) test_SOURCES = test.c test_LDADD = libgslmonte.la ../rng/libgslrng.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la --- 209,215 ---- noinst_LTLIBRARIES = libgslmonte.la libgslmonte_la_SOURCES = miser.c plain.c gsl_monte_vegas.h gsl_monte_miser.h gsl_monte_plain.h gsl_monte.h vegas.c pkginclude_HEADERS = gsl_monte.h gsl_monte_vegas.h gsl_monte_miser.h gsl_monte_plain.h ! INCLUDES = -I$(top_srcdir) TESTS = $(check_PROGRAMS) test_SOURCES = test.c test_LDADD = libgslmonte.la ../rng/libgslrng.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la diff -a -rc -C 2 -P gsl-1.11/monte/miser.c gsl-1.12/monte/miser.c *** gsl-1.11/monte/miser.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/monte/miser.c Thu Nov 27 20:03:28 2008 *************** *** 193,198 **** --- 193,204 ---- i_bisect = i; weight_l = pow (sigma_l[i], beta); weight_r = pow (sigma_r[i], beta); + + if (weight_l == 0 && weight_r == 0) + { + weight_l = 1; + weight_r = 1; + } } } else diff -a -rc -C 2 -P gsl-1.11/monte/test.c gsl-1.12/monte/test.c *** gsl-1.11/monte/test.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/monte/test.c Sat Nov 29 16:42:43 2008 *************** *** 34,39 **** --- 34,40 ---- #include #define CONSTANT + #define STEP #define PRODUCT #define GAUSSIAN #define DBLGAUSSIAN *************** *** 49,54 **** --- 50,56 ---- double xu3[2] = { GSL_DBL_MAX, GSL_DBL_MAX }; double fconst (double x[], size_t d, void *params); + double fstep (double x[], size_t d, void *params); double f0 (double x[], size_t d, void *params); double f1 (double x[], size_t d, void *params); double f2 (double x[], size_t d, void *params); *************** *** 116,121 **** --- 118,124 ---- double c = (1.0 + sqrt (10.0)) / 9.0; gsl_monte_function Fc = make_function(&fconst, 0, 0); + gsl_monte_function Fs = make_function(&fstep, 0, 0); gsl_monte_function F0 = make_function(&f0, 0, &a); gsl_monte_function F1 = make_function(&f1, 0, &a); gsl_monte_function F2 = make_function(&f2, 0, &a); *************** *** 149,154 **** --- 152,171 ---- add(problems,&n, &Fc, xl, xu, 10, 1000, 1.0, 0.0, "constant, 10d"); #endif + #ifdef STEP + /* variance(Fs) = 0.4/sqrt(1000) */ + add(problems,&n, &Fs, xl, xu, 1, 100000, 0.8, 1.264e-3, "step, 1d"); + add(problems,&n, &Fs, xl, xu, 2, 100000, 0.8, 1.264e-3, "step, 2d"); + add(problems,&n, &Fs, xl, xu, 3, 100000, 0.8, 1.264e-3, "step, 3d"); + add(problems,&n, &Fs, xl, xu, 4, 100000, 0.8, 1.264e-3, "step, 4d"); + add(problems,&n, &Fs, xl, xu, 5, 100000, 0.8, 1.264e-3, "step, 5d"); + add(problems,&n, &Fs, xl, xu, 6, 100000, 0.8, 1.264e-3, "step, 6d"); + add(problems,&n, &Fs, xl, xu, 7, 100000, 0.8, 1.264e-3, "step, 7d"); + add(problems,&n, &Fs, xl, xu, 8, 100000, 0.8, 1.264e-3, "step, 8d"); + add(problems,&n, &Fs, xl, xu, 9, 100000, 0.8, 1.264e-3, "step, 9d"); + add(problems,&n, &Fs, xl, xu, 10, 100000, 0.8, 1.264e-3, "step, 10d"); + #endif + #ifdef PRODUCT /* variance(F0) = (4/3)^d - 1 */ *************** *** 269,278 **** #define NAME "vegas" #define MONTE_STATE gsl_monte_vegas_state #define MONTE_ALLOC gsl_monte_vegas_alloc ! #define MONTE_INTEGRATE(f,xl,xu,dim,calls,r,s,res,err) { gsl_monte_vegas_integrate(f,xl,xu,dim,calls,r,s,res,err) ; if (s->chisq < 0.5 || s->chisq > 2) gsl_monte_vegas_integrate(f,xl,xu,dim,calls,r,s,res,err); } #define MONTE_FREE gsl_monte_vegas_free #define MONTE_SPEEDUP 3 ! #define MONTE_ERROR_TEST(err,expected) gsl_test(err > 3.0 * (expected == 0 ? 1.0/(I->calls/MONTE_SPEEDUP) : expected), NAME ", %s, abserr[%d] (obs %g vs exp %g)", I->description, i, err, expected) #include "test_main.c" #undef NAME #undef MONTE_STATE --- 286,314 ---- #define NAME "vegas" #define MONTE_STATE gsl_monte_vegas_state #define MONTE_ALLOC gsl_monte_vegas_alloc ! #define MONTE_INTEGRATE(f,xl,xu,dim,calls,r,s,res,err) { gsl_monte_vegas_integrate(f,xl,xu,dim,calls,r,s,res,err) ; } ! #define MONTE_FREE gsl_monte_vegas_free ! #define MONTE_SPEEDUP 3 ! #define MONTE_ERROR_TEST(err,expected) gsl_test(err > 3.0 * (expected == 0 ? 1.0/(I->calls/MONTE_SPEEDUP) : expected), NAME ", %s, abserr[%d] (obs %g vs exp %g)", I->description, i, err, expected) ; gsl_test(s->chisq < 0, NAME " returns valid chisq (%g)", s->chisq) ! #include "test_main.c" ! #undef NAME ! #undef MONTE_STATE ! #undef MONTE_ALLOC ! #undef MONTE_INTEGRATE ! #undef MONTE_FREE ! #undef MONTE_ERROR_TEST ! #undef MONTE_SPEEDUP ! #endif ! ! ! #ifdef VEGAS ! #define NAME "vegas(warm)" ! #define MONTE_STATE gsl_monte_vegas_state ! #define MONTE_ALLOC gsl_monte_vegas_alloc ! #define MONTE_INTEGRATE(f,xl,xu,dim,calls,r,s,res,err) { gsl_monte_vegas_integrate(f,xl,xu,dim,calls,r,s,res,err) ; gsl_monte_vegas_integrate(f,xl,xu,dim,calls,r,s,res,err); } #define MONTE_FREE gsl_monte_vegas_free #define MONTE_SPEEDUP 3 ! #define MONTE_ERROR_TEST(err,expected) gsl_test(err > 3.0 * (expected == 0 ? 1.0/(I->calls/MONTE_SPEEDUP) : expected), NAME ", %s, abserr[%d] (obs %g vs exp %g)", I->description, i, err, expected); gsl_test(s->chisq < 0, NAME " returns valid chisq (%g)", s->chisq) #include "test_main.c" #undef NAME #undef MONTE_STATE *************** *** 282,287 **** --- 318,324 ---- #undef MONTE_ERROR_TEST #undef MONTE_SPEEDUP #endif + exit (gsl_test_summary ()); } *************** *** 293,298 **** --- 330,343 ---- return 1; } + + /* Step-type (pulse) function */ + double + fstep (double x[], size_t num_dim, void *params) + { + return (x[0] > 0.1 && x[0] < 0.9) ? 1 : 0; + } + /* Simple product function */ double f0 (double x[], size_t num_dim, void *params) diff -a -rc -C 2 -P gsl-1.11/monte/test_main.c gsl-1.12/monte/test_main.c *** gsl-1.11/monte/test_main.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/monte/test_main.c Thu Nov 27 20:03:28 2008 *************** *** 1,7 **** for (I = problems ; I->f != 0; I++) { size_t i; ! double sum = 0, mean, sumd2 = 0, sd, res, err; gsl_rng * r; --- 1,7 ---- for (I = problems ; I->f != 0; I++) { size_t i; ! double res, err; gsl_rng * r; *************** *** 34,69 **** MONTE_FREE (s); } ! for (i = 0; i < TRIALS; i++) ! { ! sum += result[i]; ! } ! ! mean = sum / TRIALS ; ! ! for (i = 0; i < TRIALS; i++) ! { ! sumd2 += pow(result[i] - mean, 2.0); ! } ! ! sd = sqrt(sumd2 / (TRIALS-1.0)) ; ! ! if (sd < TRIALS * GSL_DBL_EPSILON * fabs (mean)) ! { ! sd = 0; ! } ! ! for (i = 0; i < TRIALS; i++) ! { ! if (sd == 0 && fabs(error[i]) < GSL_DBL_EPSILON * fabs(result[i])) ! { ! error[i] = 0.0; ! } ! ! gsl_test_factor (error[i], sd, 5.0, ! NAME ", %s, abserr[%d] vs sd", I->description, i); ! } gsl_rng_free (r); } --- 34,67 ---- MONTE_FREE (s); } ! ! /* Check the results for consistency as an ensemble */ ! ! { ! double mean = 0, sumd2 = 0, sd; + /* We need to compute the mean exactly when all terms are equal, + to get an exact zero for the standard deviation (this is a + common case when integrating a constant). */ + + for (i = 0; i < TRIALS; i++) + { + mean += (result[i] - mean) / (i + 1.0); + } + + for (i = 0; i < TRIALS; i++) + { + sumd2 += pow(result[i] - mean, 2.0); + } + + sd = sqrt(sumd2 / (TRIALS-1.0)) ; + + for (i = 0; i < TRIALS; i++) + { + gsl_test_factor (error[i], sd, 5.0, + NAME ", %s, abserr[%d] vs sd", I->description, i); + } + } gsl_rng_free (r); } diff -a -rc -C 2 -P gsl-1.11/monte/vegas.c gsl-1.12/monte/vegas.c *** gsl-1.11/monte/vegas.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/monte/vegas.c Sat Nov 29 16:42:43 2008 *************** *** 71,76 **** --- 71,78 ---- #define NEW_COORD(s,i) ((s)->xin[(i)]) #define VALUE(s,i,j) ((s)->d[(i)*(s)->dim + (j)]) + #define USE_ORIGINAL_CHISQ_FORMULA 0 + /* predeclare functions */ typedef int coord; *************** *** 149,154 **** --- 151,157 ---- state->chi_sum = 0; state->it_num = 1; state->samples = 0; + state->chisq = 0; } if (state->stage <= 2) *************** *** 212,224 **** cum_int = 0.0; cum_sig = 0.0; - state->chisq = 0.0; - for (it = 0; it < state->iterations; it++) { double intgrl = 0.0, intgrl_sq = 0.0; ! double sig = 0.0; ! double wgt; size_t calls_per_box = state->calls_per_box; double jacbin = state->jac; double *x = state->x; --- 215,225 ---- cum_int = 0.0; cum_sig = 0.0; for (it = 0; it < state->iterations; it++) { double intgrl = 0.0, intgrl_sq = 0.0; ! double tss = 0.0; ! double wgt, var, sig; size_t calls_per_box = state->calls_per_box; double jacbin = state->jac; double *x = state->x; *************** *** 231,248 **** do { ! double m = 0, q = 0; double f_sq_sum = 0.0; for (k = 0; k < calls_per_box; k++) { ! double fval, bin_vol; random_point (x, bin, &bin_vol, state->box, xl, xu, state, r); fval = jacbin * bin_vol * GSL_MONTE_FN_EVAL (f, x); ! /* recurrence for mean and variance */ { double d = fval - m; --- 232,250 ---- do { ! volatile double m = 0, q = 0; double f_sq_sum = 0.0; for (k = 0; k < calls_per_box; k++) { ! volatile double fval; ! double bin_vol; random_point (x, bin, &bin_vol, state->box, xl, xu, state, r); fval = jacbin * bin_vol * GSL_MONTE_FN_EVAL (f, x); ! /* recurrence for mean and variance (sum of squares) */ { double d = fval - m; *************** *** 259,267 **** intgrl += m * calls_per_box; ! f_sq_sum = q * calls_per_box ; ! sig += f_sq_sum ; if (state->mode == GSL_VEGAS_MODE_STRATIFIED) { --- 261,269 ---- intgrl += m * calls_per_box; ! f_sq_sum = q * calls_per_box; ! tss += f_sq_sum; if (state->mode == GSL_VEGAS_MODE_STRATIFIED) { *************** *** 272,282 **** /* Compute final results for this iteration */ ! sig = sig / (calls_per_box - 1.0) ; ! if (sig > 0) { ! wgt = 1.0 / sig; } else if (state->sum_wgts > 0) { --- 274,284 ---- /* Compute final results for this iteration */ ! var = tss / (calls_per_box - 1.0) ; ! if (var > 0) { ! wgt = 1.0 / var; } else if (state->sum_wgts > 0) { *************** *** 289,299 **** intgrl_sq = intgrl * intgrl; state->result = intgrl; ! state->sigma = sqrt(sig); if (wgt > 0.0) { state->samples++ ; state->sum_wgts += wgt; state->wtd_int_sum += intgrl * wgt; --- 291,308 ---- intgrl_sq = intgrl * intgrl; + sig = sqrt (var); + state->result = intgrl; ! state->sigma = sig; if (wgt > 0.0) { + double sum_wgts = state->sum_wgts; + double wtd_int_sum = state->wtd_int_sum; + double m = (sum_wgts > 0) ? (wtd_int_sum / sum_wgts) : 0; + double q = intgrl - m; + state->samples++ ; state->sum_wgts += wgt; state->wtd_int_sum += intgrl * wgt; *************** *** 302,312 **** --- 311,336 ---- cum_int = state->wtd_int_sum / state->sum_wgts; cum_sig = sqrt (1 / state->sum_wgts); + #if USE_ORIGINAL_CHISQ_FORMULA + /* This is the chisq formula from the original Lepage paper. It + computes the variance from - ^2 and can suffer from + catastrophic cancellations, e.g. returning negative chisq. */ if (state->samples > 1) { state->chisq = (state->chi_sum - state->wtd_int_sum * cum_int) / (state->samples - 1.0); } + #else + /* The new formula below computes exactly the same quantity as above + but using a stable recurrence */ + if (state->samples == 1) { + state->chisq = 0; + } else { + state->chisq *= (state->samples - 2.0); + state->chisq += (wgt / (1 + (wgt / sum_wgts))) * q * q; + state->chisq /= (state->samples - 1.0); + } + #endif } else { *************** *** 318,324 **** if (state->verbose >= 0) { print_res (state, ! state->it_num, intgrl, sqrt (sig), cum_int, cum_sig, state->chisq); if (it + 1 == state->iterations && state->verbose > 0) { --- 342,348 ---- if (state->verbose >= 0) { print_res (state, ! state->it_num, intgrl, sig, cum_int, cum_sig, state->chisq); if (it + 1 == state->iterations && state->verbose > 0) { diff -a -rc -C 2 -P gsl-1.11/multifit/ChangeLog gsl-1.12/multifit/ChangeLog *** gsl-1.11/multifit/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/multifit/ChangeLog Thu Nov 27 20:03:28 2008 *************** *** 1,3 **** --- 1,7 ---- + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + 2007-07-29 Brian Gough * lmset.c (set): ensure internal state is zeroed after a set diff -a -rc -C 2 -P gsl-1.11/multifit/Makefile.am gsl-1.12/multifit/Makefile.am *** gsl-1.11/multifit/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/multifit/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 2,8 **** pkginclude_HEADERS = gsl_multifit.h gsl_multifit_nlin.h ! INCLUDES= -I$(top_builddir) libgslmultifit_la_SOURCES = multilinear.c work.c lmder.c fsolver.c fdfsolver.c convergence.c gradient.c covar.c --- 2,8 ---- pkginclude_HEADERS = gsl_multifit.h gsl_multifit_nlin.h ! INCLUDES = -I$(top_srcdir) libgslmultifit_la_SOURCES = multilinear.c work.c lmder.c fsolver.c fdfsolver.c convergence.c gradient.c covar.c diff -a -rc -C 2 -P gsl-1.11/multifit/Makefile.in gsl-1.12/multifit/Makefile.in *** gsl-1.11/multifit/Makefile.in Sun Mar 30 12:07:07 2008 --- gsl-1.12/multifit/Makefile.in Mon Dec 15 14:55:14 2008 *************** *** 137,142 **** --- 137,143 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 144,150 **** --- 145,154 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 209,215 **** top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslmultifit.la pkginclude_HEADERS = gsl_multifit.h gsl_multifit_nlin.h ! INCLUDES = -I$(top_builddir) libgslmultifit_la_SOURCES = multilinear.c work.c lmder.c fsolver.c fdfsolver.c convergence.c gradient.c covar.c noinst_HEADERS = lmutil.c lmpar.c lmset.c lmiterate.c qrsolv.c test_brown.c test_enso.c test_filip.c test_fn.c test_hahn1.c test_kirby2.c test_longley.c test_nelson.c test_pontius.c test_estimator.c TESTS = $(check_PROGRAMS) --- 213,219 ---- top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslmultifit.la pkginclude_HEADERS = gsl_multifit.h gsl_multifit_nlin.h ! INCLUDES = -I$(top_srcdir) libgslmultifit_la_SOURCES = multilinear.c work.c lmder.c fsolver.c fdfsolver.c convergence.c gradient.c covar.c noinst_HEADERS = lmutil.c lmpar.c lmset.c lmiterate.c qrsolv.c test_brown.c test_enso.c test_filip.c test_fn.c test_hahn1.c test_kirby2.c test_longley.c test_nelson.c test_pontius.c test_estimator.c TESTS = $(check_PROGRAMS) diff -a -rc -C 2 -P gsl-1.11/multimin/ChangeLog gsl-1.12/multimin/ChangeLog *** gsl-1.11/multimin/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/multimin/ChangeLog Sat Nov 29 17:56:44 2008 *************** *** 1,3 **** --- 1,21 ---- + 2008-11-29 Brian Gough + + * test.c (test_f): extended fminimizer test to allow type to be + passed in as a parameter + + * simplex2.c: use BLAS, keep track of center in state to avoid + unnecessary computation, compute size as RMS value to allow linear + update. + + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + + 2008-05-06 Brian Gough + + * simplex.c (nmsimplex_iterate): fix search for second highest + point + 2007-07-30 Brian Gough * history.c: removed (unused file) diff -a -rc -C 2 -P gsl-1.11/multimin/Makefile.am gsl-1.12/multimin/Makefile.am *** gsl-1.11/multimin/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/multimin/Makefile.am Sat Nov 29 17:51:18 2008 *************** *** 2,10 **** pkginclude_HEADERS = gsl_multimin.h ! INCLUDES= -I$(top_builddir) ! libgslmultimin_la_SOURCES = fdfminimizer.c steepest_descent.c conjugate_fr.c conjugate_pr.c convergence.c diff.c vector_bfgs.c vector_bfgs2.c fminimizer.c simplex.c noinst_HEADERS = directional_minimize.c linear_minimize.c linear_wrapper.c --- 2,10 ---- pkginclude_HEADERS = gsl_multimin.h ! INCLUDES = -I$(top_srcdir) ! libgslmultimin_la_SOURCES = fdfminimizer.c steepest_descent.c conjugate_fr.c conjugate_pr.c convergence.c diff.c vector_bfgs.c vector_bfgs2.c fminimizer.c simplex.c simplex2.c noinst_HEADERS = directional_minimize.c linear_minimize.c linear_wrapper.c diff -a -rc -C 2 -P gsl-1.11/multimin/Makefile.in gsl-1.12/multimin/Makefile.in *** gsl-1.11/multimin/Makefile.in Sun Mar 30 12:07:07 2008 --- gsl-1.12/multimin/Makefile.in Mon Dec 15 14:55:15 2008 *************** *** 48,54 **** libgslmultimin_la_LIBADD = am_libgslmultimin_la_OBJECTS = fdfminimizer.lo steepest_descent.lo \ conjugate_fr.lo conjugate_pr.lo convergence.lo diff.lo \ ! vector_bfgs.lo vector_bfgs2.lo fminimizer.lo simplex.lo libgslmultimin_la_OBJECTS = $(am_libgslmultimin_la_OBJECTS) am_test_OBJECTS = test.$(OBJEXT) test_funcs.$(OBJEXT) test_OBJECTS = $(am_test_OBJECTS) --- 48,55 ---- libgslmultimin_la_LIBADD = am_libgslmultimin_la_OBJECTS = fdfminimizer.lo steepest_descent.lo \ conjugate_fr.lo conjugate_pr.lo convergence.lo diff.lo \ ! vector_bfgs.lo vector_bfgs2.lo fminimizer.lo simplex.lo \ ! simplex2.lo libgslmultimin_la_OBJECTS = $(am_libgslmultimin_la_OBJECTS) am_test_OBJECTS = test.$(OBJEXT) test_funcs.$(OBJEXT) test_OBJECTS = $(am_test_OBJECTS) *************** *** 139,144 **** --- 140,146 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 146,152 **** --- 148,157 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 211,218 **** top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslmultimin.la pkginclude_HEADERS = gsl_multimin.h ! INCLUDES = -I$(top_builddir) ! libgslmultimin_la_SOURCES = fdfminimizer.c steepest_descent.c conjugate_fr.c conjugate_pr.c convergence.c diff.c vector_bfgs.c vector_bfgs2.c fminimizer.c simplex.c noinst_HEADERS = directional_minimize.c linear_minimize.c linear_wrapper.c TESTS = $(check_PROGRAMS) test_SOURCES = test.c test_funcs.c test_funcs.h --- 216,223 ---- top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslmultimin.la pkginclude_HEADERS = gsl_multimin.h ! INCLUDES = -I$(top_srcdir) ! libgslmultimin_la_SOURCES = fdfminimizer.c steepest_descent.c conjugate_fr.c conjugate_pr.c convergence.c diff.c vector_bfgs.c vector_bfgs2.c fminimizer.c simplex.c simplex2.c noinst_HEADERS = directional_minimize.c linear_minimize.c linear_wrapper.c TESTS = $(check_PROGRAMS) test_SOURCES = test.c test_funcs.c test_funcs.h diff -a -rc -C 2 -P gsl-1.11/multimin/gsl_multimin.h gsl-1.12/multimin/gsl_multimin.h *** gsl-1.11/multimin/gsl_multimin.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/multimin/gsl_multimin.h Sat Nov 29 17:48:46 2008 *************** *** 218,224 **** GSL_VAR const gsl_multimin_fdfminimizer_type *gsl_multimin_fdfminimizer_vector_bfgs; GSL_VAR const gsl_multimin_fdfminimizer_type *gsl_multimin_fdfminimizer_vector_bfgs2; GSL_VAR const gsl_multimin_fminimizer_type *gsl_multimin_fminimizer_nmsimplex; ! __END_DECLS --- 218,224 ---- GSL_VAR const gsl_multimin_fdfminimizer_type *gsl_multimin_fdfminimizer_vector_bfgs; GSL_VAR const gsl_multimin_fdfminimizer_type *gsl_multimin_fdfminimizer_vector_bfgs2; GSL_VAR const gsl_multimin_fminimizer_type *gsl_multimin_fminimizer_nmsimplex; ! GSL_VAR const gsl_multimin_fminimizer_type *gsl_multimin_fminimizer_nmsimplex2; __END_DECLS diff -a -rc -C 2 -P gsl-1.11/multimin/simplex.c gsl-1.12/multimin/simplex.c *** gsl-1.11/multimin/simplex.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/multimin/simplex.c Thu Nov 27 20:03:28 2008 *************** *** 329,335 **** size_t n = y1->size; size_t i; ! size_t hi = 0, s_hi = 0, lo = 0; double dhi, ds_hi, dlo; int status; double val, val2; --- 329,335 ---- size_t n = y1->size; size_t i; ! size_t hi, s_hi, lo; double dhi, ds_hi, dlo; int status; double val, val2; *************** *** 342,348 **** /* get index of highest, second highest and lowest point */ ! dhi = ds_hi = dlo = gsl_vector_get (y1, 0); for (i = 1; i < n; i++) { --- 342,352 ---- /* get index of highest, second highest and lowest point */ ! dhi = dlo = gsl_vector_get (y1, 0); ! hi = 0; lo = 0; ! ! ds_hi = gsl_vector_get(y1, 1); ! s_hi = 1; for (i = 1; i < n; i++) { diff -a -rc -C 2 -P gsl-1.11/multimin/simplex2.c gsl-1.12/multimin/simplex2.c *** gsl-1.11/multimin/simplex2.c Thu Jan 1 00:00:00 1970 --- gsl-1.12/multimin/simplex2.c Sat Nov 29 17:10:16 2008 *************** *** 0 **** --- 1,557 ---- + /* multimin/simplex2.c + * + * Copyright (C) 2007, 2008 Brian Gough + * Copyright (C) 2002 Tuomo Keskitalo, 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + + /* + - Originally written by Tuomo Keskitalo + - Corrections to nmsimplex_iterate and other functions + by Ivo Alxneit + - Additional help by Brian Gough + - Optimisations added by Brian Gough + + use BLAS for frequently-called functions + + keep track of the center to avoid unnecessary computation + + compute size as RMS value, allowing linear update on each step + instead of recomputing from all N+1 vectors. + */ + + /* The Simplex method of Nelder and Mead, also known as the polytope + search alogorithm. Ref: Nelder, J.A., Mead, R., Computer Journal 7 + (1965) pp. 308-313. + + This implementation uses n+1 corner points in the simplex. + */ + + #include + #include + #include + #include + + typedef struct + { + gsl_matrix *x1; /* simplex corner points */ + gsl_vector *y1; /* function value at corner points */ + gsl_vector *ws1; /* workspace 1 for algorithm */ + gsl_vector *ws2; /* workspace 2 for algorithm */ + gsl_vector *center; /* center of all points */ + gsl_vector *delta; /* current step */ + gsl_vector *xmc; /* x - center (workspace) */ + double S2; + } + nmsimplex_state_t; + + static double + try_corner_move (const double coeff, + const nmsimplex_state_t * state, + size_t corner, + gsl_vector * xc, const gsl_multimin_function * f) + { + /* moves a simplex corner scaled by coeff (negative value represents + mirroring by the middle point of the "other" corner points) + and gives new corner in xc and function value at xc as a + return value + */ + + gsl_matrix *x1 = state->x1; + const size_t P = x1->size1; + double newval; + + /* xc = (1-coeff)*(P/(P-1)) * center(all) + ((P*coeff-1)/(P-1))*x_corner */ + { + double alpha = (1 - coeff) * P / (P - 1.0); + double beta = (P * coeff - 1.0) / (P - 1.0); + gsl_vector_const_view row = gsl_matrix_const_row (x1, corner); + + gsl_vector_memcpy (xc, state->center); + gsl_blas_dscal (alpha, xc); + gsl_blas_daxpy (beta, &row.vector, xc); + } + + newval = GSL_MULTIMIN_FN_EVAL (f, xc); + + return newval; + } + + + static void + update_point (nmsimplex_state_t * state, size_t i, + const gsl_vector * x, double val) + { + gsl_vector_const_view x_orig = gsl_matrix_const_row (state->x1, i); + const size_t P = state->x1->size1; + + /* Compute delta = x - x_orig */ + gsl_vector_memcpy (state->delta, x); + gsl_blas_daxpy (-1.0, &x_orig.vector, state->delta); + + /* Compute xmc = x_orig - c */ + gsl_vector_memcpy (state->xmc, &x_orig.vector); + gsl_blas_daxpy (-1.0, state->center, state->xmc); + + /* Update size: S2' = S2 + (2/P) * (x_orig - c).delta + (P-1)*(delta/P)^2 */ + { + double d = gsl_blas_dnrm2 (state->delta); + double xmcd; + gsl_blas_ddot (state->xmc, state->delta, &xmcd); + state->S2 += (2.0 / P) * xmcd + ((P - 1.0) / P) * (d * d / P); + } + + /* Update center: c' = c + (x - x_orig) / P */ + + { + double alpha = 1.0 / P; + gsl_blas_daxpy (-alpha, &x_orig.vector, state->center); + gsl_blas_daxpy (alpha, x, state->center); + } + + gsl_matrix_set_row (state->x1, i, x); + gsl_vector_set (state->y1, i, val); + } + + static int + contract_by_best (nmsimplex_state_t * state, size_t best, + gsl_vector * xc, gsl_multimin_function * f) + { + + /* Function contracts the simplex in respect to best valued + corner. That is, all corners besides the best corner are moved. + (This function is rarely called in practice, since it is the last + choice, hence not optimised - BJG) */ + + /* the xc vector is simply work space here */ + + gsl_matrix *x1 = state->x1; + gsl_vector *y1 = state->y1; + + size_t i, j; + double newval; + + int status = GSL_SUCCESS; + + for (i = 0; i < x1->size1; i++) + { + if (i != best) + { + for (j = 0; j < x1->size2; j++) + { + newval = 0.5 * (gsl_matrix_get (x1, i, j) + + gsl_matrix_get (x1, best, j)); + gsl_matrix_set (x1, i, j, newval); + } + + /* evaluate function in the new point */ + + gsl_matrix_get_row (xc, x1, i); + newval = GSL_MULTIMIN_FN_EVAL (f, xc); + gsl_vector_set (y1, i, newval); + + /* notify caller that we found at least one bad function value. + we finish the contraction (and do not abort) to allow the user + to handle the situation */ + + if (!gsl_finite (newval)) + { + status = GSL_EBADFUNC; + } + } + } + + return status; + } + + static int + compute_center (const nmsimplex_state_t * state, gsl_vector * center) + { + /* calculates the center of the simplex and stores in center */ + + gsl_matrix *x1 = state->x1; + const size_t P = x1->size1; + size_t i; + + gsl_vector_set_zero (center); + + for (i = 0; i < P; i++) + { + gsl_vector_const_view row = gsl_matrix_const_row (x1, i); + gsl_blas_daxpy (1.0, &row.vector, center); + } + + { + const double alpha = 1.0 / P; + gsl_blas_dscal (alpha, center); + } + + return GSL_SUCCESS; + } + + static double + compute_size (nmsimplex_state_t * state, const gsl_vector * center) + { + /* calculates simplex size as rms sum of length of vectors + from simplex center to corner points: + + sqrt( sum ( || y - y_middlepoint ||^2 ) / n ) + */ + + gsl_vector *s = state->ws1; + gsl_matrix *x1 = state->x1; + const size_t P = x1->size1; + size_t i; + + double ss = 0.0; + + for (i = 0; i < P; i++) + { + double t; + gsl_matrix_get_row (s, x1, i); + gsl_blas_daxpy (-1.0, center, s); + t = gsl_blas_dnrm2 (s); + ss += t * t; + } + + /* Store squared size in the state */ + state->S2 = (ss / P); + + return sqrt (ss / P); + } + + static int + nmsimplex_alloc (void *vstate, size_t n) + { + nmsimplex_state_t *state = (nmsimplex_state_t *) vstate; + + if (n == 0) + { + GSL_ERROR ("invalid number of parameters specified", GSL_EINVAL); + } + + state->x1 = gsl_matrix_alloc (n + 1, n); + + if (state->x1 == NULL) + { + GSL_ERROR ("failed to allocate space for x1", GSL_ENOMEM); + } + + state->y1 = gsl_vector_alloc (n + 1); + + if (state->y1 == NULL) + { + gsl_matrix_free (state->x1); + GSL_ERROR ("failed to allocate space for y", GSL_ENOMEM); + } + + state->ws1 = gsl_vector_alloc (n); + + if (state->ws1 == NULL) + { + gsl_matrix_free (state->x1); + gsl_vector_free (state->y1); + GSL_ERROR ("failed to allocate space for ws1", GSL_ENOMEM); + } + + state->ws2 = gsl_vector_alloc (n); + + if (state->ws2 == NULL) + { + gsl_matrix_free (state->x1); + gsl_vector_free (state->y1); + gsl_vector_free (state->ws1); + GSL_ERROR ("failed to allocate space for ws2", GSL_ENOMEM); + } + + state->center = gsl_vector_alloc (n); + + if (state->center == NULL) + { + gsl_matrix_free (state->x1); + gsl_vector_free (state->y1); + gsl_vector_free (state->ws1); + gsl_vector_free (state->ws2); + GSL_ERROR ("failed to allocate space for center", GSL_ENOMEM); + } + + state->delta = gsl_vector_alloc (n); + + if (state->delta == NULL) + { + gsl_matrix_free (state->x1); + gsl_vector_free (state->y1); + gsl_vector_free (state->ws1); + gsl_vector_free (state->ws2); + gsl_vector_free (state->center); + GSL_ERROR ("failed to allocate space for delta", GSL_ENOMEM); + } + + state->xmc = gsl_vector_alloc (n); + + if (state->xmc == NULL) + { + gsl_matrix_free (state->x1); + gsl_vector_free (state->y1); + gsl_vector_free (state->ws1); + gsl_vector_free (state->ws2); + gsl_vector_free (state->center); + gsl_vector_free (state->delta); + GSL_ERROR ("failed to allocate space for xmc", GSL_ENOMEM); + } + + + return GSL_SUCCESS; + } + + static void + nmsimplex_free (void *vstate) + { + nmsimplex_state_t *state = (nmsimplex_state_t *) vstate; + + gsl_matrix_free (state->x1); + gsl_vector_free (state->y1); + gsl_vector_free (state->ws1); + gsl_vector_free (state->ws2); + gsl_vector_free (state->center); + gsl_vector_free (state->delta); + gsl_vector_free (state->xmc); + } + + static int + nmsimplex_set (void *vstate, gsl_multimin_function * f, + const gsl_vector * x, + double *size, const gsl_vector * step_size) + { + int status; + size_t i; + double val; + + nmsimplex_state_t *state = (nmsimplex_state_t *) vstate; + + gsl_vector *xtemp = state->ws1; + + if (xtemp->size != x->size) + { + GSL_ERROR ("incompatible size of x", GSL_EINVAL); + } + + if (xtemp->size != step_size->size) + { + GSL_ERROR ("incompatible size of step_size", GSL_EINVAL); + } + + /* first point is the original x0 */ + + val = GSL_MULTIMIN_FN_EVAL (f, x); + + if (!gsl_finite (val)) + { + GSL_ERROR ("non-finite function value encountered", GSL_EBADFUNC); + } + + gsl_matrix_set_row (state->x1, 0, x); + gsl_vector_set (state->y1, 0, val); + + /* following points are initialized to x0 + step_size */ + + for (i = 0; i < x->size; i++) + { + status = gsl_vector_memcpy (xtemp, x); + + if (status != 0) + { + GSL_ERROR ("vector memcopy failed", GSL_EFAILED); + } + + { + double xi = gsl_vector_get (x, i); + double si = gsl_vector_get (step_size, i); + + gsl_vector_set (xtemp, i, xi + si); + val = GSL_MULTIMIN_FN_EVAL (f, xtemp); + } + + if (!gsl_finite (val)) + { + GSL_ERROR ("non-finite function value encountered", GSL_EBADFUNC); + } + + gsl_matrix_set_row (state->x1, i + 1, xtemp); + gsl_vector_set (state->y1, i + 1, val); + } + + compute_center (state, state->center); + + /* Initialize simplex size */ + *size = compute_size (state, state->center); + + return GSL_SUCCESS; + } + + static int + nmsimplex_iterate (void *vstate, gsl_multimin_function * f, + gsl_vector * x, double *size, double *fval) + { + + /* Simplex iteration tries to minimize function f value */ + /* Includes corrections from Ivo Alxneit */ + + nmsimplex_state_t *state = (nmsimplex_state_t *) vstate; + + /* xc and xc2 vectors store tried corner point coordinates */ + + gsl_vector *xc = state->ws1; + gsl_vector *xc2 = state->ws2; + gsl_vector *y1 = state->y1; + gsl_matrix *x1 = state->x1; + + const size_t n = y1->size; + size_t i; + size_t hi, s_hi, lo; + double dhi, ds_hi, dlo; + int status; + double val, val2; + + if (xc->size != x->size) + { + GSL_ERROR ("incompatible size of x", GSL_EINVAL); + } + + /* get index of highest, second highest and lowest point */ + + dhi = dlo = gsl_vector_get (y1, 0); + hi = 0; + lo = 0; + + ds_hi = gsl_vector_get (y1, 1); + s_hi = 1; + + for (i = 1; i < n; i++) + { + val = (gsl_vector_get (y1, i)); + if (val < dlo) + { + dlo = val; + lo = i; + } + else if (val > dhi) + { + ds_hi = dhi; + s_hi = hi; + dhi = val; + hi = i; + } + else if (val > ds_hi) + { + ds_hi = val; + s_hi = i; + } + } + + /* try reflecting the highest value point */ + + val = try_corner_move (-1.0, state, hi, xc, f); + + if (gsl_finite (val) && val < gsl_vector_get (y1, lo)) + { + /* reflected point is lowest, try expansion */ + + val2 = try_corner_move (-2.0, state, hi, xc2, f); + + if (gsl_finite (val2) && val2 < gsl_vector_get (y1, lo)) + { + update_point (state, hi, xc2, val2); + } + else + { + update_point (state, hi, xc, val); + } + } + else if (!gsl_finite (val) || val > gsl_vector_get (y1, s_hi)) + { + /* reflection does not improve things enough, or we got a + non-finite function value */ + + if (gsl_finite (val) && val <= gsl_vector_get (y1, hi)) + { + /* if trial point is better than highest point, replace + highest point */ + + update_point (state, hi, xc, val); + } + + /* try one-dimensional contraction */ + + val2 = try_corner_move (0.5, state, hi, xc2, f); + + if (gsl_finite (val2) && val2 <= gsl_vector_get (y1, hi)) + { + update_point (state, hi, xc2, val2); + } + else + { + /* contract the whole simplex about the best point */ + + status = contract_by_best (state, lo, xc, f); + + if (status != GSL_SUCCESS) + { + GSL_ERROR ("contraction failed", GSL_EFAILED); + } + } + } + else + { + /* trial point is better than second highest point. Replace + highest point by it */ + + update_point (state, hi, xc, val); + } + + /* return lowest point of simplex as x */ + + lo = gsl_vector_min_index (y1); + gsl_matrix_get_row (x, x1, lo); + *fval = gsl_vector_get (y1, lo); + + /* Update simplex size */ + + { + double S2 = state->S2; + + if (S2 > 0) + { + *size = sqrt (S2); + } + else + { + /* recompute if accumulated error has made size invalid */ + *size = compute_size (state, state->center); + } + } + + return GSL_SUCCESS; + } + + static const gsl_multimin_fminimizer_type nmsimplex_type = + { "nmsimplex2", /* name */ + sizeof (nmsimplex_state_t), + &nmsimplex_alloc, + &nmsimplex_set, + &nmsimplex_iterate, + &nmsimplex_free + }; + + const gsl_multimin_fminimizer_type + * gsl_multimin_fminimizer_nmsimplex2 = &nmsimplex_type; diff -a -rc -C 2 -P gsl-1.11/multimin/test.c gsl-1.12/multimin/test.c *** gsl-1.11/multimin/test.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/multimin/test.c Sat Nov 29 17:05:16 2008 *************** *** 35,80 **** initpt_function initpt, const gsl_multimin_fdfminimizer_type *T); int ! test_f(const char * desc, gsl_multimin_function *f, initpt_function initpt); int main (void) { - const gsl_multimin_fdfminimizer_type *fdfminimizers[6]; - const gsl_multimin_fdfminimizer_type ** T; - gsl_ieee_env_setup (); ! fdfminimizers[0] = gsl_multimin_fdfminimizer_steepest_descent; ! fdfminimizers[1] = gsl_multimin_fdfminimizer_conjugate_pr; ! fdfminimizers[2] = gsl_multimin_fdfminimizer_conjugate_fr; ! fdfminimizers[3] = gsl_multimin_fdfminimizer_vector_bfgs; ! fdfminimizers[4] = gsl_multimin_fdfminimizer_vector_bfgs2; ! fdfminimizers[5] = 0; ! ! T = fdfminimizers; ! ! while (*T != 0) ! { ! test_fdf("Roth", &roth, roth_initpt,*T); ! test_fdf("Wood", &wood, wood_initpt,*T); ! test_fdf("Rosenbrock", &rosenbrock, rosenbrock_initpt,*T); ! T++; ! } ! ! test_f("Roth", &roth_fmin, roth_initpt); ! test_f("Wood", &wood_fmin, wood_initpt); ! test_f("Rosenbrock", &rosenbrock_fmin, rosenbrock_initpt); - T = fdfminimizers; - - while (*T != 0) - { - test_fdf("NRoth", &Nroth, roth_initpt,*T); - test_fdf("NWood", &Nwood, wood_initpt,*T); - test_fdf("NRosenbrock", &Nrosenbrock, rosenbrock_initpt,*T); - T++; - } exit (gsl_test_summary()); } --- 35,100 ---- initpt_function initpt, const gsl_multimin_fdfminimizer_type *T); int ! test_f(const char * desc, gsl_multimin_function *f, initpt_function initpt, ! const gsl_multimin_fminimizer_type *T); int main (void) { gsl_ieee_env_setup (); ! { ! const gsl_multimin_fdfminimizer_type *fdfminimizers[6]; ! const gsl_multimin_fdfminimizer_type ** T; ! ! fdfminimizers[0] = gsl_multimin_fdfminimizer_steepest_descent; ! fdfminimizers[1] = gsl_multimin_fdfminimizer_conjugate_pr; ! fdfminimizers[2] = gsl_multimin_fdfminimizer_conjugate_fr; ! fdfminimizers[3] = gsl_multimin_fdfminimizer_vector_bfgs; ! fdfminimizers[4] = gsl_multimin_fdfminimizer_vector_bfgs2; ! fdfminimizers[5] = 0; ! ! T = fdfminimizers; ! ! while (*T != 0) ! { ! test_fdf("Roth", &roth, roth_initpt,*T); ! test_fdf("Wood", &wood, wood_initpt,*T); ! test_fdf("Rosenbrock", &rosenbrock, rosenbrock_initpt,*T); ! T++; ! } ! ! T = fdfminimizers; ! ! while (*T != 0) ! { ! test_fdf("NRoth", &Nroth, roth_initpt,*T); ! test_fdf("NWood", &Nwood, wood_initpt,*T); ! test_fdf("NRosenbrock", &Nrosenbrock, rosenbrock_initpt,*T); ! T++; ! } ! } ! ! ! { ! const gsl_multimin_fminimizer_type *fminimizers[3]; ! const gsl_multimin_fminimizer_type ** T; ! ! fminimizers[0] = gsl_multimin_fminimizer_nmsimplex; ! fminimizers[1] = gsl_multimin_fminimizer_nmsimplex2; ! fminimizers[2] = 0; ! ! T = fminimizers; ! ! while (*T != 0) ! { ! test_f("Roth", &roth_fmin, roth_initpt,*T); ! test_f("Wood", &wood_fmin, wood_initpt,*T); ! test_f("Rosenbrock", &rosenbrock_fmin, rosenbrock_initpt,*T); ! T++; ! } ! } exit (gsl_test_summary()); } *************** *** 137,149 **** } int ! test_f(const char * desc, gsl_multimin_function *f, initpt_function initpt) { - /* currently this function tests only nmsimplex */ - int status; size_t i, iter = 0; - const gsl_multimin_fminimizer_type *T = gsl_multimin_fminimizer_nmsimplex; gsl_vector *x = gsl_vector_alloc (f->n); --- 157,167 ---- } int ! test_f(const char * desc, gsl_multimin_function *f, initpt_function initpt, ! const gsl_multimin_fminimizer_type *T) { int status; size_t i, iter = 0; gsl_vector *x = gsl_vector_alloc (f->n); diff -a -rc -C 2 -P gsl-1.11/multiroots/ChangeLog gsl-1.12/multiroots/ChangeLog *** gsl-1.11/multiroots/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/multiroots/ChangeLog Thu Nov 27 20:03:28 2008 *************** *** 1,3 **** --- 1,7 ---- + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + 2007-11-09 Brian Gough * convergence.c (gsl_multiroot_test_delta): accept dxi = 0 diff -a -rc -C 2 -P gsl-1.11/multiroots/Makefile.am gsl-1.12/multiroots/Makefile.am *** gsl-1.11/multiroots/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/multiroots/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 6,12 **** noinst_HEADERS = enorm.c dogleg.c ! INCLUDES= -I$(top_builddir) libgslmultiroots_la_SOURCES = fdjac.c fsolver.c fdfsolver.c convergence.c newton.c gnewton.c dnewton.c broyden.c hybrid.c hybridj.c --- 6,12 ---- noinst_HEADERS = enorm.c dogleg.c ! INCLUDES = -I$(top_srcdir) libgslmultiroots_la_SOURCES = fdjac.c fsolver.c fdfsolver.c convergence.c newton.c gnewton.c dnewton.c broyden.c hybrid.c hybridj.c diff -a -rc -C 2 -P gsl-1.11/multiroots/Makefile.in gsl-1.12/multiroots/Makefile.in *** gsl-1.11/multiroots/Makefile.in Sun Mar 30 12:07:07 2008 --- gsl-1.12/multiroots/Makefile.in Mon Dec 15 14:55:15 2008 *************** *** 140,145 **** --- 140,146 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 147,153 **** --- 148,157 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 213,219 **** noinst_LTLIBRARIES = libgslmultiroots.la pkginclude_HEADERS = gsl_multiroots.h noinst_HEADERS = enorm.c dogleg.c ! INCLUDES = -I$(top_builddir) libgslmultiroots_la_SOURCES = fdjac.c fsolver.c fdfsolver.c convergence.c newton.c gnewton.c dnewton.c broyden.c hybrid.c hybridj.c TESTS = $(check_PROGRAMS) test_SOURCES = test.c test_funcs.c test_funcs.h --- 217,223 ---- noinst_LTLIBRARIES = libgslmultiroots.la pkginclude_HEADERS = gsl_multiroots.h noinst_HEADERS = enorm.c dogleg.c ! INCLUDES = -I$(top_srcdir) libgslmultiroots_la_SOURCES = fdjac.c fsolver.c fdfsolver.c convergence.c newton.c gnewton.c dnewton.c broyden.c hybrid.c hybridj.c TESTS = $(check_PROGRAMS) test_SOURCES = test.c test_funcs.c test_funcs.h diff -a -rc -C 2 -P gsl-1.11/multiroots/hybrid.c gsl-1.12/multiroots/hybrid.c *** gsl-1.11/multiroots/hybrid.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/multiroots/hybrid.c Thu Nov 27 20:03:28 2008 *************** *** 64,75 **** gsl_vector * x, gsl_vector * f, gsl_vector * dx); static int hybrids_set (void *vstate, gsl_multiroot_function * func, gsl_vector * x, gsl_vector * f, gsl_vector * dx); ! static int set (void *vstate, gsl_multiroot_function * func, gsl_vector * x, gsl_vector * f, gsl_vector * dx, int scale); static int hybrid_iterate (void *vstate, gsl_multiroot_function * func, gsl_vector * x, gsl_vector * f, gsl_vector * dx); static void hybrid_free (void *vstate); ! static int iterate (void *vstate, gsl_multiroot_function * func, gsl_vector * x, gsl_vector * f, gsl_vector * dx, int scale); --- 64,75 ---- gsl_vector * x, gsl_vector * f, gsl_vector * dx); static int hybrids_set (void *vstate, gsl_multiroot_function * func, gsl_vector * x, gsl_vector * f, gsl_vector * dx); ! static int hybrid_set_impl (void *vstate, gsl_multiroot_function * func, gsl_vector * x, gsl_vector * f, gsl_vector * dx, int scale); static int hybrid_iterate (void *vstate, gsl_multiroot_function * func, gsl_vector * x, gsl_vector * f, gsl_vector * dx); static void hybrid_free (void *vstate); ! static int hybrid_iterate_impl (void *vstate, gsl_multiroot_function * func, gsl_vector * x, gsl_vector * f, gsl_vector * dx, int scale); *************** *** 343,349 **** hybrid_set (void *vstate, gsl_multiroot_function * func, gsl_vector * x, gsl_vector * f, gsl_vector * dx) { ! int status = set (vstate, func, x, f, dx, 0); return status; } --- 343,349 ---- hybrid_set (void *vstate, gsl_multiroot_function * func, gsl_vector * x, gsl_vector * f, gsl_vector * dx) { ! int status = hybrid_set_impl (vstate, func, x, f, dx, 0); return status; } *************** *** 351,362 **** hybrids_set (void *vstate, gsl_multiroot_function * func, gsl_vector * x, gsl_vector * f, gsl_vector * dx) { ! int status = set (vstate, func, x, f, dx, 1); return status; } static int ! set (void *vstate, gsl_multiroot_function * func, gsl_vector * x, gsl_vector * f, gsl_vector * dx, int scale) { hybrid_state_t *state = (hybrid_state_t *) vstate; --- 351,362 ---- hybrids_set (void *vstate, gsl_multiroot_function * func, gsl_vector * x, gsl_vector * f, gsl_vector * dx) { ! int status = hybrid_set_impl (vstate, func, x, f, dx, 1); return status; } static int ! hybrid_set_impl (void *vstate, gsl_multiroot_function * func, gsl_vector * x, gsl_vector * f, gsl_vector * dx, int scale) { hybrid_state_t *state = (hybrid_state_t *) vstate; *************** *** 421,427 **** hybrid_iterate (void *vstate, gsl_multiroot_function * func, gsl_vector * x, gsl_vector * f, gsl_vector * dx) { ! int status = iterate (vstate, func, x, f, dx, 0); return status; } --- 421,427 ---- hybrid_iterate (void *vstate, gsl_multiroot_function * func, gsl_vector * x, gsl_vector * f, gsl_vector * dx) { ! int status = hybrid_iterate_impl (vstate, func, x, f, dx, 0); return status; } *************** *** 429,441 **** hybrids_iterate (void *vstate, gsl_multiroot_function * func, gsl_vector * x, gsl_vector * f, gsl_vector * dx) { ! int status = iterate (vstate, func, x, f, dx, 1); return status; } static int ! iterate (void *vstate, gsl_multiroot_function * func, gsl_vector * x, ! gsl_vector * f, gsl_vector * dx, int scale) { hybrid_state_t *state = (hybrid_state_t *) vstate; --- 429,442 ---- hybrids_iterate (void *vstate, gsl_multiroot_function * func, gsl_vector * x, gsl_vector * f, gsl_vector * dx) { ! int status = hybrid_iterate_impl (vstate, func, x, f, dx, 1); return status; } static int ! hybrid_iterate_impl (void *vstate, gsl_multiroot_function * func, ! gsl_vector * x, ! gsl_vector * f, gsl_vector * dx, int scale) { hybrid_state_t *state = (hybrid_state_t *) vstate; diff -a -rc -C 2 -P gsl-1.11/multiroots/hybridj.c gsl-1.12/multiroots/hybridj.c *** gsl-1.11/multiroots/hybridj.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/multiroots/hybridj.c Thu Nov 27 20:03:28 2008 *************** *** 61,70 **** static int hybridj_alloc (void *vstate, size_t n); static int hybridj_set (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx); static int hybridsj_set (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx); ! static int set (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx, int scale); static int hybridj_iterate (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx); static void hybridj_free (void *vstate); ! static int iterate (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx, int scale); static int hybridj_alloc (void *vstate, size_t n) --- 61,70 ---- static int hybridj_alloc (void *vstate, size_t n); static int hybridj_set (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx); static int hybridsj_set (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx); ! static int hybridj_set_impl (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx, int scale); static int hybridj_iterate (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx); static void hybridj_free (void *vstate); ! static int hybridj_iterate_impl (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx, int scale); static int hybridj_alloc (void *vstate, size_t n) *************** *** 311,329 **** static int hybridj_set (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx) { ! int status = set (vstate, fdf, x, f, J, dx, 0); return status ; } static int hybridsj_set (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx) { ! int status = set (vstate, fdf, x, f, J, dx, 1); return status ; } static int ! set (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx, int scale) { hybridj_state_t *state = (hybridj_state_t *) vstate; --- 311,329 ---- static int hybridj_set (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx) { ! int status = hybridj_set_impl (vstate, fdf, x, f, J, dx, 0); return status ; } static int hybridsj_set (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx) { ! int status = hybridj_set_impl (vstate, fdf, x, f, J, dx, 1); return status ; } static int ! hybridj_set_impl (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx, int scale) { hybridj_state_t *state = (hybridj_state_t *) vstate; *************** *** 365,383 **** static int hybridj_iterate (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx) { ! int status = iterate (vstate, fdf, x, f, J, dx, 0); return status; } static int hybridsj_iterate (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx) { ! int status = iterate (vstate, fdf, x, f, J, dx, 1); return status; } static int ! iterate (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx, int scale) { hybridj_state_t *state = (hybridj_state_t *) vstate; --- 365,383 ---- static int hybridj_iterate (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx) { ! int status = hybridj_iterate_impl (vstate, fdf, x, f, J, dx, 0); return status; } static int hybridsj_iterate (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx) { ! int status = hybridj_iterate_impl (vstate, fdf, x, f, J, dx, 1); return status; } static int ! hybridj_iterate_impl (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx, int scale) { hybridj_state_t *state = (hybridj_state_t *) vstate; diff -a -rc -C 2 -P gsl-1.11/ntuple/ChangeLog gsl-1.12/ntuple/ChangeLog *** gsl-1.11/ntuple/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/ntuple/ChangeLog Thu Nov 27 20:03:28 2008 *************** *** 1,3 **** --- 1,7 ---- + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + 2004-05-30 Brian Gough * ntuple/test.c (main): choose ratio 1/(i+1.5) to avoid values diff -a -rc -C 2 -P gsl-1.11/ntuple/Makefile.am gsl-1.12/ntuple/Makefile.am *** gsl-1.11/ntuple/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/ntuple/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 2,8 **** pkginclude_HEADERS = gsl_ntuple.h ! INCLUDES= -I$(top_builddir) libgslntuple_la_SOURCES = ntuple.c --- 2,8 ---- pkginclude_HEADERS = gsl_ntuple.h ! INCLUDES = -I$(top_srcdir) libgslntuple_la_SOURCES = ntuple.c diff -a -rc -C 2 -P gsl-1.11/ntuple/Makefile.in gsl-1.12/ntuple/Makefile.in *** gsl-1.11/ntuple/Makefile.in Sun Mar 30 12:07:07 2008 --- gsl-1.12/ntuple/Makefile.in Mon Dec 15 14:55:15 2008 *************** *** 133,138 **** --- 133,139 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 140,146 **** --- 141,150 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 205,211 **** top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslntuple.la pkginclude_HEADERS = gsl_ntuple.h ! INCLUDES = -I$(top_builddir) libgslntuple_la_SOURCES = ntuple.c TESTS = $(check_PROGRAMS) test_SOURCES = test.c --- 209,215 ---- top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslntuple.la pkginclude_HEADERS = gsl_ntuple.h ! INCLUDES = -I$(top_srcdir) libgslntuple_la_SOURCES = ntuple.c TESTS = $(check_PROGRAMS) test_SOURCES = test.c diff -a -rc -C 2 -P gsl-1.11/ode-initval/ChangeLog gsl-1.12/ode-initval/ChangeLog *** gsl-1.11/ode-initval/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/ode-initval/ChangeLog Thu Nov 27 20:03:28 2008 *************** *** 1,3 **** --- 1,7 ---- + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + 2008-01-28 Brian Gough * test.c (test_evolve_negative_h): test evolution with negative diff -a -rc -C 2 -P gsl-1.11/ode-initval/Makefile.am gsl-1.12/ode-initval/Makefile.am *** gsl-1.11/ode-initval/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/ode-initval/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 2,8 **** pkginclude_HEADERS = gsl_odeiv.h ! 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 --- 2,8 ---- pkginclude_HEADERS = gsl_odeiv.h ! INCLUDES = -I$(top_srcdir) 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 diff -a -rc -C 2 -P gsl-1.11/ode-initval/Makefile.in gsl-1.12/ode-initval/Makefile.in *** gsl-1.11/ode-initval/Makefile.in Sun Mar 30 12:07:08 2008 --- gsl-1.12/ode-initval/Makefile.in Mon Dec 15 14:55:15 2008 *************** *** 138,143 **** --- 138,144 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 145,151 **** --- 146,155 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 210,216 **** top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslodeiv.la pkginclude_HEADERS = gsl_odeiv.h ! 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 TESTS = $(check_PROGRAMS) --- 214,220 ---- top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslodeiv.la pkginclude_HEADERS = gsl_odeiv.h ! INCLUDES = -I$(top_srcdir) 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 TESTS = $(check_PROGRAMS) diff -a -rc -C 2 -P gsl-1.11/ode-initval/TODO gsl-1.12/ode-initval/TODO *** gsl-1.11/ode-initval/TODO Tue Feb 5 13:22:10 2008 --- gsl-1.12/ode-initval/TODO Thu Nov 27 20:03:28 2008 *************** *** 9,15 **** existing workspaces * Implement other stepping methods from well-known packages such as ! RKSUITE, etc * Roundoff error needs to be taken into account to prevent the step-size being made arbitrarily small --- 9,15 ---- existing workspaces * Implement other stepping methods from well-known packages such as ! RKSUITE, VODE, DASSL, etc * Roundoff error needs to be taken into account to prevent the step-size being made arbitrarily small diff -a -rc -C 2 -P gsl-1.11/permutation/ChangeLog gsl-1.12/permutation/ChangeLog *** gsl-1.11/permutation/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/permutation/ChangeLog Thu Nov 27 20:03:28 2008 *************** *** 1,3 **** --- 1,13 ---- + 2008-07-03 Brian Gough + + * permutation.c: move gsl_permutation_get to inline.c + + * gsl_permutation.h: use new inline declarations + + * inline.c: handle inline functions separately + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + 2003-02-17 Brian Gough * canonical.c (gsl_permutation_canonical_to_linear): fixed bug diff -a -rc -C 2 -P gsl-1.11/permutation/Makefile.am gsl-1.12/permutation/Makefile.am *** gsl-1.11/permutation/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/permutation/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 2,10 **** pkginclude_HEADERS = gsl_permutation.h gsl_permute.h gsl_permute_char.h gsl_permute_complex_double.h gsl_permute_complex_float.h gsl_permute_complex_long_double.h gsl_permute_double.h gsl_permute_float.h gsl_permute_int.h gsl_permute_long.h gsl_permute_long_double.h gsl_permute_short.h gsl_permute_uchar.h gsl_permute_uint.h gsl_permute_ulong.h gsl_permute_ushort.h gsl_permute_vector.h gsl_permute_vector_char.h gsl_permute_vector_complex_double.h gsl_permute_vector_complex_float.h gsl_permute_vector_complex_long_double.h gsl_permute_vector_double.h gsl_permute_vector_float.h gsl_permute_vector_int.h gsl_permute_vector_long.h gsl_permute_vector_long_double.h gsl_permute_vector_short.h gsl_permute_vector_uchar.h gsl_permute_vector_uint.h gsl_permute_vector_ulong.h gsl_permute_vector_ushort.h ! INCLUDES= -I$(top_builddir) -I$(top_srcdir) ! libgslpermutation_la_SOURCES = init.c file.c permutation.c permute.c canonical.c noinst_HEADERS = permute_source.c --- 2,10 ---- pkginclude_HEADERS = gsl_permutation.h gsl_permute.h gsl_permute_char.h gsl_permute_complex_double.h gsl_permute_complex_float.h gsl_permute_complex_long_double.h gsl_permute_double.h gsl_permute_float.h gsl_permute_int.h gsl_permute_long.h gsl_permute_long_double.h gsl_permute_short.h gsl_permute_uchar.h gsl_permute_uint.h gsl_permute_ulong.h gsl_permute_ushort.h gsl_permute_vector.h gsl_permute_vector_char.h gsl_permute_vector_complex_double.h gsl_permute_vector_complex_float.h gsl_permute_vector_complex_long_double.h gsl_permute_vector_double.h gsl_permute_vector_float.h gsl_permute_vector_int.h gsl_permute_vector_long.h gsl_permute_vector_long_double.h gsl_permute_vector_short.h gsl_permute_vector_uchar.h gsl_permute_vector_uint.h gsl_permute_vector_ulong.h gsl_permute_vector_ushort.h ! INCLUDES = -I$(top_srcdir) ! libgslpermutation_la_SOURCES = init.c file.c permutation.c permute.c canonical.c inline.c noinst_HEADERS = permute_source.c diff -a -rc -C 2 -P gsl-1.11/permutation/Makefile.in gsl-1.12/permutation/Makefile.in *** gsl-1.11/permutation/Makefile.in Sun Mar 30 12:07:08 2008 --- gsl-1.12/permutation/Makefile.in Mon Dec 15 14:55:16 2008 *************** *** 47,53 **** LTLIBRARIES = $(noinst_LTLIBRARIES) libgslpermutation_la_LIBADD = am_libgslpermutation_la_OBJECTS = init.lo file.lo permutation.lo \ ! permute.lo canonical.lo libgslpermutation_la_OBJECTS = $(am_libgslpermutation_la_OBJECTS) am_test_OBJECTS = test.$(OBJEXT) test_OBJECTS = $(am_test_OBJECTS) --- 47,53 ---- LTLIBRARIES = $(noinst_LTLIBRARIES) libgslpermutation_la_LIBADD = am_libgslpermutation_la_OBJECTS = init.lo file.lo permutation.lo \ ! permute.lo canonical.lo inline.lo libgslpermutation_la_OBJECTS = $(am_libgslpermutation_la_OBJECTS) am_test_OBJECTS = test.$(OBJEXT) test_OBJECTS = $(am_test_OBJECTS) *************** *** 134,139 **** --- 134,140 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 141,147 **** --- 142,151 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 206,213 **** top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslpermutation.la pkginclude_HEADERS = gsl_permutation.h gsl_permute.h gsl_permute_char.h gsl_permute_complex_double.h gsl_permute_complex_float.h gsl_permute_complex_long_double.h gsl_permute_double.h gsl_permute_float.h gsl_permute_int.h gsl_permute_long.h gsl_permute_long_double.h gsl_permute_short.h gsl_permute_uchar.h gsl_permute_uint.h gsl_permute_ulong.h gsl_permute_ushort.h gsl_permute_vector.h gsl_permute_vector_char.h gsl_permute_vector_complex_double.h gsl_permute_vector_complex_float.h gsl_permute_vector_complex_long_double.h gsl_permute_vector_double.h gsl_permute_vector_float.h gsl_permute_vector_int.h gsl_permute_vector_long.h gsl_permute_vector_long_double.h gsl_permute_vector_short.h gsl_permute_vector_uchar.h gsl_permute_vector_uint.h gsl_permute_vector_ulong.h gsl_permute_vector_ushort.h ! INCLUDES = -I$(top_builddir) -I$(top_srcdir) ! libgslpermutation_la_SOURCES = init.c file.c permutation.c permute.c canonical.c noinst_HEADERS = permute_source.c TESTS = $(check_PROGRAMS) test_SOURCES = test.c --- 210,217 ---- top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslpermutation.la pkginclude_HEADERS = gsl_permutation.h gsl_permute.h gsl_permute_char.h gsl_permute_complex_double.h gsl_permute_complex_float.h gsl_permute_complex_long_double.h gsl_permute_double.h gsl_permute_float.h gsl_permute_int.h gsl_permute_long.h gsl_permute_long_double.h gsl_permute_short.h gsl_permute_uchar.h gsl_permute_uint.h gsl_permute_ulong.h gsl_permute_ushort.h gsl_permute_vector.h gsl_permute_vector_char.h gsl_permute_vector_complex_double.h gsl_permute_vector_complex_float.h gsl_permute_vector_complex_long_double.h gsl_permute_vector_double.h gsl_permute_vector_float.h gsl_permute_vector_int.h gsl_permute_vector_long.h gsl_permute_vector_long_double.h gsl_permute_vector_short.h gsl_permute_vector_uchar.h gsl_permute_vector_uint.h gsl_permute_vector_ulong.h gsl_permute_vector_ushort.h ! INCLUDES = -I$(top_srcdir) ! libgslpermutation_la_SOURCES = init.c file.c permutation.c permute.c canonical.c inline.c noinst_HEADERS = permute_source.c TESTS = $(check_PROGRAMS) test_SOURCES = test.c diff -a -rc -C 2 -P gsl-1.11/permutation/gsl_permutation.h gsl-1.12/permutation/gsl_permutation.h *** gsl-1.11/permutation/gsl_permutation.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/permutation/gsl_permutation.h Thu Nov 27 20:03:28 2008 *************** *** 23,28 **** --- 23,29 ---- #include #include #include + #include #include #undef __BEGIN_DECLS *************** *** 59,65 **** size_t gsl_permutation_size (const gsl_permutation * p); size_t * gsl_permutation_data (const gsl_permutation * p); - size_t gsl_permutation_get (const gsl_permutation * p, const size_t i); int gsl_permutation_swap (gsl_permutation * p, const size_t i, const size_t j); int gsl_permutation_valid (const gsl_permutation * p); --- 60,65 ---- *************** *** 76,89 **** size_t gsl_permutation_linear_cycles (const gsl_permutation * p); size_t gsl_permutation_canonical_cycles (const gsl_permutation * q); #ifdef HAVE_INLINE ! extern inline size_t gsl_permutation_get (const gsl_permutation * p, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= p->size) { GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); } --- 76,91 ---- size_t gsl_permutation_linear_cycles (const gsl_permutation * p); size_t gsl_permutation_canonical_cycles (const gsl_permutation * q); + INLINE_DECL size_t gsl_permutation_get (const gsl_permutation * p, const size_t i); + #ifdef HAVE_INLINE ! INLINE_FUN size_t gsl_permutation_get (const gsl_permutation * p, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= p->size)) { GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); } diff -a -rc -C 2 -P gsl-1.11/permutation/inline.c gsl-1.12/permutation/inline.c *** gsl-1.11/permutation/inline.c Thu Jan 1 00:00:00 1970 --- gsl-1.12/permutation/inline.c Thu Nov 27 20:03:28 2008 *************** *** 0 **** --- 1,27 ---- + /* permutation/inline.c + * + * Copyright (C) 2008 Brian Gough + * + * 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + + #include + #include + + /* Compile all the inline functions */ + + #define COMPILE_INLINE_STATIC + #include "build.h" + #include diff -a -rc -C 2 -P gsl-1.11/permutation/permutation.c gsl-1.12/permutation/permutation.c *** gsl-1.11/permutation/permutation.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/permutation/permutation.c Thu Nov 27 20:03:28 2008 *************** *** 33,54 **** return p->data ; } - #ifndef HIDE_INLINE_STATIC - size_t - gsl_permutation_get (const gsl_permutation * p, const size_t i) - { - if (gsl_check_range) - { - if (i >= p->size) /* size_t is unsigned, can't be negative */ - { - GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); - } - } - - return p->data[i]; - } - #endif - int gsl_permutation_swap (gsl_permutation * p, const size_t i, const size_t j) { --- 33,38 ---- diff -a -rc -C 2 -P gsl-1.11/poly/ChangeLog gsl-1.12/poly/ChangeLog *** gsl-1.11/poly/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/poly/ChangeLog Thu Nov 27 20:03:28 2008 *************** *** 1,3 **** --- 1,17 ---- + 2008-07-03 Brian Gough + + * gsl_poly.h: use new inline declarations + + * inline.c: handle inline functions in separate file + + * dd.c: move gsl_poly_dd_eval to inline.c + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + + 2008-04-28 Brian Gough + + * dd.c (gsl_poly_dd_taylor): use new descending loop convention + 2007-12-17 Brian Gough * eval.c: added functions for complex polynomials diff -a -rc -C 2 -P gsl-1.11/poly/Makefile.am gsl-1.12/poly/Makefile.am *** gsl-1.11/poly/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/poly/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 2,8 **** pkginclude_HEADERS = gsl_poly.h ! INCLUDES= -I$(top_builddir) libgslpoly_la_SOURCES = dd.c eval.c solve_quadratic.c solve_cubic.c zsolve_quadratic.c zsolve_cubic.c zsolve.c zsolve_init.c --- 2,8 ---- pkginclude_HEADERS = gsl_poly.h ! INCLUDES = -I$(top_srcdir) libgslpoly_la_SOURCES = dd.c eval.c solve_quadratic.c solve_cubic.c zsolve_quadratic.c zsolve_cubic.c zsolve.c zsolve_init.c diff -a -rc -C 2 -P gsl-1.11/poly/Makefile.in gsl-1.12/poly/Makefile.in *** gsl-1.11/poly/Makefile.in Sun Mar 30 12:07:08 2008 --- gsl-1.12/poly/Makefile.in Mon Dec 15 14:55:16 2008 *************** *** 134,139 **** --- 134,140 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 141,147 **** --- 142,151 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 206,212 **** top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslpoly.la pkginclude_HEADERS = gsl_poly.h ! INCLUDES = -I$(top_builddir) libgslpoly_la_SOURCES = dd.c eval.c solve_quadratic.c solve_cubic.c zsolve_quadratic.c zsolve_cubic.c zsolve.c zsolve_init.c noinst_HEADERS = balance.c companion.c qr.c TESTS = $(check_PROGRAMS) --- 210,216 ---- top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslpoly.la pkginclude_HEADERS = gsl_poly.h ! INCLUDES = -I$(top_srcdir) libgslpoly_la_SOURCES = dd.c eval.c solve_quadratic.c solve_cubic.c zsolve_quadratic.c zsolve_cubic.c zsolve.c zsolve_init.c noinst_HEADERS = balance.c companion.c qr.c TESTS = $(check_PROGRAMS) diff -a -rc -C 2 -P gsl-1.11/poly/dd.c gsl-1.12/poly/dd.c *** gsl-1.11/poly/dd.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/poly/dd.c Thu Nov 27 20:03:28 2008 *************** *** 49,70 **** return GSL_SUCCESS; } - #ifndef HIDE_INLINE_STATIC - double - gsl_poly_dd_eval (const double dd[], const double xa[], const size_t size, const double x) - { - size_t i; - double y = dd[size - 1]; - - for (i = size - 1; i--;) - { - y = dd[i] + (x - xa[i]) * y; - } - - return y; - } - #endif - int gsl_poly_dd_taylor (double c[], double xp, const double dd[], const double xa[], size_t size, --- 49,54 ---- *************** *** 82,88 **** c[0] = dd[0]; ! for (i = size - 1; i > 0 && i--;) { w[i] = -w[i + 1] * (xa[size - 2 - i] - xp); --- 66,72 ---- c[0] = dd[0]; ! for (i = size - 1; i-- > 0;) { w[i] = -w[i + 1] * (xa[size - 2 - i] - xp); diff -a -rc -C 2 -P gsl-1.11/poly/eval.c gsl-1.12/poly/eval.c *** gsl-1.11/poly/eval.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/poly/eval.c Thu Nov 27 20:03:28 2008 *************** *** 19,70 **** */ #include - #include - - /*-*-*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*-*/ - - /* checked OK [GJ] Tue May 5 12:19:56 MDT 1998 */ ! #ifndef HIDE_INLINE_STATIC ! double ! gsl_poly_eval(const double c[], const int len, const double x) ! { ! int i; ! double ans = c[len-1]; ! for(i=len-1; i>0; i--) ans = c[i-1] + x * ans; ! return ans; ! } ! gsl_complex ! gsl_poly_complex_eval(const double c[], const int len, const gsl_complex z) ! { ! int i; ! gsl_complex ans; ! GSL_SET_COMPLEX (&ans, c[len-1], 0.0); ! for(i=len-1; i>0; i--) { ! /* The following three lines are equivalent to ! ans = gsl_complex_add_real (gsl_complex_mul (z, ans), c[i-1]); ! but faster */ ! double tmp = c[i-1] + GSL_REAL (z) * GSL_REAL (ans) - GSL_IMAG (z) * GSL_IMAG (ans); ! GSL_SET_IMAG (&ans, GSL_IMAG (z) * GSL_REAL (ans) + GSL_REAL (z) * GSL_IMAG (ans)); ! GSL_SET_REAL (&ans, tmp); ! } ! return ans; ! } ! ! gsl_complex ! gsl_complex_poly_complex_eval(const gsl_complex c[], const int len, const gsl_complex z) ! { ! int i; ! gsl_complex ans = c[len-1]; ! for(i=len-1; i>0; i--) { ! /* The following three lines are equivalent to ! ans = gsl_complex_add (c[i-1], gsl_complex_mul (z, ans)); ! but faster */ ! double tmp = GSL_REAL (c[i-1]) + GSL_REAL (z) * GSL_REAL (ans) - GSL_IMAG (z) * GSL_IMAG (ans); ! GSL_SET_IMAG (&ans, GSL_IMAG (c[i-1]) + GSL_IMAG (z) * GSL_REAL (ans) + GSL_REAL (z) * GSL_IMAG (ans)); ! GSL_SET_REAL (&ans, tmp); ! } ! return ans; ! } ! #endif --- 19,27 ---- */ #include ! /* Compile all the inline functions */ ! #define COMPILE_INLINE_STATIC ! #include "build.h" ! #include diff -a -rc -C 2 -P gsl-1.11/poly/gsl_poly.h gsl-1.12/poly/gsl_poly.h *** gsl-1.11/poly/gsl_poly.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/poly/gsl_poly.h Thu Nov 27 20:03:28 2008 *************** *** 21,26 **** --- 21,27 ---- #define __GSL_POLY_H__ #include + #include #include #undef __BEGIN_DECLS *************** *** 44,60 **** */ /* real polynomial, real x */ ! double gsl_poly_eval(const double c[], const int len, const double x); /* real polynomial, complex x */ ! gsl_complex gsl_poly_complex_eval (const double c [], const int len, const gsl_complex z); /* complex polynomial, complex x */ ! gsl_complex gsl_complex_poly_complex_eval (const gsl_complex c [], const int len, const gsl_complex z); ! #ifdef HAVE_INLINE ! extern inline double gsl_poly_eval(const double c[], const int len, const double x) { --- 45,60 ---- */ /* real polynomial, real x */ ! INLINE_DECL double gsl_poly_eval(const double c[], const int len, const double x); /* real polynomial, complex x */ ! INLINE_DECL gsl_complex gsl_poly_complex_eval (const double c [], const int len, const gsl_complex z); /* complex polynomial, complex x */ ! INLINE_DECL gsl_complex gsl_complex_poly_complex_eval (const gsl_complex c [], const int len, const gsl_complex z); #ifdef HAVE_INLINE ! INLINE_FUN double gsl_poly_eval(const double c[], const int len, const double x) { *************** *** 64,70 **** return ans; } ! extern inline gsl_complex gsl_poly_complex_eval(const double c[], const int len, const gsl_complex z) { --- 64,70 ---- return ans; } ! INLINE_FUN gsl_complex gsl_poly_complex_eval(const double c[], const int len, const gsl_complex z) { *************** *** 82,88 **** return ans; } ! extern inline gsl_complex gsl_complex_poly_complex_eval(const gsl_complex c[], const int len, const gsl_complex z) { --- 82,88 ---- return ans; } ! INLINE_FUN gsl_complex gsl_complex_poly_complex_eval(const gsl_complex c[], const int len, const gsl_complex z) { *************** *** 106,116 **** gsl_poly_dd_init (double dd[], const double x[], const double y[], size_t size); ! double gsl_poly_dd_eval (const double dd[], const double xa[], const size_t size, const double x); #ifdef HAVE_INLINE ! extern inline double gsl_poly_dd_eval(const double dd[], const double xa[], const size_t size, const double x) { --- 106,116 ---- gsl_poly_dd_init (double dd[], const double x[], const double y[], size_t size); ! INLINE_DECL double gsl_poly_dd_eval (const double dd[], const double xa[], const size_t size, const double x); #ifdef HAVE_INLINE ! INLINE_FUN double gsl_poly_dd_eval(const double dd[], const double xa[], const size_t size, const double x) { diff -a -rc -C 2 -P gsl-1.11/qrng/ChangeLog gsl-1.12/qrng/ChangeLog *** gsl-1.11/qrng/ChangeLog Mon Mar 17 17:15:36 2008 --- gsl-1.12/qrng/ChangeLog Thu Nov 27 20:03:28 2008 *************** *** 1,3 **** --- 1,13 ---- + 2008-07-03 Brian Gough + + * qrng.c: moved gsl_qrng_get to inline.c + + * gsl_qrng.h (gsl_qrng_get): new inline declaration + + * inline.c: handle inline functions separately + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + 2008-03-17 Brian Gough * reversehalton.c (reversehalton_init): removed unused variable i diff -a -rc -C 2 -P gsl-1.11/qrng/Makefile.am gsl-1.12/qrng/Makefile.am *** gsl-1.11/qrng/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/qrng/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 2,10 **** pkginclude_HEADERS = gsl_qrng.h ! INCLUDES= -I$(top_builddir) ! libgslqrng_la_SOURCES = gsl_qrng.h qrng.c niederreiter-2.c sobol.c halton.c reversehalton.c TESTS = $(check_PROGRAMS) check_PROGRAMS = test --- 2,10 ---- pkginclude_HEADERS = gsl_qrng.h ! INCLUDES = -I$(top_srcdir) ! libgslqrng_la_SOURCES = gsl_qrng.h qrng.c niederreiter-2.c sobol.c halton.c reversehalton.c inline.c TESTS = $(check_PROGRAMS) check_PROGRAMS = test diff -a -rc -C 2 -P gsl-1.11/qrng/Makefile.in gsl-1.12/qrng/Makefile.in *** gsl-1.11/qrng/Makefile.in Sun Mar 30 12:07:08 2008 --- gsl-1.12/qrng/Makefile.in Mon Dec 15 14:55:16 2008 *************** *** 47,53 **** LTLIBRARIES = $(noinst_LTLIBRARIES) libgslqrng_la_LIBADD = am_libgslqrng_la_OBJECTS = qrng.lo niederreiter-2.lo sobol.lo \ ! halton.lo reversehalton.lo libgslqrng_la_OBJECTS = $(am_libgslqrng_la_OBJECTS) am_test_OBJECTS = test.$(OBJEXT) test_OBJECTS = $(am_test_OBJECTS) --- 47,53 ---- LTLIBRARIES = $(noinst_LTLIBRARIES) libgslqrng_la_LIBADD = am_libgslqrng_la_OBJECTS = qrng.lo niederreiter-2.lo sobol.lo \ ! halton.lo reversehalton.lo inline.lo libgslqrng_la_OBJECTS = $(am_libgslqrng_la_OBJECTS) am_test_OBJECTS = test.$(OBJEXT) test_OBJECTS = $(am_test_OBJECTS) *************** *** 133,138 **** --- 133,139 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 140,146 **** --- 141,150 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 205,212 **** top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslqrng.la pkginclude_HEADERS = gsl_qrng.h ! INCLUDES = -I$(top_builddir) ! libgslqrng_la_SOURCES = gsl_qrng.h qrng.c niederreiter-2.c sobol.c halton.c reversehalton.c TESTS = $(check_PROGRAMS) test_SOURCES = test.c test_LDADD = libgslqrng.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la --- 209,216 ---- top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslqrng.la pkginclude_HEADERS = gsl_qrng.h ! INCLUDES = -I$(top_srcdir) ! libgslqrng_la_SOURCES = gsl_qrng.h qrng.c niederreiter-2.c sobol.c halton.c reversehalton.c inline.c TESTS = $(check_PROGRAMS) test_SOURCES = test.c test_LDADD = libgslqrng.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la diff -a -rc -C 2 -P gsl-1.11/qrng/gsl_qrng.h gsl-1.12/qrng/gsl_qrng.h *** gsl-1.11/qrng/gsl_qrng.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/qrng/gsl_qrng.h Thu Nov 27 20:03:28 2008 *************** *** 6,11 **** --- 6,12 ---- #include #include #include + #include #undef __BEGIN_DECLS #undef __END_DECLS *************** *** 93,104 **** /* Retrieve next vector in sequence. */ ! int gsl_qrng_get (const gsl_qrng * q, double x[]); ! #ifdef HAVE_INLINE ! extern inline int gsl_qrng_get (const gsl_qrng * q, double x[]); ! extern inline int gsl_qrng_get (const gsl_qrng * q, double x[]) { return (q->type->get) (q->state, q->dimension, x); } --- 94,103 ---- /* Retrieve next vector in sequence. */ ! INLINE_DECL int gsl_qrng_get (const gsl_qrng * q, double x[]); #ifdef HAVE_INLINE ! INLINE_FUN int gsl_qrng_get (const gsl_qrng * q, double x[]) { return (q->type->get) (q->state, q->dimension, x); } diff -a -rc -C 2 -P gsl-1.11/qrng/inline.c gsl-1.12/qrng/inline.c *** gsl-1.11/qrng/inline.c Thu Jan 1 00:00:00 1970 --- gsl-1.12/qrng/inline.c Thu Nov 27 20:03:28 2008 *************** *** 0 **** --- 1,13 ---- + /* Author: G. Jungman + */ + #include + #include + #include + #include + + /* Compile all the inline functions */ + + #define COMPILE_INLINE_STATIC + #include "build.h" + #include + diff -a -rc -C 2 -P gsl-1.11/qrng/qrng.c gsl-1.12/qrng/qrng.c *** gsl-1.11/qrng/qrng.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/qrng/qrng.c Thu Nov 27 20:03:28 2008 *************** *** 88,101 **** return r; } - #ifndef HIDE_INLINE_STATIC - int - gsl_qrng_get (const gsl_qrng * q, double x[]) - { - return (q->type->get) (q->state, q->dimension, x); - } - #endif - const char * gsl_qrng_name (const gsl_qrng * q) { --- 88,93 ---- diff -a -rc -C 2 -P gsl-1.11/randist/ChangeLog gsl-1.12/randist/ChangeLog *** gsl-1.11/randist/ChangeLog Sat Feb 9 16:41:24 2008 --- gsl-1.12/randist/ChangeLog Sun Nov 30 08:56:31 2008 *************** *** 1,3 **** --- 1,13 ---- + 2008-11-30 Brian Gough + + * test.c (test_gamma_vlarge): added test for a >= UINT_MAX. + + * gamma.c (gsl_ran_gamma_knuth): handle the case a >= UINT_MAX. + + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + 2008-02-09 Brian Gough * gausszig.c (gsl_ran_gaussian_ziggurat): handle different diff -a -rc -C 2 -P gsl-1.11/randist/Makefile.am gsl-1.12/randist/Makefile.am *** gsl-1.11/randist/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/randist/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 2,8 **** pkginclude_HEADERS= gsl_randist.h ! INCLUDES= -I$(top_builddir) 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 gausszig.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 --- 2,8 ---- pkginclude_HEADERS= gsl_randist.h ! INCLUDES = -I$(top_srcdir) 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 gausszig.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 diff -a -rc -C 2 -P gsl-1.11/randist/Makefile.in gsl-1.12/randist/Makefile.in *** gsl-1.11/randist/Makefile.in Sun Mar 30 12:07:09 2008 --- gsl-1.12/randist/Makefile.in Mon Dec 15 14:55:17 2008 *************** *** 142,147 **** --- 142,148 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 149,155 **** --- 150,159 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 214,220 **** top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslrandist.la pkginclude_HEADERS = gsl_randist.h ! INCLUDES = -I$(top_builddir) 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 gausszig.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) test_SOURCES = test.c --- 218,224 ---- top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslrandist.la pkginclude_HEADERS = gsl_randist.h ! INCLUDES = -I$(top_srcdir) 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 gausszig.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) test_SOURCES = test.c diff -a -rc -C 2 -P gsl-1.11/randist/gamma.c gsl-1.12/randist/gamma.c *** gsl-1.11/randist/gamma.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/randist/gamma.c Sun Nov 30 08:21:50 2008 *************** *** 43,49 **** /* assume a > 0 */ unsigned int na = floor (a); ! if (a == na) { return b * gsl_ran_gamma_int (r, na); } --- 43,53 ---- /* assume a > 0 */ unsigned int na = floor (a); ! if(a >= UINT_MAX) ! { ! return b * (gamma_large (r, floor (a)) + gamma_frac (r, a - floor (a))); ! } ! else if (a == na) { return b * gsl_ran_gamma_int (r, na); } diff -a -rc -C 2 -P gsl-1.11/randist/test.c gsl-1.12/randist/test.c *** gsl-1.11/randist/test.c Fri Feb 29 10:37:50 2008 --- gsl-1.12/randist/test.c Sun Nov 30 08:33:40 2008 *************** *** 110,115 **** --- 110,117 ---- double test_gamma_int_pdf (double x); double test_gamma_large (void); double test_gamma_large_pdf (double x); + double test_gamma_vlarge (void); + double test_gamma_vlarge_pdf (double x); double test_gamma_small (void); double test_gamma_small_pdf (double x); double test_gamma_mt (void); *************** *** 122,127 **** --- 124,131 ---- double test_gamma_mt_large_pdf (double x); double test_gamma_mt_small (void); double test_gamma_mt_small_pdf (double x); + double test_gamma_knuth_vlarge (void); + double test_gamma_knuth_vlarge_pdf (double x); double test_gaussian (void); double test_gaussian_pdf (double x); double test_gaussian_ratio_method (void); *************** *** 298,303 **** --- 302,309 ---- testPDF (FUNC2 (gamma1)); testPDF (FUNC2 (gamma_int)); testPDF (FUNC2 (gamma_large)); + testPDF (FUNC2 (gamma_vlarge)); + testPDF (FUNC2 (gamma_knuth_vlarge)); testPDF (FUNC2 (gamma_small)); testPDF (FUNC2 (gamma_mt)); testPDF (FUNC2 (gamma_mt1)); *************** *** 546,552 **** for (i = 0; i < N; i++) { double r = f (); - total += r; if (r < b && r > a) --- 552,557 ---- *************** *** 1307,1312 **** --- 1312,1335 ---- return gsl_ran_gamma_pdf (x, 0.92, 2.17); } + double + test_gamma_vlarge (void) + { + /* Scale the distribution to get it into the range [-5,5] */ + double c = 2.71828181565; + double b = 6.32899304917e-10; + double d = 1e4; + return (gsl_ran_gamma (r_global, 4294967296.0, b) - c) * d; + } + + double + test_gamma_vlarge_pdf (double x) + { + double c = 2.71828181565; + double b = 6.32899304917e-10; + double d = 1e4; + return gsl_ran_gamma_pdf ((x / d) + c, 4294967296.0, b) / d; + } double test_gamma_mt (void) *************** *** 1373,1378 **** --- 1396,1420 ---- double + test_gamma_knuth_vlarge (void) + { + /* Scale the distribution to get it into the range [-5,5] */ + double c = 2.71828181565; + double b = 6.32899304917e-10; + double d = 1e4; + return (gsl_ran_gamma_knuth (r_global, 4294967296.0, b) - c) * d; + } + + double + test_gamma_knuth_vlarge_pdf (double x) + { + double c = 2.71828181565; + double b = 6.32899304917e-10; + double d = 1e4; + return gsl_ran_gamma_pdf ((x / d) + c, 4294967296.0, b) / d; + } + + double test_gaussian (void) { return gsl_ran_gaussian (r_global, 3.0); diff -a -rc -C 2 -P gsl-1.11/rng/ChangeLog gsl-1.12/rng/ChangeLog *** gsl-1.11/rng/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/rng/ChangeLog Thu Nov 27 20:03:28 2008 *************** *** 1,3 **** --- 1,17 ---- + 2008-10-13 Brian Gough + + * file.c: added (char *) to allow compilation with C++ compiler + + 2008-07-03 Brian Gough + + * rng.c: moved inline functions to inline.c + + * gsl_rng.h: use new inline declarations + + * inline.c: handle inline functions separately + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + 2007-01-28 Brian Gough * knuthran2002.c: added revised version from 9th printing diff -a -rc -C 2 -P gsl-1.11/rng/Makefile.am gsl-1.12/rng/Makefile.am *** gsl-1.11/rng/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/rng/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 2,10 **** pkginclude_HEADERS = gsl_rng.h ! INCLUDES= -I$(top_builddir) ! libgslrng_la_SOURCES = borosh13.c cmrg.c coveyou.c default.c file.c fishman18.c fishman20.c fishman2x.c gfsr4.c knuthran2.c knuthran.c knuthran2002.c lecuyer21.c minstd.c mrg.c mt.c r250.c ran0.c ran1.c ran2.c ran3.c rand48.c rand.c random.c randu.c ranf.c ranlux.c ranlxd.c ranlxs.c ranmar.c rng.c slatec.c taus.c taus113.c transputer.c tt.c types.c uni32.c uni.c vax.c waterman14.c zuf.c CLEANFILES = test.dat --- 2,10 ---- pkginclude_HEADERS = gsl_rng.h ! INCLUDES = -I$(top_srcdir) ! libgslrng_la_SOURCES = borosh13.c cmrg.c coveyou.c default.c file.c fishman18.c fishman20.c fishman2x.c gfsr4.c knuthran2.c knuthran.c knuthran2002.c lecuyer21.c minstd.c mrg.c mt.c r250.c ran0.c ran1.c ran2.c ran3.c rand48.c rand.c random.c randu.c ranf.c ranlux.c ranlxd.c ranlxs.c ranmar.c rng.c slatec.c taus.c taus113.c transputer.c tt.c types.c uni32.c uni.c vax.c waterman14.c zuf.c inline.c CLEANFILES = test.dat diff -a -rc -C 2 -P gsl-1.11/rng/Makefile.in gsl-1.12/rng/Makefile.in *** gsl-1.11/rng/Makefile.in Sun Mar 30 12:07:09 2008 --- gsl-1.12/rng/Makefile.in Mon Dec 15 14:55:17 2008 *************** *** 53,59 **** rand48.lo rand.lo random.lo randu.lo ranf.lo ranlux.lo \ ranlxd.lo ranlxs.lo ranmar.lo rng.lo slatec.lo taus.lo \ taus113.lo transputer.lo tt.lo types.lo uni32.lo uni.lo vax.lo \ ! waterman14.lo zuf.lo libgslrng_la_OBJECTS = $(am_libgslrng_la_OBJECTS) am_test_OBJECTS = test.$(OBJEXT) test_OBJECTS = $(am_test_OBJECTS) --- 53,59 ---- rand48.lo rand.lo random.lo randu.lo ranf.lo ranlux.lo \ ranlxd.lo ranlxs.lo ranmar.lo rng.lo slatec.lo taus.lo \ taus113.lo transputer.lo tt.lo types.lo uni32.lo uni.lo vax.lo \ ! waterman14.lo zuf.lo inline.lo libgslrng_la_OBJECTS = $(am_libgslrng_la_OBJECTS) am_test_OBJECTS = test.$(OBJEXT) test_OBJECTS = $(am_test_OBJECTS) *************** *** 139,144 **** --- 139,145 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 146,152 **** --- 147,156 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 211,218 **** top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslrng.la pkginclude_HEADERS = gsl_rng.h ! INCLUDES = -I$(top_builddir) ! libgslrng_la_SOURCES = borosh13.c cmrg.c coveyou.c default.c file.c fishman18.c fishman20.c fishman2x.c gfsr4.c knuthran2.c knuthran.c knuthran2002.c lecuyer21.c minstd.c mrg.c mt.c r250.c ran0.c ran1.c ran2.c ran3.c rand48.c rand.c random.c randu.c ranf.c ranlux.c ranlxd.c ranlxs.c ranmar.c rng.c slatec.c taus.c taus113.c transputer.c tt.c types.c uni32.c uni.c vax.c waterman14.c zuf.c CLEANFILES = test.dat noinst_HEADERS = schrage.c test_SOURCES = test.c --- 215,222 ---- top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslrng.la pkginclude_HEADERS = gsl_rng.h ! INCLUDES = -I$(top_srcdir) ! libgslrng_la_SOURCES = borosh13.c cmrg.c coveyou.c default.c file.c fishman18.c fishman20.c fishman2x.c gfsr4.c knuthran2.c knuthran.c knuthran2002.c lecuyer21.c minstd.c mrg.c mt.c r250.c ran0.c ran1.c ran2.c ran3.c rand48.c rand.c random.c randu.c ranf.c ranlux.c ranlxd.c ranlxs.c ranmar.c rng.c slatec.c taus.c taus113.c transputer.c tt.c types.c uni32.c uni.c vax.c waterman14.c zuf.c inline.c CLEANFILES = test.dat noinst_HEADERS = schrage.c test_SOURCES = test.c diff -a -rc -C 2 -P gsl-1.11/rng/file.c gsl-1.12/rng/file.c *** gsl-1.11/rng/file.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/rng/file.c Thu Nov 27 20:03:28 2008 *************** *** 27,33 **** { size_t n = r->type->size ; ! char * state = r->state; size_t items = fread (state, 1, n, stream); --- 27,33 ---- { size_t n = r->type->size ; ! char * state = (char *)r->state; size_t items = fread (state, 1, n, stream); *************** *** 44,50 **** { size_t n = r->type->size ; ! char * state = r->state; size_t items = fwrite (state, 1, n, stream); --- 44,50 ---- { size_t n = r->type->size ; ! char * state = (char *)r->state; size_t items = fwrite (state, 1, n, stream); diff -a -rc -C 2 -P gsl-1.11/rng/gsl_rng.h gsl-1.12/rng/gsl_rng.h *** gsl-1.11/rng/gsl_rng.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/rng/gsl_rng.h Thu Nov 27 20:03:28 2008 *************** *** 22,27 **** --- 22,28 ---- #include #include #include + #include #undef __BEGIN_DECLS #undef __END_DECLS *************** *** 147,178 **** const gsl_rng_type * gsl_rng_env_setup (void); ! unsigned long int gsl_rng_get (const gsl_rng * r); ! double gsl_rng_uniform (const gsl_rng * r); ! double gsl_rng_uniform_pos (const gsl_rng * r); ! unsigned long int gsl_rng_uniform_int (const gsl_rng * r, unsigned long int n); ! #ifdef HAVE_INLINE - extern inline unsigned long int gsl_rng_get (const gsl_rng * r); ! extern inline unsigned long int gsl_rng_get (const gsl_rng * r) { return (r->type->get) (r->state); } ! extern inline double gsl_rng_uniform (const gsl_rng * r); ! ! extern inline double gsl_rng_uniform (const gsl_rng * r) { return (r->type->get_double) (r->state); } ! extern inline double gsl_rng_uniform_pos (const gsl_rng * r); ! ! extern inline double gsl_rng_uniform_pos (const gsl_rng * r) { double x ; --- 148,173 ---- const gsl_rng_type * gsl_rng_env_setup (void); ! INLINE_DECL unsigned long int gsl_rng_get (const gsl_rng * r); ! INLINE_DECL double gsl_rng_uniform (const gsl_rng * r); ! INLINE_DECL double gsl_rng_uniform_pos (const gsl_rng * r); ! INLINE_DECL unsigned long int gsl_rng_uniform_int (const gsl_rng * r, unsigned long int n); #ifdef HAVE_INLINE ! INLINE_FUN unsigned long int gsl_rng_get (const gsl_rng * r) { return (r->type->get) (r->state); } ! INLINE_FUN double gsl_rng_uniform (const gsl_rng * r) { return (r->type->get_double) (r->state); } ! INLINE_FUN double gsl_rng_uniform_pos (const gsl_rng * r) { double x ; *************** *** 185,193 **** return x ; } ! extern inline unsigned long int gsl_rng_uniform_int (const gsl_rng * r, unsigned long int n); ! extern inline unsigned long int gsl_rng_uniform_int (const gsl_rng * r, unsigned long int n) { unsigned long int offset = r->type->min; --- 180,192 ---- return x ; } ! /* Note: to avoid integer overflow in (range+1) we work with scale = ! range/n = (max-min)/n rather than scale=(max-min+1)/n, this reduces ! efficiency slightly but avoids having to check for the out of range ! value. Note that range is typically O(2^32) so the addition of 1 ! is negligible in most usage. */ ! INLINE_FUN unsigned long int gsl_rng_uniform_int (const gsl_rng * r, unsigned long int n) { unsigned long int offset = r->type->min; diff -a -rc -C 2 -P gsl-1.11/rng/inline.c gsl-1.12/rng/inline.c *** gsl-1.11/rng/inline.c Thu Jan 1 00:00:00 1970 --- gsl-1.12/rng/inline.c Thu Nov 27 20:03:28 2008 *************** *** 0 **** --- 1,30 ---- + /* rng/inline.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + + #include + #include + #include + #include + #include + + /* Compile all the inline functions */ + + #define COMPILE_INLINE_STATIC + #include "build.h" + #include diff -a -rc -C 2 -P gsl-1.11/rng/rng.c gsl-1.12/rng/rng.c *** gsl-1.11/rng/rng.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/rng/rng.c Thu Nov 27 20:03:28 2008 *************** *** 100,163 **** (r->type->set) (r->state, seed); } - #ifndef HIDE_INLINE_STATIC - unsigned long int - gsl_rng_get (const gsl_rng * r) - { - return (r->type->get) (r->state); - } - - double - gsl_rng_uniform (const gsl_rng * r) - { - return (r->type->get_double) (r->state); - } - - double - gsl_rng_uniform_pos (const gsl_rng * r) - { - double x ; - do - { - x = (r->type->get_double) (r->state) ; - } - while (x == 0) ; - - return x ; - } - - /* Note: to avoid integer overflow in (range+1) we work with scale = - range/n = (max-min)/n rather than scale=(max-min+1)/n, this reduces - efficiency slightly but avoids having to check for the out of range - value. Note that range is typically O(2^32) so the addition of 1 - is negligible in most usage. */ - - unsigned long int - gsl_rng_uniform_int (const gsl_rng * r, unsigned long int n) - { - unsigned long int offset = r->type->min; - unsigned long int range = r->type->max - offset; - unsigned long int scale; - unsigned long int k; - - if (n > range || n == 0) - { - GSL_ERROR_VAL ("invalid n, either 0 or exceeds maximum value of generator", - GSL_EINVAL, 0) ; - } - - scale = range / n; - - do - { - k = (((r->type->get) (r->state)) - offset) / scale; - } - while (k >= n); - - return k; - } - #endif - unsigned long int gsl_rng_max (const gsl_rng * r) { --- 100,105 ---- diff -a -rc -C 2 -P gsl-1.11/roots/ChangeLog gsl-1.12/roots/ChangeLog *** gsl-1.11/roots/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/roots/ChangeLog Thu Nov 27 20:03:28 2008 *************** *** 1,3 **** --- 1,7 ---- + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + 2007-07-30 Brian Gough * newton.c (newton_iterate): use gsl_finite instead of finite diff -a -rc -C 2 -P gsl-1.11/roots/Makefile.am gsl-1.12/roots/Makefile.am *** gsl-1.11/roots/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/roots/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 6,12 **** noinst_HEADERS = roots.h ! INCLUDES= -I$(top_builddir) libgslroots_la_SOURCES = bisection.c brent.c falsepos.c newton.c secant.c steffenson.c convergence.c fsolver.c fdfsolver.c --- 6,12 ---- noinst_HEADERS = roots.h ! INCLUDES = -I$(top_srcdir) libgslroots_la_SOURCES = bisection.c brent.c falsepos.c newton.c secant.c steffenson.c convergence.c fsolver.c fdfsolver.c diff -a -rc -C 2 -P gsl-1.11/roots/Makefile.in gsl-1.12/roots/Makefile.in *** gsl-1.11/roots/Makefile.in Sun Mar 30 12:07:09 2008 --- gsl-1.12/roots/Makefile.in Mon Dec 15 14:55:17 2008 *************** *** 136,141 **** --- 136,142 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 143,149 **** --- 144,153 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 209,215 **** noinst_LTLIBRARIES = libgslroots.la pkginclude_HEADERS = gsl_roots.h noinst_HEADERS = roots.h ! INCLUDES = -I$(top_builddir) libgslroots_la_SOURCES = bisection.c brent.c falsepos.c newton.c secant.c steffenson.c convergence.c fsolver.c fdfsolver.c TESTS = $(check_PROGRAMS) test_SOURCES = test.c test_funcs.c test.h --- 213,219 ---- noinst_LTLIBRARIES = libgslroots.la pkginclude_HEADERS = gsl_roots.h noinst_HEADERS = roots.h ! INCLUDES = -I$(top_srcdir) libgslroots_la_SOURCES = bisection.c brent.c falsepos.c newton.c secant.c steffenson.c convergence.c fsolver.c fdfsolver.c TESTS = $(check_PROGRAMS) test_SOURCES = test.c test_funcs.c test.h diff -a -rc -C 2 -P gsl-1.11/siman/ChangeLog gsl-1.12/siman/ChangeLog *** gsl-1.11/siman/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/siman/ChangeLog Thu Nov 27 20:03:28 2008 *************** *** 1,3 **** --- 1,7 ---- + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + 2007-05-30 Brian Gough * siman.c (boltzmann): moved safe_exp into boltzmann diff -a -rc -C 2 -P gsl-1.11/siman/Makefile.am gsl-1.12/siman/Makefile.am *** gsl-1.11/siman/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/siman/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 18,21 **** libgslsiman_la_SOURCES = siman.c pkginclude_HEADERS = gsl_siman.h ! INCLUDES= -I$(top_builddir) --- 18,21 ---- libgslsiman_la_SOURCES = siman.c pkginclude_HEADERS = gsl_siman.h ! INCLUDES = -I$(top_srcdir) diff -a -rc -C 2 -P gsl-1.11/siman/Makefile.in gsl-1.12/siman/Makefile.in *** gsl-1.11/siman/Makefile.in Sun Mar 30 12:07:09 2008 --- gsl-1.12/siman/Makefile.in Mon Dec 15 14:55:18 2008 *************** *** 142,147 **** --- 142,148 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 149,155 **** --- 150,159 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 222,228 **** CLEANFILES = siman_test.out libgslsiman_la_SOURCES = siman.c pkginclude_HEADERS = gsl_siman.h ! INCLUDES = -I$(top_builddir) all: all-am .SUFFIXES: --- 226,232 ---- CLEANFILES = siman_test.out libgslsiman_la_SOURCES = siman.c pkginclude_HEADERS = gsl_siman.h ! INCLUDES = -I$(top_srcdir) all: all-am .SUFFIXES: diff -a -rc -C 2 -P gsl-1.11/sort/ChangeLog gsl-1.12/sort/ChangeLog *** gsl-1.11/sort/ChangeLog Sat Feb 9 19:45:03 2008 --- gsl-1.12/sort/ChangeLog Thu Nov 27 20:03:28 2008 *************** *** 1,3 **** --- 1,7 ---- + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + 2008-02-09 Brian Gough * test_source.c: prevent signed overflow in tests diff -a -rc -C 2 -P gsl-1.11/sort/Makefile.am gsl-1.12/sort/Makefile.am *** gsl-1.11/sort/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/sort/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 2,8 **** pkginclude_HEADERS = gsl_heapsort.h gsl_sort.h gsl_sort_char.h gsl_sort_double.h gsl_sort_float.h gsl_sort_int.h gsl_sort_long.h gsl_sort_long_double.h gsl_sort_short.h gsl_sort_uchar.h gsl_sort_uint.h gsl_sort_ulong.h gsl_sort_ushort.h gsl_sort_vector.h gsl_sort_vector_char.h gsl_sort_vector_double.h gsl_sort_vector_float.h gsl_sort_vector_int.h gsl_sort_vector_long.h gsl_sort_vector_long_double.h gsl_sort_vector_short.h gsl_sort_vector_uchar.h gsl_sort_vector_uint.h gsl_sort_vector_ulong.h gsl_sort_vector_ushort.h ! INCLUDES= -I$(top_builddir) -I$(top_srcdir) libgslsort_la_SOURCES = sort.c sortind.c sortvec.c sortvecind.c subset.c subsetind.c noinst_HEADERS = sortvec_source.c sortvecind_source.c subset_source.c subsetind_source.c test_source.c test_heapsort.c --- 2,8 ---- pkginclude_HEADERS = gsl_heapsort.h gsl_sort.h gsl_sort_char.h gsl_sort_double.h gsl_sort_float.h gsl_sort_int.h gsl_sort_long.h gsl_sort_long_double.h gsl_sort_short.h gsl_sort_uchar.h gsl_sort_uint.h gsl_sort_ulong.h gsl_sort_ushort.h gsl_sort_vector.h gsl_sort_vector_char.h gsl_sort_vector_double.h gsl_sort_vector_float.h gsl_sort_vector_int.h gsl_sort_vector_long.h gsl_sort_vector_long_double.h gsl_sort_vector_short.h gsl_sort_vector_uchar.h gsl_sort_vector_uint.h gsl_sort_vector_ulong.h gsl_sort_vector_ushort.h ! INCLUDES = -I$(top_srcdir) libgslsort_la_SOURCES = sort.c sortind.c sortvec.c sortvecind.c subset.c subsetind.c noinst_HEADERS = sortvec_source.c sortvecind_source.c subset_source.c subsetind_source.c test_source.c test_heapsort.c diff -a -rc -C 2 -P gsl-1.11/sort/Makefile.in gsl-1.12/sort/Makefile.in *** gsl-1.11/sort/Makefile.in Sun Mar 30 12:07:10 2008 --- gsl-1.12/sort/Makefile.in Mon Dec 15 14:55:18 2008 *************** *** 134,139 **** --- 134,140 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 141,147 **** --- 142,151 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 206,212 **** top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslsort.la pkginclude_HEADERS = gsl_heapsort.h gsl_sort.h gsl_sort_char.h gsl_sort_double.h gsl_sort_float.h gsl_sort_int.h gsl_sort_long.h gsl_sort_long_double.h gsl_sort_short.h gsl_sort_uchar.h gsl_sort_uint.h gsl_sort_ulong.h gsl_sort_ushort.h gsl_sort_vector.h gsl_sort_vector_char.h gsl_sort_vector_double.h gsl_sort_vector_float.h gsl_sort_vector_int.h gsl_sort_vector_long.h gsl_sort_vector_long_double.h gsl_sort_vector_short.h gsl_sort_vector_uchar.h gsl_sort_vector_uint.h gsl_sort_vector_ulong.h gsl_sort_vector_ushort.h ! INCLUDES = -I$(top_builddir) -I$(top_srcdir) libgslsort_la_SOURCES = sort.c sortind.c sortvec.c sortvecind.c subset.c subsetind.c noinst_HEADERS = sortvec_source.c sortvecind_source.c subset_source.c subsetind_source.c test_source.c test_heapsort.c TESTS = $(check_PROGRAMS) --- 210,216 ---- top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslsort.la pkginclude_HEADERS = gsl_heapsort.h gsl_sort.h gsl_sort_char.h gsl_sort_double.h gsl_sort_float.h gsl_sort_int.h gsl_sort_long.h gsl_sort_long_double.h gsl_sort_short.h gsl_sort_uchar.h gsl_sort_uint.h gsl_sort_ulong.h gsl_sort_ushort.h gsl_sort_vector.h gsl_sort_vector_char.h gsl_sort_vector_double.h gsl_sort_vector_float.h gsl_sort_vector_int.h gsl_sort_vector_long.h gsl_sort_vector_long_double.h gsl_sort_vector_short.h gsl_sort_vector_uchar.h gsl_sort_vector_uint.h gsl_sort_vector_ulong.h gsl_sort_vector_ushort.h ! INCLUDES = -I$(top_srcdir) libgslsort_la_SOURCES = sort.c sortind.c sortvec.c sortvecind.c subset.c subsetind.c noinst_HEADERS = sortvec_source.c sortvecind_source.c subset_source.c subsetind_source.c test_source.c test_heapsort.c TESTS = $(check_PROGRAMS) diff -a -rc -C 2 -P gsl-1.11/sort/test_source.c gsl-1.12/sort/test_source.c *** gsl-1.11/sort/test_source.c Sat Feb 9 19:49:43 2008 --- gsl-1.12/sort/test_source.c Thu Nov 27 20:03:28 2008 *************** *** 43,51 **** TYPE (gsl_vector) * data = FUNCTION (gsl_vector, alloc_from_block) (b2, 0, N, stride); TYPE (gsl_vector) * data2 = FUNCTION (gsl_vector, alloc_from_block) (b3, 0, N, stride); ! BASE * small = malloc(k * sizeof(BASE)); ! BASE * large = malloc(k * sizeof(BASE)); ! size_t * index = malloc(k * sizeof(size_t)); gsl_permutation *p = gsl_permutation_alloc (N); --- 43,51 ---- TYPE (gsl_vector) * data = FUNCTION (gsl_vector, alloc_from_block) (b2, 0, N, stride); TYPE (gsl_vector) * data2 = FUNCTION (gsl_vector, alloc_from_block) (b3, 0, N, stride); ! BASE * small = (BASE *)malloc(k * sizeof(BASE)); ! BASE * large = (BASE *)malloc(k * sizeof(BASE)); ! size_t * index = (size_t *)malloc(k * sizeof(size_t)); gsl_permutation *p = gsl_permutation_alloc (N); diff -a -rc -C 2 -P gsl-1.11/specfunc/ChangeLog gsl-1.12/specfunc/ChangeLog *** gsl-1.11/specfunc/ChangeLog Mon Mar 17 17:14:23 2008 --- gsl-1.12/specfunc/ChangeLog Thu Dec 4 09:56:05 2008 *************** *** 1,3 **** --- 1,34 ---- + 2008-12-04 Brian Gough + + * gamma_inc.c (gamma_inc_D): propagate cancellation error + in (x-a)/x for x close to a + + 2008-12-03 Brian Gough + + * exp.c (exprel_n_CF): changed N to double, to allow non-integer + usage for gamma_inc, double error factor to allow for two + parameters in recurrence. + (gsl_sf_exprel_n_CF_e): exported function to allow calls to + exprel_n_CF + + * gamma_inc.c (gamma_inc_P_series): improved convergence condition + using estimate of the remainder of the series, added continued + fraction as a fallback, increased nmax to 10000 + + 2008-08-26 Brian Gough + + * ellint.c (gsl_sf_ellint_Kcomp_e): corrected taylor expansion for + k close to 1. + + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + + 2008-06-27 Brian Gough + + * legendre_poly.c (gsl_sf_legendre_array_size): removed inline + version of this function in gsl_sf_legendre.h + 2008-03-17 Brian Gough * hyperg_2F1.c (gsl_sf_hyperg_2F1_e): replace duplicate error diff -a -rc -C 2 -P gsl-1.11/specfunc/Makefile.am gsl-1.12/specfunc/Makefile.am *** gsl-1.11/specfunc/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/specfunc/Makefile.am Thu Nov 27 20:03:28 2008 *************** *** 4,10 **** noinst_HEADERS = bessel_amp_phase.h bessel_olver.h bessel_temme.h bessel.h hyperg.h legendre.h eval.h chebyshev.h cheb_eval.c cheb_eval_mode.c check.h error.h ! INCLUDES= -I$(top_builddir) 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 mathieu_angfunc.c mathieu_charv.c mathieu_coeff.c mathieu_radfunc.c mathieu_workspace.c poch.c pow_int.c psi.c recurse.h result.c shint.c sinint.c synchrotron.c transport.c trig.c zeta.c --- 4,10 ---- noinst_HEADERS = bessel_amp_phase.h bessel_olver.h bessel_temme.h bessel.h hyperg.h legendre.h eval.h chebyshev.h cheb_eval.c cheb_eval_mode.c check.h error.h ! INCLUDES = -I$(top_srcdir) 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 mathieu_angfunc.c mathieu_charv.c mathieu_coeff.c mathieu_radfunc.c mathieu_workspace.c poch.c pow_int.c psi.c recurse.h result.c shint.c sinint.c synchrotron.c transport.c trig.c zeta.c diff -a -rc -C 2 -P gsl-1.11/specfunc/Makefile.in gsl-1.12/specfunc/Makefile.in *** gsl-1.11/specfunc/Makefile.in Sun Mar 30 12:07:10 2008 --- gsl-1.12/specfunc/Makefile.in Mon Dec 15 14:55:18 2008 *************** *** 157,162 **** --- 157,163 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 164,170 **** --- 165,174 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 230,236 **** noinst_LTLIBRARIES = libgslspecfunc.la pkginclude_HEADERS = gsl_sf.h gsl_sf_airy.h gsl_sf_bessel.h gsl_sf_clausen.h gsl_sf_coulomb.h gsl_sf_coupling.h gsl_sf_dawson.h gsl_sf_debye.h gsl_sf_dilog.h gsl_sf_elementary.h gsl_sf_ellint.h gsl_sf_elljac.h gsl_sf_erf.h gsl_sf_exp.h gsl_sf_expint.h gsl_sf_fermi_dirac.h gsl_sf_gamma.h gsl_sf_gegenbauer.h gsl_sf_hyperg.h gsl_sf_laguerre.h gsl_sf_lambert.h gsl_sf_legendre.h gsl_sf_log.h gsl_sf_mathieu.h gsl_sf_pow_int.h gsl_sf_psi.h gsl_sf_result.h gsl_sf_synchrotron.h gsl_sf_transport.h gsl_sf_trig.h gsl_sf_zeta.h gsl_specfunc.h noinst_HEADERS = bessel_amp_phase.h bessel_olver.h bessel_temme.h bessel.h hyperg.h legendre.h eval.h chebyshev.h cheb_eval.c cheb_eval_mode.c check.h error.h ! INCLUDES = -I$(top_builddir) 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 mathieu_angfunc.c mathieu_charv.c mathieu_coeff.c mathieu_radfunc.c mathieu_workspace.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) test_LDADD = libgslspecfunc.la ../eigen/libgsleigen.la ../linalg/libgsllinalg.la ../sort/libgslsort.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la --- 234,240 ---- noinst_LTLIBRARIES = libgslspecfunc.la pkginclude_HEADERS = gsl_sf.h gsl_sf_airy.h gsl_sf_bessel.h gsl_sf_clausen.h gsl_sf_coulomb.h gsl_sf_coupling.h gsl_sf_dawson.h gsl_sf_debye.h gsl_sf_dilog.h gsl_sf_elementary.h gsl_sf_ellint.h gsl_sf_elljac.h gsl_sf_erf.h gsl_sf_exp.h gsl_sf_expint.h gsl_sf_fermi_dirac.h gsl_sf_gamma.h gsl_sf_gegenbauer.h gsl_sf_hyperg.h gsl_sf_laguerre.h gsl_sf_lambert.h gsl_sf_legendre.h gsl_sf_log.h gsl_sf_mathieu.h gsl_sf_pow_int.h gsl_sf_psi.h gsl_sf_result.h gsl_sf_synchrotron.h gsl_sf_transport.h gsl_sf_trig.h gsl_sf_zeta.h gsl_specfunc.h noinst_HEADERS = bessel_amp_phase.h bessel_olver.h bessel_temme.h bessel.h hyperg.h legendre.h eval.h chebyshev.h cheb_eval.c cheb_eval_mode.c check.h error.h ! INCLUDES = -I$(top_srcdir) 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 mathieu_angfunc.c mathieu_charv.c mathieu_coeff.c mathieu_radfunc.c mathieu_workspace.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) test_LDADD = libgslspecfunc.la ../eigen/libgsleigen.la ../linalg/libgsllinalg.la ../sort/libgslsort.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la diff -a -rc -C 2 -P gsl-1.11/specfunc/ellint.c gsl-1.12/specfunc/ellint.c *** gsl-1.11/specfunc/ellint.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/specfunc/ellint.c Sat Nov 29 16:42:43 2008 *************** *** 481,494 **** DOMAIN_ERROR(result); } else if(k*k >= 1.0 - GSL_SQRT_DBL_EPSILON) { ! /* [Abramowitz+Stegun, 17.3.33] */ const double y = 1.0 - k*k; const double a[] = { 1.38629436112, 0.09666344259, 0.03590092383 }; const double b[] = { 0.5, 0.12498593597, 0.06880248576 }; const double ta = a[0] + y*(a[1] + y*a[2]); ! const double tb = -log(y) * (b[0] * y*(b[1] + y*b[2])); result->val = ta + tb; ! result->err = 2.0 * GSL_DBL_EPSILON * result->val; return GSL_SUCCESS; } else { --- 481,494 ---- DOMAIN_ERROR(result); } else if(k*k >= 1.0 - GSL_SQRT_DBL_EPSILON) { ! /* [Abramowitz+Stegun, 17.3.34] */ const double y = 1.0 - k*k; const double a[] = { 1.38629436112, 0.09666344259, 0.03590092383 }; const double b[] = { 0.5, 0.12498593597, 0.06880248576 }; const double ta = a[0] + y*(a[1] + y*a[2]); ! const double tb = -log(y) * (b[0] + y*(b[1] + y*b[2])); result->val = ta + tb; ! result->err = 2.0 * GSL_DBL_EPSILON * (fabs(result->val) + fabs(k/y)); return GSL_SUCCESS; } else { diff -a -rc -C 2 -P gsl-1.11/specfunc/exp.c gsl-1.12/specfunc/exp.c *** gsl-1.11/specfunc/exp.c Sat Feb 9 16:01:36 2008 --- gsl-1.12/specfunc/exp.c Thu Dec 4 07:02:27 2008 *************** *** 32,38 **** */ static int ! exprel_n_CF(const int N, const double x, gsl_sf_result * result) { const double RECUR_BIG = GSL_SQRT_DBL_MAX; const int maxiter = 5000; --- 32,38 ---- */ static int ! exprel_n_CF(const double N, const double x, gsl_sf_result * result) { const double RECUR_BIG = GSL_SQRT_DBL_MAX; const int maxiter = 5000; *************** *** 93,99 **** } result->val = fn; ! result->err = 2.0*(n+1.0)*GSL_DBL_EPSILON*fabs(fn); if(n == maxiter) GSL_ERROR ("error", GSL_EMAXITER); --- 93,99 ---- } result->val = fn; ! result->err = 4.0*(n+1.0)*GSL_DBL_EPSILON*fabs(fn); if(n == maxiter) GSL_ERROR ("error", GSL_EMAXITER); *************** *** 414,419 **** --- 414,425 ---- int + gsl_sf_exprel_n_CF_e(const double N, const double x, gsl_sf_result * result) + { + return exprel_n_CF(N, x, result); + } + + int gsl_sf_exprel_n_e(const int N, const double x, gsl_sf_result * result) { if(N < 0) { diff -a -rc -C 2 -P gsl-1.11/specfunc/gamma_inc.c gsl-1.12/specfunc/gamma_inc.c *** gsl-1.11/specfunc/gamma_inc.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/specfunc/gamma_inc.c Thu Dec 4 10:13:48 2008 *************** *** 59,69 **** --- 59,74 ---- } else { double mu = (x-a)/a; gsl_sf_log_1plusx_mx_e(mu, &ln_term); /* log(1+mu) - mu */ + /* Propagate cancellation error from x-a, since the absolute + error of mu=x-a is DBL_EPSILON */ + ln_term.err += GSL_DBL_EPSILON * fabs(mu); }; gsl_sf_gammastar_e(a, &gstar); term1 = exp(a*ln_term.val)/sqrt(2.0*M_PI*a); result->val = term1/gstar.val; result->err = 2.0 * GSL_DBL_EPSILON * (fabs(a*ln_term.val) + 1.0) * fabs(result->val); + /* Include propagated error from log term */ + result->err += fabs(a) * ln_term.err * fabs(result->val); result->err += gstar.err/fabs(gstar.val) * fabs(result->val); return GSL_SUCCESS; } *************** *** 77,104 **** int gamma_inc_P_series(const double a, const double x, gsl_sf_result * result) { ! const int nmax = 5000; gsl_sf_result D; int stat_D = gamma_inc_D(a, x, &D); ! double sum = 1.0; ! double term = 1.0; ! int n; ! for(n=1; nval = D.val * sum; ! result->err = D.err * fabs(sum); ! result->err += (1.0 + n) * GSL_DBL_EPSILON * fabs(result->val); ! if(n == nmax) ! GSL_ERROR ("error", GSL_EMAXITER); ! else ! return stat_D; } --- 82,152 ---- int gamma_inc_P_series(const double a, const double x, gsl_sf_result * result) { ! const int nmax = 10000; gsl_sf_result D; int stat_D = gamma_inc_D(a, x, &D); ! /* Approximating the terms of the series using Stirling's ! approximation gives t_n = (x/a)^n * exp(-n(n+1)/(2a)), so the ! convergence condition is n^2 / (2a) + (1-(x/a) + (1/2a)) n >> ! -log(GSL_DBL_EPS) if we want t_n < O(1e-16) t_0. The condition ! below detects cases where the minimum value of n is > 5000 */ ! ! if (x > 0.995 * a && a > 1e5) { /* Difficult case: try continued fraction */ ! gsl_sf_result cf_res; ! int status = gsl_sf_exprel_n_CF_e(a, x, &cf_res); ! result->val = D.val * cf_res.val; ! result->err = fabs(D.val * cf_res.err) + fabs(D.err * cf_res.val); ! return status; } ! /* Series would require excessive number of terms */ ! if (x > (a + nmax)) { ! GSL_ERROR ("gamma_inc_P_series x>>a exceeds range", GSL_EMAXITER); ! } ! ! /* Normal case: sum the series */ ! ! { ! double sum = 1.0; ! double term = 1.0; ! double remainder; ! int n; ! ! /* Handle lower part of the series where t_n is increasing, |x| > a+n */ ! ! int nlow = (x > a) ? (x - a): 0; ! ! for(n=1; n < nlow; n++) { ! term *= x/(a+n); ! sum += term; ! } ! ! /* Handle upper part of the series where t_n is decreasing, |x| < a+n */ ! ! for (/* n = previous n */ ; nval = D.val * sum; ! result->err = D.err * fabs(sum) + fabs(D.val * remainder); ! result->err += (1.0 + n) * GSL_DBL_EPSILON * fabs(result->val); ! ! if(n == nmax && fabs(remainder/sum) > GSL_SQRT_DBL_EPSILON) ! GSL_ERROR ("gamma_inc_P_series failed to converge", GSL_EMAXITER); ! else ! return stat_D; ! } } diff -a -rc -C 2 -P gsl-1.11/specfunc/gsl_sf_exp.h gsl-1.12/specfunc/gsl_sf_exp.h *** gsl-1.11/specfunc/gsl_sf_exp.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/specfunc/gsl_sf_exp.h Wed Dec 3 10:04:46 2008 *************** *** 102,107 **** --- 102,109 ---- int gsl_sf_exprel_n_e(const int n, const double x, gsl_sf_result * result); double gsl_sf_exprel_n(const int n, const double x); + int gsl_sf_exprel_n_CF_e(const double n, const double x, gsl_sf_result * result); + /* Exponentiate a quantity with an associated error. */ diff -a -rc -C 2 -P gsl-1.11/specfunc/gsl_sf_legendre.h gsl-1.12/specfunc/gsl_sf_legendre.h *** gsl-1.11/specfunc/gsl_sf_legendre.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/specfunc/gsl_sf_legendre.h Thu Nov 27 20:03:29 2008 *************** *** 193,199 **** */ int gsl_sf_legendre_array_size(const int lmax, const int m); - /* Irregular Spherical Conical Function * P^{1/2}_{-1/2 + I lambda}(x) * --- 193,198 ---- *************** *** 311,326 **** int gsl_sf_legendre_H3d_array(const int lmax, const double lambda, const double eta, double * result_array); - #ifdef HAVE_INLINE - extern inline - int - gsl_sf_legendre_array_size(const int lmax, const int m) - { - return lmax-m+1; - } - #endif /* HAVE_INLINE */ - - __END_DECLS #endif /* __GSL_SF_LEGENDRE_H__ */ --- 310,315 ---- diff -a -rc -C 2 -P gsl-1.11/specfunc/legendre_poly.c gsl-1.12/specfunc/legendre_poly.c *** gsl-1.11/specfunc/legendre_poly.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/specfunc/legendre_poly.c Thu Nov 27 20:03:29 2008 *************** *** 737,751 **** } } - - #ifndef HIDE_INLINE_STATIC int gsl_sf_legendre_array_size(const int lmax, const int m) { return lmax-m+1; } - #endif - /*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ --- 737,747 ---- diff -a -rc -C 2 -P gsl-1.11/specfunc/test_gamma.c gsl-1.12/specfunc/test_gamma.c *** gsl-1.11/specfunc/test_gamma.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/specfunc/test_gamma.c Wed Dec 3 11:22:12 2008 *************** *** 203,208 **** --- 203,212 ---- /* Regression test Martin Jansche BUG#12 */ TEST_SF(s, gsl_sf_gamma_inc_P_e, (10, 1e-16, &r), 2.755731922398588814734648067e-167, TEST_TOL2, GSL_SUCCESS); + /* Regression test for gsl_cdf_chisq_Pinv, (0.05, 1263131.0) */ + TEST_SF(s, gsl_sf_gamma_inc_P_e, (1263131.0, 1261282.3637, &r), 0.04994777516935182963821362168, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_P_e, (1263131.0, 1263131.0, &r), 0.500118321758657770672882362502514254, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_Q_e, (0.0, 0.001, &r), 0.0, TEST_TOL0, GSL_SUCCESS); TEST_SF(s, gsl_sf_gamma_inc_Q_e, (0.001, 0.001, &r), 0.006312353291139709793, TEST_TOL0, GSL_SUCCESS); TEST_SF(s, gsl_sf_gamma_inc_Q_e, (0.001, 1.0, &r), 0.00021960835758555639171, TEST_TOL1, GSL_SUCCESS); diff -a -rc -C 2 -P gsl-1.11/specfunc/test_hyperg.c gsl-1.12/specfunc/test_hyperg.c *** gsl-1.11/specfunc/test_hyperg.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/specfunc/test_hyperg.c Thu Dec 4 06:30:06 2008 *************** *** 259,265 **** TEST_SF(s, gsl_sf_hyperg_1F1_e, (-26, 2.0, 100.0, &r), 1.444786781107436954e+19, TEST_TOL3, GSL_SUCCESS); ! #if 0 /* This one is computed with a huge error, there is loss of precision but the error estimate flags the problem (assuming the user looks at it). We should probably trap any return with --- 259,265 ---- TEST_SF(s, gsl_sf_hyperg_1F1_e, (-26, 2.0, 100.0, &r), 1.444786781107436954e+19, TEST_TOL3, GSL_SUCCESS); ! #ifdef FIXME /* This one is computed with a huge error, there is loss of precision but the error estimate flags the problem (assuming the user looks at it). We should probably trap any return with *************** *** 276,282 **** TEST_SF(s, gsl_sf_hyperg_1F1_e, (1.0, 1000000.5, 1001000.5, &r), 3480.3699557431856166, TEST_TOL4, GSL_SUCCESS); ! #if 0 /* FIX THESE NEXT RELEASE */ TEST_SF(s, gsl_sf_hyperg_1F1_e, (1.1, 1000000.5, 1001000.5, &r), 7304.6126942641350122, TEST_TOL3, GSL_SUCCESS); TEST_SF(s, gsl_sf_hyperg_1F1_e, (0.9, 1000000.5, 1001000.5, &r), 1645.4879293475410982, TEST_TOL3, GSL_SUCCESS); #endif --- 276,282 ---- TEST_SF(s, gsl_sf_hyperg_1F1_e, (1.0, 1000000.5, 1001000.5, &r), 3480.3699557431856166, TEST_TOL4, GSL_SUCCESS); ! #ifdef FIXME /* FIX THESE NEXT RELEASE */ TEST_SF(s, gsl_sf_hyperg_1F1_e, (1.1, 1000000.5, 1001000.5, &r), 7304.6126942641350122, TEST_TOL3, GSL_SUCCESS); TEST_SF(s, gsl_sf_hyperg_1F1_e, (0.9, 1000000.5, 1001000.5, &r), 1645.4879293475410982, TEST_TOL3, GSL_SUCCESS); #endif *************** *** 424,429 **** --- 424,434 ---- TEST_SF(s, gsl_sf_hyperg_U_e, (-50.5, 100.1, 70, &r), 3.249026971618851e+84, TEST_TOL2, GSL_SUCCESS); TEST_SF(s, gsl_sf_hyperg_U_e, (-50.5, 100.1, 100, &r), 1.003401902126641e+85, TEST_TOL1, GSL_SUCCESS); + /* Bug report from Stefan Gerlach */ + + #ifdef FIXME + TEST_SF(s, gsl_sf_hyperg_U_e, (-2.0, 4.0, 1.0, &r), 11.0, TEST_TOL0, GSL_SUCCESS); + #endif /* 2F1 */ *************** *** 461,470 **** /* added special handling with x == 1.0 , Richard J. Mathar, 2008-01-09 */ ! TEST_SF(s, gsl_sf_hyperg_2F1_e, (1.5, 0.5, 3.0, 1.0, &r), 1.6976527263135502482014268 , TEST_TOL0, GSL_SUCCESS); ! TEST_SF(s, gsl_sf_hyperg_2F1_e, (1.5, -4.2, 3.0, 1.0, &r), .15583601560025710649555254 , TEST_TOL0, GSL_SUCCESS); ! TEST_SF(s, gsl_sf_hyperg_2F1_e, (-7.4, 0.7, -1.5, 1.0, &r), -.34478866959246584996859 , TEST_TOL0, GSL_SUCCESS); ! TEST_SF(s, gsl_sf_hyperg_2F1_e, (0.1, -2.7, -1.5, 1.0, &r), 1.059766766063610122925 , TEST_TOL0, GSL_SUCCESS); /* 2F1 conj */ --- 466,475 ---- /* added special handling with x == 1.0 , Richard J. Mathar, 2008-01-09 */ ! TEST_SF(s, gsl_sf_hyperg_2F1_e, (1.5, 0.5, 3.0, 1.0, &r), 1.6976527263135502482014268 , TEST_TOL2, GSL_SUCCESS); ! TEST_SF(s, gsl_sf_hyperg_2F1_e, (1.5, -4.2, 3.0, 1.0, &r), .15583601560025710649555254 , TEST_TOL2, GSL_SUCCESS); ! TEST_SF(s, gsl_sf_hyperg_2F1_e, (-7.4, 0.7, -1.5, 1.0, &r), -.34478866959246584996859 , TEST_TOL2, GSL_SUCCESS); ! TEST_SF(s, gsl_sf_hyperg_2F1_e, (0.1, -2.7, -1.5, 1.0, &r), 1.059766766063610122925 , TEST_TOL2, GSL_SUCCESS); /* 2F1 conj */ diff -a -rc -C 2 -P gsl-1.11/specfunc/test_legendre.c gsl-1.12/specfunc/test_legendre.c *** gsl-1.11/specfunc/test_legendre.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/specfunc/test_legendre.c Thu Nov 27 20:03:29 2008 *************** *** 490,496 **** TEST_SF(s, gsl_sf_legendre_H3d_e, (5, 1.0e+08, 1.0e-08, &r), 0.00009256115861125841299, TEST_TOL2, GSL_SUCCESS); TEST_SF(s, gsl_sf_legendre_H3d_e, (5, 1.0e+08, 100.0, &r), -6.496143209092860765e-52 , 128.0*TEST_SQRT_TOL0, GSL_SUCCESS); ! #if 0 sa = 0; gsl_sf_legendre_H3d_array(100, 1.0, 3.0, L); TEST_SF_VAL(sa, L[0], +0.0, gsl_sf_legendre_H3d(0, 1.0, 3.0), 1.0e-12); --- 490,496 ---- TEST_SF(s, gsl_sf_legendre_H3d_e, (5, 1.0e+08, 1.0e-08, &r), 0.00009256115861125841299, TEST_TOL2, GSL_SUCCESS); TEST_SF(s, gsl_sf_legendre_H3d_e, (5, 1.0e+08, 100.0, &r), -6.496143209092860765e-52 , 128.0*TEST_SQRT_TOL0, GSL_SUCCESS); ! #if FIXME sa = 0; gsl_sf_legendre_H3d_array(100, 1.0, 3.0, L); TEST_SF_VAL(sa, L[0], +0.0, gsl_sf_legendre_H3d(0, 1.0, 3.0), 1.0e-12); diff -a -rc -C 2 -P gsl-1.11/specfunc/test_sf.c gsl-1.12/specfunc/test_sf.c *** gsl-1.11/specfunc/test_sf.c Sun Mar 16 21:51:48 2008 --- gsl-1.12/specfunc/test_sf.c Thu Dec 4 07:34:41 2008 *************** *** 536,541 **** --- 536,544 ---- TEST_SF(s, gsl_sf_ellint_Kcomp_e, ( 0.50, mode, &r), 1.6857503548125960429, TEST_TOL0, GSL_SUCCESS); TEST_SF(s, gsl_sf_ellint_Kcomp_e, (0.010, mode, &r), 1.5708355989121522360, TEST_TOL0, GSL_SUCCESS); + /* Bug report from Thies Heidecke */ + TEST_SF(s, gsl_sf_ellint_Kcomp_e, ( 0.99999999906867742538, mode, &r), 11.4369284843320018031, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_Ecomp_e, (0.99, mode, &r), 1.0284758090288040010, TEST_TOL0, GSL_SUCCESS); TEST_SF(s, gsl_sf_ellint_Ecomp_e, (0.50, mode, &r), 1.4674622093394271555, TEST_TOL0, GSL_SUCCESS); TEST_SF(s, gsl_sf_ellint_Ecomp_e, (0.01, mode, &r), 1.5707570561503852873, TEST_TOL0, GSL_SUCCESS); *************** *** 997,1007 **** /* Test cases from Szymon Jaroszewicz */ TEST_SF_E10(s, gsl_sf_exp_mult_e10_e, (10000.0, 1.0, &re), 8.806818225662921587261496007, 4342, TEST_TOL5, GSL_SUCCESS); ! TEST_SF_E10(s, gsl_sf_exp_mult_e10_e, (100.0, 1.0, &re), 2.688117141816135448412625551e43, 0, TEST_TOL1, GSL_SUCCESS); ! TEST_SF_E10(s, gsl_sf_exp_e10_e, (100.0, &re), 2.688117141816135448412625551e43, 0, TEST_TOL1, GSL_SUCCESS); ! TEST_SF_E10(s, gsl_sf_exp_e10_e, (1000.0, &re), 1.970071114017046993888879352, 434, TEST_TOL1, GSL_SUCCESS); ! TEST_SF_E10(s, gsl_sf_exp_e10_e, (-100.0, &re), 3.720075976020835962959695803e-44, 0, TEST_TOL1, GSL_SUCCESS); ! TEST_SF_E10(s, gsl_sf_exp_e10_e, (-1000.0, &re), 5.075958897549456765291809479, -435, TEST_TOL1, GSL_SUCCESS); TEST_SF(s, gsl_sf_expm1_e, (-10.0, &r), exp(-10.0)-1.0, TEST_TOL0, GSL_SUCCESS); TEST_SF(s, gsl_sf_expm1_e, (-0.001, &r), -0.00099950016662500845, TEST_TOL0, GSL_SUCCESS); --- 1000,1010 ---- /* Test cases from Szymon Jaroszewicz */ TEST_SF_E10(s, gsl_sf_exp_mult_e10_e, (10000.0, 1.0, &re), 8.806818225662921587261496007, 4342, TEST_TOL5, GSL_SUCCESS); ! TEST_SF_E10(s, gsl_sf_exp_mult_e10_e, (100.0, 1.0, &re), 2.688117141816135448412625551e43, 0, TEST_TOL2, GSL_SUCCESS); ! TEST_SF_E10(s, gsl_sf_exp_e10_e, (100.0, &re), 2.688117141816135448412625551e43, 0, TEST_TOL2, GSL_SUCCESS); ! TEST_SF_E10(s, gsl_sf_exp_e10_e, (1000.0, &re), 1.970071114017046993888879352, 434, TEST_TOL3, GSL_SUCCESS); ! TEST_SF_E10(s, gsl_sf_exp_e10_e, (-100.0, &re), 3.720075976020835962959695803e-44, 0, TEST_TOL2, GSL_SUCCESS); ! TEST_SF_E10(s, gsl_sf_exp_e10_e, (-1000.0, &re), 5.075958897549456765291809479, -435, TEST_TOL3, GSL_SUCCESS); TEST_SF(s, gsl_sf_expm1_e, (-10.0, &r), exp(-10.0)-1.0, TEST_TOL0, GSL_SUCCESS); TEST_SF(s, gsl_sf_expm1_e, (-0.001, &r), -0.00099950016662500845, TEST_TOL0, GSL_SUCCESS); *************** *** 1066,1071 **** --- 1069,1077 ---- TEST_SF(s, gsl_sf_exprel_n_e, (500, 1000.0, &r), 2.4037563160335300322e+68, TEST_TOL4, GSL_SUCCESS); TEST_SF(s, gsl_sf_exprel_n_e, (500, 1600.0, &r), 7.899293535320607403e+226, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (1263131.0, 1261282.3637, &r), 545.0113107238425900305428360, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_CF_e, (6.315655e+05, 6.302583168053568806e+05, &r), 385.425369029433473098652465720, TEST_TOL4, GSL_SUCCESS); + return s; } diff -a -rc -C 2 -P gsl-1.11/statistics/ChangeLog gsl-1.12/statistics/ChangeLog *** gsl-1.11/statistics/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/statistics/ChangeLog Thu Nov 27 20:03:29 2008 *************** *** 1,3 **** --- 1,7 ---- + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + 2007-10-02 Brian Gough * variance_source.c: added functions for sum of squares and diff -a -rc -C 2 -P gsl-1.11/statistics/Makefile.am gsl-1.12/statistics/Makefile.am *** gsl-1.11/statistics/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/statistics/Makefile.am Thu Nov 27 20:03:29 2008 *************** *** 4,10 **** pkginclude_HEADERS = gsl_statistics.h gsl_statistics_char.h gsl_statistics_double.h gsl_statistics_float.h gsl_statistics_int.h gsl_statistics_long.h gsl_statistics_long_double.h gsl_statistics_short.h gsl_statistics_uchar.h gsl_statistics_uint.h gsl_statistics_ulong.h gsl_statistics_ushort.h ! INCLUDES= -I$(top_builddir) -I$(top_srcdir) libgslstatistics_la_SOURCES = mean.c variance.c absdev.c skew.c kurtosis.c lag1.c p_variance.c minmax.c ttest.c median.c covariance.c quantiles.c wmean.c wvariance.c wabsdev.c wskew.c wkurtosis.c --- 4,10 ---- pkginclude_HEADERS = gsl_statistics.h gsl_statistics_char.h gsl_statistics_double.h gsl_statistics_float.h gsl_statistics_int.h gsl_statistics_long.h gsl_statistics_long_double.h gsl_statistics_short.h gsl_statistics_uchar.h gsl_statistics_uint.h gsl_statistics_ulong.h gsl_statistics_ushort.h ! INCLUDES = -I$(top_srcdir) libgslstatistics_la_SOURCES = mean.c variance.c absdev.c skew.c kurtosis.c lag1.c p_variance.c minmax.c ttest.c median.c covariance.c quantiles.c wmean.c wvariance.c wabsdev.c wskew.c wkurtosis.c diff -a -rc -C 2 -P gsl-1.11/statistics/Makefile.in gsl-1.12/statistics/Makefile.in *** gsl-1.11/statistics/Makefile.in Sun Mar 30 12:07:10 2008 --- gsl-1.12/statistics/Makefile.in Mon Dec 15 14:55:18 2008 *************** *** 135,140 **** --- 135,141 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 142,148 **** --- 143,152 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 207,213 **** top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslstatistics.la pkginclude_HEADERS = gsl_statistics.h gsl_statistics_char.h gsl_statistics_double.h gsl_statistics_float.h gsl_statistics_int.h gsl_statistics_long.h gsl_statistics_long_double.h gsl_statistics_short.h gsl_statistics_uchar.h gsl_statistics_uint.h gsl_statistics_ulong.h gsl_statistics_ushort.h ! INCLUDES = -I$(top_builddir) -I$(top_srcdir) libgslstatistics_la_SOURCES = mean.c variance.c absdev.c skew.c kurtosis.c lag1.c p_variance.c minmax.c ttest.c median.c covariance.c quantiles.c wmean.c wvariance.c wabsdev.c wskew.c wkurtosis.c noinst_HEADERS = mean_source.c variance_source.c covariance_source.c absdev_source.c skew_source.c kurtosis_source.c lag1_source.c p_variance_source.c minmax_source.c ttest_source.c median_source.c quantiles_source.c wmean_source.c wvariance_source.c wabsdev_source.c wskew_source.c wkurtosis_source.c test_float_source.c test_int_source.c TESTS = $(check_PROGRAMS) --- 211,217 ---- top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslstatistics.la pkginclude_HEADERS = gsl_statistics.h gsl_statistics_char.h gsl_statistics_double.h gsl_statistics_float.h gsl_statistics_int.h gsl_statistics_long.h gsl_statistics_long_double.h gsl_statistics_short.h gsl_statistics_uchar.h gsl_statistics_uint.h gsl_statistics_ulong.h gsl_statistics_ushort.h ! INCLUDES = -I$(top_srcdir) libgslstatistics_la_SOURCES = mean.c variance.c absdev.c skew.c kurtosis.c lag1.c p_variance.c minmax.c ttest.c median.c covariance.c quantiles.c wmean.c wvariance.c wabsdev.c wskew.c wkurtosis.c noinst_HEADERS = mean_source.c variance_source.c covariance_source.c absdev_source.c skew_source.c kurtosis_source.c lag1_source.c p_variance_source.c minmax_source.c ttest_source.c median_source.c quantiles_source.c wmean_source.c wvariance_source.c wabsdev_source.c wskew_source.c wkurtosis_source.c test_float_source.c test_int_source.c TESTS = $(check_PROGRAMS) diff -a -rc -C 2 -P gsl-1.11/sum/ChangeLog gsl-1.12/sum/ChangeLog *** gsl-1.11/sum/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/sum/ChangeLog Thu Nov 27 20:03:29 2008 *************** *** 1,3 **** --- 1,7 ---- + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + Thu Dec 21 21:46:54 2000 Brian Gough * changed err to abserr, to make it clear that it is an absolute diff -a -rc -C 2 -P gsl-1.11/sum/Makefile.am gsl-1.12/sum/Makefile.am *** gsl-1.11/sum/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/sum/Makefile.am Thu Nov 27 20:03:29 2008 *************** *** 2,8 **** pkginclude_HEADERS = gsl_sum.h ! INCLUDES= -I$(top_builddir) libgslsum_la_SOURCES = levin_u.c levin_utrunc.c work_u.c work_utrunc.c --- 2,8 ---- pkginclude_HEADERS = gsl_sum.h ! INCLUDES = -I$(top_srcdir) libgslsum_la_SOURCES = levin_u.c levin_utrunc.c work_u.c work_utrunc.c diff -a -rc -C 2 -P gsl-1.11/sum/Makefile.in gsl-1.12/sum/Makefile.in *** gsl-1.11/sum/Makefile.in Sun Mar 30 12:07:10 2008 --- gsl-1.12/sum/Makefile.in Mon Dec 15 14:55:19 2008 *************** *** 133,138 **** --- 133,139 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 140,146 **** --- 141,150 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 205,211 **** top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslsum.la pkginclude_HEADERS = gsl_sum.h ! INCLUDES = -I$(top_builddir) libgslsum_la_SOURCES = levin_u.c levin_utrunc.c work_u.c work_utrunc.c TESTS = $(check_PROGRAMS) test_LDADD = libgslsum.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la --- 209,215 ---- top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslsum.la pkginclude_HEADERS = gsl_sum.h ! INCLUDES = -I$(top_srcdir) libgslsum_la_SOURCES = levin_u.c levin_utrunc.c work_u.c work_utrunc.c TESTS = $(check_PROGRAMS) test_LDADD = libgslsum.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la diff -a -rc -C 2 -P gsl-1.11/sys/ChangeLog gsl-1.12/sys/ChangeLog *** gsl-1.11/sys/ChangeLog Tue Mar 18 15:27:35 2008 --- gsl-1.12/sys/ChangeLog Thu Nov 27 20:03:29 2008 *************** *** 1,3 **** --- 1,28 ---- + 2008-10-13 Brian Gough + + * log1p.c: use gsl_sys.h header file + + * infnan.c: use gsl_sys.h header file + + * hypot.c: use gsl_sys.h header file + + * fdiv.c: use gsl_sys.h header file + + * coerce.c: use gsl_sys.h header file + + 2008-10-08 Brian Gough + + * infnan.c (gsl_isinf): handle the case where isinf(-inf) + returns +1 + + 2008-07-03 Brian Gough + + * prec.c: compile inline functions from header here + + * pow_int.c: compile inline functions from header here + + * minmax.c: compile inline functions from header here + 2008-03-18 Brian Gough * test.c (main): use volatile to avoid extended precision in loop diff -a -rc -C 2 -P gsl-1.11/sys/Makefile.am gsl-1.12/sys/Makefile.am *** gsl-1.11/sys/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/sys/Makefile.am Thu Nov 27 20:03:29 2008 *************** *** 4,10 **** libgslsys_la_SOURCES = minmax.c prec.c hypot.c log1p.c expm1.c coerce.c invhyp.c pow_int.c infnan.c fdiv.c fcmp.c ldfrexp.c ! INCLUDES = -I$(top_builddir) check_PROGRAMS = test TESTS = $(check_PROGRAMS) --- 4,10 ---- libgslsys_la_SOURCES = minmax.c prec.c hypot.c log1p.c expm1.c coerce.c invhyp.c pow_int.c infnan.c fdiv.c fcmp.c ldfrexp.c ! INCLUDES = -I$(top_srcdir) check_PROGRAMS = test TESTS = $(check_PROGRAMS) diff -a -rc -C 2 -P gsl-1.11/sys/Makefile.in gsl-1.12/sys/Makefile.in *** gsl-1.11/sys/Makefile.in Sun Mar 30 12:07:11 2008 --- gsl-1.12/sys/Makefile.in Mon Dec 15 14:55:19 2008 *************** *** 134,139 **** --- 134,140 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 141,147 **** --- 142,151 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 207,213 **** noinst_LTLIBRARIES = libgslsys.la pkginclude_HEADERS = gsl_sys.h libgslsys_la_SOURCES = minmax.c prec.c hypot.c log1p.c expm1.c coerce.c invhyp.c pow_int.c infnan.c fdiv.c fcmp.c ldfrexp.c ! INCLUDES = -I$(top_builddir) 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 --- 211,217 ---- noinst_LTLIBRARIES = libgslsys.la pkginclude_HEADERS = gsl_sys.h libgslsys_la_SOURCES = minmax.c prec.c hypot.c log1p.c expm1.c coerce.c invhyp.c pow_int.c infnan.c fdiv.c fcmp.c ldfrexp.c ! INCLUDES = -I$(top_srcdir) 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 -a -rc -C 2 -P gsl-1.11/sys/coerce.c gsl-1.12/sys/coerce.c *** gsl-1.11/sys/coerce.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/sys/coerce.c Thu Nov 27 20:03:29 2008 *************** *** 19,26 **** #include #include ! ! double gsl_coerce_double (const double x); double gsl_coerce_double (const double x) --- 19,25 ---- #include #include ! #include double gsl_coerce_double (const double x) *************** *** 30,37 **** return y; } - float gsl_coerce_float (const float x); - float gsl_coerce_float (const float x) { --- 29,34 ---- *************** *** 42,49 **** /* The following function is not needed, but is included for completeness */ - long double gsl_coerce_long_double (const long double x); - long double gsl_coerce_long_double (const long double x) { --- 39,44 ---- diff -a -rc -C 2 -P gsl-1.11/sys/fdiv.c gsl-1.12/sys/fdiv.c *** gsl-1.11/sys/fdiv.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/sys/fdiv.c Thu Nov 27 20:03:29 2008 *************** *** 19,26 **** #include #include ! ! double gsl_fdiv (const double x, const double y); double gsl_fdiv (const double x, const double y) --- 19,25 ---- #include #include ! #include double gsl_fdiv (const double x, const double y) diff -a -rc -C 2 -P gsl-1.11/sys/hypot.c gsl-1.12/sys/hypot.c *** gsl-1.11/sys/hypot.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/sys/hypot.c Thu Nov 27 20:03:29 2008 *************** *** 21,29 **** #include #include - double gsl_hypot (const double x, const double y); - double gsl_hypot3 (const double x, const double y, const double z); - double gsl_hypot (const double x, const double y) { double xabs = fabs(x) ; --- 21,26 ---- diff -a -rc -C 2 -P gsl-1.11/sys/infnan.c gsl-1.12/sys/infnan.c *** gsl-1.11/sys/infnan.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/sys/infnan.c Thu Nov 27 20:03:29 2008 *************** *** 24,33 **** #include #endif ! double gsl_nan (void); ! double gsl_posinf (void); ! double gsl_neginf (void); ! double gsl_fdiv (const double x, const double y); double gsl_nan (void) { --- 24,30 ---- #include #endif ! #include double gsl_nan (void) { *************** *** 118,124 **** int gsl_isinf (const double x) { ! return isinf(x); } # else --- 115,132 ---- int gsl_isinf (const double x) { ! /* isinf(3): In glibc 2.01 and earlier, isinf() returns a ! non-zero value (actually: 1) if x is an infinity (positive or ! negative). (This is all that C99 requires.) */ ! ! if (isinf(x)) ! { ! return (x > 0) ? 1 : -1; ! } ! else ! { ! return 0; ! } } # else diff -a -rc -C 2 -P gsl-1.11/sys/log1p.c gsl-1.12/sys/log1p.c *** gsl-1.11/sys/log1p.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/sys/log1p.c Thu Nov 27 20:03:29 2008 *************** *** 19,26 **** #include #include ! ! double gsl_log1p (const double x); double gsl_log1p (const double x) { --- 19,25 ---- #include #include ! #include double gsl_log1p (const double x) { diff -a -rc -C 2 -P gsl-1.11/sys/minmax.c gsl-1.12/sys/minmax.c *** gsl-1.11/sys/minmax.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/sys/minmax.c Thu Nov 27 20:03:29 2008 *************** *** 19,77 **** #include ! #define GSL_MAX(a,b) ((a) > (b) ? (a) : (b)) ! #define GSL_MIN(a,b) ((a) < (b) ? (a) : (b)) ! #ifndef HIDE_INLINE_STATIC ! int GSL_MAX_INT (int a, int b); ! int GSL_MIN_INT (int a, int b); ! double GSL_MAX_DBL (double a, double b); ! double GSL_MIN_DBL (double a, double b); ! long double GSL_MAX_LDBL (long double a, long double b); ! long double GSL_MIN_LDBL (long double a, long double b); ! ! int ! GSL_MAX_INT (int a, int b) ! { ! return GSL_MAX (a, b); ! } ! ! int ! GSL_MIN_INT (int a, int b) ! { ! return GSL_MIN (a, b); ! } ! ! double ! GSL_MAX_DBL (double a, double b) ! { ! return GSL_MAX (a, b); ! } ! ! double ! GSL_MIN_DBL (double a, double b) ! { ! return GSL_MIN (a, b); ! } ! ! long double ! GSL_MAX_LDBL (long double a, long double b) ! { ! return GSL_MAX (a, b); ! } ! ! long double ! GSL_MIN_LDBL (long double a, long double b) ! { ! return GSL_MIN (a, b); ! } ! #endif /* Define some static functions which are always available */ - double gsl_max (double a, double b); - double gsl_min (double a, double b); - double gsl_max (double a, double b) { return GSL_MAX (a, b); --- 19,32 ---- #include ! /* Compile all the inline functions */ ! #define COMPILE_INLINE_STATIC ! #include "build.h" ! #include /* Define some static functions which are always available */ double gsl_max (double a, double b) { return GSL_MAX (a, b); diff -a -rc -C 2 -P gsl-1.11/sys/pow_int.c gsl-1.12/sys/pow_int.c *** gsl-1.11/sys/pow_int.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/sys/pow_int.c Thu Nov 27 20:03:29 2008 *************** *** 18,35 **** */ #include #include - #include ! #ifndef HIDE_INLINE_STATIC ! double gsl_pow_2(const double x) { return x*x; } ! double gsl_pow_3(const double x) { return x*x*x; } ! double gsl_pow_4(const double x) { double x2 = x*x; return x2*x2; } ! double gsl_pow_5(const double x) { double x2 = x*x; return x2*x2*x; } ! double gsl_pow_6(const double x) { double x2 = x*x; return x2*x2*x2; } ! double gsl_pow_7(const double x) { double x3 = x*x*x; return x3*x3*x; } ! double gsl_pow_8(const double x) { double x2 = x*x; double x4 = x2*x2; return x4*x4; } ! double gsl_pow_9(const double x) { double x3 = x*x*x; return x3*x3*x3; } ! #endif double gsl_pow_int(double x, int n) { --- 18,29 ---- */ #include #include ! /* Compile all the inline functions */ ! ! #define COMPILE_INLINE_STATIC ! #include "build.h" ! #include double gsl_pow_int(double x, int n) { diff -a -rc -C 2 -P gsl-1.11/sys/prec.c gsl-1.12/sys/prec.c *** gsl-1.11/sys/prec.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/sys/prec.c Thu Nov 27 20:03:29 2008 *************** *** 21,27 **** --- 21,33 ---- #include #include + + /* Compile all the inline functions */ + + #define COMPILE_INLINE_STATIC + #include "build.h" #include + #include const double gsl_prec_eps[_GSL_PREC_T_NUM] = { GSL_DBL_EPSILON, *************** *** 59,75 **** GSL_ROOT6_SFLT_EPSILON }; - typedef unsigned int gsl_mode_t; - - #ifndef HIDE_INLINE_STATIC - /* We need this somewhere, in case the inline is ignored. - */ - - unsigned int GSL_MODE_PREC(gsl_mode_t mt); - - unsigned int - GSL_MODE_PREC(gsl_mode_t mt) - { - return (mt & (unsigned int)7); - } - #endif --- 65,67 ---- diff -a -rc -C 2 -P gsl-1.11/sys/test.c gsl-1.12/sys/test.c *** gsl-1.11/sys/test.c Tue Mar 18 15:25:05 2008 --- gsl-1.12/sys/test.c Thu Nov 27 20:03:29 2008 *************** *** 455,466 **** s = gsl_isinf (inf); gsl_test_int (s, 1, "gsl_isinf(inf)"); - /* isinf(3): In glibc 2.01 and earlier, isinf() returns a - non-zero value (actually: 1) if x is an infinity (positive or - negative). (This is all that C99 requires.) */ - s = gsl_isinf (-inf); ! gsl_test (s == 0, "gsl_isinf(-inf) is non-zero"); s = gsl_isinf (nan); gsl_test_int (s, 0, "gsl_isinf(nan)"); --- 455,462 ---- s = gsl_isinf (inf); gsl_test_int (s, 1, "gsl_isinf(inf)"); s = gsl_isinf (-inf); ! gsl_test_int (s, -1, "gsl_isinf(-inf)"); s = gsl_isinf (nan); gsl_test_int (s, 0, "gsl_isinf(nan)"); diff -a -rc -C 2 -P gsl-1.11/test/Makefile.in gsl-1.12/test/Makefile.in *** gsl-1.11/test/Makefile.in Sun Mar 30 12:07:11 2008 --- gsl-1.12/test/Makefile.in Mon Dec 15 14:55:19 2008 *************** *** 126,131 **** --- 126,132 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 133,139 **** --- 134,143 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ diff -a -rc -C 2 -P gsl-1.11/utils/Makefile.in gsl-1.12/utils/Makefile.in *** gsl-1.11/utils/Makefile.in Sun Mar 30 12:07:11 2008 --- gsl-1.12/utils/Makefile.in Mon Dec 15 14:55:20 2008 *************** *** 116,121 **** --- 116,122 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 123,129 **** --- 124,133 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ diff -a -rc -C 2 -P gsl-1.11/vector/ChangeLog gsl-1.12/vector/ChangeLog *** gsl-1.11/vector/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/vector/ChangeLog Thu Nov 27 20:03:29 2008 *************** *** 1,3 **** --- 1,18 ---- + 2008-09-27 Brian Gough + + * gsl_vector_complex_double.h: added missing functions isnonneg, + add, sub, mul, div, scale, add_constant + + 2008-07-03 Brian Gough + + * gsl_vector.h: use new inline declarations in all header files + + * vector.c: compile inline functions from header here + + * vector_source.c: removed + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + 2007-08-21 Brian Gough * prop_source.c (FUNCTION): added gsl_vector_isnonneg diff -a -rc -C 2 -P gsl-1.11/vector/Makefile.am gsl-1.12/vector/Makefile.am *** gsl-1.11/vector/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/vector/Makefile.am Thu Nov 27 20:03:29 2008 *************** *** 4,10 **** pkginclude_HEADERS = gsl_vector.h gsl_vector_char.h gsl_vector_complex.h gsl_vector_complex_double.h gsl_vector_complex_float.h gsl_vector_complex_long_double.h gsl_vector_double.h gsl_vector_float.h gsl_vector_int.h gsl_vector_long.h gsl_vector_long_double.h gsl_vector_short.h gsl_vector_uchar.h gsl_vector_uint.h gsl_vector_ulong.h gsl_vector_ushort.h ! INCLUDES= -I$(top_builddir) -I$(top_srcdir) TESTS = $(check_PROGRAMS) --- 4,10 ---- pkginclude_HEADERS = gsl_vector.h gsl_vector_char.h gsl_vector_complex.h gsl_vector_complex_double.h gsl_vector_complex_float.h gsl_vector_complex_long_double.h gsl_vector_double.h gsl_vector_float.h gsl_vector_int.h gsl_vector_long.h gsl_vector_long_double.h gsl_vector_short.h gsl_vector_uchar.h gsl_vector_uint.h gsl_vector_ulong.h gsl_vector_ushort.h ! INCLUDES = -I$(top_srcdir) TESTS = $(check_PROGRAMS) *************** *** 16,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 --- 16,21 ---- CLEANFILES = test.txt test.dat ! noinst_HEADERS = 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 oper_complex_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 -a -rc -C 2 -P gsl-1.11/vector/Makefile.in gsl-1.12/vector/Makefile.in *** gsl-1.11/vector/Makefile.in Sun Mar 30 12:07:11 2008 --- gsl-1.12/vector/Makefile.in Mon Dec 15 14:55:20 2008 *************** *** 140,145 **** --- 140,146 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 147,153 **** --- 148,157 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 212,225 **** top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslvector.la pkginclude_HEADERS = gsl_vector.h gsl_vector_char.h gsl_vector_complex.h gsl_vector_complex_double.h gsl_vector_complex_float.h gsl_vector_complex_long_double.h gsl_vector_double.h gsl_vector_float.h gsl_vector_int.h gsl_vector_long.h gsl_vector_long_double.h gsl_vector_short.h gsl_vector_uchar.h gsl_vector_uint.h gsl_vector_ulong.h gsl_vector_ushort.h ! 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 test_static_LDADD = 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 test_static_SOURCES = test_static.c 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 all: all-am --- 216,229 ---- top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslvector.la pkginclude_HEADERS = gsl_vector.h gsl_vector_char.h gsl_vector_complex.h gsl_vector_complex_double.h gsl_vector_complex_float.h gsl_vector_complex_long_double.h gsl_vector_double.h gsl_vector_float.h gsl_vector_int.h gsl_vector_long.h gsl_vector_long_double.h gsl_vector_short.h gsl_vector_uchar.h gsl_vector_uint.h gsl_vector_ulong.h gsl_vector_ushort.h ! INCLUDES = -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 test_static_LDADD = 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 test_static_SOURCES = test_static.c CLEANFILES = test.txt test.dat ! noinst_HEADERS = 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 oper_complex_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 all: all-am diff -a -rc -C 2 -P gsl-1.11/vector/gsl_vector_char.h gsl-1.12/vector/gsl_vector_char.h *** gsl-1.11/vector/gsl_vector_char.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/vector/gsl_vector_char.h Thu Nov 27 20:03:29 2008 *************** *** 23,28 **** --- 23,29 ---- #include #include #include + #include #include #include *************** *** 122,133 **** /* Operations */ - char gsl_vector_char_get (const gsl_vector_char * v, const size_t i); - void gsl_vector_char_set (gsl_vector_char * v, const size_t i, char x); - - char *gsl_vector_char_ptr (gsl_vector_char * v, const size_t i); - const char *gsl_vector_char_const_ptr (const gsl_vector_char * v, const size_t i); - void gsl_vector_char_set_zero (gsl_vector_char * v); void gsl_vector_char_set_all (gsl_vector_char * v, char x); int gsl_vector_char_set_basis (gsl_vector_char * v, size_t i); --- 123,128 ---- *************** *** 165,178 **** int gsl_vector_char_isneg (const gsl_vector_char * v); int gsl_vector_char_isnonneg (const gsl_vector_char * v); #ifdef HAVE_INLINE ! extern inline char gsl_vector_char_get (const gsl_vector_char * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); } --- 160,178 ---- int gsl_vector_char_isneg (const gsl_vector_char * v); int gsl_vector_char_isnonneg (const gsl_vector_char * v); + INLINE_DECL char gsl_vector_char_get (const gsl_vector_char * v, const size_t i); + INLINE_DECL void gsl_vector_char_set (gsl_vector_char * v, const size_t i, char x); + INLINE_DECL char * gsl_vector_char_ptr (gsl_vector_char * v, const size_t i); + INLINE_DECL const char * gsl_vector_char_const_ptr (const gsl_vector_char * v, const size_t i); + #ifdef HAVE_INLINE ! INLINE_FUN char gsl_vector_char_get (const gsl_vector_char * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); } *************** *** 180,191 **** return v->data[i * v->stride]; } ! extern inline void gsl_vector_char_set (gsl_vector_char * v, const size_t i, char x) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_VOID ("index out of range", GSL_EINVAL); } --- 180,191 ---- return v->data[i * v->stride]; } ! INLINE_FUN void gsl_vector_char_set (gsl_vector_char * v, const size_t i, char x) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_VOID ("index out of range", GSL_EINVAL); } *************** *** 193,204 **** v->data[i * v->stride] = x; } ! extern inline char * gsl_vector_char_ptr (gsl_vector_char * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } --- 193,204 ---- v->data[i * v->stride] = x; } ! INLINE_FUN char * gsl_vector_char_ptr (gsl_vector_char * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } *************** *** 206,225 **** return (char *) (v->data + i * v->stride); } ! extern inline const char * gsl_vector_char_const_ptr (const gsl_vector_char * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } #endif return (const char *) (v->data + i * v->stride); } - - #endif /* HAVE_INLINE */ __END_DECLS --- 206,223 ---- return (char *) (v->data + i * v->stride); } ! INLINE_FUN const char * gsl_vector_char_const_ptr (const gsl_vector_char * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } #endif return (const char *) (v->data + i * v->stride); } #endif /* HAVE_INLINE */ __END_DECLS diff -a -rc -C 2 -P gsl-1.11/vector/gsl_vector_complex_double.h gsl-1.12/vector/gsl_vector_complex_double.h *** gsl-1.11/vector/gsl_vector_complex_double.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/vector/gsl_vector_complex_double.h Thu Nov 27 20:03:29 2008 *************** *** 142,159 **** /* Operations */ - gsl_complex - gsl_vector_complex_get (const gsl_vector_complex * v, const size_t i); - - void gsl_vector_complex_set (gsl_vector_complex * v, const size_t i, - gsl_complex z); - - gsl_complex - *gsl_vector_complex_ptr (gsl_vector_complex * v, const size_t i); - - const gsl_complex - *gsl_vector_complex_const_ptr (const gsl_vector_complex * v, const size_t i); - void gsl_vector_complex_set_zero (gsl_vector_complex * v); void gsl_vector_complex_set_all (gsl_vector_complex * v, gsl_complex z); --- 142,147 ---- *************** *** 179,194 **** int gsl_vector_complex_isnull (const gsl_vector_complex * v); int gsl_vector_complex_ispos (const gsl_vector_complex * v); int gsl_vector_complex_isneg (const gsl_vector_complex * v); #ifdef HAVE_INLINE ! extern inline gsl_complex gsl_vector_complex_get (const gsl_vector_complex * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { gsl_complex zero = {{0, 0}}; GSL_ERROR_VAL ("index out of range", GSL_EINVAL, zero); --- 167,195 ---- int gsl_vector_complex_isnull (const gsl_vector_complex * v); int gsl_vector_complex_ispos (const gsl_vector_complex * v); int gsl_vector_complex_isneg (const gsl_vector_complex * v); + int gsl_vector_complex_isnonneg (const gsl_vector_complex * v); + + int gsl_vector_complex_add (gsl_vector_complex * a, const gsl_vector_complex * b); + int gsl_vector_complex_sub (gsl_vector_complex * a, const gsl_vector_complex * b); + int gsl_vector_complex_mul (gsl_vector_complex * a, const gsl_vector_complex * b); + int gsl_vector_complex_div (gsl_vector_complex * a, const gsl_vector_complex * b); + int gsl_vector_complex_scale (gsl_vector_complex * a, const gsl_complex x); + int gsl_vector_complex_add_constant (gsl_vector_complex * a, const gsl_complex x); + + INLINE_DECL gsl_complex gsl_vector_complex_get (const gsl_vector_complex * v, const size_t i); + INLINE_DECL void gsl_vector_complex_set (gsl_vector_complex * v, const size_t i, gsl_complex z); + INLINE_DECL gsl_complex *gsl_vector_complex_ptr (gsl_vector_complex * v, const size_t i); + INLINE_DECL const gsl_complex *gsl_vector_complex_const_ptr (const gsl_vector_complex * v, const size_t i); #ifdef HAVE_INLINE ! INLINE_FUN gsl_complex gsl_vector_complex_get (const gsl_vector_complex * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { gsl_complex zero = {{0, 0}}; GSL_ERROR_VAL ("index out of range", GSL_EINVAL, zero); *************** *** 197,209 **** return *GSL_COMPLEX_AT (v, i); } ! extern inline void gsl_vector_complex_set (gsl_vector_complex * v, const size_t i, gsl_complex z) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_VOID ("index out of range", GSL_EINVAL); } --- 198,210 ---- return *GSL_COMPLEX_AT (v, i); } ! INLINE_FUN void gsl_vector_complex_set (gsl_vector_complex * v, const size_t i, gsl_complex z) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_VOID ("index out of range", GSL_EINVAL); } *************** *** 211,223 **** *GSL_COMPLEX_AT (v, i) = z; } ! extern inline gsl_complex * gsl_vector_complex_ptr (gsl_vector_complex * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } --- 212,224 ---- *GSL_COMPLEX_AT (v, i) = z; } ! INLINE_FUN gsl_complex * gsl_vector_complex_ptr (gsl_vector_complex * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } *************** *** 225,237 **** return GSL_COMPLEX_AT (v, i); } ! extern inline const gsl_complex * gsl_vector_complex_const_ptr (const gsl_vector_complex * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } --- 226,238 ---- return GSL_COMPLEX_AT (v, i); } ! INLINE_FUN const gsl_complex * gsl_vector_complex_const_ptr (const gsl_vector_complex * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } diff -a -rc -C 2 -P gsl-1.11/vector/gsl_vector_complex_float.h gsl-1.12/vector/gsl_vector_complex_float.h *** gsl-1.11/vector/gsl_vector_complex_float.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/vector/gsl_vector_complex_float.h Thu Nov 27 20:03:29 2008 *************** *** 142,159 **** /* Operations */ - gsl_complex_float - gsl_vector_complex_float_get (const gsl_vector_complex_float * v, const size_t i); - - void gsl_vector_complex_float_set (gsl_vector_complex_float * v, const size_t i, - gsl_complex_float z); - - gsl_complex_float - *gsl_vector_complex_float_ptr (gsl_vector_complex_float * v, const size_t i); - - const gsl_complex_float - *gsl_vector_complex_float_const_ptr (const gsl_vector_complex_float * v, const size_t i); - void gsl_vector_complex_float_set_zero (gsl_vector_complex_float * v); void gsl_vector_complex_float_set_all (gsl_vector_complex_float * v, gsl_complex_float z); --- 142,147 ---- *************** *** 179,194 **** int gsl_vector_complex_float_isnull (const gsl_vector_complex_float * v); int gsl_vector_complex_float_ispos (const gsl_vector_complex_float * v); int gsl_vector_complex_float_isneg (const gsl_vector_complex_float * v); #ifdef HAVE_INLINE ! extern inline gsl_complex_float gsl_vector_complex_float_get (const gsl_vector_complex_float * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { gsl_complex_float zero = {{0, 0}}; GSL_ERROR_VAL ("index out of range", GSL_EINVAL, zero); --- 167,195 ---- int gsl_vector_complex_float_isnull (const gsl_vector_complex_float * v); int gsl_vector_complex_float_ispos (const gsl_vector_complex_float * v); int gsl_vector_complex_float_isneg (const gsl_vector_complex_float * v); + int gsl_vector_complex_float_isnonneg (const gsl_vector_complex_float * v); + + int gsl_vector_complex_float_add (gsl_vector_complex_float * a, const gsl_vector_complex_float * b); + int gsl_vector_complex_float_sub (gsl_vector_complex_float * a, const gsl_vector_complex_float * b); + int gsl_vector_complex_float_mul (gsl_vector_complex_float * a, const gsl_vector_complex_float * b); + int gsl_vector_complex_float_div (gsl_vector_complex_float * a, const gsl_vector_complex_float * b); + int gsl_vector_complex_float_scale (gsl_vector_complex_float * a, const gsl_complex_float x); + int gsl_vector_complex_float_add_constant (gsl_vector_complex_float * a, const gsl_complex_float x); + + INLINE_DECL gsl_complex_float gsl_vector_complex_float_get (const gsl_vector_complex_float * v, const size_t i); + INLINE_DECL void gsl_vector_complex_float_set (gsl_vector_complex_float * v, const size_t i, gsl_complex_float z); + INLINE_DECL gsl_complex_float *gsl_vector_complex_float_ptr (gsl_vector_complex_float * v, const size_t i); + INLINE_DECL const gsl_complex_float *gsl_vector_complex_float_const_ptr (const gsl_vector_complex_float * v, const size_t i); #ifdef HAVE_INLINE ! INLINE_FUN gsl_complex_float gsl_vector_complex_float_get (const gsl_vector_complex_float * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { gsl_complex_float zero = {{0, 0}}; GSL_ERROR_VAL ("index out of range", GSL_EINVAL, zero); *************** *** 197,209 **** return *GSL_COMPLEX_FLOAT_AT (v, i); } ! extern inline void gsl_vector_complex_float_set (gsl_vector_complex_float * v, const size_t i, gsl_complex_float z) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_VOID ("index out of range", GSL_EINVAL); } --- 198,210 ---- return *GSL_COMPLEX_FLOAT_AT (v, i); } ! INLINE_FUN void gsl_vector_complex_float_set (gsl_vector_complex_float * v, const size_t i, gsl_complex_float z) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_VOID ("index out of range", GSL_EINVAL); } *************** *** 211,223 **** *GSL_COMPLEX_FLOAT_AT (v, i) = z; } ! extern inline gsl_complex_float * gsl_vector_complex_float_ptr (gsl_vector_complex_float * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } --- 212,224 ---- *GSL_COMPLEX_FLOAT_AT (v, i) = z; } ! INLINE_FUN gsl_complex_float * gsl_vector_complex_float_ptr (gsl_vector_complex_float * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } *************** *** 225,237 **** return GSL_COMPLEX_FLOAT_AT (v, i); } ! extern inline const gsl_complex_float * gsl_vector_complex_float_const_ptr (const gsl_vector_complex_float * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } --- 226,238 ---- return GSL_COMPLEX_FLOAT_AT (v, i); } ! INLINE_FUN const gsl_complex_float * gsl_vector_complex_float_const_ptr (const gsl_vector_complex_float * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } diff -a -rc -C 2 -P gsl-1.11/vector/gsl_vector_complex_long_double.h gsl-1.12/vector/gsl_vector_complex_long_double.h *** gsl-1.11/vector/gsl_vector_complex_long_double.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/vector/gsl_vector_complex_long_double.h Thu Nov 27 20:03:29 2008 *************** *** 142,159 **** /* Operations */ - gsl_complex_long_double - gsl_vector_complex_long_double_get (const gsl_vector_complex_long_double * v, const size_t i); - - void gsl_vector_complex_long_double_set (gsl_vector_complex_long_double * v, const size_t i, - gsl_complex_long_double z); - - gsl_complex_long_double - *gsl_vector_complex_long_double_ptr (gsl_vector_complex_long_double * v, const size_t i); - - const gsl_complex_long_double - *gsl_vector_complex_long_double_const_ptr (const gsl_vector_complex_long_double * v, const size_t i); - void gsl_vector_complex_long_double_set_zero (gsl_vector_complex_long_double * v); void gsl_vector_complex_long_double_set_all (gsl_vector_complex_long_double * v, gsl_complex_long_double z); --- 142,147 ---- *************** *** 179,194 **** int gsl_vector_complex_long_double_isnull (const gsl_vector_complex_long_double * v); int gsl_vector_complex_long_double_ispos (const gsl_vector_complex_long_double * v); int gsl_vector_complex_long_double_isneg (const gsl_vector_complex_long_double * v); #ifdef HAVE_INLINE ! extern inline gsl_complex_long_double gsl_vector_complex_long_double_get (const gsl_vector_complex_long_double * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { gsl_complex_long_double zero = {{0, 0}}; GSL_ERROR_VAL ("index out of range", GSL_EINVAL, zero); --- 167,195 ---- int gsl_vector_complex_long_double_isnull (const gsl_vector_complex_long_double * v); int gsl_vector_complex_long_double_ispos (const gsl_vector_complex_long_double * v); int gsl_vector_complex_long_double_isneg (const gsl_vector_complex_long_double * v); + int gsl_vector_complex_long_double_isnonneg (const gsl_vector_complex_long_double * v); + + int gsl_vector_complex_long_double_add (gsl_vector_complex_long_double * a, const gsl_vector_complex_long_double * b); + int gsl_vector_complex_long_double_sub (gsl_vector_complex_long_double * a, const gsl_vector_complex_long_double * b); + int gsl_vector_complex_long_double_mul (gsl_vector_complex_long_double * a, const gsl_vector_complex_long_double * b); + int gsl_vector_complex_long_double_div (gsl_vector_complex_long_double * a, const gsl_vector_complex_long_double * b); + int gsl_vector_complex_long_double_scale (gsl_vector_complex_long_double * a, const gsl_complex_long_double x); + int gsl_vector_complex_long_double_add_constant (gsl_vector_complex_long_double * a, const gsl_complex_long_double x); + + INLINE_DECL gsl_complex_long_double gsl_vector_complex_long_double_get (const gsl_vector_complex_long_double * v, const size_t i); + INLINE_DECL void gsl_vector_complex_long_double_set (gsl_vector_complex_long_double * v, const size_t i, gsl_complex_long_double z); + INLINE_DECL gsl_complex_long_double *gsl_vector_complex_long_double_ptr (gsl_vector_complex_long_double * v, const size_t i); + INLINE_DECL const gsl_complex_long_double *gsl_vector_complex_long_double_const_ptr (const gsl_vector_complex_long_double * v, const size_t i); #ifdef HAVE_INLINE ! INLINE_FUN gsl_complex_long_double gsl_vector_complex_long_double_get (const gsl_vector_complex_long_double * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { gsl_complex_long_double zero = {{0, 0}}; GSL_ERROR_VAL ("index out of range", GSL_EINVAL, zero); *************** *** 197,209 **** return *GSL_COMPLEX_LONG_DOUBLE_AT (v, i); } ! extern inline void gsl_vector_complex_long_double_set (gsl_vector_complex_long_double * v, const size_t i, gsl_complex_long_double z) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_VOID ("index out of range", GSL_EINVAL); } --- 198,210 ---- return *GSL_COMPLEX_LONG_DOUBLE_AT (v, i); } ! INLINE_FUN void gsl_vector_complex_long_double_set (gsl_vector_complex_long_double * v, const size_t i, gsl_complex_long_double z) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_VOID ("index out of range", GSL_EINVAL); } *************** *** 211,223 **** *GSL_COMPLEX_LONG_DOUBLE_AT (v, i) = z; } ! extern inline gsl_complex_long_double * gsl_vector_complex_long_double_ptr (gsl_vector_complex_long_double * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } --- 212,224 ---- *GSL_COMPLEX_LONG_DOUBLE_AT (v, i) = z; } ! INLINE_FUN gsl_complex_long_double * gsl_vector_complex_long_double_ptr (gsl_vector_complex_long_double * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } *************** *** 225,237 **** return GSL_COMPLEX_LONG_DOUBLE_AT (v, i); } ! extern inline const gsl_complex_long_double * gsl_vector_complex_long_double_const_ptr (const gsl_vector_complex_long_double * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } --- 226,238 ---- return GSL_COMPLEX_LONG_DOUBLE_AT (v, i); } ! INLINE_FUN const gsl_complex_long_double * gsl_vector_complex_long_double_const_ptr (const gsl_vector_complex_long_double * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } diff -a -rc -C 2 -P gsl-1.11/vector/gsl_vector_double.h gsl-1.12/vector/gsl_vector_double.h *** gsl-1.11/vector/gsl_vector_double.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/vector/gsl_vector_double.h Thu Nov 27 20:03:29 2008 *************** *** 23,28 **** --- 23,29 ---- #include #include #include + #include #include #include *************** *** 122,133 **** /* Operations */ - double gsl_vector_get (const gsl_vector * v, const size_t i); - void gsl_vector_set (gsl_vector * v, const size_t i, double x); - - double *gsl_vector_ptr (gsl_vector * v, const size_t i); - const double *gsl_vector_const_ptr (const gsl_vector * v, const size_t i); - void gsl_vector_set_zero (gsl_vector * v); void gsl_vector_set_all (gsl_vector * v, double x); int gsl_vector_set_basis (gsl_vector * v, size_t i); --- 123,128 ---- *************** *** 165,178 **** int gsl_vector_isneg (const gsl_vector * v); int gsl_vector_isnonneg (const gsl_vector * v); #ifdef HAVE_INLINE ! extern inline double gsl_vector_get (const gsl_vector * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); } --- 160,178 ---- int gsl_vector_isneg (const gsl_vector * v); int gsl_vector_isnonneg (const gsl_vector * v); + INLINE_DECL double gsl_vector_get (const gsl_vector * v, const size_t i); + INLINE_DECL void gsl_vector_set (gsl_vector * v, const size_t i, double x); + INLINE_DECL double * gsl_vector_ptr (gsl_vector * v, const size_t i); + INLINE_DECL const double * gsl_vector_const_ptr (const gsl_vector * v, const size_t i); + #ifdef HAVE_INLINE ! INLINE_FUN double gsl_vector_get (const gsl_vector * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); } *************** *** 180,191 **** return v->data[i * v->stride]; } ! extern inline void gsl_vector_set (gsl_vector * v, const size_t i, double x) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_VOID ("index out of range", GSL_EINVAL); } --- 180,191 ---- return v->data[i * v->stride]; } ! INLINE_FUN void gsl_vector_set (gsl_vector * v, const size_t i, double x) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_VOID ("index out of range", GSL_EINVAL); } *************** *** 193,204 **** v->data[i * v->stride] = x; } ! extern inline double * gsl_vector_ptr (gsl_vector * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } --- 193,204 ---- v->data[i * v->stride] = x; } ! INLINE_FUN double * gsl_vector_ptr (gsl_vector * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } *************** *** 206,225 **** return (double *) (v->data + i * v->stride); } ! extern inline const double * gsl_vector_const_ptr (const gsl_vector * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } #endif return (const double *) (v->data + i * v->stride); } - - #endif /* HAVE_INLINE */ __END_DECLS --- 206,223 ---- return (double *) (v->data + i * v->stride); } ! INLINE_FUN const double * gsl_vector_const_ptr (const gsl_vector * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } #endif return (const double *) (v->data + i * v->stride); } #endif /* HAVE_INLINE */ __END_DECLS diff -a -rc -C 2 -P gsl-1.11/vector/gsl_vector_float.h gsl-1.12/vector/gsl_vector_float.h *** gsl-1.11/vector/gsl_vector_float.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/vector/gsl_vector_float.h Thu Nov 27 20:03:29 2008 *************** *** 23,28 **** --- 23,29 ---- #include #include #include + #include #include #include *************** *** 122,133 **** /* Operations */ - float gsl_vector_float_get (const gsl_vector_float * v, const size_t i); - void gsl_vector_float_set (gsl_vector_float * v, const size_t i, float x); - - float *gsl_vector_float_ptr (gsl_vector_float * v, const size_t i); - const float *gsl_vector_float_const_ptr (const gsl_vector_float * v, const size_t i); - void gsl_vector_float_set_zero (gsl_vector_float * v); void gsl_vector_float_set_all (gsl_vector_float * v, float x); int gsl_vector_float_set_basis (gsl_vector_float * v, size_t i); --- 123,128 ---- *************** *** 165,178 **** int gsl_vector_float_isneg (const gsl_vector_float * v); int gsl_vector_float_isnonneg (const gsl_vector_float * v); #ifdef HAVE_INLINE ! extern inline float gsl_vector_float_get (const gsl_vector_float * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); } --- 160,178 ---- int gsl_vector_float_isneg (const gsl_vector_float * v); int gsl_vector_float_isnonneg (const gsl_vector_float * v); + INLINE_DECL float gsl_vector_float_get (const gsl_vector_float * v, const size_t i); + INLINE_DECL void gsl_vector_float_set (gsl_vector_float * v, const size_t i, float x); + INLINE_DECL float * gsl_vector_float_ptr (gsl_vector_float * v, const size_t i); + INLINE_DECL const float * gsl_vector_float_const_ptr (const gsl_vector_float * v, const size_t i); + #ifdef HAVE_INLINE ! INLINE_FUN float gsl_vector_float_get (const gsl_vector_float * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); } *************** *** 180,191 **** return v->data[i * v->stride]; } ! extern inline void gsl_vector_float_set (gsl_vector_float * v, const size_t i, float x) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_VOID ("index out of range", GSL_EINVAL); } --- 180,191 ---- return v->data[i * v->stride]; } ! INLINE_FUN void gsl_vector_float_set (gsl_vector_float * v, const size_t i, float x) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_VOID ("index out of range", GSL_EINVAL); } *************** *** 193,204 **** v->data[i * v->stride] = x; } ! extern inline float * gsl_vector_float_ptr (gsl_vector_float * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } --- 193,204 ---- v->data[i * v->stride] = x; } ! INLINE_FUN float * gsl_vector_float_ptr (gsl_vector_float * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } *************** *** 206,225 **** return (float *) (v->data + i * v->stride); } ! extern inline const float * gsl_vector_float_const_ptr (const gsl_vector_float * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } #endif return (const float *) (v->data + i * v->stride); } - - #endif /* HAVE_INLINE */ __END_DECLS --- 206,223 ---- return (float *) (v->data + i * v->stride); } ! INLINE_FUN const float * gsl_vector_float_const_ptr (const gsl_vector_float * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } #endif return (const float *) (v->data + i * v->stride); } #endif /* HAVE_INLINE */ __END_DECLS diff -a -rc -C 2 -P gsl-1.11/vector/gsl_vector_int.h gsl-1.12/vector/gsl_vector_int.h *** gsl-1.11/vector/gsl_vector_int.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/vector/gsl_vector_int.h Thu Nov 27 20:03:29 2008 *************** *** 23,28 **** --- 23,29 ---- #include #include #include + #include #include #include *************** *** 122,133 **** /* Operations */ - int gsl_vector_int_get (const gsl_vector_int * v, const size_t i); - void gsl_vector_int_set (gsl_vector_int * v, const size_t i, int x); - - int *gsl_vector_int_ptr (gsl_vector_int * v, const size_t i); - const int *gsl_vector_int_const_ptr (const gsl_vector_int * v, const size_t i); - void gsl_vector_int_set_zero (gsl_vector_int * v); void gsl_vector_int_set_all (gsl_vector_int * v, int x); int gsl_vector_int_set_basis (gsl_vector_int * v, size_t i); --- 123,128 ---- *************** *** 165,178 **** int gsl_vector_int_isneg (const gsl_vector_int * v); int gsl_vector_int_isnonneg (const gsl_vector_int * v); #ifdef HAVE_INLINE ! extern inline int gsl_vector_int_get (const gsl_vector_int * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); } --- 160,178 ---- int gsl_vector_int_isneg (const gsl_vector_int * v); int gsl_vector_int_isnonneg (const gsl_vector_int * v); + INLINE_DECL int gsl_vector_int_get (const gsl_vector_int * v, const size_t i); + INLINE_DECL void gsl_vector_int_set (gsl_vector_int * v, const size_t i, int x); + INLINE_DECL int * gsl_vector_int_ptr (gsl_vector_int * v, const size_t i); + INLINE_DECL const int * gsl_vector_int_const_ptr (const gsl_vector_int * v, const size_t i); + #ifdef HAVE_INLINE ! INLINE_FUN int gsl_vector_int_get (const gsl_vector_int * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); } *************** *** 180,191 **** return v->data[i * v->stride]; } ! extern inline void gsl_vector_int_set (gsl_vector_int * v, const size_t i, int x) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_VOID ("index out of range", GSL_EINVAL); } --- 180,191 ---- return v->data[i * v->stride]; } ! INLINE_FUN void gsl_vector_int_set (gsl_vector_int * v, const size_t i, int x) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_VOID ("index out of range", GSL_EINVAL); } *************** *** 193,204 **** v->data[i * v->stride] = x; } ! extern inline int * gsl_vector_int_ptr (gsl_vector_int * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } --- 193,204 ---- v->data[i * v->stride] = x; } ! INLINE_FUN int * gsl_vector_int_ptr (gsl_vector_int * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } *************** *** 206,225 **** return (int *) (v->data + i * v->stride); } ! extern inline const int * gsl_vector_int_const_ptr (const gsl_vector_int * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } #endif return (const int *) (v->data + i * v->stride); } - - #endif /* HAVE_INLINE */ __END_DECLS --- 206,223 ---- return (int *) (v->data + i * v->stride); } ! INLINE_FUN const int * gsl_vector_int_const_ptr (const gsl_vector_int * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } #endif return (const int *) (v->data + i * v->stride); } #endif /* HAVE_INLINE */ __END_DECLS diff -a -rc -C 2 -P gsl-1.11/vector/gsl_vector_long.h gsl-1.12/vector/gsl_vector_long.h *** gsl-1.11/vector/gsl_vector_long.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/vector/gsl_vector_long.h Thu Nov 27 20:03:29 2008 *************** *** 23,28 **** --- 23,29 ---- #include #include #include + #include #include #include *************** *** 122,133 **** /* Operations */ - long gsl_vector_long_get (const gsl_vector_long * v, const size_t i); - void gsl_vector_long_set (gsl_vector_long * v, const size_t i, long x); - - long *gsl_vector_long_ptr (gsl_vector_long * v, const size_t i); - const long *gsl_vector_long_const_ptr (const gsl_vector_long * v, const size_t i); - void gsl_vector_long_set_zero (gsl_vector_long * v); void gsl_vector_long_set_all (gsl_vector_long * v, long x); int gsl_vector_long_set_basis (gsl_vector_long * v, size_t i); --- 123,128 ---- *************** *** 165,178 **** int gsl_vector_long_isneg (const gsl_vector_long * v); int gsl_vector_long_isnonneg (const gsl_vector_long * v); #ifdef HAVE_INLINE ! extern inline long gsl_vector_long_get (const gsl_vector_long * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); } --- 160,178 ---- int gsl_vector_long_isneg (const gsl_vector_long * v); int gsl_vector_long_isnonneg (const gsl_vector_long * v); + INLINE_DECL long gsl_vector_long_get (const gsl_vector_long * v, const size_t i); + INLINE_DECL void gsl_vector_long_set (gsl_vector_long * v, const size_t i, long x); + INLINE_DECL long * gsl_vector_long_ptr (gsl_vector_long * v, const size_t i); + INLINE_DECL const long * gsl_vector_long_const_ptr (const gsl_vector_long * v, const size_t i); + #ifdef HAVE_INLINE ! INLINE_FUN long gsl_vector_long_get (const gsl_vector_long * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); } *************** *** 180,191 **** return v->data[i * v->stride]; } ! extern inline void gsl_vector_long_set (gsl_vector_long * v, const size_t i, long x) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_VOID ("index out of range", GSL_EINVAL); } --- 180,191 ---- return v->data[i * v->stride]; } ! INLINE_FUN void gsl_vector_long_set (gsl_vector_long * v, const size_t i, long x) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_VOID ("index out of range", GSL_EINVAL); } *************** *** 193,204 **** v->data[i * v->stride] = x; } ! extern inline long * gsl_vector_long_ptr (gsl_vector_long * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } --- 193,204 ---- v->data[i * v->stride] = x; } ! INLINE_FUN long * gsl_vector_long_ptr (gsl_vector_long * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } *************** *** 206,225 **** return (long *) (v->data + i * v->stride); } ! extern inline const long * gsl_vector_long_const_ptr (const gsl_vector_long * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } #endif return (const long *) (v->data + i * v->stride); } - - #endif /* HAVE_INLINE */ __END_DECLS --- 206,223 ---- return (long *) (v->data + i * v->stride); } ! INLINE_FUN const long * gsl_vector_long_const_ptr (const gsl_vector_long * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } #endif return (const long *) (v->data + i * v->stride); } #endif /* HAVE_INLINE */ __END_DECLS diff -a -rc -C 2 -P gsl-1.11/vector/gsl_vector_long_double.h gsl-1.12/vector/gsl_vector_long_double.h *** gsl-1.11/vector/gsl_vector_long_double.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/vector/gsl_vector_long_double.h Thu Nov 27 20:03:29 2008 *************** *** 23,28 **** --- 23,29 ---- #include #include #include + #include #include #include *************** *** 122,133 **** /* Operations */ - long double gsl_vector_long_double_get (const gsl_vector_long_double * v, const size_t i); - void gsl_vector_long_double_set (gsl_vector_long_double * v, const size_t i, long double x); - - long double *gsl_vector_long_double_ptr (gsl_vector_long_double * v, const size_t i); - const long double *gsl_vector_long_double_const_ptr (const gsl_vector_long_double * v, const size_t i); - void gsl_vector_long_double_set_zero (gsl_vector_long_double * v); void gsl_vector_long_double_set_all (gsl_vector_long_double * v, long double x); int gsl_vector_long_double_set_basis (gsl_vector_long_double * v, size_t i); --- 123,128 ---- *************** *** 165,178 **** int gsl_vector_long_double_isneg (const gsl_vector_long_double * v); int gsl_vector_long_double_isnonneg (const gsl_vector_long_double * v); #ifdef HAVE_INLINE ! extern inline long double gsl_vector_long_double_get (const gsl_vector_long_double * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); } --- 160,178 ---- int gsl_vector_long_double_isneg (const gsl_vector_long_double * v); int gsl_vector_long_double_isnonneg (const gsl_vector_long_double * v); + INLINE_DECL long double gsl_vector_long_double_get (const gsl_vector_long_double * v, const size_t i); + INLINE_DECL void gsl_vector_long_double_set (gsl_vector_long_double * v, const size_t i, long double x); + INLINE_DECL long double * gsl_vector_long_double_ptr (gsl_vector_long_double * v, const size_t i); + INLINE_DECL const long double * gsl_vector_long_double_const_ptr (const gsl_vector_long_double * v, const size_t i); + #ifdef HAVE_INLINE ! INLINE_FUN long double gsl_vector_long_double_get (const gsl_vector_long_double * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); } *************** *** 180,191 **** return v->data[i * v->stride]; } ! extern inline void gsl_vector_long_double_set (gsl_vector_long_double * v, const size_t i, long double x) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_VOID ("index out of range", GSL_EINVAL); } --- 180,191 ---- return v->data[i * v->stride]; } ! INLINE_FUN void gsl_vector_long_double_set (gsl_vector_long_double * v, const size_t i, long double x) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_VOID ("index out of range", GSL_EINVAL); } *************** *** 193,204 **** v->data[i * v->stride] = x; } ! extern inline long double * gsl_vector_long_double_ptr (gsl_vector_long_double * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } --- 193,204 ---- v->data[i * v->stride] = x; } ! INLINE_FUN long double * gsl_vector_long_double_ptr (gsl_vector_long_double * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } *************** *** 206,225 **** return (long double *) (v->data + i * v->stride); } ! extern inline const long double * gsl_vector_long_double_const_ptr (const gsl_vector_long_double * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } #endif return (const long double *) (v->data + i * v->stride); } - - #endif /* HAVE_INLINE */ __END_DECLS --- 206,223 ---- return (long double *) (v->data + i * v->stride); } ! INLINE_FUN const long double * gsl_vector_long_double_const_ptr (const gsl_vector_long_double * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } #endif return (const long double *) (v->data + i * v->stride); } #endif /* HAVE_INLINE */ __END_DECLS diff -a -rc -C 2 -P gsl-1.11/vector/gsl_vector_short.h gsl-1.12/vector/gsl_vector_short.h *** gsl-1.11/vector/gsl_vector_short.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/vector/gsl_vector_short.h Thu Nov 27 20:03:29 2008 *************** *** 23,28 **** --- 23,29 ---- #include #include #include + #include #include #include *************** *** 122,133 **** /* Operations */ - short gsl_vector_short_get (const gsl_vector_short * v, const size_t i); - void gsl_vector_short_set (gsl_vector_short * v, const size_t i, short x); - - short *gsl_vector_short_ptr (gsl_vector_short * v, const size_t i); - const short *gsl_vector_short_const_ptr (const gsl_vector_short * v, const size_t i); - void gsl_vector_short_set_zero (gsl_vector_short * v); void gsl_vector_short_set_all (gsl_vector_short * v, short x); int gsl_vector_short_set_basis (gsl_vector_short * v, size_t i); --- 123,128 ---- *************** *** 165,178 **** int gsl_vector_short_isneg (const gsl_vector_short * v); int gsl_vector_short_isnonneg (const gsl_vector_short * v); #ifdef HAVE_INLINE ! extern inline short gsl_vector_short_get (const gsl_vector_short * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); } --- 160,178 ---- int gsl_vector_short_isneg (const gsl_vector_short * v); int gsl_vector_short_isnonneg (const gsl_vector_short * v); + INLINE_DECL short gsl_vector_short_get (const gsl_vector_short * v, const size_t i); + INLINE_DECL void gsl_vector_short_set (gsl_vector_short * v, const size_t i, short x); + INLINE_DECL short * gsl_vector_short_ptr (gsl_vector_short * v, const size_t i); + INLINE_DECL const short * gsl_vector_short_const_ptr (const gsl_vector_short * v, const size_t i); + #ifdef HAVE_INLINE ! INLINE_FUN short gsl_vector_short_get (const gsl_vector_short * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); } *************** *** 180,191 **** return v->data[i * v->stride]; } ! extern inline void gsl_vector_short_set (gsl_vector_short * v, const size_t i, short x) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_VOID ("index out of range", GSL_EINVAL); } --- 180,191 ---- return v->data[i * v->stride]; } ! INLINE_FUN void gsl_vector_short_set (gsl_vector_short * v, const size_t i, short x) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_VOID ("index out of range", GSL_EINVAL); } *************** *** 193,204 **** v->data[i * v->stride] = x; } ! extern inline short * gsl_vector_short_ptr (gsl_vector_short * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } --- 193,204 ---- v->data[i * v->stride] = x; } ! INLINE_FUN short * gsl_vector_short_ptr (gsl_vector_short * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } *************** *** 206,225 **** return (short *) (v->data + i * v->stride); } ! extern inline const short * gsl_vector_short_const_ptr (const gsl_vector_short * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } #endif return (const short *) (v->data + i * v->stride); } - - #endif /* HAVE_INLINE */ __END_DECLS --- 206,223 ---- return (short *) (v->data + i * v->stride); } ! INLINE_FUN const short * gsl_vector_short_const_ptr (const gsl_vector_short * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } #endif return (const short *) (v->data + i * v->stride); } #endif /* HAVE_INLINE */ __END_DECLS diff -a -rc -C 2 -P gsl-1.11/vector/gsl_vector_uchar.h gsl-1.12/vector/gsl_vector_uchar.h *** gsl-1.11/vector/gsl_vector_uchar.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/vector/gsl_vector_uchar.h Thu Nov 27 20:03:29 2008 *************** *** 23,28 **** --- 23,29 ---- #include #include #include + #include #include #include *************** *** 122,133 **** /* Operations */ - unsigned char gsl_vector_uchar_get (const gsl_vector_uchar * v, const size_t i); - void gsl_vector_uchar_set (gsl_vector_uchar * v, const size_t i, unsigned char x); - - unsigned char *gsl_vector_uchar_ptr (gsl_vector_uchar * v, const size_t i); - const unsigned char *gsl_vector_uchar_const_ptr (const gsl_vector_uchar * v, const size_t i); - void gsl_vector_uchar_set_zero (gsl_vector_uchar * v); void gsl_vector_uchar_set_all (gsl_vector_uchar * v, unsigned char x); int gsl_vector_uchar_set_basis (gsl_vector_uchar * v, size_t i); --- 123,128 ---- *************** *** 165,178 **** int gsl_vector_uchar_isneg (const gsl_vector_uchar * v); int gsl_vector_uchar_isnonneg (const gsl_vector_uchar * v); #ifdef HAVE_INLINE ! extern inline unsigned char gsl_vector_uchar_get (const gsl_vector_uchar * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); } --- 160,178 ---- int gsl_vector_uchar_isneg (const gsl_vector_uchar * v); int gsl_vector_uchar_isnonneg (const gsl_vector_uchar * v); + INLINE_DECL unsigned char gsl_vector_uchar_get (const gsl_vector_uchar * v, const size_t i); + INLINE_DECL void gsl_vector_uchar_set (gsl_vector_uchar * v, const size_t i, unsigned char x); + INLINE_DECL unsigned char * gsl_vector_uchar_ptr (gsl_vector_uchar * v, const size_t i); + INLINE_DECL const unsigned char * gsl_vector_uchar_const_ptr (const gsl_vector_uchar * v, const size_t i); + #ifdef HAVE_INLINE ! INLINE_FUN unsigned char gsl_vector_uchar_get (const gsl_vector_uchar * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); } *************** *** 180,191 **** return v->data[i * v->stride]; } ! extern inline void gsl_vector_uchar_set (gsl_vector_uchar * v, const size_t i, unsigned char x) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_VOID ("index out of range", GSL_EINVAL); } --- 180,191 ---- return v->data[i * v->stride]; } ! INLINE_FUN void gsl_vector_uchar_set (gsl_vector_uchar * v, const size_t i, unsigned char x) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_VOID ("index out of range", GSL_EINVAL); } *************** *** 193,204 **** v->data[i * v->stride] = x; } ! extern inline unsigned char * gsl_vector_uchar_ptr (gsl_vector_uchar * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } --- 193,204 ---- v->data[i * v->stride] = x; } ! INLINE_FUN unsigned char * gsl_vector_uchar_ptr (gsl_vector_uchar * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } *************** *** 206,225 **** return (unsigned char *) (v->data + i * v->stride); } ! extern inline const unsigned char * gsl_vector_uchar_const_ptr (const gsl_vector_uchar * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } #endif return (const unsigned char *) (v->data + i * v->stride); } - - #endif /* HAVE_INLINE */ __END_DECLS --- 206,223 ---- return (unsigned char *) (v->data + i * v->stride); } ! INLINE_FUN const unsigned char * gsl_vector_uchar_const_ptr (const gsl_vector_uchar * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } #endif return (const unsigned char *) (v->data + i * v->stride); } #endif /* HAVE_INLINE */ __END_DECLS diff -a -rc -C 2 -P gsl-1.11/vector/gsl_vector_uint.h gsl-1.12/vector/gsl_vector_uint.h *** gsl-1.11/vector/gsl_vector_uint.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/vector/gsl_vector_uint.h Thu Nov 27 20:03:29 2008 *************** *** 23,28 **** --- 23,29 ---- #include #include #include + #include #include #include *************** *** 122,133 **** /* Operations */ - unsigned int gsl_vector_uint_get (const gsl_vector_uint * v, const size_t i); - void gsl_vector_uint_set (gsl_vector_uint * v, const size_t i, unsigned int x); - - unsigned int *gsl_vector_uint_ptr (gsl_vector_uint * v, const size_t i); - const unsigned int *gsl_vector_uint_const_ptr (const gsl_vector_uint * v, const size_t i); - void gsl_vector_uint_set_zero (gsl_vector_uint * v); void gsl_vector_uint_set_all (gsl_vector_uint * v, unsigned int x); int gsl_vector_uint_set_basis (gsl_vector_uint * v, size_t i); --- 123,128 ---- *************** *** 165,178 **** int gsl_vector_uint_isneg (const gsl_vector_uint * v); int gsl_vector_uint_isnonneg (const gsl_vector_uint * v); #ifdef HAVE_INLINE ! extern inline unsigned int gsl_vector_uint_get (const gsl_vector_uint * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); } --- 160,178 ---- int gsl_vector_uint_isneg (const gsl_vector_uint * v); int gsl_vector_uint_isnonneg (const gsl_vector_uint * v); + INLINE_DECL unsigned int gsl_vector_uint_get (const gsl_vector_uint * v, const size_t i); + INLINE_DECL void gsl_vector_uint_set (gsl_vector_uint * v, const size_t i, unsigned int x); + INLINE_DECL unsigned int * gsl_vector_uint_ptr (gsl_vector_uint * v, const size_t i); + INLINE_DECL const unsigned int * gsl_vector_uint_const_ptr (const gsl_vector_uint * v, const size_t i); + #ifdef HAVE_INLINE ! INLINE_FUN unsigned int gsl_vector_uint_get (const gsl_vector_uint * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); } *************** *** 180,191 **** return v->data[i * v->stride]; } ! extern inline void gsl_vector_uint_set (gsl_vector_uint * v, const size_t i, unsigned int x) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_VOID ("index out of range", GSL_EINVAL); } --- 180,191 ---- return v->data[i * v->stride]; } ! INLINE_FUN void gsl_vector_uint_set (gsl_vector_uint * v, const size_t i, unsigned int x) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_VOID ("index out of range", GSL_EINVAL); } *************** *** 193,204 **** v->data[i * v->stride] = x; } ! extern inline unsigned int * gsl_vector_uint_ptr (gsl_vector_uint * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } --- 193,204 ---- v->data[i * v->stride] = x; } ! INLINE_FUN unsigned int * gsl_vector_uint_ptr (gsl_vector_uint * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } *************** *** 206,225 **** return (unsigned int *) (v->data + i * v->stride); } ! extern inline const unsigned int * gsl_vector_uint_const_ptr (const gsl_vector_uint * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } #endif return (const unsigned int *) (v->data + i * v->stride); } - - #endif /* HAVE_INLINE */ __END_DECLS --- 206,223 ---- return (unsigned int *) (v->data + i * v->stride); } ! INLINE_FUN const unsigned int * gsl_vector_uint_const_ptr (const gsl_vector_uint * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } #endif return (const unsigned int *) (v->data + i * v->stride); } #endif /* HAVE_INLINE */ __END_DECLS diff -a -rc -C 2 -P gsl-1.11/vector/gsl_vector_ulong.h gsl-1.12/vector/gsl_vector_ulong.h *** gsl-1.11/vector/gsl_vector_ulong.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/vector/gsl_vector_ulong.h Thu Nov 27 20:03:29 2008 *************** *** 23,28 **** --- 23,29 ---- #include #include #include + #include #include #include *************** *** 122,133 **** /* Operations */ - unsigned long gsl_vector_ulong_get (const gsl_vector_ulong * v, const size_t i); - void gsl_vector_ulong_set (gsl_vector_ulong * v, const size_t i, unsigned long x); - - unsigned long *gsl_vector_ulong_ptr (gsl_vector_ulong * v, const size_t i); - const unsigned long *gsl_vector_ulong_const_ptr (const gsl_vector_ulong * v, const size_t i); - void gsl_vector_ulong_set_zero (gsl_vector_ulong * v); void gsl_vector_ulong_set_all (gsl_vector_ulong * v, unsigned long x); int gsl_vector_ulong_set_basis (gsl_vector_ulong * v, size_t i); --- 123,128 ---- *************** *** 165,178 **** int gsl_vector_ulong_isneg (const gsl_vector_ulong * v); int gsl_vector_ulong_isnonneg (const gsl_vector_ulong * v); #ifdef HAVE_INLINE ! extern inline unsigned long gsl_vector_ulong_get (const gsl_vector_ulong * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); } --- 160,178 ---- int gsl_vector_ulong_isneg (const gsl_vector_ulong * v); int gsl_vector_ulong_isnonneg (const gsl_vector_ulong * v); + INLINE_DECL unsigned long gsl_vector_ulong_get (const gsl_vector_ulong * v, const size_t i); + INLINE_DECL void gsl_vector_ulong_set (gsl_vector_ulong * v, const size_t i, unsigned long x); + INLINE_DECL unsigned long * gsl_vector_ulong_ptr (gsl_vector_ulong * v, const size_t i); + INLINE_DECL const unsigned long * gsl_vector_ulong_const_ptr (const gsl_vector_ulong * v, const size_t i); + #ifdef HAVE_INLINE ! INLINE_FUN unsigned long gsl_vector_ulong_get (const gsl_vector_ulong * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); } *************** *** 180,191 **** return v->data[i * v->stride]; } ! extern inline void gsl_vector_ulong_set (gsl_vector_ulong * v, const size_t i, unsigned long x) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_VOID ("index out of range", GSL_EINVAL); } --- 180,191 ---- return v->data[i * v->stride]; } ! INLINE_FUN void gsl_vector_ulong_set (gsl_vector_ulong * v, const size_t i, unsigned long x) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_VOID ("index out of range", GSL_EINVAL); } *************** *** 193,204 **** v->data[i * v->stride] = x; } ! extern inline unsigned long * gsl_vector_ulong_ptr (gsl_vector_ulong * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } --- 193,204 ---- v->data[i * v->stride] = x; } ! INLINE_FUN unsigned long * gsl_vector_ulong_ptr (gsl_vector_ulong * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } *************** *** 206,225 **** return (unsigned long *) (v->data + i * v->stride); } ! extern inline const unsigned long * gsl_vector_ulong_const_ptr (const gsl_vector_ulong * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } #endif return (const unsigned long *) (v->data + i * v->stride); } - - #endif /* HAVE_INLINE */ __END_DECLS --- 206,223 ---- return (unsigned long *) (v->data + i * v->stride); } ! INLINE_FUN const unsigned long * gsl_vector_ulong_const_ptr (const gsl_vector_ulong * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } #endif return (const unsigned long *) (v->data + i * v->stride); } #endif /* HAVE_INLINE */ __END_DECLS diff -a -rc -C 2 -P gsl-1.11/vector/gsl_vector_ushort.h gsl-1.12/vector/gsl_vector_ushort.h *** gsl-1.11/vector/gsl_vector_ushort.h Tue Feb 5 13:22:10 2008 --- gsl-1.12/vector/gsl_vector_ushort.h Thu Nov 27 20:03:29 2008 *************** *** 23,28 **** --- 23,29 ---- #include #include #include + #include #include #include *************** *** 122,133 **** /* Operations */ - unsigned short gsl_vector_ushort_get (const gsl_vector_ushort * v, const size_t i); - void gsl_vector_ushort_set (gsl_vector_ushort * v, const size_t i, unsigned short x); - - unsigned short *gsl_vector_ushort_ptr (gsl_vector_ushort * v, const size_t i); - const unsigned short *gsl_vector_ushort_const_ptr (const gsl_vector_ushort * v, const size_t i); - void gsl_vector_ushort_set_zero (gsl_vector_ushort * v); void gsl_vector_ushort_set_all (gsl_vector_ushort * v, unsigned short x); int gsl_vector_ushort_set_basis (gsl_vector_ushort * v, size_t i); --- 123,128 ---- *************** *** 165,178 **** int gsl_vector_ushort_isneg (const gsl_vector_ushort * v); int gsl_vector_ushort_isnonneg (const gsl_vector_ushort * v); #ifdef HAVE_INLINE ! extern inline unsigned short gsl_vector_ushort_get (const gsl_vector_ushort * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); } --- 160,178 ---- int gsl_vector_ushort_isneg (const gsl_vector_ushort * v); int gsl_vector_ushort_isnonneg (const gsl_vector_ushort * v); + INLINE_DECL unsigned short gsl_vector_ushort_get (const gsl_vector_ushort * v, const size_t i); + INLINE_DECL void gsl_vector_ushort_set (gsl_vector_ushort * v, const size_t i, unsigned short x); + INLINE_DECL unsigned short * gsl_vector_ushort_ptr (gsl_vector_ushort * v, const size_t i); + INLINE_DECL const unsigned short * gsl_vector_ushort_const_ptr (const gsl_vector_ushort * v, const size_t i); + #ifdef HAVE_INLINE ! INLINE_FUN unsigned short gsl_vector_ushort_get (const gsl_vector_ushort * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); } *************** *** 180,191 **** return v->data[i * v->stride]; } ! extern inline void gsl_vector_ushort_set (gsl_vector_ushort * v, const size_t i, unsigned short x) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_VOID ("index out of range", GSL_EINVAL); } --- 180,191 ---- return v->data[i * v->stride]; } ! INLINE_FUN void gsl_vector_ushort_set (gsl_vector_ushort * v, const size_t i, unsigned short x) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_VOID ("index out of range", GSL_EINVAL); } *************** *** 193,204 **** v->data[i * v->stride] = x; } ! extern inline unsigned short * gsl_vector_ushort_ptr (gsl_vector_ushort * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } --- 193,204 ---- v->data[i * v->stride] = x; } ! INLINE_FUN unsigned short * gsl_vector_ushort_ptr (gsl_vector_ushort * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } *************** *** 206,225 **** return (unsigned short *) (v->data + i * v->stride); } ! extern inline const unsigned short * gsl_vector_ushort_const_ptr (const gsl_vector_ushort * v, const size_t i) { #if GSL_RANGE_CHECK ! if (i >= v->size) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } #endif return (const unsigned short *) (v->data + i * v->stride); } - - #endif /* HAVE_INLINE */ __END_DECLS --- 206,223 ---- return (unsigned short *) (v->data + i * v->stride); } ! INLINE_FUN const unsigned short * gsl_vector_ushort_const_ptr (const gsl_vector_ushort * v, const size_t i) { #if GSL_RANGE_CHECK ! if (GSL_RANGE_COND(i >= v->size)) { GSL_ERROR_NULL ("index out of range", GSL_EINVAL); } #endif return (const unsigned short *) (v->data + i * v->stride); } #endif /* HAVE_INLINE */ __END_DECLS diff -a -rc -C 2 -P gsl-1.11/vector/oper.c gsl-1.12/vector/oper.c *** gsl-1.11/vector/oper.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/vector/oper.c Thu Nov 27 20:03:29 2008 *************** *** 1,7 **** --- 1,27 ---- #include #include + #include + #include #include + #define BASE_GSL_COMPLEX_LONG + #include "templates_on.h" + #include "oper_complex_source.c" + #include "templates_off.h" + #undef BASE_GSL_COMPLEX_LONG + + #define BASE_GSL_COMPLEX + #include "templates_on.h" + #include "oper_complex_source.c" + #include "templates_off.h" + #undef BASE_GSL_COMPLEX + + #define BASE_GSL_COMPLEX_FLOAT + #include "templates_on.h" + #include "oper_complex_source.c" + #include "templates_off.h" + #undef BASE_GSL_COMPLEX_FLOAT + #define BASE_LONG_DOUBLE #include "templates_on.h" #include "oper_source.c" diff -a -rc -C 2 -P gsl-1.11/vector/oper_complex_source.c gsl-1.12/vector/oper_complex_source.c *** gsl-1.11/vector/oper_complex_source.c Thu Jan 1 00:00:00 1970 --- gsl-1.12/vector/oper_complex_source.c Thu Nov 27 20:03:29 2008 *************** *** 0 **** --- 1,182 ---- + /* vector/oper_source.c + * + * Copyright (C) 2008 Brian Gough + * + * 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + + int + FUNCTION(gsl_vector, add) (TYPE(gsl_vector) * a, const TYPE(gsl_vector) * b) + { + const size_t N = a->size; + + if (b->size != N) + { + GSL_ERROR ("vectors must have same length", GSL_EBADLEN); + } + else + { + const size_t stride_a = a->stride; + const size_t stride_b = b->stride; + + size_t i; + + for (i = 0; i < N; i++) + { + a->data[2 * i * stride_a] += b->data[2 * i * stride_b]; + a->data[2 * i * stride_a + 1] += b->data[2 * i * stride_b + 1]; + } + + return GSL_SUCCESS; + } + } + + int + FUNCTION(gsl_vector, sub) (TYPE(gsl_vector) * a, const TYPE(gsl_vector) * b) + { + const size_t N = a->size; + + if (b->size != N) + { + GSL_ERROR ("vectors must have same length", GSL_EBADLEN); + } + else + { + const size_t stride_a = a->stride; + const size_t stride_b = b->stride; + + size_t i; + + for (i = 0; i < N; i++) + { + a->data[2 * i * stride_a] -= b->data[2 * i * stride_b]; + a->data[2 * i * stride_a + 1] -= b->data[2 * i * stride_b + 1]; + } + + return GSL_SUCCESS; + } + } + + int + FUNCTION(gsl_vector, mul) (TYPE(gsl_vector) * a, const TYPE(gsl_vector) * b) + { + const size_t N = a->size; + + if (b->size != N) + { + GSL_ERROR ("vectors must have same length", GSL_EBADLEN); + } + else + { + const size_t stride_a = a->stride; + const size_t stride_b = b->stride; + + size_t i; + + for (i = 0; i < N; i++) + { + ATOMIC ar = a->data[2 * i * stride_a]; + ATOMIC ai = a->data[2 * i * stride_a + 1]; + + ATOMIC br = b->data[2 * i * stride_b]; + ATOMIC bi = b->data[2 * i * stride_b + 1]; + + a->data[2 * i * stride_a] = ar * br - ai * bi; + a->data[2 * i * stride_a + 1] = ar * bi + ai * br; + } + + return GSL_SUCCESS; + } + } + + int + FUNCTION(gsl_vector, div) (TYPE(gsl_vector) * a, const TYPE(gsl_vector) * b) + { + const size_t N = a->size; + + if (b->size != N) + { + GSL_ERROR ("vectors must have same length", GSL_EBADLEN); + } + else + { + const size_t stride_a = a->stride; + const size_t stride_b = b->stride; + + size_t i; + + for (i = 0; i < N; i++) + { + ATOMIC ar = a->data[2 * i * stride_a]; + ATOMIC ai = a->data[2 * i * stride_a + 1]; + + ATOMIC br = b->data[2 * i * stride_b]; + ATOMIC bi = b->data[2 * i * stride_b + 1]; + + ATOMIC s = 1.0 / hypot(br, bi); + + ATOMIC sbr = s * br; + ATOMIC sbi = s * bi; + + a->data[2 * i * stride_a] = (ar * sbr + ai * sbi) * s; + a->data[2 * i * stride_a + 1] = (ai * sbr - ar * sbi) * s; + } + + return GSL_SUCCESS; + } + } + + int + FUNCTION(gsl_vector, scale) (TYPE(gsl_vector) * a, const BASE x) + { + const size_t N = a->size; + const size_t stride = a->stride; + + size_t i; + + ATOMIC xr = GSL_REAL(x); + ATOMIC xi = GSL_IMAG(x); + + for (i = 0; i < N; i++) + { + ATOMIC ar = a->data[2 * i * stride]; + ATOMIC ai = a->data[2 * i * stride + 1]; + + a->data[2 * i * stride] = ar * xr - ai * xi; + a->data[2 * i * stride + 1] = ar * xi + ai * xr; + } + + return GSL_SUCCESS; + } + + int + FUNCTION(gsl_vector, add_constant) (TYPE(gsl_vector) * a, const BASE x) + { + const size_t N = a->size; + const size_t stride = a->stride; + + size_t i; + + ATOMIC xr = GSL_REAL(x); + ATOMIC xi = GSL_IMAG(x); + + for (i = 0; i < N; i++) + { + a->data[2 * i * stride] += xr; + a->data[2 * i * stride + 1] += xi; + } + + return GSL_SUCCESS; + } diff -a -rc -C 2 -P gsl-1.11/vector/test.c gsl-1.12/vector/test.c *** gsl-1.11/vector/test.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/vector/test.c Thu Nov 27 20:03:29 2008 *************** *** 38,51 **** #define DESC "" #endif - #define BASE_GSL_COMPLEX_LONG #include "templates_on.h" #include "test_complex_source.c" #include "templates_off.h" #undef BASE_GSL_COMPLEX_LONG - #define BASE_GSL_COMPLEX #include "templates_on.h" #include "test_complex_source.c" --- 38,49 ---- *************** *** 167,172 **** --- 165,173 ---- test_short_ops (stride, ostride, N); test_uchar_ops (stride, ostride, N); test_char_ops (stride, ostride, N); + test_complex_ops (stride, ostride, N); + test_complex_float_ops (stride, ostride, N); + test_complex_long_double_ops (stride, ostride, N); } test_text (stride, N); diff -a -rc -C 2 -P gsl-1.11/vector/test_complex_source.c gsl-1.12/vector/test_complex_source.c *** gsl-1.11/vector/test_complex_source.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/vector/test_complex_source.c Thu Nov 27 20:03:29 2008 *************** *** 267,272 **** --- 267,326 ---- TEST (status, "_setbasis" DESC " over range") ; } + { + 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); + } + + { + BASE x = ZERO; + GSL_REAL(x) = 2.0; + GSL_IMAG(x) = 3.0; + FUNCTION (gsl_vector, scale) (v, x); + } + + for (i = 0; i < N; i++) + { + BASE r = FUNCTION(gsl_vector,get) (v,i); + ATOMIC real = -(ATOMIC)i-(ATOMIC)3702; + ATOMIC imag = 5*(ATOMIC)i+(ATOMIC)2468; + if (GSL_REAL(r) != real || GSL_IMAG(r) != imag) + status = 1; + }; + + TEST (status, "_scale" DESC " by 2") ; + } + + { + int status = 0; + + { + BASE x = ZERO; + GSL_REAL(x) = 7.0; + GSL_IMAG(x) = 13.0; + FUNCTION (gsl_vector, add_constant) (v, x); + } + + + for (i = 0; i < N; i++) + { + BASE r = FUNCTION(gsl_vector,get) (v,i); + ATOMIC real = -(ATOMIC)i-(ATOMIC)3695; + ATOMIC imag = 5*(ATOMIC)i+(ATOMIC)2481; + + if (GSL_REAL(r) != real || GSL_IMAG(r) != imag) + status = 1; + }; + + TEST (status, "_add_constant" DESC) ; + } + for (i = 0; i < N; i++) { BASE x = ZERO; *************** *** 427,432 **** --- 481,624 ---- 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++) + { + BASE z, z1; + GSL_REAL (z) = (ATOMIC) 3+i; + GSL_IMAG (z) = (ATOMIC) (3+i + 10); + GSL_REAL (z1) = (ATOMIC) (3 + 2*i + 5); + GSL_IMAG (z1) = (ATOMIC) (3 + 2*i + 20); + + FUNCTION (gsl_vector, set) (a, i, z); + FUNCTION (gsl_vector, set) (b, i, z1); + } + + 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); + if (GSL_REAL(r) != (ATOMIC) (3*i+11) + || GSL_IMAG(r) != (ATOMIC) (3*i+36)) + status = 1; + } + TEST2 (status, "_add vector addition"); + } + + { + int status = 0; + + FUNCTION(gsl_vector, swap) (a, b); + + for (i = 0; i < N; i++) + { + BASE z, z1; + + BASE x = FUNCTION (gsl_vector, get) (a, i); + BASE y = FUNCTION (gsl_vector, get) (b, i); + + GSL_REAL (z) = (ATOMIC) 3+i; + GSL_IMAG (z) = (ATOMIC) (3+i + 10); + GSL_REAL (z1) = (ATOMIC) (3 + 2*i + 5); + GSL_IMAG (z1) = (ATOMIC) (3 + 2*i + 20); + + status |= !GSL_COMPLEX_EQ(z,y); + status |= !GSL_COMPLEX_EQ(z1,x); + } + + FUNCTION(gsl_vector, swap) (a, b); + + for (i = 0; i < N; i++) + { + BASE z, z1; + + BASE x = FUNCTION (gsl_vector, get) (a, i); + BASE y = FUNCTION (gsl_vector, get) (b, i); + + GSL_REAL (z) = (ATOMIC) 3+i; + GSL_IMAG (z) = (ATOMIC) (3+i + 10); + GSL_REAL (z1) = (ATOMIC) (3 + 2*i + 5); + GSL_IMAG (z1) = (ATOMIC) (3 + 2*i + 20); + + status |= !GSL_COMPLEX_EQ(z,x); + status |= !GSL_COMPLEX_EQ(z1,y); + } + + 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); + if (GSL_REAL(r) != (-(ATOMIC)i-(ATOMIC)5) || GSL_IMAG(r) != (-(ATOMIC)i-(ATOMIC)10)) + 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); + ATOMIC real = (-35*(ATOMIC)i-275); + ATOMIC imag = (173+((ATOMIC)i)*(63+4*(ATOMIC)i)); + if (fabs(GSL_REAL(r) - real) > 100 * BASE_EPSILON || + fabs(GSL_IMAG(r) - imag) > 100 * BASE_EPSILON) + 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); + ATOMIC denom = 593 + ((ATOMIC)i)*(124+((ATOMIC)i)*8); + ATOMIC real = (323+((ATOMIC)i)*(63+4*((ATOMIC)i))) / denom; + ATOMIC imag = (35 +((ATOMIC)i)*5) / denom; + if (fabs(GSL_REAL(r) - real) > 100 * BASE_EPSILON) + status = 1; + if (fabs(GSL_IMAG(r) - imag) > 100 * BASE_EPSILON) + 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) { diff -a -rc -C 2 -P gsl-1.11/vector/vector.c gsl-1.12/vector/vector.c *** gsl-1.11/vector/vector.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/vector/vector.c Thu Nov 27 20:03:29 2008 *************** *** 19,109 **** #include #include - #include - - /* turn off range checking at runtime if zero */ - int gsl_check_range = 1; - - #define BASE_GSL_COMPLEX_LONG - #include "templates_on.h" - #include "vector_source.c" - #include "templates_off.h" - #undef BASE_GSL_COMPLEX_LONG - - #define BASE_GSL_COMPLEX - #include "templates_on.h" - #include "vector_source.c" - #include "templates_off.h" - #undef BASE_GSL_COMPLEX - - #define BASE_GSL_COMPLEX_FLOAT - #include "templates_on.h" - #include "vector_source.c" - #include "templates_off.h" - #undef BASE_GSL_COMPLEX_FLOAT - - #define BASE_LONG_DOUBLE - #include "templates_on.h" - #include "vector_source.c" - #include "templates_off.h" - #undef BASE_LONG_DOUBLE - - #define BASE_DOUBLE - #include "templates_on.h" - #include "vector_source.c" - #include "templates_off.h" - #undef BASE_DOUBLE ! #define BASE_FLOAT ! #include "templates_on.h" ! #include "vector_source.c" ! #include "templates_off.h" ! #undef BASE_FLOAT ! #define BASE_ULONG ! #include "templates_on.h" ! #include "vector_source.c" ! #include "templates_off.h" ! #undef BASE_ULONG ! ! #define BASE_LONG ! #include "templates_on.h" ! #include "vector_source.c" ! #include "templates_off.h" ! #undef BASE_LONG ! ! #define BASE_UINT ! #include "templates_on.h" ! #include "vector_source.c" ! #include "templates_off.h" ! #undef BASE_UINT ! ! #define BASE_INT ! #include "templates_on.h" ! #include "vector_source.c" ! #include "templates_off.h" ! #undef BASE_INT ! ! #define BASE_USHORT ! #include "templates_on.h" ! #include "vector_source.c" ! #include "templates_off.h" ! #undef BASE_USHORT ! ! #define BASE_SHORT ! #include "templates_on.h" ! #include "vector_source.c" ! #include "templates_off.h" ! #undef BASE_SHORT ! #define BASE_UCHAR ! #include "templates_on.h" ! #include "vector_source.c" ! #include "templates_off.h" ! #undef BASE_UCHAR - #define BASE_CHAR - #include "templates_on.h" - #include "vector_source.c" - #include "templates_off.h" - #undef BASE_CHAR --- 19,31 ---- #include #include ! /* Compile all the inline functions */ ! #define COMPILE_INLINE_STATIC ! #include "build.h" ! #include ! /* turn on range checking at runtime (disabled if zero) */ ! int gsl_check_range = 1; Only in gsl-1.11/vector: vector_source.c diff -a -rc -C 2 -P gsl-1.11/wavelet/ChangeLog gsl-1.12/wavelet/ChangeLog *** gsl-1.11/wavelet/ChangeLog Tue Feb 5 13:22:10 2008 --- gsl-1.12/wavelet/ChangeLog Thu Nov 27 20:03:29 2008 *************** *** 1,3 **** --- 1,12 ---- + 2008-10-13 Brian Gough + + * test.c (test_2d): change typename variable to name to avoid + conflict with C++ typename keyword + + 2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + 2008-01-03 Brian Gough * dwt.c (dwt_step): move pointer dereference out of loop diff -a -rc -C 2 -P gsl-1.11/wavelet/Makefile.am gsl-1.12/wavelet/Makefile.am *** gsl-1.11/wavelet/Makefile.am Tue Feb 5 13:22:10 2008 --- gsl-1.12/wavelet/Makefile.am Thu Nov 27 20:03:29 2008 *************** *** 2,8 **** 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 --- 2,8 ---- pkginclude_HEADERS = gsl_wavelet.h gsl_wavelet2d.h ! INCLUDES = -I$(top_srcdir) libgslwavelet_la_SOURCES = dwt.c wavelet.c bspline.c daubechies.c haar.c diff -a -rc -C 2 -P gsl-1.11/wavelet/Makefile.in gsl-1.12/wavelet/Makefile.in *** gsl-1.11/wavelet/Makefile.in Sun Mar 30 12:07:12 2008 --- gsl-1.12/wavelet/Makefile.in Mon Dec 15 14:55:20 2008 *************** *** 135,140 **** --- 135,141 ---- LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ + LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ *************** *** 142,148 **** --- 143,152 ---- MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ + OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ *************** *** 207,213 **** top_srcdir = @top_srcdir@ 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 = $(check_PROGRAMS) 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 --- 211,217 ---- top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslwavelet.la pkginclude_HEADERS = gsl_wavelet.h gsl_wavelet2d.h ! INCLUDES = -I$(top_srcdir) libgslwavelet_la_SOURCES = dwt.c wavelet.c bspline.c daubechies.c haar.c TESTS = $(check_PROGRAMS) 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 diff -a -rc -C 2 -P gsl-1.11/wavelet/test.c gsl-1.12/wavelet/test.c *** gsl-1.11/wavelet/test.c Tue Feb 5 13:22:10 2008 --- gsl-1.12/wavelet/test.c Thu Nov 27 20:03:29 2008 *************** *** 105,111 **** 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; --- 105,111 ---- gsl_wavelet *w; size_t i; ! double *data = (double *)malloc (N * stride * sizeof (double)); for (i = 0; i < N * stride; i++) data[i] = 12345.0 + i; *************** *** 184,194 **** 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; --- 184,194 ---- size_t i; size_t j; ! double *data = (double *)malloc (N * tda * sizeof (double)); ! const char * name; ! name = (type == 1) ? "standard" : "nonstd" ; for (i = 0; i < N * tda; i++) data[i] = 12345.0 + i; *************** *** 243,249 **** 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) --- 243,249 ---- gsl_test (fabs (x2 - x1) > N * 1e-15, "%s(%d)-2d %s, n = %d, tda = %d, maxerr = %g", ! gsl_wavelet_name (w), member, name, N, tda, fabs (x2 - x1)); } if (tda > N) *************** *** 259,265 **** } gsl_test (status, "%s(%d)-2d %s other data untouched, n = %d, tda = %d", ! gsl_wavelet_name (w), member, typename, N, tda); } free (data); --- 259,265 ---- } gsl_test (status, "%s(%d)-2d %s other data untouched, n = %d, tda = %d", ! gsl_wavelet_name (w), member, name, N, tda); } free (data);