OONumerics User :

From: Nick Cummings (nickc_at_[hidden])
Date: 2005-03-23 15:32:55


I'd like the post a follow-up question to one I posted a few months ago.
First, let me thank those who responded for their helpful comments. I
gave MTL a serious look but had some issues with solving complex linear
systems. In the end, I've been using GMM++ and have the main linear
algebra portion of what I wanted to do complete.

My program requires a matrix that is the result of a rather lengthy matrix
expression, which will be changed later for other problems. I would like
to design things so that this matrix expression may be input in a fairly
transparent way, for which I'd really like to use operator overloading.
Once I have computed the input matrix from this expression, I can then
use GMM++ with no operator overloading for the rest of the program.

Clearly, one option is simply to write overloaded operators for the GMM++
classes, but another option is just to use a different library for this
first step, where efficiency is not as important as clarity of the
expressions. What I need, then, is a library for complex matrices that
implements all the basic arithmetic operations, including matrix
multiplication, but no further linear algebra functions are required.
Using expression templates would be preferable, but not required. What
are your suggestions? I looked at, for example, uBlas, but it seems that
matrix multiplication is not done by operator overloading.

Thanks,

Nick

On Mon, 24 Jan 2005, Nick Cummings wrote:

> Hi,
>
> I'm a physics graduate student working on a problem for which I need to do a
> bit of numerical linear algebra, which I've not had much experience doing
> before. One possibility is using the FORTRAN package LAPACK, but I wanted to
> explore the possibility of using and object oriented approach in C++, so I
> was wondering if anyone could suggest a good, free library. I thought
> finding such a thing would be a breeze, but it seems it is harder than I
> thought to find what I want.
>
> As a bare minimum I require vector and matrix classes, matrix multiplication
> (as in A_ik = B_ij C_jk), the ability to easily solve the matrix equation A*X
> = B for X, and the ability to exponentiate diagonalizable matrices (so a
> function to diagonalize them would do). I need to be able to do all these
> operations on dense complex valued matrices. Efficiency of operations on
> large matrices is the main concern rather than small. I would love to find a
> library that implements operator overloading on matrices (perhaps via
> expression templates), but that is not a must. The ability to manipulate
> sparse matrices is also on the wish list of non-essential features. Any
> suggestions? I've looked at a few libraries, but so far it looks like the
> sticking point is the ability to diagonalize non-symmetric matrices, as some
> libraries will only solve symmetric eigenvaule problems. I've also tried
> some that seem to have issues solving complex matrix equations.
>
> I thought at the outset that an OO approach would allow a much more
> transparent treatment of the formulae, e.g. with the ability to treat
> matrices as objects with operator overloading. And easy translation of
> formulae between the chalkboard and the program would be a big advantage for
> physicists who don't (and probably don't want to) spend a lot of time
> programming.
>
> Thanks for your insight,
>
> Nick
> _______________________________________________
> oon-list mailing list
> oon-list_at_[hidden]
> http://www.oonumerics.org/mailman/listinfo.cgi/oon-list
>