Boost logo

Boost Users :

From: Nicholas Andrews (nicholas.andrews_at_[hidden])
Date: 2004-07-28 09:49:25


Here's the formula I want to reproduce in uBLAS: K=P*Mt*(M*P*Mt+R)^-1

Where K, P, M, and R are matrices, and Mt is the transpose of M.

I have written the following function:

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.

Thanks for your help,
Nick


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