Matrix View
Matrix operations
Overview

This library implements a class similar to the GNU Scientific Library matrix_view. It points to a section of a C++ vector and interprets that section as a matrix. Matrix manipulations can then be done as usual. The matrices are column-major. See documentation for the available methods. Matrix dimensions are checked when necessary, unless the -DPKG_DEBUG_OFF compiler flag is set.

Dependencies

BLAS/LAPACK

Interfaces to a subset of BLAS and LAPACK routines is available. People prefer a variety of implementations of these libraries. I have two built-in possibilities:

  • Using the libraries included with R, useful for writing R extensions.
  • Using a stand-alone library, in particular Intel's Math Kernel Library. To use this option, include the -DNO_REXT compilation flag and make sure MKL is visible to the compiler.

Using other libraries is also possible, but you may need to modify the #include statement for BLAS and LAPACK. If you want to use CBLAS, you may also need to modify routine names.

Utilities

The implementation depends on a set of numerical utilities that I collected in the bayesicUtilities repository. I assume that the utilities are available in a bayesicUtilities directory at the same level as bayesicMatrix. This can be changed by modifying the #include path.