Boost logo

Boost Users :

From: Russell Hind (rhind_at_[hidden])
Date: 2004-04-08 10:36:17


Angus Leeming wrote:
>
> X is 500x5
> trans(X) is 5x500
> prod(trans(X),X) is 5x5, which is a square matrix. So, yes, it can be
> inverted (all other requirements assumed satisfied...). And if it's
> 5x5 the lu_ functions are perfect. In fact, you could probably invert
> it by hand ;-)
>

Is there no method in ublas that can invert it? I haven't done matrices
for years, and don't have any docs on doing it.

The initial problem I'm trying to solve is

a = (X^T X)^-1 X^T y

where y is a 500 row vector and X is the 500 x 5 matrix. But I can't
use lu_* with the compiler/boost version I have.

ublas::solve says it does A^-1 * b but what is the tag parameter passed
to it? It can be lower_tag or upper_tag but I can't find what these
mean in the docs, or the difference between them or which I should be using.

Thanks

Russell


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