|
Ublas : |
From: Markus Weimer (markus.weimer_at_[hidden])
Date: 2007-05-20 21:39:31
Hi,
the following code works:
template < class M >
void printDimensions(const matrix_expression<M>& m){
cout << (m()).size1() << "x" << (m()).size2() << endl;
}
Note the extra () around m(). This makes all the difference.
However, this is not what I want. I want to be sure that a matrix of
double is passed, but that matrix can be of arbitrary type (sparse /
dense). How can I achieve that?
Thanks for all your replies!
Markus