Registered Member
|
Just after some advice on the best way to take a cholesky decomposition of matrices around size 100x100 to obtain an inverse. Just to test I was trying a quick program (-02 -DNDEBUG -march=core2) with the following code for the inverse calculation bit:
As it is, it's much slower than the default inverse() method using the LU decomposition by about 40%. Is it just because the cholesky hasn't been thoroughly optimised yet or is there a better way to attack this? Daniel Stonier. |
Moderator
|
what about:
Matrix inv = Matrix::Identity(); A.llt().solveInPlace(inv); there is no way Cholesky could be slower than LU. |
Registered Member
|
Oh indeed! I didn't realise you could pass the entire matrix into the solver. The block operations were taking up all the extra time. Cheers. Daniel Stonier. |
Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell