[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon May 29 21:51:25 2001 
Subject:Re: GSL collaboration and (and GSL Manual contents) 
From:Aaron Sloman See text for reply address 
Volume-ID:1010529.06 

[To reply replace "Aaron.Sloman.XX" with "A.Sloman"]

Jonathan.Cunningham@tesco.net (Jonathan L Cunningham) writes:

(among other things)

> Date: Tue, 29 May 2001 19:50:51 GMT
> ...
> >cglur@onwe.co.za wrote:
> >
> >"Graham Higgins" <gjh@bel-epa.com> wrote:
> >> ...
> >> GSL -- The GNU Scientific Library. ... gsl is free software. It is distributed
> (snip)
>
> Having the GNU library available can only be a Good Thing, but ...
>
> >Presumably 'senior member(s)' have judged that the cost/benefit says
> >do-it.
>
> Do what?

Nobody has *decided* anything.

Some time ago I noticed that the GSL had become available. I then
remembered interacting with people doing various kinds of AI
research who had extolled the benefits of interactive mathematical
systems (e.g. matlab) that had lots of mathematical capabilities
pre-packaged so that users did not have to look up algorithms or
reinvent them and then implement them.

However (a) these packages cost real money, even for academics and
(b) the languages often don't have the flexibility and power of pop-11.

So I thought it might be very nice for such people to be able to
get all they wanted and more free of charge from pop11+gsl instead
of having to pay money for something less powerful.

And it might attract more users to pop11 and hence lead to more
willing developers, etc.

By the way if pop-11 interfaces to a package exist they can also
conveniently be accessed from Prolog, Common Lisp, and ML, in poplog.

I enquired whether anyone was interested in doing anything about
GSL. Both Steve Leach and Jeff Best said they were very interested,
though they had slightly different reasons.

> >What skill set do we need ?
>
> For what?
>
> I can't spare any time to help, so I ask only out of curiosity. If it
> was explained what was intended, I'm sorry I missed it - could someone
> point me at the post which explained it (the news server I use seems
> to have comp.lang.pop back at least as far as January).

You may by now have seen my earlier message to Chris explaining that
providing an interface to gsl (of the sort I had in mind) would be
analogous to the work done by poplog developers in providing an
interface to X, or the work done by David Young in providing pop-11
interfaces to his C programs in the popvision library
    http://www.cs.bham.ac.uk/research/poplog/popvision/

However, if the GSL documentation is sufficiently formal some of the
process could be automated.

> But what, exactly, is required? This is a genuine question; it is not
> obvious what is *required*[1] beyond copying documentation, and
> including it and the library with the Poplog distribution.

I don't think that would achieve anything useful: people would probably
prefer to get the up to date version of the library from its home and
adding bulk to poplog would not be welcomed by people who did not want
the mathematical extensions.

I was thinking more of providing convenient pre-packaged interfaces
with some limited documentation, which would point to the full GSL
documentation.

I think it would be far more convenient to many users if they did
not have to learn how to externally load C libraries in order to use
the mathematical utilities provided, just as I am grateful that all
the X stuff I use has been packaged in pop-11. But for that I would
have found building RCLIB FAR more difficult. (It was difficult enough!)

> The next level up would be to prepare a set of pop11 lib
> files which included the necessary declarations for run-time
> loading of the GSL functions, and possibly linking them into a
> poplog image. Or would it?

I would say a collection of autoloadable or explicitly loadable
libraries would suffice, based on the sort of model I have been using
for the "extras" at the poplog site. There's too much in gsl to compile
into the standard image, though saved images could be used for
frequently used subsets. (However as disks, and CPUs get faster the need
for saved images reduces: things that used to take minutes to compile
now compile in seconds. E.g. I started pop-11 and did
    lib prolog

It compiled the prolog compiler and then reported (on a shared 450 Mhz
ultrasparc)

;;; PROLOG COMPILED, TIME = 1.01 seconds

Remember how long that took in the mid 80s? Compiling the whole of
Poplog Common Lisp takes about 6.5 seconds on a Dell 400 mhz celeron
laptop running linux.

The model I use for libraries works as follows:

A new library foolib contains in the directory foolib, sub-directories auto,
lib, teach, help, ref (or some subset) and a "startup" file
    foolib/foolib.p
which is linked to
    $poplocal/local/lib/foolib.p

Then, if a user does

    uses foolib.p

That compiles the file foolib/foolib.p which works out where it is (because
the pop11 compiler sets the path name of the file to popfilename). Then
foolib.p uses the directory name to work out the path names for the
sub-directories, and then uses "extend_searchlist" to extend some or all
of these search lists:

    popautolist
    popuseslist
    vedteachlist
    vedhelplist
    vedreflist

(The first two have functionality a bit like $PATH in unix, and the last
three are a bit like $MANPATH).

At that point all the libraries that have been added to popautolist
become autoloadable, all those in popuseslist become available via
"uses" or "lib", the help, teach, and ref commands will find the
documentation, and the showlib command can be used to browse libraries
in foolib/auto/ and foolib/lib/

(Some of the libraries are a bit more flexible in that they allow the
user to specify a different directory to put on search lists, via an
environment variable or a pop11 variable. this makes it easier to have
two versions of a library installed simultaneously, e.g. a new trial
version and an old version. Many "package" systems make this difficult
or impossible.)

For an example of a file that extends the search lists, see the one used
for poprulebase:

    http://www.cs.bham.ac.uk/research/poplog/prb/prblib.p

To prevent name clashes between libraries that users may wish to combine
I use systematic prefixes for file names and global identifiers. E.g.
Poprulebase uses prb_, RCLIB uses rc_, sim_agent uses sim_, etc.

People who define useful extensions with nice short readable, mnemonic
names are asking for trouble: such names are very likely to be used by
someone else for a different purpose. (E.g. the syntax word "instance"
in Objectclass made it impossible to compile Common Lisp, until I
removed the clash by changing some Common lisp internal identifiers.)

[JLC continued]
> And after that, then what?
>
> I may be being naive here, particularly since I know nothing about
> the problems the poplog development team had in interfacing to
> the X Window System. But X is an Abomination, and is Not Nice (as
> a collection of code). I defy anyone to claim otherwise.

That's why I am so glad I was not left to produce my own low level
interfaces to it in order to produce graphical tools that work on
solaris, linux, digital unix, etc.

> Presumably GSL is not an Abomination. (If it is, why would we want
> to use it?)

(Lots of abominations are very widely used, as you know well.)

> Oh, and does GSL include code for solving LP problems (Linear
> Programming - a class of optimisation problems)? If so,
> then I WANT it! :-).

Well, since not everyone has easy and fast access to remote web sites, I
thought I'd circulate the table of contents from the online GSL manual
at

    http://sources.redhat.com/gsl/ref/gsl-ref_toc.html

Here it is, all subject to the terms of the GNU General Public License.

There's a lot of it, and possibly still growing. That's why I hope some
of the interfacing can be automated. (A pop11 program reads the
GSL documentation, and then genrates all the interface files ?????)

Aaron
PS I don't know anything about most of this!
=======================================================================

                  GNU Scientific Library -- Reference Manual

Edition 0.8, for gsl Version 0.8

21 May 2001


    Mark Galassi

    Jim Davies

    James Theiler

    Brian Gough

    Reid Priedhorsky

    Gerard Jungman

    Michael Booth

    Fabrice Rossi
     _________________________________________________________________

   This file documents the GNU Scientific Library, a collection of
   numerical routines for scientific computing.

   As of 21 May 2001 the library is in developers release only and is not
   recommended for general use.
     * Preliminaries
     * Using the library
          + ANSI C Compliance
          + Compiling and Linking
          + Shared Libraries
          + Automake macros
          + Inline functions
          + Long double
          + Portability functions
          + Alternative optimized functions
          + Support for different numeric types
          + Compatibility with C++
          + Aliasing of arrays
          + Code Reuse
     * Error handling
          + Error reporting
          + Error handlers
          + Using GSL error reporting in your own functions
     * Mathematical Functions
          + Mathematical Constants
          + Infinities and Not-a-number
          + Elementary Functions
          + Small integer powers
          + Testing the Sign of Numbers
          + Testing for Odd and Even Numbers
          + Maximum and Minimum functions
     * Complex Numbers
          + Complex numbers
          + Properties of complex numbers
          + Complex arithmetic operators
          + Elementary Complex Functions
          + Complex Trigonometric Functions
          + Inverse Complex Trigonometric Functions
          + Complex Hyperbolic Functions
          + Inverse Complex Hyperbolic Functions
          + References and Further Reading
     * Roots of Polynomials
          + Polynomial evaluation
          + Quadratic equations
          + Cubic equations
          + General polynomial equations
          + Examples
          + References and Further Reading
     * Special Functions
          + Special Function Usage
          + The gsl_sf_result struct
          + Special Function Modes
          + Airy Functions
               o Airy Functions
               o Derivatives of Airy Functions
               o Zeros of Airy Functions
               o Zeros of Derivatives of Airy Functions
          + Bessel Functions
               o Regular Cylindrical Bessel Functions
               o Irregular Cylindrical Bessel Functions
               o Regular Modified Cylindrical Bessel Functions
               o Irregular Modified Cylindrical Bessel Functions
               o Regular Spherical Bessel Functions
               o Irregular Spherical Bessel Functions
               o Regular Modified Spherical Bessel Functions
               o Irregular Modified Spherical Bessel Functions
               o Regular Bessel Function - Fractional Order
               o Irregular Bessel Functions - Fractional Order
               o Regular Modified Bessel Functions - Fractional Order
               o Irregular Modified Bessel Functions - Fractional Order
               o Zeros of Regular Bessel Functions
          + Clausen Functions
          + Coulomb Wave Functions
               o Normalized Hydrogenic Bound States
               o Coulomb Wave Functions
               o Coulomb Wave Function Normalization Constant
          + Coupling Coefficients
               o 3-j Symbols
               o 6-j Symbols
               o 9-j Symbols
          + Dawson Function
          + Debye Functions
          + Dilogarithm
               o Real Argument
               o Complex Argument
          + Elementary Operations
          + Elliptic Integrals
               o Legendre Forms
               o Carlson Forms
               o Legendre Form of Complete Elliptic Integrals
               o Legendre Form of Incomplete Elliptic Integrals
               o Carlson Forms
          + Elliptic Functions (Jacobi)
          + Error Function
               o Error Function
               o Complementary Error Function
               o Log Complementary Error Function
               o Probability functions
          + Exponential Function
               o Exponential Function
               o Relative Exponential Functions
               o Exponentiation With Error Estimate
          + Exponential Integrals
               o Exponential Integrals
               o Ei(x)
               o Hyperbolic Integrals
               o Ei_3(x)
               o Trigonometric Integrals
               o Arctangent Integral
          + Fermi-Dirac Function
               o Complete Fermi-Dirac Integrals
               o Incomplete Fermi-Dirac Integrals:
          + Gamma Function
          + Gegenbauer Functions
          + Hypergeometric Functions
          + Laguerre Functions
          + Legendre Functions and Spherical Harmonics
               o Legendre Polynomials
               o Associated Legendre Polynomials and Spherical Harmonics
               o Conical Functions
               o Radial Functions for Hyperbolic Space
          + Logarithm and Related Functions
          + Power Function
          + Psi (Digamma) Function
               o Digamma Function
               o Trigamma Function
               o Polygamma Function
          + Synchrotron Functions
          + Transport Functions
          + Trigonometric Functions
               o Trigonometric Functions
               o Conversion Functions
               o Restriction Functions
               o Trigonometric Functions With Error Estimate
          + Zeta Functions
               o Riemann Zeta Function
               o Hurwitz Zeta Function
               o Eta Function
          + Examples
          + References and Further Reading
     * Fast Fourier Transforms (FFTs)
          + Mathematical Definitions
          + Overview of complex data FFTs
          + Radix-2 FFT routines for complex data
          + Mixed-radix FFT routines for complex data
          + Overview of real data FFTs
          + Radix-2 FFT routines for real data
          + Mixed-radix FFT routines for real data
          + References and Further Reading
     * Numerical Integration
          + QNG non-adaptive Gauss-Kronrod integration
          + QAG adaptive integration
          + QAGS adaptive integration with singularities
          + QAGP adaptive integration with known singular points
          + QAGI adaptive integration on infinite intervals
          + QAWC adaptive integration for Cauchy principal values
          + QAWS adaptive integration for singular functions
          + QAWO adaptive integration for oscillatory functions
          + QAWF adaptive integration for Fourier integrals
          + Error codes
          + Examples
          + References and Further Reading
     * Random Number Generation
          + General comments on random numbers
          + The Random Number Generator Interface
          + Random number generator initialization
          + Sampling from a random number generator
          + Auxiliary random number generator functions
          + Random number environment variables
          + Saving and restoring random number generator state
          + Random number generator algorithms
          + Unix random number generators
          + Numerical Recipes generators
          + Other random number generators
          + Random Number Generator Performance
          + References and Further Reading
          + Acknowledgements
     * Quasi-Random Sequences
          + Quasi-random number generator initialization
          + Sampling from a quasi-random number generator
          + Auxiliary quasi-random number generator functions
          + Saving and resorting quasi-random number generator state
          + Quasi-random number generator algorithms
          + Examples
          + References
     * Random Number Distributions
          + The Gaussian Distribution
          + The Gaussian Tail Distribution
          + The Bivariate Gaussian Distribution
          + The Exponential Distribution
          + The Laplace Distribution
          + The Exponential Power Distribution
          + The Cauchy Distribution
          + The Rayleigh Distribution
          + The Rayleigh Tail Distribution
          + The Levy alpha-Stable Distributions
          + The Levy skew alpha-Stable Distribution
          + The Gamma Distribution
          + The Flat (Uniform) Distribution
          + The Lognormal Distribution
          + The Chi-squared Distribution
          + The F-distribution
          + The t-distribution
          + The Beta Distribution
          + The Logistic Distribution
          + The Pareto Distribution
          + The Spherical Distribution (2D & 3D)
          + The Weibull Distribution
          + The Type-1 Gumbel Distribution
          + The Type-2 Gumbel Distribution
          + General Discrete Distributions
          + The Poisson Distribution
          + The Bernoulli Distribution
          + The Binomial Distribution
          + The Negative Binomial Distribution
          + The Pascal Distribution
          + The Geometric Distribution
          + The Hypergeometric Distribution
          + The Logarithmic Distribution
          + Shuffling and Sampling
          + Examples
          + References and Further Reading
     * Statistics
          + Mean, Standard Deviation and Variance
          + Absolute deviation
          + Higher moments (skewness and kurtosis)
          + Autocorrelation
          + Covariance
          + Weighted Samples
          + Maximum and Minimum values
          + Median and Percentiles
          + Example statistical programs
          + References and Further Reading
     * Histograms
          + The histogram struct
          + Histogram allocation
          + Copying Histograms
          + Updating and accessing histogram elements
          + Searching histogram ranges
          + Histogram Statistics
          + Histogram Operations
          + Reading and writing histograms
          + Resampling from histograms
          + The histogram probability distribution struct
          + Example programs for histograms
          + Two dimensional histograms
          + The 2D histogram struct
          + 2D Histogram allocation
          + Copying 2D Histograms
          + Updating and accessing 2D histogram elements
          + Searching 2D histogram ranges
          + 2D Histogram Statistics
          + 2D Histogram Operations
          + Reading and writing 2D histograms
          + Resampling from 2D histograms
          + Example programs for 2D histograms
     * N-tuples
          + The ntuple struct
          + Creating ntuples
          + Opening an existing ntuple file
          + Writing ntuples
          + Reading ntuples
          + Closing an ntuple file
          + Histogramming ntuple values
          + Example programs
          + References and Further Reading
     * Monte Carlo Integration
          + Interface
          + PLAIN Monte Carlo
          + MISER
          + VEGAS
          + Examples
          + References and Further Reading
     * Simulated Annealing
          + Simulated Annealing algorithm
          + Simulated Annealing functions
          + Examples with Simulated Annealing
               o Trivial example
               o Traveling Salesman Problem
     * Ordinary Differential Equations (ODEs)
     * Interpolation
          + Introduction
          + Functions
          + Examples
               o Creating and Using a Linear Interpolation
               o Creating and Using Other Interpolations
     * Numerical Differentiation
          + Functions
          + Example
          + References and Further Reading
     * Chebyshev Approximations
          + The gsl_cheb_series struct
          + Creation and Calculation of Chebyshev Series
          + Chebyshev Series Evaluation
          + Derivatives and Integrals
          + Examples
          + References and Further Reading
     * Series Acceleration
          + Acceleration functions
          + Acceleration functions without error estimation
          + Example of accelerating a series
          + References and Further Reading
     * Discrete Hankel Transforms
          + Definitions
          + Functions
          + References and Further Reading
     * Vectors and Matrices
          + Data types
          + Blocks
               o Block allocation
               o Reading and writing blocks
               o Example programs for blocks
          + Vectors
               o Vector allocation
               o Accessing vector elements
               o Initializing vector elements
               o Reading and writing vectors
               o Creating subvector views
               o Modifying subvector views
               o Copying vectors
               o Exchanging elements
               o Vector operations
               o Finding maximum and minimum elements of vectors
               o Vector properties
               o Example programs for vectors
          + Matrices
               o Matrix allocation
               o Accessing matrix elements
               o Initializing matrix elements
               o Reading and writing matrices
               o Creating submatrix views
               o Modifying matrix views
               o Creating row and column views
               o Copying matrices
               o Copying rows and columns
               o Exchanging rows and columns
               o Matrix operations
               o Finding maximum and minimum elements of matrices
               o Matrix properties
               o Example programs for matrices
          + References and Further Reading
     * Permutations
          + The Permutation struct
          + Permutation allocation
          + Accessing permutation elements
          + Permutation properties
          + Permutation functions
          + Applying Permutations
          + Reading and writing permutations
          + Examples
          + References and Further Reading
     * Sorting
          + Sorting objects
          + Sorting vectors
          + Selecting the k-th smallest or largest elements
          + Computing the rank
          + Examples
          + References and Further Reading
     * BLAS Support
          + GSL BLAS Interface
               o Level 1
               o Level 2
               o Level 3
          + CBLAS Library
               o Level 1
               o Level 2
               o Level 3
          + Examples
          + References and Further Reading
     * Linear Algebra
          + LU Decomposition
          + QR Decomposition
          + QR Decomposition with Column Pivoting
          + Singular Value Decomposition
          + Cholesky Decomposition
          + Householder solver for linear systems
          + Tridiagonal Systems
          + References and Further Reading
     * Eigensystems
     * One dimensional Root-Finding
          + Overview
          + Caveats
          + Initializing the Solver
          + Providing the function to solve
          + Search Bounds and Guesses
          + Iteration
          + Search Stopping Parameters
          + Root Bracketing Algorithms
          + Root Finding Algorithms using Derivatives
          + Examples
          + References and Further Reading
     * One dimensional Minimization
          + Overview
          + Caveats
          + Initializing the Minimizer
          + Providing the function to minimize
          + Iteration
          + Stopping Parameters
          + Minimization Algorithms
          + Examples
          + References and Further Reading
     * Fitting
          + Linear regression
          + Linear fitting without a constant term
          + Multi-parameter fitting
          + Examples
          + References and Further Reading
     * Nonlinear Fitting
          + Overview
          + Initializing the Solver
          + Providing the Function to be Minimized
          + Iteration
          + Search Stopping Parameters
          + Minimization Algorithms using Derivatives
          + Minimization Algorithms without Derivatives
          + Computing the covariance matrix of best fit parameters
          + Examples
          + References and Further Reading
     * Multidimensional Root-Finding
          + Overview
          + Initializing the Solver
          + Providing the function to solve
          + Iteration
          + Search Stopping Parameters
          + Algorithms using Derivatives
          + Algorithms without Derivatives
          + Examples
          + References and Further Reading
     * Multidimensional Minimization
          + Overview
          + Caveats
          + Initializing the Multidimensional Minimizer
          + Providing a function to minimize
          + Multimin Iteration
          + Multimin Stopping Criteria
          + Multimin Algorithms
          + Multimin Examples
          + Multimin References and Further Reading
     * Physical Constants
          + Fundamental Constants
          + Astronomy and Astrophysics
          + Atomic and Nuclear Physics
          + Measurement of Time
          + Imperial Units
          + Nautical Units
          + Printers Units
          + Volume
          + Cookery
          + Mass and Weight
          + Thermal Energy and Power
          + Pressure
          + Viscosity
          + Light and Illumination
          + Radioactivity
          + Examples
          + References and Further Reading
     * IEEE floating-point arithmetic
          + Representation of floating point numbers
          + Setting up your IEEE environment
          + References and Further Reading
     * Debugging Numerical Programs
          + Using gdb
          + Examining floating point registers
          + Handling floating point exceptions
          + GCC warning options for numerical programs
          + References and Further Reading
     * Contributors to GSL
     * Copying
     * Concept Index
     * Function Index
     * Variable Index
     * Type Index
     _________________________________________________________________

   This document was generated on 23 May 2001 using the texi2html
   translator version 1.54.
=======================================================================
====
Aaron Sloman, ( http://www.cs.bham.ac.uk/~axs/ )
School of Computer Science, The University of Birmingham, B15 2TT, UK
EMAIL A.Sloman AT cs.bham.ac.uk   (ReadATas@please !)
PAPERS: http://www.cs.bham.ac.uk/research/cogaff/
FREE TOOLS: http://www.cs.bham.ac.uk/research/poplog/freepoplog.html