summaryrefslogtreecommitdiff
path: root/packages/base/src/Internal/Util.hs
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/src/Internal/Util.hs
parente9b75398020a095041c371dac8e3bb00fa39d911 (diff)
unitary -> normalize
Diffstat (limited to 'packages/base/src/Internal/Util.hs')
-rw-r--r--packages/base/src/Internal/Util.hs6
1 files changed, 3 insertions, 3 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