I'm doing some linear algebra math, and was looking for some really lightweight and simple to use matrix class that could handle different dimensions: 2x2, 2x1, 3x1 and 1x2 basically. I presume such class could be implemented with templates and using some specialization in some cases, for performance. Anybody know of any simple implementation available for use? I don't want "bloated" implementations, as I'll running this in an embedded environment where memory is constrained.
Thanks
How about just store the matrix in an array, like
This is really simple, and addition operations are trivial. However, you need to write your own multiplication function.
Another option, altough may be too late is:
https://launchpad.net/lwmatrix