Boost logo

Ublas :

Subject: Re: [ublas] Is coordinate_matrixelement assignment/insertion broken in 1.42?
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2010-03-01 03:15:34


Jesse Perla wrote:

> It looks to me like some weird problems are happening with the
> sorting/binary search of elements on element access rather than on setting
> the values. However, after setting a value a flag tells the matrix to
> re-sort upon next access. But I am having trouble tracking down... any
> ideas
> on this?. The new test file that I am attaching gives a little more
> detail
> on the tracking down the problem. I am also attaching the output on mingw
> and intel 11.1.

Weird stuff... On my machine it runs as expected, see below. The size 3 of
the arrays seems to be the same as the code, it's max(size1,size2,nnz).
Perhaps it would be best if a ublas guru would take a look at it...

Cheers,

Rutger

----
Setting matrix(1,1) = 2.1
Displaying matrix(1,1)
2.1
Displaying indices1, indices2, and values_data.  Why are there 3?  May be a 
red herring
1,0,0,
1,0,0,
2.1,0,0,
Setting matrix(0,1) = 1.1
Displaying indices1, indices2, and values_data.  Looks OK to me.
1,0,0,
1,1,0,
2.1,1.1,0,
Sorting the matrix, which would be triggered pre-lookup.
Displaying indices1, indices2, and values_data.  Messed up now after the 
read.
0,1,0,
1,1,0,
1.1,2.1,0,
Displaying matrix(1,1).  This might be doing a sort that breaks the values?
2.1
Displaying indices1, indices2, and values_data.  Messed up now after the 
read.
0,1,0,
1,1,0,
1.1,2.1,0,