summaryrefslogtreecommitdiff
path: root/packages/base
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2016-11-02 20:54:01 +0100
committerAlberto Ruiz <aruiz@um.es>2016-11-02 20:54:01 +0100
commitb23333b54908232d5803c852ed362d3b43e78796 (patch)
treedc6779b20ebb0aba3b7955f313118a1630e50e56 /packages/base
parente9b75398020a095041c371dac8e3bb00fa39d911 (diff)
unitary -> normalize
Diffstat (limited to 'packages/base')
-rw-r--r--packages/base/src/Internal/Util.hs6
-rw-r--r--packages/base/src/Numeric/LinearAlgebra.hs2
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
346unitary :: Vector Double -> Vector Double 346normalize :: (Normed (Vector t), Num (Vector t), Field t) => Vector t -> Vector t
347unitary v = v / scalar (norm v) 347normalize 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