Make small adjustments to code

This commit is contained in:
Kiana Sheibani 2022-09-02 21:45:10 -04:00
parent c9dada5206
commit da4bb5873c
Signed by: toki
GPG key ID: 6CB106C25E86A9F7
2 changed files with 3 additions and 3 deletions

View file

@ -350,7 +350,7 @@ detWithLUP : (Ord a, Abs a, Neg a, Fractional a) =>
(mat : Matrix' n a) -> DecompLUP mat -> a
detWithLUP {n} mat lup =
(if numSwaps lup `mod` 2 == 0 then 1 else -1)
* product (diagonal lup.lower) * product (diagonal lup.upper)
* product (diagonal lup.lu)
export
det : (Ord a, Abs a, Neg a, Fractional a) => Matrix' n a -> a