|
Ublas : |
From: choon (teochoonhui_at_[hidden])
Date: 2007-07-08 08:35:16
hi,
Gunter Winkler wrote:
>
> Am Donnerstag, 5. Juli 2007 12:42 schrieb choon:
>
>> //cout << ublas::inner_prod(v1,v2) << endl; // <-- failed to
>> compile
>
>> cout << ublas::inner_prod(v1,v3) << endl; // <-- this
>> works; feature or bug?
>
> The cause of this behavior is that the vector implementation is
> essentially a loop: for ( i=0; i < result.size(); ++i ) ...
> Thus the size is checked before computation. The sparse implementation
> is based on forward iterators. Thus there is no size check. I can
> simply add the check if necessary.
>
>
It will be nice to have an assertion check ;-)
Thanks,
Choon
-- View this message in context: http://www.nabble.com/bug-in-sparse-vector-inner-product--tf4028960.html#a11488406 Sent from the Boost - uBLAS mailing list archive at Nabble.com.