Linear algebra library for C++, created to accompany the corresponding series of videos on the QuantitativeBytes YouTube channel at:
www.youtube.com/c/QuantitativeBytes.
Many excellent linear algebra libraries already exist for C++ and as such this code is intended to be primarily for educational purposes, rather than as an alternative to those. It is intended to be studied alongside the corresponding series of videos on the QuantitativeBytes YouTube channel, the full playlist for which can be found here:
https://www.youtube.com/playlist?list=PL3WoIG-PLjSv9vFx2dg0BqzDZH_6qzF8-
As this code is paired with the corresponding videos on the QuantitativeBytes YouTube channel, pull requests will not be accepted.
Implementation of Principal Component Analysis (PCA).
Function to perform QR decomposition on the given matrix, returning an orthogonal matrix, Q, and an upper-triangular matrix, R. Uses the method of Householder reflections to perform the decomposition.
Functions for computing the eigenvectors and eigenvalues for a given matrix. Contains an implementation of the power iteration method for computing the dominant eigenvector, the inverse-power-iteration method and an implementation of the QR algorithm to estimate eigenvalue / eigenvector pairs for a given symmetric matrix.
Function for solving systems of linear equations. Uses an implementation of Gaussian elimination and back-substitution.
Function for computing the linear least squares solution to an over-determined system of linear equations.
Class for handling matrices. Implements a number of useful functions:
Compute the inverse of the matrix using the Gauss-Jordan elimination method.
Convert the matrix to row echelon form.
Transpose the matrix.
Compute the determinant of the matrix.
Class for handling vectors. Implements a number of useful functions:
Returns a normalized copy of the vector.
Normalizes the vector 'in-place'.
Computes the vector dot product.
Computes the vector cross product.