Lapack

Table of Contents

The Lapack class

Introduction

LAPACK is written in Fortran 90 and provides routines for solving systems of simultaneous linear equations, least-squares solutions of linear systems of equations, eigenvalue problems, and singular value problems. This extension wraps the LAPACKE C bindings to allow access to several processes exposed by the library. Most functions work with arrays of arrays, representing rectangular matrices in row major order - so a two by two matrix [1 2; 3 4] would be array(array(1, 2), array(3, 4)).

All of the functions are called statically, for example $eig = Lapack::eigenvalues($a);

Class synopsis

Lapack
class Lapack {
/* Methods */
public static array eigenValues ( array $a [, array $left [, array $right ]] )
public static array identity ( int $n )
public static array leastSquaresByFactorisation ( array $a , array $b )
public static array leastSquaresBySVD ( array $a , array $b )
public static array pseudoInverse ( array $a )
public static array singularValues ( array $a )
public static array solveLinearEquation ( array $a , array $b )
}

The LapackException class

Introduction

Exception thrown when an error is caught in the LAPACK functions

Class synopsis

lapackexception
class lapackexception extends Exception {
/* Inherited properties */
protected string $message ;
protected int $code ;
protected string $file ;
protected int $line ;
/* Inherited methods */
final public string Exception::getMessage ( void )
final public Exception Exception::getPrevious ( void )
final public mixed Exception::getCode ( void )
final public string Exception::getFile ( void )
final public int Exception::getLine ( void )
final public array Exception::getTrace ( void )
final public string Exception::getTraceAsString ( void )
public string Exception::__toString ( void )
final private void Exception::__clone ( void )
}