Hi Roland, you wrote:
I am trying to find a good choice for argument types to a function.
(Please be patient, I am a poor user of C++ who has not yet understood all this expression template magic.)
I'd like to have a function:
void foo( whattype arg) { }
matrix<double> m(3,3); vector<double> v(6);
and call it like:
foo(m.column(0)); foo(m.row(0)); foo(v);
Is this feasible?
I'd tend to use template<class E> void foo (vector_expression<E> &arg); or template<class E> void foo (const vector_expression<E> &arg);
Should I use iterators for whattype?
Unsure about that.
(how do I access size information then?)
it ().size ();
Am I trying to misuse the ublas when asking such a question?
Nope.
(Which container should I use in this case?)
No need to copy yet.
In the hope anyone can shade some light on it.
HTH, Joerg