Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- invertMatrix :: Matrix -> Matrix
- invertMatrix = snd . splitCol . scaleToOne . twice (flipAppend . splitCol . simpleGauss) . ap mColAppend (identityMatrix . dimRow)
- where
- flipAppend :: (Matrix, Matrix) -> Matrix
- flipAppend = uncurry mColAppend . join (***) flipMatrix
- twice f = f . f
Add Comment
Please, Sign In to add comment