Boost logo

Ublas :

Subject: [ublas] triplets for CSR format
From: Umut Tabak (u.tabak_at_[hidden])
Date: 2011-01-02 17:07:16

Dear all,

Digging through the previous posts, found out that (maybe the direct
answer is there but I am a bit tired of going in between messages)


return the native CSR format, is there a way to reach the array format
of the index1_data, say directly the row array, because index1_data()
returns the row_ptr, so then I should do some manual tweaking and
wondered if there is a direct way that gives me these triplets.

Second question is on the retrieval of data from the above functions, by
a bit of trial and error, I found out that this works, naive perhaps,
not sure...

    std::vector<int> rowIndx;
    std::vector<int> colIndx;
    std::vector<double> vals;

however I could not find where the above mentioned functions are
implemented, they are some kind of sequences, where begin() and end()
functions are defined but is this the right way to use these functions
to get the triplets for a matrix market export operation?

Best regards,