I need to pass ublas::matrix data to a legacy C API which expects
input in the form:
void doSomething(double* data,...);
If I have a std::vector<doublemyA this is easy. I do:
doSomething(&myA[0],...);
I am not sure what to do with my ublas::matrix<doublemyB?
I tried:
matrix_column<matrix<double x1(myB, 0); //get a proxy to the
1st column
doSomething(&x1[0],...);
but this results in a "differs in levels of indirection from
'boost::numeric::ublas::matrix_column<M>" error. Is there a way to do
this without copying to another data strucutre before passing?
Thanks,
Sanjeev