Mark Bishop

Analytical Chemistry and

Signal Acquisition/Analysis



Matrix Computations

This section presents Java implementations of matrix computation algorithms and improves code included in an original document that presented the material together with implementations in C#.Net: Implementing Matrix Computation Algorithms, (2007), Mark Bishop, New England Testing Laboratory, Providence, RI.

Implementing Matrix Computation was developed with the following primary reference: Matrix Computations 3rd Edition by Gene H. Golub and Charles F. Van Loan (Johns Hopkins University Press, Baltimore, 1996).

The CPU implementations manage matrices as row-major float[m][n] arrays, where m = row count and n = column count. Vectors are represented as float[n] arrays. To be compatible with NVidia Cuda, the GPU implementations use column-major, vector representations of matrices, but convenience methods are provided in the classes for passing row-major float[][] objects to the GPU methods. The implementations are literal translations of pseudo code and are not production-optimized.

In certain cases the methods return result objects that contain multiple result components arranged in object lists or arrays of float[][].

These include: