[Gsll-devel] Added evaluate-integral-example
Liam Healy
lhealy at common-lisp.net
Fri Nov 13 02:23:42 UTC 2009
Thanks Mirko. I've committed those patches, and then made some
simplifications and added a test based on that function. One of the
simplifications I made was the :acceleration argument for all spline
functions now defaults to (make-acceleration).
Liam
On Wed, Nov 11, 2009 at 8:39 PM, Mirko Vukovic <mirko.vukovic at gmail.com> wrote:
> Hi Liam,
>
> I em enclosing the results of `git format-patch origin'
>
> Mirko
>
> On Wed, Nov 11, 2009 at 9:18 AM, Liam Healy <lhealy at common-lisp.net> wrote:
>>
>> Hi Mirko,
>>
>> Thank you for the contribution. There are a couple ways you can make
>> your patches available. You can email them using format-patch; see
>> http://book.git-scm.com/5_git_and_email.html and git help
>> format-patch, or you can fork the repository somewhere public like
>> repo.or.cz or github and I can pull your commit(s). In the latter
>> case of course send an email to the list alerting everyone to the URL
>> and what it is you've done.
>>
>> In the case of small separate changes/additions like this, email
>> probably makes the most sense. For more extended development, a
>> separate repository would be easier.
>>
>> Contributions are very welcome, and anyone who would like to submit
>> something is invited to do so in one of these ways.
>>
>> Liam
>>
>>
>> On Wed, Nov 11, 2009 at 7:46 AM, Mirko Vukovic <mirko.vukovic at gmail.com>
>> wrote:
>> > Hi,
>> >
>> > I have added the following example of `evaluate-integral' to
>> > spline-example.lisp:
>> >
>> > (defun evaluate-integral-example (&optional (intervals 4))
>> > "Evaluate integral of sin(x) in interval 0-pi. sin(x) is tabulated
>> > over a 0-2pi interval and interpolated with
>> > +periodic-cubic-spline-interpolation+"
>> > (let* ((nodes (1+ intervals))
>> > (max-node (1- nodes))
>> > (xarr
>> > (loop
>> > with step = (/ (* 2.0 pi) intervals)
>> > for i from 0 upto max-node
>> > collect (* i step)))
>> > (xmarr (make-marray 'double-float :initial-contents xarr))
>> > ;; cannot use (loop for x on (cl-array xmarr)...) -- c function
>> > gives
>> > error
>> > (ymarr
>> > (make-marray 'double-float :initial-contents
>> > (loop for x in xarr
>> > collect (sin x))))
>> > (acc (make-acceleration))
>> > (spline (make-spline +periodic-cubic-spline-interpolation+ xmarr
>> > ymarr)))
>> > (evaluate-integral spline 0d0 (coerce pi 'double-float) :acceleration
>> > acc)))
>> >
>> > 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?
>> >
>> > Mirko
>> >
>> > _______________________________________________
>> > Gsll-devel mailing list
>> > Gsll-devel at common-lisp.net
>> > http://common-lisp.net/cgi-bin/mailman/listinfo/gsll-devel
>> >
>> >
>
>
More information about the gsll-devel
mailing list