summaryrefslogtreecommitdiff
path: root/packages/base/src/Internal
diff options
context:
space:
mode:
Diffstat (limited to 'packages/base/src/Internal')
-rw-r--r--packages/base/src/Internal/Algorithms.hs6
-rw-r--r--packages/base/src/Internal/Container.hs2
-rw-r--r--packages/base/src/Internal/Element.hs4
-rw-r--r--packages/base/src/Internal/Vector.hs2
4 files changed, 7 insertions, 7 deletions
diff --git a/packages/base/src/Internal/Algorithms.hs b/packages/base/src/Internal/Algorithms.hs
index c8b2d3e..99c90aa 100644
--- a/packages/base/src/Internal/Algorithms.hs
+++ b/packages/base/src/Internal/Algorithms.hs
@@ -470,14 +470,14 @@ rq m = {-# SCC "rq" #-} (r,q) where
470 470
471-- | Hessenberg factorization. 471-- | Hessenberg factorization.
472-- 472--
473-- If @(p,h) = hess m@ then @m == p \<> h \<> ctrans p@, where p is unitary 473-- If @(p,h) = hess m@ then @m == p \<> h \<> tr p@, where p is unitary
474-- and h is in upper Hessenberg form (it has zero entries below the first subdiagonal). 474-- and h is in upper Hessenberg form (it has zero entries below the first subdiagonal).
475hess :: Field t => Matrix t -> (Matrix t, Matrix t) 475hess :: Field t => Matrix t -> (Matrix t, Matrix t)
476hess = hess' 476hess = hess'
477 477
478-- | Schur factorization. 478-- | Schur factorization.
479-- 479--
480-- If @(u,s) = schur m@ then @m == u \<> s \<> ctrans u@, where u is unitary 480-- If @(u,s) = schur m@ then @m == u \<> s \<> tr u@, where u is unitary
481-- and s is a Shur matrix. A complex Schur matrix is upper triangular. A real Schur matrix is 481-- and s is a Shur matrix. A complex Schur matrix is upper triangular. A real Schur matrix is
482-- upper triangular in 2x2 blocks. 482-- upper triangular in 2x2 blocks.
483-- 483--
@@ -497,7 +497,7 @@ cholSH = {-# SCC "cholSH" #-} cholSH'
497 497
498-- | Cholesky factorization of a positive definite hermitian or symmetric matrix. 498-- | Cholesky factorization of a positive definite hermitian or symmetric matrix.
499-- 499--
500-- If @c = chol m@ then @c@ is upper triangular and @m == ctrans c \<> c@. 500-- If @c = chol m@ then @c@ is upper triangular and @m == tr c \<> c@.
501chol :: Field t => Matrix t -> Matrix t 501chol :: Field t => Matrix t -> Matrix t
502chol m | exactHermitian m = cholSH m 502chol m | exactHermitian m = cholSH m
503 | otherwise = error "chol requires positive definite complex hermitian or real symmetric matrix" 503 | otherwise = error "chol requires positive definite complex hermitian or real symmetric matrix"
diff --git a/packages/base/src/Internal/Container.hs b/packages/base/src/Internal/Container.hs
index 8926fac..307c6a8 100644
--- a/packages/base/src/Internal/Container.hs
+++ b/packages/base/src/Internal/Container.hs
@@ -72,7 +72,7 @@ infixr 8 <.>
72 72
73 73
74 74
75{- | infix synonym for 'app' 75{- | dense matrix-vector product
76 76
77>>> let m = (2><3) [1..] 77>>> let m = (2><3) [1..]
78>>> m 78>>> m
diff --git a/packages/base/src/Internal/Element.hs b/packages/base/src/Internal/Element.hs
index 6d86f3d..a459678 100644
--- a/packages/base/src/Internal/Element.hs
+++ b/packages/base/src/Internal/Element.hs
@@ -325,9 +325,9 @@ takeDiag m = fromList [flatten m @> (k*cols m+k) | k <- [0 .. min (rows m) (cols
325 325
326------------------------------------------------------------ 326------------------------------------------------------------
327 327
328{- | create a general matrix 328{- | Create a matrix from a list of elements
329 329
330>>> (2><3) [2, 4, 7+2*𝑖, -3, 11, 0] 330>>> (2><3) [2, 4, 7+2*iC, -3, 11, 0]
331(2><3) 331(2><3)
332 [ 2.0 :+ 0.0, 4.0 :+ 0.0, 7.0 :+ 2.0 332 [ 2.0 :+ 0.0, 4.0 :+ 0.0, 7.0 :+ 2.0
333 , (-3.0) :+ (-0.0), 11.0 :+ 0.0, 0.0 :+ 0.0 ] 333 , (-3.0) :+ (-0.0), 11.0 :+ 0.0, 0.0 :+ 0.0 ]
diff --git a/packages/base/src/Internal/Vector.hs b/packages/base/src/Internal/Vector.hs
index 29b6797..de4e670 100644
--- a/packages/base/src/Internal/Vector.hs
+++ b/packages/base/src/Internal/Vector.hs
@@ -127,7 +127,7 @@ n |> l
127 l' = take n l 127 l' = take n l
128 128
129 129
130-- | Create a vector of indexes, useful for matrix extraction using '??' 130-- | Create a vector of indexes, useful for matrix extraction using '(??)'
131idxs :: [Int] -> Vector I 131idxs :: [Int] -> Vector I
132idxs js = fromList (map fromIntegral js) :: Vector I 132idxs js = fromList (map fromIntegral js) :: Vector I
133 133