Skip to content

aloispichler/Matrix-Class

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Matrix-Class

Matrix Class for C++ including a stable and smart inverse.

Efficient implementation of a C++ matrix (and vector) class. The implementation provides the following operators on matrices and vectors:

+ adds matrices or vectors,

+ adds a scalar to a vector,

+ adds the identity matrix,

- subtracts matrices or vectors,

- subtracts a scalar from a vector,

- subtracts the identity from the matrix,

* multiply matrices,

/ solves a linear system: this main implementation of the class employs Householder reflections (one of the top 10 algorithms of the 20th century) to efficiently find the solution of the linear system A*x= b. The rank-revealing implementation works for rank deficient and rectangular matrices. For regular matrices, the solution is x= A-1 b; for singular matrices, x= A+b, where A+ is the generalized inverse of the possibly rank deficient matrix A. The second decomposition is efficient by exploiting the structure of the resulting matrix. The decomposition can be reused (recycled). The complete orthogonal decomposition pivots the rows, cf. notes.

Invoke the library by calling

#include "matrix.h"

About

Matrix Class for C++ including a stable and smart inverse

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages