|
Ublas : |
From: Riccardo Rossi (rrossi_at_[hidden])
Date: 2007-06-08 13:21:12
inex1_data are the rows
index2_data are the columns
value_data are the values
to get the underlying C-style array just write
index1_data.data()
On Fri, 2007-06-08 at 19:04 +0200, Georg Baum wrote:
> Am Freitag 08 Juni 2007 18:48 schrieb Nico Galoppo:
> > Hi,
> >
> > 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.
>
>
> Georg
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas