summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Numeric/Container.hs14
-rw-r--r--lib/Numeric/LinearAlgebra/Algorithms.hs2
-rw-r--r--lib/Numeric/Matrix.hs7
-rw-r--r--lib/Numeric/Vector.hs6
4 files changed, 12 insertions, 17 deletions
diff --git a/lib/Numeric/Container.hs b/lib/Numeric/Container.hs
index 77c9902..44e2711 100644
--- a/lib/Numeric/Container.hs
+++ b/lib/Numeric/Container.hs
@@ -8,7 +8,7 @@
8----------------------------------------------------------------------------- 8-----------------------------------------------------------------------------
9-- | 9-- |
10-- Module : Numeric.Container 10-- Module : Numeric.Container
11-- Copyright : (c) Alberto Ruiz 2007 11-- Copyright : (c) Alberto Ruiz 2010
12-- License : GPL-style 12-- License : GPL-style
13-- 13--
14-- Maintainer : Alberto Ruiz <aruiz@um.es> 14-- Maintainer : Alberto Ruiz <aruiz@um.es>
@@ -41,7 +41,6 @@ import Numeric.GSL.Vector
41 41
42import Data.Complex 42import Data.Complex
43import Control.Monad(ap) 43import Control.Monad(ap)
44--import Control.Arrow((***))
45 44
46import Numeric.LinearAlgebra.LAPACK(multiplyR,multiplyC,multiplyF,multiplyQ) 45import Numeric.LinearAlgebra.LAPACK(multiplyR,multiplyC,multiplyF,multiplyQ)
47 46
@@ -78,15 +77,18 @@ class (Element e) => Container c e where
78 -- 77 --
79 -- | indexing function 78 -- | indexing function
80 atIndex :: c e -> IndexOf c -> e 79 atIndex :: c e -> IndexOf c -> e
81 -- | index of min/max element 80 -- | index of min element
82 minIndex :: c e -> IndexOf c 81 minIndex :: c e -> IndexOf c
82 -- | index of max element
83 maxIndex :: c e -> IndexOf c 83 maxIndex :: c e -> IndexOf c
84 -- | value of min/max element 84 -- | value of min element
85 minElement :: c e -> e 85 minElement :: c e -> e
86 -- | value of max element
86 maxElement :: c e -> e 87 maxElement :: c e -> e
87 -- the C functions sumX/prodX are twice as fast as using foldVector 88 -- the C functions sumX/prodX are twice as fast as using foldVector
88 -- | the sum/product of elements (faster than using @fold@ 89 -- | the sum of elements (faster than using @fold@)
89 sumElements :: c e -> e 90 sumElements :: c e -> e
91 -- | the product of elements (faster than using @fold@)
90 prodElements :: c e -> e 92 prodElements :: c e -> e
91 93
92-- -- | Basic element-by-element functions. 94-- -- | Basic element-by-element functions.
@@ -215,7 +217,7 @@ class Element e => Product e where
215 multiply :: Matrix e -> Matrix e -> Matrix e 217 multiply :: Matrix e -> Matrix e -> Matrix e
216 -- | dot (inner) product 218 -- | dot (inner) product
217 dot :: Vector e -> Vector e -> e 219 dot :: Vector e -> Vector e -> e
218 -- | sum of absolute value of elements (differs in complex case from @norm1@ 220 -- | sum of absolute value of elements (differs in complex case from @norm1@)
219 absSum :: Vector e -> RealOf e 221 absSum :: Vector e -> RealOf e
220 -- | sum of absolute value of elements 222 -- | sum of absolute value of elements
221 norm1 :: Vector e -> RealOf e 223 norm1 :: Vector e -> RealOf e
diff --git a/lib/Numeric/LinearAlgebra/Algorithms.hs b/lib/Numeric/LinearAlgebra/Algorithms.hs
index cf86904..6e703fa 100644
--- a/lib/Numeric/LinearAlgebra/Algorithms.hs
+++ b/lib/Numeric/LinearAlgebra/Algorithms.hs
@@ -77,7 +77,7 @@ module Numeric.LinearAlgebra.Algorithms (
77import Data.Packed.Internal hiding ((//)) 77import Data.Packed.Internal hiding ((//))
78import Data.Packed.Matrix 78import Data.Packed.Matrix
79import Data.Complex 79import Data.Complex
80--import Numeric.LinearAlgebra.Linear 80
81import Numeric.LinearAlgebra.LAPACK as LAPACK 81import Numeric.LinearAlgebra.LAPACK as LAPACK
82import Data.List(foldl1') 82import Data.List(foldl1')
83import Data.Array 83import Data.Array
diff --git a/lib/Numeric/Matrix.hs b/lib/Numeric/Matrix.hs
index 6ba870f..f462e88 100644
--- a/lib/Numeric/Matrix.hs
+++ b/lib/Numeric/Matrix.hs
@@ -8,7 +8,7 @@
8----------------------------------------------------------------------------- 8-----------------------------------------------------------------------------
9-- | 9-- |
10-- Module : Numeric.Matrix 10-- Module : Numeric.Matrix
11-- Copyright : (c) Alberto Ruiz 2007 11-- Copyright : (c) Alberto Ruiz 2010
12-- License : GPL-style 12-- License : GPL-style
13-- 13--
14-- Maintainer : Alberto Ruiz <aruiz@um.es> 14-- Maintainer : Alberto Ruiz <aruiz@um.es>
@@ -37,13 +37,10 @@ module Numeric.Matrix (
37 37
38import Data.Packed.Vector 38import Data.Packed.Vector
39import Data.Packed.Matrix 39import Data.Packed.Matrix
40
40import Numeric.Container 41import Numeric.Container
41--import Numeric.LinearAlgebra.Linear
42import Numeric.Vector 42import Numeric.Vector
43import Numeric.LinearAlgebra.Algorithms 43import Numeric.LinearAlgebra.Algorithms
44--import Control.Monad(ap)
45
46--import Control.Arrow((***))
47 44
48------------------------------------------------------------------- 45-------------------------------------------------------------------
49 46
diff --git a/lib/Numeric/Vector.hs b/lib/Numeric/Vector.hs
index 7ecd0eb..1baa6f8 100644
--- a/lib/Numeric/Vector.hs
+++ b/lib/Numeric/Vector.hs
@@ -3,11 +3,10 @@
3{-# LANGUAGE FlexibleInstances #-} 3{-# LANGUAGE FlexibleInstances #-}
4{-# LANGUAGE UndecidableInstances #-} 4{-# LANGUAGE UndecidableInstances #-}
5{-# LANGUAGE MultiParamTypeClasses #-} 5{-# LANGUAGE MultiParamTypeClasses #-}
6--{-# LANGUAGE FunctionalDependencies #-}
7----------------------------------------------------------------------------- 6-----------------------------------------------------------------------------
8-- | 7-- |
9-- Module : Numeric.Vector 8-- Module : Numeric.Vector
10-- Copyright : (c) Alberto Ruiz 2007 9-- Copyright : (c) Alberto Ruiz 2010
11-- License : GPL-style 10-- License : GPL-style
12-- 11--
13-- Maintainer : Alberto Ruiz <aruiz@um.es> 12-- Maintainer : Alberto Ruiz <aruiz@um.es>
@@ -32,12 +31,9 @@ import Data.Complex
32 31
33import Data.Packed.Vector 32import Data.Packed.Vector
34import Data.Packed.Internal.Matrix 33import Data.Packed.Internal.Matrix
35--import Data.Packed.Internal.Vector(asComplex,asReal)
36--import Data.Packed.Matrix(toColumns,fromColumns,flatten,reshape)
37import Numeric.GSL.Vector 34import Numeric.GSL.Vector
38 35
39import Numeric.Container 36import Numeric.Container
40--import Numeric.LinearAlgebra.Linear
41 37
42------------------------------------------------------------------- 38-------------------------------------------------------------------
43 39