why not simply put your matrices into a vector:
std::vector<matrix<T>> multi;
You can then access to any element like this:
multi(i)(j,k)
and work on single matrices like that, for example:
matrix<T> result = multi(i) + multi(j);
The first dimension will always reference a matrix and the two inner dimensions are coordinates in your matrix.
Then all possible combinations are possible:
vector<T> v = my_vector + row(multi(i) , t);
T p = inner_prod(v , col(multi(i), t);
etc....
Hope it helps.
David
--
David Bellot, PhD
david.bellot@gmail.com
http://david.bellot.free.fr