Boost logo

Ublas :

Subject: [ublas] [bindings] naming for sparse matrices
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2010-01-28 03:44:31


Hello,

please see below this message a list of current ways to slice and dice a
linear algebra entity for the begin function (also available for end and
size functions). I am looking for adding the sparse matrix stuff, but
index<1> is already in use for accessing rows/columns. I.e., I think
begin_index1 is a bit too similar to begin1.

I am looking for nice names for the sparse stuff. E.g.,

begin_coord1( m ) // Coord iterator, works for *all* matrices
begin_coord2( m ) // Coord iterator

(or begin_c1/begin_c2, or begin_i, begin_j?). Take these two functions, the
begin_value, mix in a zip iterator, and you will get tuples
( i, j, a_ij )

Now, if a matrix actually has coordinate data (e.g., the sparse case), it
may be that coord1/coord2 use underlying index data arrays which are of
different length (the compressed stuff). So, let's name those different than
the coord stuff, e.g.,

begin_coord_value1( m )
begin_coord_value2( m )

..., or something nicer / better?

Suggestions are welcome.

Cheers,

Rutger

Current stuff:

// Entity stuff
begin( m, tag::index<1>() ) // Row iterator
begin( m, tag::index<2>() ) // Column iterator
begin( m, tag::row() ) // Same as <1>
begin( m, tag::column() ) // Same as <2>
begin( m, tag::major() ) // Depends on data_order
begin( m, tag::minor() ) // Depends on data_order

// Data stuff
begin( m, tag::value() ) // Begin of value array

// Convenience
begin(v) // Convenience for tagged version
begin1(m) // Convenience for tagged version
begin2(m) // Convenience for tagged version
begin_row(m) // Convenience for tagged version
begin_column(m) // Convenience for tagged version
begin_major(m) // Convenience for tagged version
begin_minor(m) // Convenience for tagged version

begin_value(m) // Convenience for tagged version