diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..45c476ae0040d7eb35d1c823c90d598452782c62 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,10 @@ +pages: + stage: deploy + script: mv src public + artifacts: + paths: + - public + tags: + - site-gen + only: + - master diff --git a/index.html b/index.html new file mode 100644 index 0000000000000000000000000000000000000000..cdab58d5763c7fc6e25d734ec42d07731754a05e --- /dev/null +++ b/index.html @@ -0,0 +1,300 @@ + + + + + GSLL, the GNU Scientific Library for Lisp + + + + + + + + + + +
+ +

About

+ +

+ + +

The GNU Scientific Library for Lisp (GSLL) allows you to use +the GNU Scientific Library +(GSL) 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. +

+ +

Topics include: polynomials, special functions, vectors and +matrices, permutations, sorting, linear algebra including BLAS, +eigensystems, fast Fourier transforms (FFT), quadrature, random numbers, +quasi-random sequences, random distributions, statistics, histograms, +N-tuples, Monte Carlo integration, simulated annealing, ordinary +differential equations, interpolation, numerical integration, +numerical differentiation, Chebyshev approximation, series +acceleration, discrete Hankel transforms, root-finding, minimization, +least-squares fitting, IEEE floating-point, discrete wavelet +transforms, basis splines, physical constants. See +missing-features.text +on the status of some incomplete topics. +

+ +

Examples

+ +

The Jacobian elliptic functions sn, cn, and + dn are special functions (Chapter 7):

+
+(jacobian-elliptic-functions 0.2d0 0.81d0)
+0.19762082367187703d0
+0.9802785369736752d0
+0.9840560289645665d0
+
+

which returns as multiple values the three function values. The +functions are defined only if the second argument m is not +greater than 1, so an error is signalled if this parameter is out of +range: +

+(jacobian-elliptic-functions 0.61802d0 1.5d0)
+Input domain error |m| > 1.0 in elljac.c at line 46
+   [Condition of type INPUT-DOMAIN]
+
+

This is an ordinary Lisp error which may be handled with standard +definitions available in Lisp. To take the + +complex conjugate scalar product of two complex vectors of length 3: +

