(c) 2000-2015 Niv Drory, Claus A. Gössl, and Jan Snigula released under the GNU Public License (GPL)

The current version is 2.0.22, released Jul 10, 2019

LTL provides dynamic arrays of up to 7-dimensions, subarrays and slicing, support for fixed-size vectors and matrices including basic linear algebra operations, expression templates-based evaluation, and I/O facilities for ascii and FITS format files. Utility classes for command-line processing and configuration-file processing are provided as well.

Although the library is developed with application to astronomical image and data processing in mind (therefore FITS format I/O), it is by no means restricted to these fields of application. In fact, it qualifies as a fully general array processing package.

Focus is laid on a high abstraction level regarding the handling of expressions involving arrays or parts of arrays and linear algebra related operations without negative impact on performance. Hence the use of expression templates throughout the library. The price to pay is dependence on a compiler implementing enough of the current ANSI C++ specification, as well as significantly higher demand on resources at compile time compared to hand-coded C implementations.

A new feature as of LTL 1.7 is the use of the vector
execution unit present in some modern processors for evaluation
of array expressions. This is basically a compiler independent
**auto-vectorizer**. Currently PowerPC processors (Altivec) and
x86 processors (SSE/SSE2 and above) are supported. Most array-valued
(arithmetic, logical) and scalar-valued (reductions) operations on
MArrays are currently vectorized.

Version 1.8 supports multithreaded environments, for example use with OpenMP.

Version 1.9 adds an interface to BLAS and LAPACK routines for dynamic arrays, and LU and singular value decomposition routines for fixed sized matrices. Additionally, partial reductions (reducing the rank of expressions by one by, e.g., summing along one dimension) are now supported.

Version 2.0 adds support for FITS extensions and
tables, FFTW interfacing, a
generic interface
to GNUplot, genereic
convolutions including finite differencing operators, complete
support form complex

For the full list of changes, see the ChangeLog.

LTL is known to compile on GCC versions 2.95.2 and above (Linux/IA32, Mac OS X/PPC, Solaris/SPARC), Intel ICC version 7.1 and above (Linux/IA32/IA64), Sun C++ version 5.5 and above (Solaris/SPARC), and IBM xlC version 6 and above (AIX/PPC, Mac OS X/PPC). Newer versions also work with LLVM clang++ and llvm-g++. Other sufficiently ANSI complient C++ compilers should also do, but might require small modifications. Patches welcome.

A summary of the library's main features is given below. You can browse the documentation online. A good starting point is the Introduction section, then read the conceptual documentation about Multidimensional Dynamic Arrays first, before proceeding to the other modules and the API reference.

The latest version is ltl-2.0.22 which can be downloaded here. Full installation instructions are given in the documentation. In general, the following should do the job:

tar -zxf ltl-2.x.xx.tar.gz cd ltl-2.x.xx ./configure --prefix=/path/to/whereever/you/like make make check #optional; runs test suite make install

The last release of the ltl-1.x series was 1.9.10, released March 5, 2010.

The dynamically allocated multidimensional array `ltl::MArray`

provides

- creating and referencing subarrays (rank preserving)
- slicing (rank reducing), e.g. a column of an image
- mixing subarrays and slices in the same indexing expression e.g. a submatrix of a slice of a cube
- referencing the data of other arrays ('views')
- reference counting for the memory chunks holding the actual data
- STL-compatible iterators
- arbitrary complex arithmetic expressions without creation of temporary objects: 'expression templates'
- support for all standard library math functions
- user supplied functions can be added easily
- auto-vectorization of expressions (Altivec, SSE2,3)
- indexing arbitrary sets of elements: where()
- conditional expression evaluation: merge( A!=0, 1/A, 0 )
- applying arbitrary functors to expressions: apply(f, Expr)
- statistical and logical reductions: sum, average, variance, kappa-sigma-clipping, ..., allof, anyof, noneof
- partial reductions (reducing rank by 1)
- optional bounds-checking for debugging
- stream I/O: cout << A; cin >> A;
- ASCII-file I/O for columnar data
- FITS file I/O. Convenient interface via operator>>. Support for FITS image extensions and tables.
- transparent memory-mapped arrays
- threadsafe reference-counting memory management
- BLAS and LAPACK interface for 1D and 2D arrays
- support for high-performance BLAS and LAPACK implementations, such as Appple's Accelerate and Intel's MKL.
- interface to FFTW fast fourier transform package
- Interface to gnuplot. Easily plot MArrays and any stdlib containers interactively. Query mouse.
- full supprt for complex
types and vector/tensor fields made out of ltl::FVector and ltl::FMatrix types - generic support for convolution operations in N-dimensions, including finite differencing

The fixed-size ltl::FVector and ltl::FMatrix provide:

- compile time fixed size (allows strong optimization)
- expression template based evaluation of arithmetic and linear algebra expressions
- referencing column and row vectors of a matrix
- vector dot product
- matrix-vector and matrix-matrix dot-product
- all operations on small enough objects are automatically unrolled by template metaprograms
- STL-compatible iterators
- Gauss-Jordan-Elimination
- LU decomposition
- Singular value decomposition
- Linear Least Squares Fitting method(s)
- Nonlinear Least Squares Fitting methods(s)

Additionally, there are some utility classes providing:

- command line and config file parsing
- output formatting utilities
- date format handling