[Gsll-devel] spline-example fails

Mirko Vukovic mirko.vukovic at gmail.com
Tue Jan 27 01:09:24 UTC 2009


Hello,

I downloaded the latest snapshot of gsll, and I cannot get
spline-example to work.

Currently, the :dimensions argument to make-marray is a lisp array,
while it requests a list of dimensions.  I made some progress by
definining xarr and yarr using make-marray,


(multiple-value-bind (xarr yarr)
    (let ((xarr (make-marray 'double-float :dimensions '(10)))
	  (yarr (make-marray 'double-float :dimensions '(10))))
      (loop for i from 0 below 10
	 do (setf (maref xarr i) (+ i (* 0.5d0 (sin (coerce i 'double-float))))
		  (maref yarr i) (+ i (cos (expt (coerce i 'double-float) 2)))))
      (values xarr yarr))
  (let* ((acc (make-acceleration))
	 (spline (make-spline *cubic-spline-interpolation* xarr yarr)))
    (loop for xi from (maref xarr 0) below (maref xarr 9) by 0.01d0
       collect (list xi (evaluate-spline spline xi acc)))))

but then evaluate-spline gives an error:

The value #<SPLINE {10038D9FB1}>
is not of type
  SB-SYS:SYSTEM-AREA-POINTER.
   [Condition of type TYPE-ERROR]

Restarts:
 0: [RETRY] Retry SLIME REPL evaluation request.
 1: [ABORT] Return to SLIME's top level.
 2: [ABORT] Exit debugger, returning to top level.

Backtrace:
  0: (EVALUATE-SPLINE #<SPLINE {10038D9FB1}> 3.395929557952573d-313
#<ACCELERATION {10038D9711}>)
  1: ((LAMBDA ()))
  2: (SB-INT:SIMPLE-EVAL-IN-LEXENV ..)
 --more--

And that is a bit too deep for me :-(

Any ideas?

Thank you,

Mirko




More information about the gsll-devel mailing list