packages feed

hTensor 0.5.0 → 0.6.0

raw patch · 3 files changed

+8/−6 lines, 3 filesdep −haskell98dep ~hmatrixPVP ok

version bump matches the API change (PVP)

Dependencies removed: haskell98

Dependency ranges changed: hmatrix

API changes (from Hackage documentation)

- Numeric.LinearAlgebra.Array.Solve: solveHomog' :: (Compat i, Field t1, Coord t) => (Matrix t -> Matrix t1) -> NArray i t -> [Name] -> Either Double Int -> [NArray i t1]
+ Numeric.LinearAlgebra.Array.Solve: solveHomog' :: (Coord t1, Compat i, Coord t) => (Matrix t -> Matrix t1) -> NArray i t -> [Name] -> Either Double Int -> [NArray i t1]
- Numeric.LinearAlgebra.Array.Solve: solveHomog1' :: (Compat i, Field t1, Coord t) => (Matrix t -> Matrix t1) -> NArray i t -> [Name] -> NArray i t1
+ Numeric.LinearAlgebra.Array.Solve: solveHomog1' :: (Coord t1, Compat i, Coord t) => (Matrix t -> Matrix t1) -> NArray i t -> [Name] -> NArray i t1
- Numeric.LinearAlgebra.Array.Util: class (Num (Vector t), Field t) => Coord t
+ Numeric.LinearAlgebra.Array.Util: class (Num (Vector t), Field t, Storable t) => Coord t
- Numeric.LinearAlgebra.Array.Util: dummyAt :: Int -> NArray i t -> NArray i t
+ Numeric.LinearAlgebra.Array.Util: dummyAt :: (Coord t) => Int -> NArray i t -> NArray i t
- Numeric.LinearAlgebra.Array.Util: fromVector :: (Compat i) => i -> Vector t -> NArray i t
+ Numeric.LinearAlgebra.Array.Util: fromVector :: (Coord t, Compat i) => i -> Vector t -> NArray i t

Files

hTensor.cabal view
@@ -1,5 +1,5 @@ Name:               hTensor-Version:            0.5.0+Version:            0.6.0 License:            GPL License-file:       LICENSE Author:             Alberto Ruiz@@ -42,7 +42,7 @@     else       build-depends:    base < 3 -    Build-Depends:      haskell98, hmatrix >= 0.8.2, containers, random+    Build-Depends:      hmatrix >= 0.9.3, containers, random      hs-source-dirs:     lib     Exposed-modules:    Numeric.LinearAlgebra.Array.Util@@ -62,3 +62,4 @@     ghc-options:        -Wall                         -fno-warn-missing-signatures                         -fno-warn-orphans+
lib/Numeric/LinearAlgebra/Array/Display.hs view
@@ -160,7 +160,7 @@ ------------------------------------------------------  -- | Insert a dummy index of dimension 1 at a given level (for formatting purposes).-dummyAt :: Int -> NArray i t -> NArray i t+dummyAt :: Coord t => Int -> NArray i t -> NArray i t dummyAt k t = mkNArray d' (coords t) where     (d1,d2) = splitAt k (dims t)     d' = d1 ++ d : d2
lib/Numeric/LinearAlgebra/Array/Internal.hs view
@@ -64,13 +64,14 @@ import Numeric.LinearAlgebra((<>),Field) import Control.Applicative import Data.Function(on)+import Foreign(Storable) -- import Control.Parallel.Strategies import Debug.Trace  debug m f x = trace (m ++ show (f x)) x  -- | Types that can be elements of the multidimensional arrays.-class (Num (Vector t), Field t) => Coord t+class (Num (Vector t), Field t, Storable t) => Coord t instance Coord Double instance Coord (Complex Double) @@ -93,7 +94,7 @@                     }  -- | development function not intended for the end user-mkNArray :: [Idx i] -> Vector a -> NArray i a+mkNArray :: (Coord a) => [Idx i] -> Vector a -> NArray i a mkNArray [] _ = error "array with empty dimensions, use scalar" mkNArray dms vec = A dms v where     ds = map iDim dms@@ -384,7 +385,7 @@ ------------------------------------------------------------------------  -- | Create a 1st order array from a 'Vector'.-fromVector :: Compat i => i -> Vector t -> NArray i t+fromVector :: (Coord t, Compat i) => i -> Vector t -> NArray i t fromVector i v = mkNArray [Idx i (dim v) "1"] v  -- | Create a 2nd order array from a 'Matrix'.