Boost logo

Boost Users :

From: Tinne De Laet (tinne.delaet_at_[hidden])
Date: 2007-08-13 08:55:04


Hi,

While using the most recent version of Boost (boost_1_34_1) I noticed some
problems when resizing a symmetric matrix. I included a test program to
illustrate the problems.
(Recent SVN snapshots and boost 1.33 have the same problem)

When executing I get the following error caused by resizing the symmetric
matrix with the preserve option set to true:

Resize ml to bigger size
Check failed in
file /home/fiep/sources/boost_1_34_1/boost/numeric/ublas/storage.hpp at line
196:
i < size_
terminate called after throwing an instance
of 'boost::numeric::ublas::bad_index'
  what(): bad index
Aborted (core dumped)

Note that are no problems when resizing normal matrices nor resizing symmetric
matrices when the preserve option is set to false.

When stepping into the program, it seems that something goes wrong with the
indexing of the symmetric matrix.
I suspect that problems are caused by the use of the matrix_resize_preserver
routine which is called in case the preserve option is set to true. I think
this routine is designed for normal matrices only and expects a matrix which
is completely filled as opposed to a symmetric matrix in which only one
triangle is filled.

Do I use the library in a wrong way or might this be a BUG?

Kind regards,

Tinne De Laet

_______________________________________

Tinne De Laet
Department of Mechanical Engineering - PMA
Katholieke Universiteit Leuven
Celestijnenlaan 300B - bus 2420
3001 Heverlee
Tel: +32 (0)16 32 25 33
http://people.mech.kuleuven.be/~tdelaet/

_______________________________________

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm




Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net