I currently have a matrix class which is a std::vector<std::vector<double>>. I also have a vector class (not to get confused with stl's vector its more of math's vector of 1,2,3 .. dimension) which is a std::vector<double>.
After I made these two class I came into problem since now I wanted to do tmp_vector*tmp_matrix but since they are of different type I was not able to do it.
So my question is:
What would be a appropriate design choice?
- Should I inherit both
matrixandvectorfrom same class (lets say for examplematvecclass which is just a empty class) or - should I inherit vector from matrix class (Here I am inheriting vector from a heavy
matrixclass)