Boost logo

Ublas :

Subject: Re: [ublas] bug on compressed_matrix ?
From: Riccardo Rossi (rrossi_at_[hidden])
Date: 2013-01-16 13:32:21


i am kind of shocked...

doesn't ublas guarantee the exact csr format???

Riccardo

On Wed, Jan 16, 2013 at 6:27 PM, Thomas Klimpel <Thomas.Klimpel_at_[hidden]
> wrote:

> Hoang Giang Bui wrote:
> > After fill I tried to print out the values of index1_data and
> > index2_data and observe different results with the inputs.
> > [...]
> > In this case, which should be the reason for such behaviour?
>
> You probably have a wrong expectation with respect to the member functions
> "index1_data()" and "index2_data()". The member functions "filled1()" and
> "filled2()" could help clear the confusion.
>
> Your expectation is probably
> P. index1_data().size() == P.filled1()
> P. index2_data().size() == P.filled2()
> but this is false.
>
> I suggest you replace
> std::copy(P.index1_data().begin(), P.index1_data().end(),
> std::ostream_iterator<int>(std::cout, " "));
> by
> std::copy(P.index1_data().begin(),P.index1_data().begin()+P.filled1(),
> std::ostream_iterator<int>(std::cout, " "));
> and similarly for index2_data. Perhaps this will improve the match between
> your expectations and the actual results.
>
> Regards,
> Thomas
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
> Sent to: rrossi_at_[hidden]
>