Skip to content
Brian W. Mulligan edited this page Dec 22, 2017 · 6 revisions

xlibs is a collection of routines for general purpose use. It is a supplement to the std routines in c/c++ xlibs is broken into several individual libaries:

xstdlib: contains classes similar to those in stdlib, including such things as a random number generator, min/max, some string and command line parsing routines.

xmath: a variety of useful mathematical routines including root finding, model fitting, linear algebra, calculus, splines, fast polynomial evaluation, and others.

xastro: astronomy specific routines; a set of common physical constants and unit conversions used in astronomy; ionization and line transition data.

xflash: c++ routines for reading FLASH (http://flash.uchicago.edu/site/) data files, adapted from built in FLASH tools.

xtime: high precision (microsecond and shorter) timing routines.

xio: fixed record size databases (e.g. spreadsheet), convenient for working with data sets, can read data in many storage formats (.csv, whitespace separated values, etc.); parameter file (map) routines for free format parameter files.

Installation

autotools and the autotools archive are required for installation.

  • configscr - this runs libtoolize, aclocal, automake, and autoconf
  • ./configure (you may want to specify an installation path with --prefix=/your/desired/path)
  • make
  • make install

The installation will attempt to identify if environment modules are present on your system. If the installation path is global ('/usr' or '/opt'), a modulefile will be placed in your global modulefile path (probably '/usr/share/Modules/modulefiles'). If it is a local installation (e.g. ~/xlibs-1.x.x) and a privatemodules folder exists in your home directory, the modulefiles will be placed there.

If you do not use modulefiles and install locally, you will probably want to add the following lines to your .bashrc or .cshrc

EXPORT PATH=$PATH:/your/install/path/bin

EXPORT PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/your/install/path/lib/pkgconfig

EXPORT LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/your/install/path/lib

(for .cshrc, use setenv as appopriate).

Function Page Template

Function Page Template