B
bluekite2000
I d rather have a Matlab syntax such as:
// create a Matrix of size 3,4 and fills it w/ random values.
Matrix<double> M=rand(3,4)
But since this function changes the state of the object, I ought to
make it a member function.
ie.
Matrix<double> M(3,4);
M.rand();
which I dont really like too much.
What is my best option (while maintaining a matlab-like notation)?
// create a Matrix of size 3,4 and fills it w/ random values.
Matrix<double> M=rand(3,4)
But since this function changes the state of the object, I ought to
make it a member function.
ie.
Matrix<double> M(3,4);
M.rand();
which I dont really like too much.
What is my best option (while maintaining a matlab-like notation)?