Hi,<br><br>I have added the following example of `evaluate-integral' to spline-example.lisp:<br><br>(defun evaluate-integral-example (&optional (intervals 4))<br> "Evaluate integral of sin(x) in interval 0-pi. sin(x) is tabulated<br>
over a 0-2pi interval and interpolated with<br>+periodic-cubic-spline-interpolation+"<br> (let* ((nodes (1+ intervals))<br> (max-node (1- nodes))<br> (xarr <br> (loop <br> with step = (/ (* 2.0 pi) intervals)<br>
for i from 0 upto max-node<br> collect (* i step)))<br> (xmarr (make-marray 'double-float :initial-contents xarr))<br> ;; cannot use (loop for x on (cl-array xmarr)...) -- c function gives error<br>
(ymarr <br> (make-marray 'double-float :initial-contents<br> (loop for x in xarr<br> collect (sin x))))<br> (acc (make-acceleration))<br> (spline (make-spline +periodic-cubic-spline-interpolation+ xmarr ymarr)))<br>
(evaluate-integral spline 0d0 (coerce pi 'double-float) :acceleration acc)))<br><br>Right now it is sitting in the `master' branch on my laptop. How would you like me to upload it. As a master, or something else?<br>
<br>Mirko<br>