Subject: Re: [ublas] [bindings] naming for sparse matrices
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2010-02-01 03:19:50
Thomas Klimpel wrote:
> Since we are dealing with matrices, there is not much too choice left with
> respect to terminology. We don't have the freedom to rename index/indices
> to coord/coords or coordinate/coordinates. (Of course we could do it, but
> it would just be wrong, in a certain sense.)
> The "xxx1" / "xxx2" is a question with more choice. In a certain sense,
> "xxx1" is an easy to understand abbreviation for "xxx_row" and "xxx2" an
> abbreviation for "xxx_column". More tricky is the tag "index<1>", because
I'll try to replace that tag, it doesn't always necessarily mean what it
> I like begin_i, begin_j.
I guess me too.
> So what about "begin_start" instead of "index1_storage" and "begin_index"
> instead of "index2_storage"? No, that's too confusing. Less confusing
> might be "begin_major_start" and "begin_minor_index".
I've been pondering about this for a while. Given that we also have matrices
like tridiagonal (3 arrays), and ones with data in associative arrays (which
is just one array containing something else than "value"), I've come up with
the following proposal that I actually like:
begin_array1( ... ), end_array1( ... )
begin_array2( ... ), etc.
the contents of these arrays depend on the data structure. Iterating through
the stuff is done with specialized iterators / other accessor functions.
I.e., these functions may be used for direct data access by the algorithm
If you agree, I'll make the appropriate adjustments, run all unit tests, and
wrap up the sparse stuff so we can move on again.
Do we need an index_type<M>::type?