Hi Joerg and everybody,

now that sparse matrix_row's works with Joerg's latest CVS upload (thanks Joerg), a const& parameter that used to work with 1_29_0 doesn't anymore:

using namespace boost::numeric;
typedef ublas::matrix<double> TM;

double InnerProdConst( const TM& A, const ublas::vector<double>& x )
{
return ublas::inner_prod( ublas::matrix_row< const TM >( A, 2 ), x );
}

VC++.NET complains that some internal conversion loses qualifiers,
This does compile with a non const matrix reference parameter, the same is true if I use a sparse_matrix or a compressed_matrix. I didn't try the other matrix types, but since this breaks with three matrix types, it looks like it has to do with matrix_row itself.

I think this should work with const&'s since inner_prod is non mutating. I'd like to keep the const&'s.

Joerg: You suggested using compressed_matrix instead of sparse_matrix in your recent response to my matrix_row access problem. I couldn't find much in the documentation about the pros and cons of either type. Can you give me hint where to look for more information? Thanks.

Julius




Julius Muschaweck

_____________________________________________________
OEC AG
Paul-Gerhardt-Allee 42
81245 Muenchen, Germany

Phone: +49 89 820050-30
Fax: +49 89 820050-41
e-mail: <[EMAIL PROTECTED]>
Internet: www.oec.net
______________________________________________________

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to