NTmatrix (formerly CLmatrix v1.0) is a C++ class for defining matrix objects of various dimensions and performing elementary operations between and on matrix objects. Currently supported operations include addition (+), subtraction (-), multiplication (*), assignment (=), transposition (!=), and trace. Addition and subtraction can be performed between matrices of equal dimensions, or a matrix and a vector with the same number of elements as the matrix has rows. Multiplication can be performed between two matrices where the number of columns of the left-hand matrix equals the number of rows of the right-hand matrix, or between a matrix and a scalar where the scalar is the right-hand argument.
The goal of this class is to simplify operations on and between matrices that otherwise require nested for loops and keeping track of matrix dimensions. If you have ever coded a simulation in state space before, you know that matrix multiplication can be a headache, and if you decide to change the dimensions of your matrices you have to change it everywhere in your code by hand. With this class you simply update the object definitions and everything should work.
I welcome improvements and additions to the code. Please let me know if you have any suggestions for added functionality, and please send me any upgrades you come up with so I can provide the best version to everybody.
I will continue to update it as I make improvements and additions.