diff --git a/basis-splines.lisp b/basis-splines.lisp index e40f04f679116f980b9b1c24d081c23e676cbc7b..e93a2fb8bdc21edc7c601b11613c4f9da8c26050 100644 --- a/basis-splines.lisp +++ b/basis-splines.lisp @@ -1,6 +1,6 @@ ;; Basis splines. ;; Liam Healy 2008-02-18 14:43:20EST basis-splines.lisp -;; Time-stamp: <2009-02-19 21:59:54EST basis-splines.lisp> +;; Time-stamp: <2009-02-21 16:46:31EST basis-splines.lisp> ;; $Id$ (in-package :gsl) @@ -123,7 +123,7 @@ (dotimes (j ncoeffs) (setf (maref Xmatrix i j) (maref B j)))) ;; Do the fit - (linear-mfit Xmatrix y c nil w cov mw) + (linear-mfit Xmatrix y c w nil cov mw) ;; Return the smoothed curve (loop for xi from 0.0d0 to 15.0d0 by 0.1d0 with yval and yerr diff --git a/documentation/index.html b/documentation/index.html index 5fbc49632f36da7e964137fcf52fc4f3facafc3d..2aab04b9c9306bc03d1feb60c88834d3bcf2a428 100644 --- a/documentation/index.html +++ b/documentation/index.html @@ -359,8 +359,7 @@ GSL doesn't have them. <a name="status"/> <p> GSLL is largely complete and usable, with functioning interfaces to -most of GSL. Some functionality is not yet ported, particularly those -introduced in the more recent versions of GSL; see +most of GSL. Some functionality is not yet ported; see <a href="missing-features.text">missing-features.text</a> for more details. Known bugs are documented in <a href="status.text">status.text</a>. Work is ongoing to both @@ -384,7 +383,7 @@ and arrays used internally or for function return. <!-- Created: Feb 25 2005 --> <!-- hhmts start --> <small> -Time-stamp: <2009-02-16 14:41:41EST index.html> +Time-stamp: <2009-02-21 16:47:23EST index.html> </small> <!-- hhmts end --> </div> diff --git a/documentation/missing-features.text b/documentation/missing-features.text index 24a405ea29f081d35a53e645d7f48c390b6a009e..2afc5c10666ebc36a4e198021541ad46fb355aa2 100644 --- a/documentation/missing-features.text +++ b/documentation/missing-features.text @@ -10,3 +10,7 @@ Stride is always set to 1 in GSL functions that take a stride. Wishlist Be able to set the real and imaginary parts of an array to a real array. + + +Unify names for sampling Sat Feb 21 2009 +Polynomial coefficients solver vs. evaluator Sat Feb 21 2009 diff --git a/histogram/probability-distribution.lisp b/histogram/probability-distribution.lisp index a831fa7f890cebacaa2cc9a45a72ecd4f460da01..cf5eba9e0024fc554dfc97e7ca57ff1ba69978b3 100644 --- a/histogram/probability-distribution.lisp +++ b/histogram/probability-distribution.lisp @@ -1,6 +1,6 @@ ;; Histogram probability distribution. ;; Liam Healy, Mon Jan 1 2007 - 17:51 -;; Time-stamp: <2009-01-25 10:04:23EST probability-distribution.lisp> +;; Time-stamp: <2009-02-21 17:12:56EST probability-distribution.lisp> ;; $Id$ (in-package :gsl) @@ -40,8 +40,8 @@ 'pdf. The algorithm used to compute the sample s is given by s = range[i] + delta * (range[i+1] - range[i]) where i is the index which satisfies - sum[i] <= r < sum[i+1] and delta is - (r - sum[i])/(sum[i+1] - sum[i]).")) + sum[i] <= value < sum[i+1] and delta is + (value - sum[i])/(sum[i+1] - sum[i]).")) (defmfun sample ((pdf histogram-pdf) value) "gsl_histogram_pdf_sample" diff --git a/random/generators.lisp b/random/generators.lisp index cbcc3fc3daa0955aad70b48ad304f3be80e0a2ed..6343edd7f311e01fdac4f316caf4a5c1b9a7f38c 100644 --- a/random/generators.lisp +++ b/random/generators.lisp @@ -1,6 +1,6 @@ ;; Generators of random numbers. ;; Liam Healy, Sat Jul 15 2006 - 14:43 -;; Time-stamp: <2009-02-16 18:43:36EST generators.lisp> +;; Time-stamp: <2009-02-21 17:23:26EST generators.lisp> ;; $Id$ (in-package :gsl) @@ -59,7 +59,7 @@ "A double precision floating point number uniformly distributed in the range [0,1). The range includes 0.0 but excludes 1.0. The value is typically obtained by dividing the result of - #'rng-get by (+ (rng-max generator) 1.0) in double + #'get-random-number by (+ (rng-max generator) 1.0) in double precision. Some generators compute this ratio internally so that they can provide floating point numbers with more than 32 bits of randomness (the maximum number of bits that can be portably represented in a single diff --git a/solve-minimize-fit/generic.lisp b/solve-minimize-fit/generic.lisp index f231583a763fe46dbe9de081a887e2934994c788..882422c734fd195b31d66f361ebe584cb0ffae25 100644 --- a/solve-minimize-fit/generic.lisp +++ b/solve-minimize-fit/generic.lisp @@ -1,6 +1,6 @@ ;; Generic functions for optimization ;; Liam Healy 2009-01-03 12:59:07EST generic.lisp -;; Time-stamp: <2009-02-14 12:25:14EST generic.lisp> +;; Time-stamp: <2009-02-21 16:47:51EST generic.lisp> ;; $Id: $ (in-package :gsl) @@ -9,6 +9,8 @@ ;;;; Generic functions for solve-minimize-fit objects ;;;;**************************************************************************** +(export '(iterate solution function-value last-step)) + (defgeneric iterate (object) (:documentation "Take the next iteration step for this object.")) diff --git a/solve-minimize-fit/linear-least-squares.lisp b/solve-minimize-fit/linear-least-squares.lisp index 34d9476257b05fb007e973583fff455b7330c818..6543c5fe70e50bfb0f2338502203b8d5cfbbfc77 100644 --- a/solve-minimize-fit/linear-least-squares.lisp +++ b/solve-minimize-fit/linear-least-squares.lisp @@ -1,6 +1,6 @@ ;; Linear least squares, or linear regression ;; Liam Healy <2008-01-21 12:41:46EST linear-least-squares.lisp> -;; Time-stamp: <2009-02-19 21:58:24EST linear-least-squares.lisp> +;; Time-stamp: <2009-02-21 16:46:32EST linear-least-squares.lisp> ;; $Id$ (in-package :gsl) @@ -130,7 +130,7 @@ (export 'linear-mfit) (defun linear-mfit (model observations parameters-or-size - &optional tolerance weight + &optional weight tolerance (covariance (default-covariance parameters-or-size)) (workspace (default-lls-workspace observations parameters-or-size))) "Compute the best-fit parameters c of the weighted or unweighted @@ -330,7 +330,7 @@ (maref y i) (second row) (maref w i) (/ (expt (third row) 2)))) (multiple-value-bind (parameters cov chisq) - (linear-mfit X y 3 nil w) + (linear-mfit X y 3 w) (when print-details (format t "Best fit: Y = ~10,8f + ~10,8f X + ~10,8f X^2~&" (maref parameters 0) (maref parameters 1) (maref parameters 2))