@gradCodeMonkey said:
It turns out that they have
lots of different classes for the matrices. As a matter of fact if
you do anything to a matrix it returns a different type. Some
examples:AddedMatrix
MultipliedMatrix
SubtractedMatrix
ConcatenatedMatrix
StackedMatrix
ShiftedMatrix
ScaledMatrix
TransposedMatrix
etc.
In C++, this may be used for some optimizations. For example, multiplying two transposed matrices can be provided as a single function, simply by defining the operator * for two TranspsedMatrix input arguments. This avoids the generation of temporary objects. The method isn't exotic at all; I read about it in Stroustrup (the C++ bible!).
It's possible that modern compilers can do these optimizations without specialized definitions. But if the library had been written some time ago, it may have been a perfectly valid approach.