Daniel-Diaz / matrix

A Haskell native implementation of matrices and their operations.
BSD 3-Clause "New" or "Revised" License
35 stars 31 forks source link

Fixed `luDecomp' and `switchRows` #4

Closed konn closed 10 years ago

konn commented 10 years ago

This fixes #3 and odd behavior of switchRows.

In the most recent release, switchRows doesn't work as described:

ghci> switchRows 1 2 $ fromLists [[1,2,3],[4,5,6],[7,8,9]]
( 2 1 3 )
( 4 5 6 ) -- wrong!
( 7 8 9 )

This pull request fixes this behavior, and also added switchCols similar to switchRows.

Daniel-Diaz commented 10 years ago

Great! Thank you for the catch!