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
Some of the most valuable features are undocumented - such as scalar_vector, vector_indirect, and matrix_indirect. The widespread adoption of uBLAS by
----- Original Message ----- From: Mike Hayford To: Boost-Users@yahoogroups.com Sent: Tuesday, December 31, 2002 8:20 AM Subject: [Boost-Users] ublas - newbie question and comment the new user to > uBLAS. OK. the C++
numeric community would be more rapid if these omissions were addressed.
OK.
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.
I'd use a banded_matrix with number of upper and lower diagonals set to zero. Another strategy could be to add an expression tree node class for this operation based on vector_binary. Regards Joerg