Boost logo

Boost Users :

From: Mike Hayford (mikehayford_at_[hidden])
Date: 2002-12-31 02:20:47


I discovered uBLAS a week ago and am very impressed by the design and implementation of the library. To learn the library I have been porting a few non-linear least squares codes from FORTRAN into uBLAS. A real hinderance is the documentation. There is no user's guide or set of example code to orient the new user to uBLAS. Some of the most valuable features are undocumented - such as scalar_vector, vector_indirect, and matrix_indirect. The widespread adoption of uBLAS by the C++ numeric community would be more rapid if these omissions were addressed.

I would be willing to write up some of the *simple* examples I have done, if people think it would be useful. If my implementations can be improved, that would be even better. I'm new to Boost and haven't yet completely RTFM'd the requirements for Boost doc contributions so point me in the right direction if I'm going astray here.

Having said that, I have a specific problem I'm trying to solve. I'm looking for the best "uBLAS-style" solution - I can do an element-by-element brute force solution.

Problem: write the product of a diagonal matrix and a vector when the diagonal matrix is stored as a vector.

So what I want to do figuratively is:

int n = 5;

vector<double> x(n), y(n), diag(n);

diagonal_matrix<double> dMat(n);

dMat = diag;

x = prod(dMat, y);

Is there a matrix adaptor of some sort that can fill the role of diagonal_matrix<> above? I looked in the header files and didn't see anything obvious.

Thanks in adavance for your help.

Mike Hayford

---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

[Non-text portions of this message have been removed]


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net