Each matrix class has a conversion operator so that the programmer can explicitly cast one type of matrix to another (the casting is done by copying). It would have been possible to make conversions occur automatically when needed, but because these conversions can be quite extensive for large matrices and because unexpected results might occur if the programmer did not intend for a conversion to occur, the conversions have to be used explicitly.
operator XXXMatrix () const
Example: FloatMatrix C = A * (FloatMatrix)B;
Convert a matrix of one type into another. These conversions allow the various arithmetic operators, such as * and +, to be used on matrices of different type. For example, if A in the example above is a (3, 3) FloatMatrix and B is a (3, 2) IntMatrix, then C is a FloatMatrix with dimensions (3, 2).