diff options
Diffstat (limited to 'packages/base/src/Internal')
-rw-r--r-- | packages/base/src/Internal/Algorithms.hs | 6 | ||||
-rw-r--r-- | packages/base/src/Internal/Container.hs | 2 | ||||
-rw-r--r-- | packages/base/src/Internal/Element.hs | 4 | ||||
-rw-r--r-- | packages/base/src/Internal/Vector.hs | 2 |
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). |
475 | hess :: Field t => Matrix t -> (Matrix t, Matrix t) | 475 | hess :: Field t => Matrix t -> (Matrix t, Matrix t) |
476 | hess = hess' | 476 | hess = 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@. |
501 | chol :: Field t => Matrix t -> Matrix t | 501 | chol :: Field t => Matrix t -> Matrix t |
502 | chol m | exactHermitian m = cholSH m | 502 | chol 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 '(??)' |
131 | idxs :: [Int] -> Vector I | 131 | idxs :: [Int] -> Vector I |
132 | idxs js = fromList (map fromIntegral js) :: Vector I | 132 | idxs js = fromList (map fromIntegral js) :: Vector I |
133 | 133 | ||