From: Gunter Winkler (guwi17_at_[hidden])
Date: 2005-06-23 04:53:21
On Thursday 23 June 2005 10:46, Vardan Akopian wrote:
> diagonal_matrix<double> z(sz), x(sz);
> matrix<double> y(sz, sz);
> matrix<double> B = prod(z, x - y);
the assignment is dispatched to the packed_proxy case, but IMHO it should be
dispatched to the dense proxy case. (AFAIK banded * dense gives dense?)
> A is computed correctly, while B is not (they should be equal). Am I
> doing something wrong/illegal? I've tested this with boost version
> 1.32.0 and the CVS head; gcc 3.4.3 and gcc 4 under Linux.
confirmed. The computation/assignment is broken.
> Interestingly, when NDEBUG is off, ublas's internal runtime check
> catches the problem with an assertion failure:
> Assertion failed in file
> ../../../../boost_1_32_0/boost/numeric/ublas/matrix_assign.hpp at line
> equals (m, cm)
> terminate called after throwing an instance of
> what(): external logic
That means, that ublas internal checks work perfectly and inform the user
about a broken algorithm.
> I'd be very interested if someone would confirm and/or propose a fix.
I'll have a look at this...
PS: please subscribe to the list.