diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/base/src/Internal/Util.hs | 6 | ||||
-rw-r--r-- | packages/base/src/Numeric/LinearAlgebra.hs | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/packages/base/src/Internal/Util.hs b/packages/base/src/Internal/Util.hs index 7f52a9c..17d3e50 100644 --- a/packages/base/src/Internal/Util.hs +++ b/packages/base/src/Internal/Util.hs | |||
@@ -41,7 +41,7 @@ module Internal.Util( | |||
41 | ℕ,ℤ,ℝ,ℂ,iC, | 41 | ℕ,ℤ,ℝ,ℂ,iC, |
42 | Normed(..), norm_Frob, norm_nuclear, | 42 | Normed(..), norm_Frob, norm_nuclear, |
43 | magnit, | 43 | magnit, |
44 | unitary, | 44 | normalize, |
45 | mt, | 45 | mt, |
46 | (~!~), | 46 | (~!~), |
47 | pairwiseD2, | 47 | pairwiseD2, |
@@ -343,8 +343,8 @@ magnit e x = norm_1 (fromList [x]) > e | |||
343 | 343 | ||
344 | 344 | ||
345 | -- | Obtains a vector in the same direction with 2-norm=1 | 345 | -- | Obtains a vector in the same direction with 2-norm=1 |
346 | unitary :: Vector Double -> Vector Double | 346 | normalize :: (Normed (Vector t), Num (Vector t), Field t) => Vector t -> Vector t |
347 | unitary v = v / scalar (norm v) | 347 | normalize v = v / real (scalar (norm_2 v)) |
348 | 348 | ||
349 | 349 | ||
350 | -- | trans . inv | 350 | -- | trans . inv |
diff --git a/packages/base/src/Numeric/LinearAlgebra.hs b/packages/base/src/Numeric/LinearAlgebra.hs index 626ee52..badf8f9 100644 --- a/packages/base/src/Numeric/LinearAlgebra.hs +++ b/packages/base/src/Numeric/LinearAlgebra.hs | |||
@@ -154,7 +154,7 @@ module Numeric.LinearAlgebra ( | |||
154 | Seed, RandDist(..), randomVector, rand, randn, gaussianSample, uniformSample, | 154 | Seed, RandDist(..), randomVector, rand, randn, gaussianSample, uniformSample, |
155 | 155 | ||
156 | -- * Misc | 156 | -- * Misc |
157 | meanCov, rowOuters, pairwiseD2, unitary, peps, relativeError, magnit, | 157 | meanCov, rowOuters, pairwiseD2, normalize, peps, relativeError, magnit, |
158 | haussholder, optimiseMult, udot, nullspaceSVD, orthSVD, ranksv, | 158 | haussholder, optimiseMult, udot, nullspaceSVD, orthSVD, ranksv, |
159 | iC, sym, mTm, trustSym, unSym, | 159 | iC, sym, mTm, trustSym, unSym, |
160 | -- * Auxiliary classes | 160 | -- * Auxiliary classes |