Boost logo

Ublas :

From: Steve Taylor (steve41412895_at_[hidden])
Date: 2006-11-06 14:16:07


Hi.

I'm trying to store a rather large dataset into a 480189 x 17770
mapped_matrix. The problem is that mapped_matrix generates a key to the
element by multiplying the row index by the row width and adding the column
index. This causes a bad_index exception to be raised from functional.hpp
(line 1397 in boost 1.33.1).

One of two things should be changed:
1. When creating a mapped_matrix of specified dimensions, those dimensions
should be checked in the same way as in line 1397 of functional.hpp.
2. Another template parameter should be added to allow a different type
other than std::size_type to be used.

I very much prefer option 2. It's not very space-efficient to have keys
larger than size_type for large datasets of small elements, but it would
still be nice to have that as an option. I'm just surprised that I can
create a really big matrix, but I'm not allowed to put anything in the
bottom half of it.

- Steve

_________________________________________________________________
Advertisement: Win two gold tickets to see Robbie Williams live!
http://ninemsn.com.au/share/redir/adTrack.asp?mode=click&clientID=729&referral=hotmailtagline&URL=http://music.ninemsn.com.au/compIntro.aspx?compId=298