Blitz logo

Blitz Devel :

From: Martin Weiser (weiser_at_[hidden])
Date: 1998-08-14 07:07:06


Thanks for your comments.

Todd:
> Sounds reasonable. You can probably use Array<T,2> to store
> the data. I'd suggest using the mapping

How that? I thought of implementing a MatrixStructure class
following the line of ColumnMajor or UpperTriangular or such.
There the get method gets only a T_numtype* data argument besides
(i,j). Or did you introduce Array<T,2> just to illustrate
the mapping?

Todd:
> Band Mat Array<T,2>
> (i,j) -> (i,j-i+L)
>
> where L is the lower bandwidth (not known at compile time),
> and the array is of size N x (1+L+H) where H is the upper
> bandwidth. This requires a bit of wasted space in the Array,
> but makes indexing much simpler (and therefore efficient).

Yes. This looks like a row major storage scheme with matrix diagonals
mapped to array columns, similar to the EISPACK scheme.

David:
> A shot in the dark here. LAPACK uses specific storage conventions
> for banded matrices and it would be very convenient if Blitz++ was
> able to store special matrices in the same format as LAPACK.

Exactly to use of LAPACK to factorize banded matrices is the
motivation behind my posting :-)

David:
> The LAPACK special matrix representation docs are available at
> http://www.netlib.org/lapack/lug/node110.html and the manual
> is available at
> http://www.netlib.org/lapack/lug/lapack_lug.html

Very convenient links, indeed. LAPACK uses a column major
storage scheme where matrix diagonals are mapped to array rows,
just contrary to what Todd suggested. Perhaps the structure
class should be templated with some ordering type
(a MatrixStructureStructure: RowMajor or ColumnMajor) ?

Anyway, if I'm not too occupied by the ICM next week in Berlin,
I will get on your nerves asking silly questions about
MatrixStructure and Iterator semantics ;-).

Martin

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