diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Numeric/LinearAlgebra/Algorithms.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Numeric/LinearAlgebra/Algorithms.hs b/lib/Numeric/LinearAlgebra/Algorithms.hs index 580f4bb..fc2fcb2 100644 --- a/lib/Numeric/LinearAlgebra/Algorithms.hs +++ b/lib/Numeric/LinearAlgebra/Algorithms.hs | |||
@@ -329,15 +329,15 @@ ctrans = ctrans' | |||
329 | 329 | ||
330 | -- | Matrix product. | 330 | -- | Matrix product. |
331 | multiply :: Field t => Matrix t -> Matrix t -> Matrix t | 331 | multiply :: Field t => Matrix t -> Matrix t -> Matrix t |
332 | multiply = multiply' | 332 | multiply = {-# SCC "multiply" #-} multiply' |
333 | 333 | ||
334 | -- | Similar to 'cholSH', but instead of an error (e.g., caused by a matrix not positive definite) it returns 'Nothing'. | 334 | -- | Similar to 'cholSH', but instead of an error (e.g., caused by a matrix not positive definite) it returns 'Nothing'. |
335 | mbCholSH :: Field t => Matrix t -> Maybe (Matrix t) | 335 | mbCholSH :: Field t => Matrix t -> Maybe (Matrix t) |
336 | mbCholSH = mbCholSH' | 336 | mbCholSH = {-# SCC "mbCholSH" #-} mbCholSH' |
337 | 337 | ||
338 | -- | Similar to 'chol', without checking that the input matrix is hermitian or symmetric. It works with the upper triangular part. | 338 | -- | Similar to 'chol', without checking that the input matrix is hermitian or symmetric. It works with the upper triangular part. |
339 | cholSH :: Field t => Matrix t -> Matrix t | 339 | cholSH :: Field t => Matrix t -> Matrix t |
340 | cholSH = cholSH' | 340 | cholSH = {-# SCC "cholSH" #-} cholSH' |
341 | 341 | ||
342 | -- | Cholesky factorization of a positive definite hermitian or symmetric matrix. | 342 | -- | Cholesky factorization of a positive definite hermitian or symmetric matrix. |
343 | -- | 343 | -- |
@@ -351,7 +351,7 @@ chol m | exactHermitian m = cholSH m | |||
351 | 351 | ||
352 | -- | Determinant of a square matrix. | 352 | -- | Determinant of a square matrix. |
353 | det :: Field t => Matrix t -> t | 353 | det :: Field t => Matrix t -> t |
354 | det m | square m = s * (product $ toList $ takeDiag $ lup) | 354 | det m | square m = {-# SCC "det" #-} s * (product $ toList $ takeDiag $ lup) |
355 | | otherwise = error "det of nonsquare matrix" | 355 | | otherwise = error "det of nonsquare matrix" |
356 | where (lup,perm) = luPacked m | 356 | where (lup,perm) = luPacked m |
357 | s = signlp (rows m) perm | 357 | s = signlp (rows m) perm |