- Hi all,

I wrote:

> > Here is the test case I promised. It shows up the problem when tested

OK, I've investigated that problem and it turned out to be a problem in

> > using uBLAS in boost CVS. The equals(m,cm) check in a debug build picks

> > up the problem. These postcondition checks are very useful!!)

> >

> > {

> > typedef sparse_matrix<float> MS;

> > matrix<float> m(3,3);

> > m(1,0) = 1; m(0,1) = 1; // numerically symmetric

> >

> > MS ms(3,3);

> > ms.plus_assign (m); // ok

> > ms.assign (m); // ok

> >

> > // Check that elements can be access via symmetric_adaptor

> >

> > symmetric_adaptor<MS> sms(ms);

> > sms.plus_assign (m); // BADNESS

> > sms.assign (m); // ok

> > }

> >

> >

> > The line label BADNESS will dispatch into the sparse(lvalue)

> > proxy(rvalue) assign algorithm. This uses the definition of an iterator

> > in a sparse storage type. It therefore applies the functional operator

> > to all non-zero elements. This results in the function (plus in this

> > case) being to both halves of the symmetric matrix and thus twice to any

> > off diagonal element. Opps!

>

> Confirmed. I had to change the behaviour regarding sparse proxies back to

> boost_1_29_0 semantics (disabling

>

> // #define BOOST_UBLAS_NON_CONFORMANT_PROXIES

>

> and adding some bug fixes) and this test case works (again ;-(.It looks as

> if we'd have to reconsider the discussion started here

>

> http://groups.yahoo.com/group/ublas-dev/message/144,

>

> especially as I found some performance related problems with the extended

> evaluators when testing with Alexei's symmetric sparse matrix tests, too

> (sorry for not reporting them).

zero_matrix's find() functions. Fixed in my newest upload.

> Is it possible that requiring sparse proxy assignment to have structural

Hm. Still unsure about this. I think I first should try to fix Michael's

> conforming lhs and rhs (i.e. the index set of the rhs is contained in the

> index set of the lhs) is the best we can achieve generically?

problem.

Best,

Joerg - Hi Michael, hi all,

I wrote:

> > > Here is the test case I promised. It shows up the problem when tested

picks

> > > using uBLAS in boost CVS. The equals(m,cm) check in a debug build

> > > up the problem. These postcondition checks are very useful!!)

iterator

> > >

> > > {

> > > typedef sparse_matrix<float> MS;

> > > matrix<float> m(3,3);

> > > m(1,0) = 1; m(0,1) = 1; // numerically symmetric

> > >

> > > MS ms(3,3);

> > > ms.plus_assign (m); // ok

> > > ms.assign (m); // ok

> > >

> > > // Check that elements can be access via symmetric_adaptor

> > >

> > > symmetric_adaptor<MS> sms(ms);

> > > sms.plus_assign (m); // BADNESS

> > > sms.assign (m); // ok

> > > }

> > >

> > >

> > > The line label BADNESS will dispatch into the sparse(lvalue)

> > > proxy(rvalue) assign algorithm. This uses the definition of an

> > > in a sparse storage type. It therefore applies the functional operator

any

> > > to all non-zero elements. This results in the function (plus in this

> > > case) being to both halves of the symmetric matrix and thus twice to

> > > off diagonal element. Opps!

to

> >

> > Confirmed. I had to change the behaviour regarding sparse proxies back

> > boost_1_29_0 semantics (disabling

as

> >

> > // #define BOOST_UBLAS_NON_CONFORMANT_PROXIES

> >

> > and adding some bug fixes) and this test case works (again ;-(.It looks

> > if we'd have to reconsider the discussion started here

extended

> >

> > http://groups.yahoo.com/group/ublas-dev/message/144,

> >

> > especially as I found some performance related problems with the

> > evaluators when testing with Alexei's symmetric sparse matrix tests, too

the

> > (sorry for not reporting them).

>

> OK, I've investigated that problem and it turned out to be a problem in

> zero_matrix's find() functions. Fixed in my newest upload.

>

> > Is it possible that requiring sparse proxy assignment to have structural

> > conforming lhs and rhs (i.e. the index set of the rhs is contained in

> > index set of the lhs) is the best we can achieve generically?

I tried that and just uploaded a new version to the files section which

>

> Hm. Still unsure about this. I think I first should try to fix Michael's

> problem.

fixes the original problem, too.

Best,

Joerg