
Boost : 
From: Julius Muschaweck (muschaweck_at_[hidden])
Date: 20030201 03:51:48
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
PaulGerhardtAllee 42
81245 Muenchen, Germany
Phone: +49 89 82005030
Fax: +49 89 82005041
email: <muschaweck_at_[hidden]>
Internet: www.oec.net
______________________________________________________
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk