summaryrefslogtreecommitdiff
path: root/packages/base/src/Numeric/LinearAlgebra/Util.hs
diff options
context:
space:
mode:
Diffstat (limited to 'packages/base/src/Numeric/LinearAlgebra/Util.hs')
-rw-r--r--packages/base/src/Numeric/LinearAlgebra/Util.hs16
1 files changed, 8 insertions, 8 deletions
diff --git a/packages/base/src/Numeric/LinearAlgebra/Util.hs b/packages/base/src/Numeric/LinearAlgebra/Util.hs
index 2e632b7..eadd2a2 100644
--- a/packages/base/src/Numeric/LinearAlgebra/Util.hs
+++ b/packages/base/src/Numeric/LinearAlgebra/Util.hs
@@ -66,7 +66,7 @@ import Control.Monad(when)
66import Text.Printf 66import Text.Printf
67import Data.List.Split(splitOn) 67import Data.List.Split(splitOn)
68import Data.List(intercalate) 68import Data.List(intercalate)
69import Foreign.C.Types(CInt) 69import Data.Packed.Internal.Numeric(I)
70 70
71type ℝ = Double 71type ℝ = Double
72type ℕ = Int 72type ℕ = Int
@@ -271,7 +271,7 @@ instance Normed (Matrix ℂ)
271 norm_2 = pnorm PNorm2 271 norm_2 = pnorm PNorm2
272 norm_Inf = pnorm Infinity 272 norm_Inf = pnorm Infinity
273 273
274instance Normed (Vector CInt) 274instance Normed (Vector I)
275 where 275 where
276 norm_0 = fromIntegral . sumElements . step . abs 276 norm_0 = fromIntegral . sumElements . step . abs
277 norm_1 = fromIntegral . norm1 277 norm_1 = fromIntegral . norm1
@@ -299,7 +299,7 @@ mt = trans . inv
299-------------------------------------------------------------------------------- 299--------------------------------------------------------------------------------
300{- | 300{- |
301 301
302>>> size $ fromList[1..10::Double] 302>>> size $ vector [1..10]
30310 30310
304>>> size $ (2><5)[1..10::Double] 304>>> size $ (2><5)[1..10::Double]
305(2,5) 305(2,5)
@@ -308,15 +308,15 @@ mt = trans . inv
308size :: Container c t => c t -> IndexOf c 308size :: Container c t => c t -> IndexOf c
309size = size' 309size = size'
310 310
311{- | 311{- | Alternative indexing function.
312 312
313>>> vect [1..10] ! 3 313>>> vector [1..10] ! 3
3144.0 3144.0
315 315
316>>> mat 5 [1..15] ! 1 316>>> matrix 5 [1..15] ! 1
317fromList [6.0,7.0,8.0,9.0,10.0] 317fromList [6.0,7.0,8.0,9.0,10.0]
318 318
319>>> mat 5 [1..15] ! 1 ! 3 319>>> matrix 5 [1..15] ! 1 ! 3
3209.0 3209.0
321 321
322-} 322-}
@@ -333,7 +333,7 @@ instance Indexable (Vector Float) Float
333 where 333 where
334 (!) = (@>) 334 (!) = (@>)
335 335
336instance Indexable (Vector CInt) CInt 336instance Indexable (Vector I) I
337 where 337 where
338 (!) = (@>) 338 (!) = (@>)
339 339