summaryrefslogtreecommitdiff
path: root/lib/Numeric
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2010-04-24 09:47:42 +0000
committerAlberto Ruiz <aruiz@um.es>2010-04-24 09:47:42 +0000
commit0c1b8611b9cc55cc646c708b63442f3aaac1249d (patch)
tree4dbd5b25ec0833aaeaaae5157f74e11b94359624 /lib/Numeric
parente36a58715c9be88bb9091f0e86fda45465c61c0b (diff)
examples/parallel using toBlocks
Diffstat (limited to 'lib/Numeric')
-rw-r--r--lib/Numeric/LinearAlgebra/Algorithms.hs8
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.
331multiply :: Field t => Matrix t -> Matrix t -> Matrix t 331multiply :: Field t => Matrix t -> Matrix t -> Matrix t
332multiply = multiply' 332multiply = {-# 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'.
335mbCholSH :: Field t => Matrix t -> Maybe (Matrix t) 335mbCholSH :: Field t => Matrix t -> Maybe (Matrix t)
336mbCholSH = mbCholSH' 336mbCholSH = {-# 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.
339cholSH :: Field t => Matrix t -> Matrix t 339cholSH :: Field t => Matrix t -> Matrix t
340cholSH = cholSH' 340cholSH = {-# 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.
353det :: Field t => Matrix t -> t 353det :: Field t => Matrix t -> t
354det m | square m = s * (product $ toList $ takeDiag $ lup) 354det 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