Strictly taken, no. However, I am using 3 x 3 matrixes for the most part, and some irregular matrices for the other. Everytime I have a Matrix object inside my class, I need a dedicated constructor call to resize the matrix so it can contain 3 x 3 elements, which is tedious. Plus, having a dedicated Matrix3D class serves clarity, I can immediately see and be certain that this matrix contains 3 x 3 elements with a minimum of effort.hmm... is there even a need for Matrix3D in the first place?
Though of that myself, but that means that I change the contents of the matrix which is not what I want. Therefore I have to create a new matrix manually, which is a possibility, but is tedious again. Consider the case where I use this matrix in a larger expression. I would have to create a separate statement in which to create the transpose matrix, which does not serve clarity IMO.Anyway, one simple solution is to have transpose() return void, and change it to transpose the object itself.