+(cdot #2m(#c(-34.5d0 8.24d0) #c(3.29d0 -8.93d0) #c(34.12d0 -6.15d0))
+      #2m(#c(49.27d0 -13.49d0) #c(32.5d0 42.73d0) #c(-17.24d0 43.31d0)))
+#C(-2940.2118d0 1861.9380999999998d0)
+
+

There are over 1500 examples available from within GSLL with the +function examples. There is also a suite of over +4000 tests; many of the examples also serve as tests, and most others +are ported from GSL's tests. + +

Download and Install

+

Download

+

Use quicklisp and follow the + instructions. You will need to make sure that the libraries and + header files associated with GNU Scientific Library +(GSL) and libffi are + installed; your distribution may name these libgsl0-dev + and libffi-dev. Once they are installed and you have + loaded the quicklisp file: +

+   (ql:quickload "gsll")
+

To test your installation: +

+   (asdf:test-system :gsll)
+

The result should look something like: +

+Unit Test Summary
+ | 3997 assertions total
+ | 3992 passed
+ | 5 failed
+ | 6 execution errors
+ | 0 missing tests
+
+

You may see more failures; if you are not on a 64 bit platform you will see fewer assertions. +

License

+

+This software is distributed under +the GPL + +; see +the file COPYING. There is absolutely no warranty.

+ +

Documentation

+ +

General Advice

+

The following techniques for using the API are advised:

+
+

+ Some examples are not yet present in, or are too complicated for, the + function #'examples. In this case, you need to look in + the relevant source file; they are in either a separate file of + examples, or at the end of the file of definitions. + It is advisable to look at the examples first for calculations that + require more complex setup (generally, the later chapters in the GSL + manual). + +

Arrays

+

+GSLL has many functions that work on vectors (one-dimensional arrays) +and matrices (two-dimensional arrays). Foreign arrays are defined and +manipulated using +the Antik +which defines generic operations on array-like objects; see the Antik +documentation for more information. GSLL supports all array element +types that are supported by CFFI, the CL implementation, GSL, and the +platform. This list is available in the +variable grid:*array-element-types*. +

+ +

Passing functions

+

+ Functions that are passed to GSL functions (known as callbacks + in C) are specified with a + function + designator for the CL function, that is, either the function + object itself or a symbol denoting the function. + There is usually an option scalarsp for functions + that take or return arrays that, if true, will + send the user function the argument element by element, and expect + the return values to be the individual elements. +

+ +

GSL objects

+

+There are a number of GSL objects other than arrays that can be +created: +

+acceleration interpolation levin levin-truncated spline
+nonlinear-ffit nonlinear-fdffit
+one-dimensional-root-solver-f one-dimensional-root-solver-fdf
+multi-dimensional-minimizer-f multi-dimensional-minimizer-fdf
+fit-workspace one-dimensional-minimizer
+multi-dimensional-root-solver-f multi-dimensional-root-solver-fdf
+histogram histogram2d histogram-pdf histogram2d-pdf
+basis-spline chebyshev hankel wavelet wavelet-workspace
+random-number-generator quasi-random-number-generator discrete-random
+polynomial-complex-workspace integration-workspace
+qaws-table qawo-table
+eigen-symm eigen-symmv eigen-herm eigen-hermv
+eigen-nonsymm eigen-nonsymmv eigen-gensymm eigen-gensymmv
+eigen-gen eigen-genv
+monte-carlo-plain monte-carlo-miser monte-carlo-vegas
+ode-stepper ode-evolution standard-control y-control
+yp-control scaled-control
+fft-real-wavetable-double-float fft-real-wavetable-single-float
+fft-real-workspace-double-float fft-real-workspace-single-float
+fft-complex-wavetable-double-float fft-complex-wavetable-single-float
+fft-complex-workspace-double-float fft-complex-workspace-single-float
+fft-half-complex-wavetable-double-float fft-half-complex-wavetable-single-float
+
+

+An instance may be created with a function whose name is "make-" +followed by the class name, e.g. make-histogram. The +arguments that the function takes depends on the class. +

+ +

Additional definitions

+

+Some definitions are provided because of their usefulness, even though +GSL doesn't have them. +

+ +

Status

+ +

+GSLL is largely complete and usable, with functioning interfaces to +most of GSL. Some functionality is not yet ported, and there are some +bugs. + +

Contact

+
+

There is a mailing list for all aspects of this project, including bug reports. See also the archives. In addition, I am frequently on #lisp IRC channel as LiamH. For bug reports, please use the mailing list. The development site for GSLL has the git repository. If you have patch(es), please commit your changes and do: +

git format-patch origin
+

This will produce one or more files whose names start with a four-digit number; please attach them all to your email. +

+ + + + diff --git a/readme.html b/readme.html new file mode 100644 index 0000000000000000000000000000000000000000..8e5bc7be2700b9a45eb6922127f7e8eaf25b2c0b --- /dev/null +++ b/readme.html @@ -0,0 +1,30 @@ + +

The GNU Scientific Library for Lisp (GSLL) allows you to use + the GNU Scientific + Library (GSL) 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. +

+

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.

+ + + + + diff --git a/site.css b/site.css new file mode 100644 index 0000000000000000000000000000000000000000..6d3295017c1ad3af0456b6a077150ca96340b644 --- /dev/null +++ b/site.css @@ -0,0 +1,355 @@ +/* taken & adapted with permission from John Wiegley's brilliant site + at http://www.newartisans.com/johnw/. Thanks, John! */ + +/* The HTML body */ + + +body { + margin: 0px; +} + +.left-float { + float: left; + padding: 20px; +} + +.right-float { + float: right; + padding: 20px; +} + +/* The top banner */ + +#banner { + color: #000000; + background-color: #E8E8E8; + + padding: 10px 0px 10px 15px; /* t r b l */ +} + +#banner a { + color: #483D8B; + text-decoration: none; +} + +#banner h1, h2 { + font-family: 'Trebuchet MS', Verdana, sans-serif; + font-weight: bold; + margin: 0px; +} + +#banner h1 { + font-size: large; + line-height: 150%; +} + +#banner h2 { + font-size: medium; +} + +/* The true body, which remains below the banner */ + +#body { + font-family: Verdana, Arial, sans-serif; + margin: 0px; +} + +#body a { + text-decoration: underline; + font-weight: bold; +} + +#body a:link { color: #666666; } +#body a:visited { color: #666666; } +#body a:active { color: #666666; } +#body a:hover { color: #CC6600; } + +#body h1, h2, h3 { + font-family: 'Trebuchet MS', Verdana, sans-serif; + font-size: large; +} + +/* The content, which is the left part of the body */ + +#content { + padding-top: 25px; + padding-left: 15px; + padding-right: 15px; + + color: #333; + background-color: #FFFFFF; + + line-height: 150%; +} + +#content table { + border-width: 0 0 0 0; + border-style: none; + padding-top: 10px; + + margin-left: 30px; + margin-right: 30px; +} + +#content td { + border-width: 0 0 0 0; + border-style: none; + padding: 1px; +} + +#content th { + font-weight: bold; + text-align: left; + border-width: 0 0 1px 0; + border-style: solid; + padding: 0; +} + +#content p.quoted { + margin-left: 20px; + margin-right: 20px; +} + +#content hr { + margin: 0px; +} + +#content dl { + margin-left: 25px; +} + +#content dd { + margin-left: 25px; + margin-right: 40px; + margin-bottom: 15px; +} + +#content ol { + margin-left: 30px; +} + +#content li { + margin-left: 0px; +} + +#content p { + margin-left: 25px; + margin-right: 15px; + margin-top: -7px; +/* text-indent: 30px; */ +} + +#content pre { + margin-left: 25px; +} + +#content p.first { text-indent: 0px; } +#content p.quoted { text-indent: 0px; } +#content p.footnote { text-indent: 0px; } + +#content hr { + margin-left: 15px; + margin-right: 15px; + margin-bottom: 10px; +} + +#content h2 { + color: #666666; + font-weight: bold; + margin-top: 25px; + margin-left: 0px; + border-bottom: 1px solid #999; + margin-bottom: 15px; +} + +#content h2.first { + margin-top: 0px; +} + +#content h3 { + color: #000000; + font-size: medium; + font-weight: bold; + margin-left: 25px; + /*margin-bottom: -10px;*/ + margin-bottom: 15px; +} + +#content code { + font-family: Courier, sans-serif; +} + +#content .verse { + margin-left: 45px; + text-indent: 0px; +} + +#content .example { + font-family: Courier, sans-serif; + white-space: pre; + line-height: 110%; + margin-left: 40px; + color: purple; +} + +/* Blog entries within the content */ + +#entry { + margin-top: -15px; + padding-left: 10px; + padding-right: 20px; +} + +blog-entry { + margin-top: -15px; + padding-left: 10px; + padding-right: 20px; +} + +#entry-head { + border-bottom: 1px solid #999; + margin-bottom: 15px; +} + +entry-head { + border-bottom: 1px solid #999; + margin-bottom: 15px; +} + +#entry-head h2 { + margin-top: 0px; + margin-bottom: 0px; + border-bottom: 0px; +} + +entry-head h2 { + margin-top: 0px; + margin-bottom: 0px; + border-bottom: 0px; +} + +#entry-date { + font-size: small; + font-weight: bold; + padding-right: 20px; + float: right; +} + +entry-date { + font-size: small; + font-weight: bold; + padding-right: 20px; + float: right; +} + +#entry-text { + margin-right: 20px; +} + +entry-text { + margin-right: 20px; +} + +#content p.quoted { + margin-left: 10px; + margin-right: 20px; +} + +#entry-text img { + padding-bottom: 10px; +} + +entry-text img { + padding-bottom: 10px; +} + +#entry-qotd { + position: relative; + top: 0px; + right: 0px; + float: right; + margin-top: 10px; + padding: 10px; + margin-left: -40px; +} + +/* Sina's style: + +#entry-qotd { + background-color: #C6D1DF; + foreground-color: #304B6D; + width: 20%; + float: right; + margin-left: 25px; + padding: 5px; + padding-bottom: 25px; + border-width: 10px; + border-color: white; +} + +#entry-qotd p { + margin-left: 5px; + margin-right: 5px; +} + +#entry-qotd h3 { + color: white; + font-size: medium; + font-weight: bold; + margin-top: 0px; + margin-left: 0px; + margin-bottom: 15px; +} + +*/ + +/* The sidebar, which is the right part of the body */ + +#sidebar { + position: relative; + top: 0px; + right: 0px; + float: right; + + padding: 15px; + width: 22%; + + font-family: 'Trebuchet MS', Verdana, sans-serif; + font-size: 90%; + background-color: #E8E8E8; + + border-style: solid; + border-top-width: 0px; + border-right-width: 0px; + border-left-width: 25px; + border-bottom-width: 10px; + border-color: white; +} + +#sidebar h2 { + color: #000000; + text-align: center; + font-weight: bold; + font-size: small; + text-transform: uppercase; + padding: 3px; + letter-spacing: .3em; +} + +#sidebar a { + color: #483D8B; +} + +#sidebar ul { + padding-top: 5px; + padding-left: 0px; + margin: 0px; + margin-bottom: 30px; +} + +#sidebar li { + color: #000000; + line-height: 140%; + margin-top: 5px; + list-style-type: none; +} diff --git a/style.css b/style.css new file mode 100644 index 0000000000000000000000000000000000000000..1ca7bf3d832b135242c7a058529c2930c0d6caac --- /dev/null +++ b/style.css @@ -0,0 +1,54 @@ + +.header { + font-size: medium; + background-color:#336699; + color:#ffffff; + border-style:solid; + border-width: 5px; + border-color:#002244; + padding: 1mm 1mm 1mm 5mm; +} + +.footer { + font-size: small; + font-style: italic; + text-align: right; + background-color:#336699; + color:#ffffff; + border-style:solid; + border-width: 2px; + border-color:#002244; + padding: 1mm 1mm 1mm 1mm; +} + +.footer a:link { + font-weight:bold; + color:#ffffff; + text-decoration:underline; +} + +.footer a:visited { + font-weight:bold; + color:#ffffff; + text-decoration:underline; +} + +.footer a:hover { + font-weight:bold; + color:#002244; + text-decoration:underline; } + +.check {font-size: x-small; + text-align:right;} + +.check a:link { font-weight:bold; + color:#a0a0ff; + text-decoration:underline; } + +.check a:visited { font-weight:bold; + color:#a0a0ff; + text-decoration:underline; } + +.check a:hover { font-weight:bold; + color:#000000; + text-decoration:underline; }