What is reusable code? Is it a template to base projects on or single piece of code used in multiple programs? Microsoft seems confused.
Still to come
With the functions in SimpleMat.cpp, we have most of the matrix operations we may ever need. Not all, however. The world of matrix algebra is particularly rich in mathematical operations. One that comes to mind is matrix diagonalization, which I'll be adding later. There are other operations that we may never add. Many special classes of matrices exist, including diagonal, triangular, tridiagonal, and symmetric, to name a few. Each of these classes has its own set of specialized operations, and many numerical systems directed at matrix algebra include a host of such operations. For my matrix class, I aim to keep my focus on the general form of the matrix and let the operations on that class suffice.
In this issue, I've concentrated on the new file, SimpleMat.cpp. Next time, we'll get back to the C++ class called Matrix. I think you'll find that, armed with the functions in SimpleMat.cpp (available on www.embedded.com/code/2008code.htm), additions to that class will go smoothly. See you then.
Jack Crenshaw is a systems engineer and the author of Math Toolkit for Real-Time Programming. He holds a PhD in physics from Auburn University. E-mail him at jcrens@earthlink.net. For more information about Jack click here