Spectator Global Risk Conference

The boost Library Part II: Linear Algebra and Matrices

The boost.uBLAS library supports vector and matrix data structures and basic linear operations on these structures. The syntax closely reflects mathematical notation because operator overloading is used to implement these operations. Furthermore, the library uses expression templates to generate efficient code. The library has been influenced by a number of other libraries such as BLAS, Blitz++, POOMA and MTL and the main design goals are:

. Use mathematical notation whenever appropriate

. Efficiency (time and resource management)

. Functionality (provide features that appeal to a wide range of application areas)

. Compatibility (array-like indexing and use of STL allocators for storage allocation)

The two most important data structures represent vectors and matrices. A vector is a one-dimensional structure while a matrix is a two-dimensional structure. We can define various vector and (especially) matrix patterns that describe how their elements are arranged in memory; examples are dense, sparse, banded, triangular, symmetric and Hermitian. These patterned matrices are needed in many kinds of applications and the can be used directly in code without you having to create them yourself. Furthermore, we can apply primitive operations on vectors and matrices:

Addition of vectors and matrices Scalar multiplication Computed assignments Transformations Norms of vectors and matrices Inner and outer products

We can use these operations in code and applications. Finally, we can define subvectors and submatrices as well as ranges and slices of vectors and matrices. Vectors and matrices are fundamental to financial and scientific applications and having a well-developed library such as boost.Tuple with ready-to-use modules will free up developer time. Seeing that matrix algebra consumes much of the effort in an application we expect that the productivity gains will be appreciable in general.

The applications of this library to PDE, Monte Carlo and other problems in computational finance are immediately obvious.See

http://www.datasimfinancial.com/forum/viewtopic.php?t=111