> Stride is a good idea. But it can be extended.
> Many algorithms that need a pivot, require to swap rows or columns.
> Thus can be taken care
> by using an array that tells how the rows or columns are ordered. While
> accessing these can be a small
> overhead, I think it might save on moving and copying data. Especially
> if it is a derived class.
> swap_included_array -> array
> What do you think
You can do this in a limited way with Cartesian-product
indirection. See
http://oonumerics.org/blitz/manual/blitz06.html#index00411
The limitation is that the permuted array can only be used as
an lvalue (on the left side of an assignment). If someone needs
to use it as an rvalue I'd be willing to think about how to do
that.
All the algorithms I've seen which require pivots are linear
algebra, and might be easier to express in libraries like MTL
or SL, which have been designed for linear algebra.
Cheers,
Todd
--------------------- blitz-dev list --------------------------------
* To subscribe/unsubscribe: use the handy web form at
http://oonumerics.org/blitz/lists.html
This archive was generated by hypermail 2b29 : Wed Feb 20 2002 - 04:30:10 EST