From: Georg Baum (Georg.Baum_at_[hidden])
Date: 2007-06-08 13:04:18
Am Freitag 08 Juni 2007 18:48 schrieb Nico Galoppo:
> I'm currently looking into writing a routine to convert a ublas type
> sparse matrix into a typical (row-oriented) compressed row storage (CRS)
> format, more specifically into a three arrays (values, columns & rowptr).
> Before I do so, I wanted to check with the list if this data is perhaps
> immediately available from the underlying storage in either
> compressed_matrix<> or coordinate_matrix<>? (their difference is unclear
> to me from the documentation).
compressed_matrix<> uses exactly that format (if instantiated with the
correct template arguments), and it also has accessors for the arrays:
index1_data(), index2_data() and value_data(). Don't ask me which is which
(apart from value_data), the names are confusing.
Coordinate matrix is different, it has a value array and two index arrays,
all of the same size, where the row and column indices of each value are
stored at the same position in the index arrays.