aavogt / DimMat

compile-time checked units for linear algebra
Other
4 stars 1 forks source link

Added functions for pseudo-inverse. #2

Closed dmcclean closed 10 years ago

dmcclean commented 10 years ago

I added the pinv and pinvTol functions. The types are essentially the same as for inv, except without the requirement that the input matrix be square. The pinvTol is conditionally compiled because the implementation in hmatrix 13 that one of my computers is stuck on doesn't have a sufficiently general type signature.

aavogt commented 10 years ago

I think units for inverse are off. For example:

pinv a `multiply` a

doesn't work (if a is the A matrix in controlspace.hs)