Boost logo

Ublas :

From: Michael Stevens (mail_at_[hidden])
Date: 2006-07-19 16:48:20


On Monday, 10. July 2006 10:53, Dima Sorkin wrote:
> Quoting Gunter Winkler:
> Hi.
> I almost always use the following pattern:
> With sparse colmunn major matrices:
> 1) I iterate untill the needed column over the row no 0, with row
> iterator. 2) then create the (dual) column iterator and iterate over the
> whole column. (With row major matrices the pattern is dual to the described
> above.)
>
> So I would prefer to have (for example) a RowIterator_type
> with the properties:
> 1) advancing it advances over whole columns
> 2) it has "matrix_column & RowIterator_type::operator * ()"
> i.e. gives whole columns.

This seems to be a partial yes to me. I think one of the reasons for having
the general row/column duality is it avoids having to have iterators that
return row/column proxies which are nasty to implement.

I wonder if there is an elegent iterator partern that can provide all the
requirments when iterating over sparse types.

Michael

-- 
___________________________________
Michael Stevens Systems Engineering
34128 Kassel, Germany
Phone/Fax: +49 561 5218038
Navigation Systems, Estimation  and
                 Bayesian Filtering
    http://bayesclasses.sf.net
___________________________________