summaryrefslogtreecommitdiff
path: root/packages/base/src/Numeric/LinearAlgebra/Static.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2015-07-16 20:16:59 +0200
committerAlberto Ruiz <aruiz@um.es>2015-07-16 20:16:59 +0200
commita273fdb74b04db6d57d5c9b15e676d83357e71fd (patch)
tree99189532f2a37129a7ec3696f681ff3fd3314950 /packages/base/src/Numeric/LinearAlgebra/Static.hs
parentd9c99a670a393fb232641183623a7fa5921ccff2 (diff)
Her, LU, LDL, Linear, Additive
Diffstat (limited to 'packages/base/src/Numeric/LinearAlgebra/Static.hs')
-rw-r--r--packages/base/src/Numeric/LinearAlgebra/Static.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/base/src/Numeric/LinearAlgebra/Static.hs b/packages/base/src/Numeric/LinearAlgebra/Static.hs
index 0dab0e6..ded69fa 100644
--- a/packages/base/src/Numeric/LinearAlgebra/Static.hs
+++ b/packages/base/src/Numeric/LinearAlgebra/Static.hs
@@ -63,9 +63,9 @@ import GHC.TypeLits
63import Numeric.LinearAlgebra hiding ( 63import Numeric.LinearAlgebra hiding (
64 (<>),(#>),(<.>),Konst(..),diag, disp,(===),(|||), 64 (<>),(#>),(<.>),Konst(..),diag, disp,(===),(|||),
65 row,col,vector,matrix,linspace,toRows,toColumns, 65 row,col,vector,matrix,linspace,toRows,toColumns,
66 (<\>),fromList,takeDiag,svd,eig,eigSH,eigSH', 66 (<\>),fromList,takeDiag,svd,eig,eigSH,
67 eigenvalues,eigenvaluesSH,eigenvaluesSH',build, 67 eigenvalues,eigenvaluesSH,build,
68 qr,size,dot,chol,range,R,C) 68 qr,size,dot,chol,range,R,C,Her,her,sym)
69import qualified Numeric.LinearAlgebra as LA 69import qualified Numeric.LinearAlgebra as LA
70import Data.Proxy(Proxy) 70import Data.Proxy(Proxy)
71import Internal.Static 71import Internal.Static
@@ -292,10 +292,10 @@ her m = Her $ (m + LA.tr m)/2
292 292
293instance KnownNat n => Eigen (Sym n) (R n) (L n n) 293instance KnownNat n => Eigen (Sym n) (R n) (L n n)
294 where 294 where
295 eigenvalues (Sym (extract -> m)) = mkR . LA.eigenvaluesSH' $ m 295 eigenvalues (Sym (extract -> m)) = mkR . LA.eigenvaluesSH . LA.trustSym $ m
296 eigensystem (Sym (extract -> m)) = (mkR l, mkL v) 296 eigensystem (Sym (extract -> m)) = (mkR l, mkL v)
297 where 297 where
298 (l,v) = LA.eigSH' m 298 (l,v) = LA.eigSH . LA.trustSym $ m
299 299
300instance KnownNat n => Eigen (Sq n) (C n) (M n n) 300instance KnownNat n => Eigen (Sq n) (C n) (M n n)
301 where 301 where
@@ -305,7 +305,7 @@ instance KnownNat n => Eigen (Sq n) (C n) (M n n)
305 (l,v) = LA.eig m 305 (l,v) = LA.eig m
306 306
307chol :: KnownNat n => Sym n -> Sq n 307chol :: KnownNat n => Sym n -> Sq n
308chol (extract . unSym -> m) = mkL $ LA.cholSH m 308chol (extract . unSym -> m) = mkL $ LA.chol $ LA.trustSym m
309 309
310-------------------------------------------------------------------------------- 310--------------------------------------------------------------------------------
311 311