BZDEV: Banded matrices again

From: Martin Weiser (weiser@zib.de)
Date: Tue Aug 25 1998 - 05:15:51 EST


Hello,

just implementing the banded matrices as I told you last week.
Some questions arise:

(i) Operators =,+=,... with single T_numtype argument are not
     yet implemented, right? Or am I too stupid to find them?

(ii) Implementing operator=(T_numtype) for matrices along the
     line of operator=(_bz_MatExpr<P_expr> expr), I see that
     the iterator is created using
     _bz_typename P_structure::T_iterator iter(rows(), cols());

     Now the iterator has to know the bandwidth too, and since
     it is unknown at compile time, it can't be encoded in the
     type of the iterator :-(
     How to move the bandwidth information into the iterator?

     Two possible (sensible) methods come to mind:
     (a) Pass a third argument to the iterator's constructor:
     the matrix structure. (Or create a second constructor
     which takes the matrix structure as single argument.)
     (b) Use the matrix structure as iterator factory:
     _bz_typename P_structure::T_iterator iter = structure_.iterator();

     For both solutions to be generally usable some changes in
     the blitz library itself seem to be necessary :-(
     Are such changes impossible or unlikely since they break a
     lot of code? Are there other solutions?

Thanks,

Martin

-- 
Martin Weiser     Konrad-Zuse-Zentrum fuer Informationstechnik Berlin
weiser@zib.de     Scientific Computing
                  Numerische Analysis und Modellierung
http://www.zib.de/weiser
--------------------- blitz-dev list --------------------------------
* To subscribe/unsubscribe: mail to majordomo@oonumerics.org, with
"subscribe blitz-dev" or "unsubscribe blitz-dev" in the body of the message
* Blitz++ web page: http://oonumerics.org/blitz/



This archive was generated by hypermail 2b29 : Wed Feb 20 2002 - 04:30:06 EST