Re: bug on compressed_matrix ?

Riccardo Rossi <[email protected]>
Newsgroups gmane.comp.lib.boost.ublas
Message-ID <CAOVdALzzhDnhAKL=39N4YfO8qjyu7UaF9x6vOiwNENWU+kSPDg@mail.gmail.com>
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 <[email protected]
> 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
> [email protected]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
> Sent to: [email protected]
>

_______________________________________________
ublas mailing list
[email protected]
http://lists.boost.org/mailman/listinfo.cgi/ublas
Sent to: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.