Boost logo

Boost Users :

From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2004-07-29 05:49:27


Nicholas Andrews wrote:

> void multi_state_kf::compute_gain(const matrix<double>& dev)
> {
> matrix<double> temp=prod(M,newP);
> matrix<double> transM=trans(M);
> matrix<double> A=(prod(temp,transM)+dev);
> permutation_matrix<size_t> pm(A.size2());
> lu_factorize(A, pm);
> matrix<double> el = prod(newP,transM);
> lu_substitute(A, pm, el);
>
> K=el;
> }
>
> This function was completely hacked together as I'm new to uBLAS (and
> rusty with linear algebra), but it got rid of most of my compile errors.
> Now only a few remain but I'm not sure what I'm doing wrong. I'm hoping
> that it will be obvious to someone here.

I tried to recreate your problem. Supposing that you defined somewhere
in the enclosing scope newP, K and M you can easily compile the above
sample by including

#include <boost/numeric/ublas/matrix.hpp> // 1
#include <boost/numeric/ublas/traingular.hpp> // 2: not logical
#include <boost/numeric/ublas/lu.hpp> // 3

I suppose you have line 1 (for having matrix) and 3 (since you're using
the lu factorization) in your program but did not include triangular.hpp
(why should you?). Actually this file should be included by lu.hpp but
it is not. Hope this helps !

BTW, you best direct all your questions to the dedicated ublas-dev
mailinglist to get more responses.

Ublas-developers, can I add the include of triangular.hpp to lu.hpp ?

toon


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