Hi!
I am using the Boost uBlas interface for matrices and I'd like to be able to create matrices with the following syntax (or similar):
typedef boost::numeric::ublas::matrix<double> Matrix; //for clarity
Matrix mat = {[1,1,1],[2,2,2],[3,3,3]};
The actual matrix should be 3x3 and look like the following -
1,1,1
2,2,2
3,3,3
Anything along the same lines would be great, say, {1,1,1; 2,2,2; 3,3,3}. Out of curiosity, is this even possible?
The only way I know how to create a matrix at the moment is by assigning each element individually, which is a bit if a faff even with loops.
Thank you for reading :)
Patrick