acts-project / algebra-plugins

Mozilla Public License 2.0
3 stars 10 forks source link

Partial Pivot LU decomposition for matrix inversion #80

Closed beomki-yeo closed 1 year ago

beomki-yeo commented 1 year ago

This PR is motivated by the poor precision of the cofactor method of cmath plugin: The single precision result of the cofactor method is quite different from the double precision one.

Following values is the determinant of 6x6 matrix that appears during the kalman filtering

It is obvious that LU decomposition gives more reliable result with single precision.

beomki-yeo commented 1 year ago

Clients will not be expected to use types like algebra::determinant::partial_pivot_lud directly, right?

Right. They should not be exposed to clients in general. In case users want to call the decomposed matrix thru algebra::cmath::matrix::decomposition::lud, it will be problematic because SMatrix doesn't seem to have LU decompose function.

But I don't think we have a specific use case for that.