|
GSL-- Documentation
0.11Introduction.This package contains some C++ wrappers for the C API provided by the GNU Scientific library (GSL).DocumentationThe code it self is documented extensively. That is, the interfaces are explained. However, the underlying concepts - for example: what is `Simulated Annealing' - isn't explained. Please refer to the documentation that came with your GSL installation, and the references there in. The references in the GSL documentation are rather good, so I deemed it a bl**dy waste of time repeating it. The GSL documentation usally comes as info pages and a Postscript file. To read the info pages, doprompt> info gsl-ref Using the class librarySimply include the class declaration files you need in your code.
The library provide three helper facilities to compile against the header files. One is the application Organisation of the codeAs almost all of the classes are implemented as templates, the library mainly consists of header files. This has the advantage, that the user can easily select the level of optimisation and specialisation as needed.
The header files generally live in a subdirectory that corresponds to the module that the class belongs to. So for example, all the fourier transformation classes live in the the subdirectory (one of the ISO/IEC C++ header files). This means you should use a rather long path to include the header files into your code. For example, to include the histogram class header, you need to do #ifndef GSLMM_histogram #include <gslmm/histogram/histogram.hh> #endif Please also refer to the modules pages. Conding conventions.As far as possible, member functions are implmented as inline for speed optimisation.As far as possible, the classes are implmented as template specialisations. To make the specialisations, the headers use macro expansion to help do that. All classes are in the gslmm namespace, to pollute the users namespace as little as possible. Class and member names are in small letters, and words are sperated by an underscore. Data member names start with an underscore. Names are spelled out, so that they are easier to read. Specialisations and headersMany of the classes in this class library have explicit specialistions fordouble , float , int , long , and so on. To use these specialisations, include the proper header file in your code. For example, if you want to use complex number that has float values, you can do #ifndef GSLMM_complex_float #include <gslmm/compleks/complex_float.hh> #endif _skel.hh file. In that way, I needn't duplicate the code for the specialisations, and still have seperate headers.The headers without an explicit type name in the file name, include all possible specialisations. For after #ifndef GSLMM_complex #inclucde <gslmm/compleks/complex.hh> #endif
There are also headers endinding in ` #ifndef GSLMM_vector_base #inclucde <gslmm/vectormatrix/vector_base.hh> #endif The testAs the library consists only of header files, and no compiled code, the only code that is compiled during installation are the various tests. This is to ensure that everything in fact works. Therefor it is highly recommended that you run the checks after building, that is you should runmake check .
All the tests supports the command line options When I compile the tests, I usually invoke a slew of options to GCC (I'm currently using 2.95.4 and 3.2.2). These options are
|