Lapack++ v2.5.2 API Documentation


Download page:

LAPACK++ is a library for high performance linear algebra computations. This version includes support for solving linear systems using LU, Cholesky, QR matrix factorizations, and symmetric eigenvalue problems.

Quick Start

The most important classes in this library are

You can create objects of that type by the constructors, or by the static constructors for elementary matrices (e.g. LaGenMatDouble::zeros), or by the template functions in latmpl.h .

Then you will probably want to use matrix-vector operations from the BLAS library. These can be found in the files blas1pp.h , blas2pp.h , and blas3pp.h (e.g. Blas_Mat_Mat_Trans_Mult).

And finally functions for solving equation systems can be found in laslv.h . SVN decomposition in lasvd.h . QR decomposition in LaGenQRFactComplex .

Note: To switch on the support for complex-valued matrices, you need to define the macro LA_COMPLEX_SUPPORT in your application.


LAPACK++ v2.5.2 has been successfully compiled on the following platforms:

If you have compiled LAPACK++ on another platform successfully, then the maintainer would be glad to hear about that.

Some similar functionality as in LAPACK++ is offered by the library IT++, see , but one important high-performance feature missing in IT++ is the ability to create "submatrix views" and "shallow copies" of matrices, i.e. pass submatrices by reference instead of by value.


This package requires the packages "blas", "lapack" (without the "++"), and a Fortran compiler. On most Linuxes these are available as pre-compiled binaries under the name "blas" and "lapack". For SuSE 10.x, the Fortran compiler is available as package "gfortran". For SuSE 9.x, the Fortran compiler is available as package "gcc-g77".

Compile and Install


On Windows, an .exe setup package with the pre-compiled DLL is provided. Watch out: This DLL works only with the gcc compiler, not with the Microsoft Visual Studio C++ (MSVC) compiler!

For compiling on Windows with the Microsoft Visual Studio C++ (MSVC) compiler:

1. Install the .exe setup package because it contains the auxiliary libraries LIBBLAS32.LIB and others. The linker library LIBBLAS32.LIB and LIBLAPACK32.Lib is installed into c:\Program-Files\Lapackpp\lib\ whereas the corresponding LIBBLAS32.DLL and LIBLAPACK32.DLL are installed into your Windows system directory, e.g. c:\WINNT. These files are unchanged since years, so you can safely use these four files from an earlier release of lapackpp to compile a newer release from source code.

2. Unpack the tar.gz package with the source code, and

3. compile the source code using the provided lapackpp.vcproj MSVC project file, which will also compile two small test programs. You might have to adapt the linker input directories (Project Properties -> Linker -> Input) so that the LIBBLAS32.LIB linker library can be found in c:\Program-Files\Lapackpp\lib\.

4. After successfully compiling the DLL, you need to copy the LAPACKPP.DLL file to whatever location you consider appropriate. This can either be your c:\WINNT directory, or the working directory of your actual application that should use lapackpp.

Note: This has been tested only with MSVC 7.1. In older MSVC versions, lapackpp probably doesn't compile anymore. This might be due to problems with the data types for complex-valued matrices, and in that case you can try to compile the real-valued matrices only by using the included project file lapackpp-onlyreal.vcproj.

For compiling on windows with gcc/mingw32 compiler, see README.WIN32.


If you retrieved this package from CVS, you first need to run ./ and continue with compilation after that.

For compilation, run the following commands:

  ./configure --prefix=/your/install/path
  make install

Type ./configure --help to see more information. After successful compilation, you can run various test programs by the command "make check".


The documentation is in the header files. The comments in the header files are used by the doxygen tool for this auto-generated HTML documentation, see e.g. LaGenMatComplex, Blas_Add_Mult, Blas_Mat_Vec_Mult, Blas_Mat_Mat_Mult, LaLinearSolveIP, or LaSVD_IP.

Documentation for the underlying LAPACK (without the '++') package can be found on and a search engine is on , but please keep in mind that these are only the underlying libraries, not Lapack++ itself.

LAPACK routines in turn are written so that as much as possible of the computation is performed by calls to the Basic Linear Algebra Subprograms (BLAS). Information about BLAS can be found on and , but please keep in mind that these are only the underlying libraries, not Lapack++ itself.

There is some old, outdated information about the original LAPACK++-1.1 in the LAPACK++ User's Manual and Class Reference Manual, all available from or on , but please keep in mind that this is old and outdated!

Library Usage

The resulting shared library is called "" or, on Windows, "liblapackpp32.dll".

To use it in your program, you need to specify the location of the header files by the compiler argument -I (for gcc), the location of the shared library by the compiler argument -L and the library itself by -llapackpp . All of these arguments can be obtained from the pkg-config helper program, see "man pkg-config". A linker command might look like this:

  gcc `pkg-config lapackpp --libs` foo.o

If your application uses autoconf/automake, these compiler arguments can alternatively be obtained from the ACX_LAPACKPP macro from macros/acx_lapackpp.m4. A linker command might look like this:

  gcc -L/usr/local/lib -llapackpp foo.o

To switch on the support for complex-valued matrices, you need to define the macro LA_COMPLEX_SUPPORT in the source code of your application.

Related projects CVM Class Library with a long history of improvements Recently started; only low-level classes

LAPACK++ v1.1 vs. v1.9 and higher

The original LAPACK++ (up to v1.1a) has been written by R. Pozo et al. at the University of Tennessee, Knoxvilee, TN., and Oak Ridge National Laboratory, Oak Ridge, TN, and is available on

However, they abandoned LAPACK in the year 2000 and stated: "Lapack++ is no longer actively supported. The successor to this project is that Template Numerical Toolkit (TNT), see for details." Unfortunately, the project TNT never really took off.

Therefore this fork from the original LAPACK++ has been started. There are a whole number of changes now in here. Most notably, this local copy has complex matrices enabled again by adding a custom copy of stdc++'s complex type (see include/lacomplex.h and include/lacomplex).

Along these lines, wrapper functions for more and more LAPACK and BLAS routines have been added. Also, this includes fixes in various wrong default arguments.


LAPACK++ v. 1.9 supports various matrix classes for vectors, non-symmetric matrices, symmetric positive definite (SPD) matrices, symmetric matrices, banded, triangular, and tridiagonal matrices; however, Version 1.1 does not include all of the capabilities of original f77 LAPACK. Emphasis is given to routines for solving linear systems consisting of non-symmetric matrices, symmetric positive definite systems, and solving linear least- square systems.

2004-01-14, Christian Stimming <>

Generated on Sat Jul 14 11:40:36 2007 for Lapack++ by  doxygen 1.5.0