Commit ebf82b24 authored by Liam Healy's avatar Liam Healy

Analysis of port progress; improve documentation

Started in file init/analysis.lisp some definitions that will aid in
gauging how much of GSL GSLL covers.  It will not normally be loaded
(and depends on port system which is not required for GSLL) because it
is mainly used by developers.  It is not yet finished.  Hash size for
*gsl-symbol-equivalence* increased to reflect actual number of symbols
present when GSLL is loaded.  Improved documentation.
parent 4f2c390f
......@@ -28,19 +28,18 @@
getting quick answers, even for someone not intending
to program in Lisp.
</p>
<p>Topics include:
roots of polynomials, special functions, vectors and matrices,
permutations, sorting, BLAS support, linear algebra,
eigensystems, fast Fourier transforms,
quadrature, random numbers, quasi-random sequences,
random distributions, statistics, histograms, N-tuples,
Monte Carlo integration, simulated annealing, differential
equations, interpolation, numerical differentiation,
Chebyshev approximation, series acceleration,
discrete Hankel transforms, root-finding, minimization
least-squares fitting, IEEE floating-point,
discrete wavelet transforms. See documentation on status of
some incomplete topics.
<p>Topics include: roots of polynomials, special functions,
vectors and matrices, permutations, sorting, BLAS (basic
linear algebra subprograms), linear algebra, eigensystems,
fast Fourier transforms, quadrature, random numbers,
quasi-random sequences, random distributions, statistics,
histograms, N-tuples, Monte Carlo integration, simulated
annealing, differential equations, interpolation, numerical
differentiation, Chebyshev approximation, series acceleration,
discrete Hankel transforms, root-finding, minimization
least-squares fitting, IEEE floating-point, discrete wavelet
transforms. See documentation on status of some incomplete
topics.
<p>This code should be considered alpha and is still under
development, but it is largely usable
now, with some GSL capability not yet available.</p>
......@@ -70,7 +69,7 @@
<pre>
(jacobian-elliptic-functions 0.61802d0 1.5d0)
Input domain error |m| > 1.0 in elljac.c at line 46
[Condition of type EDOM]
[Condition of type INPUT-DOMAIN]
</pre>
</div>
......@@ -122,9 +121,7 @@ Input domain error |m| > 1.0 in elljac.c at line 46
<li>A <a href="documentation.html">documentation</a> guide is
available.
<li>The <a href="development.html">development</a> process is described
separately for those interested, and a <a
href="http://trac.common-lisp.net/gsll">Trac page</a> is used to
track it and for bug reports (file a "New Ticket").
separately for those interested.
<li>There is a <a
href="http://common-lisp.net/cgi-bin/mailman/listinfo/gsll-devel">mailing
list</a> for all aspects of this project.
......@@ -146,7 +143,7 @@ Input domain error |m| > 1.0 in elljac.c at line 46
<!-- Created: Feb 25 2005 -->
<!-- hhmts start -->
<small>
Time-stamp: <2008-11-15 21:51:03EST index.html>
Time-stamp: <2008-11-16 15:35:22EST index.html>
</small>
<!-- hhmts end -->
</div>
......
<!-- -*- mode: HTML; time-stamp-line-limit: -18; -*- -->
<p>The GNU Scientific Library for Lisp (GSLL) allows you to use
the <a href="http://www.gnu.org/software/gsl/">GNU Scientific
Library (GSL)</a> from Common Lisp. This library provides a
full range of common mathematical operations useful to
scientific and engineering applications. The design of the GSLL
interface is such that access to most of the GSL library is
possible in a Lisp-natural way; the intent is that the user not
be hampered by the restrictions of the C language in which GSL
has been written. GSLL thus provides interactive use of GSL for
getting quick answers, even for someone not intending
to program in Lisp.
</p>
<p>Topics include: roots of polynomials, special functions,
vectors and matrices, permutations, sorting, BLAS (basic
linear algebra subprograms), linear algebra, eigensystems,
fast Fourier transforms, quadrature, random numbers,
quasi-random sequences, random distributions, statistics,
histograms, N-tuples, Monte Carlo integration, simulated
annealing, differential equations, interpolation, numerical
differentiation, Chebyshev approximation, series acceleration,
discrete Hankel transforms, root-finding, minimization
least-squares fitting, IEEE floating-point, discrete wavelet
transforms. See documentation on status of some incomplete
topics.</p>
<!- -->
<!-- Liam Healy 2008-11-16 15:08:08EST readme.html -->
<!-- Time-stamp: <2008-11-16 15:11:33EST readme.html> -->
<!-- $Id: $ -->
;; Analysis of interface status
;; Liam Healy 2008-11-16 16:17:14EST analysis.lisp
;; Time-stamp: <2008-11-16 17:21:10EST analysis.lisp>
;; $Id: $
;;; These definitions are to monitor the status of the GSLL interface
;;; with respect to the GSL library for the purpose of directing
;;; development of GSLL. Therefore, they are not loaded in the
;;; system. They require the port system.
(in-package :gsl)
(defparameter *gsl-library-path*
(namestring
(cffi::foreign-library-handle (cffi::get-foreign-library 'cl-user::libgsl))))
(defparameter *gsl-library-symbols*
(with-open-stream
(instream
(port:pipe-input ; linux commands
"/usr/bin/nm" "-D" "--defined-only" "-g" *gsl-library-path*))
(loop for symbol = (read-line instream nil nil)
while symbol
collect (subseq symbol 19)))
"All the external symbols in the GSL library.")
(defun in-gsl (string)
"The symbol occurs in the GSL library."
(find string *gsl-library-symbols* :test 'string-equal))
(defparameter *gsll-defined-symbols*
(loop for gslsymb being the hash-key of *gsl-symbol-equivalence* collect gslsymb)
"All the exported definitions in GSLL.")
(defun name-special-function-no-error (string)
"Names a function for a special function that does not return an error estimate."
(and (search "gsl_sf_" string :test 'string-equal)
(not (string-equal (subseq string (- (length string) 2)) "_e"))
(in-gsl (concatenate 'string string "_e"))))
(defun defined-without-strings (defined-list &rest strings)
"A list of definitions in GSL where none of the given strings occurs."
(loop for string in strings
for from = defined-list then list
for list = (remove-if (lambda (x) (search string x :test 'string-equal)) from)
finally (return list)))
(defun gsll-defined-with-string (string)
"A list of definitions in GSLL where the given strings occurs."
(remove-if-not
(lambda (x) (search string x :test 'string-equal))
*gsll-defined-symbols*))
;;; Step through the list of GSL definitions, removing those things
;;; we're not going to port.
(defparameter *target-port-1*
(defined-without-strings *gsl-library-symbols* "fscan" "fread" "print" "view"))
(defparameter *target-port-2*
(remove-if 'name-special-function-no-error *target-port-1*))
;;; Step through the list of GSLL definitions, removing those things
;;; that we're not advertising we've ported, but did port anyway for
;;; internal use or for whatever reason.
(defparameter *have-port-1*
(defined-without-strings *gsll-defined-symbols* "fscan" "fread" "print" "view"))
;; Macros to interface GSL functions, including definitions necessary for defmfun.
;; Liam Healy
;; Time-stamp: <2008-08-07 20:53:59EDT interface.lisp>
;; Time-stamp: <2008-11-16 18:57:24EST interface.lisp>
;; $Id$
(in-package :gsl)
......@@ -12,7 +12,7 @@
;;;;****************************************************************************
(defparameter *gsl-symbol-equivalence*
(make-hash-table :test 'equal :size 1500))
(make-hash-table :test 'equal :size 2000))
(defun map-name (cl-name gsl-name)
;; Trust here that the library does not have two symbols that differ
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment