From 2c8a5bc753e5787d2a11487c2a598f3cfbe2cecf Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Tue, 5 May 2015 21:21:28 +0200 Subject: updated Interpolation imports --- packages/gsl/src/Numeric/GSL/Interpolation.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'packages/gsl') diff --git a/packages/gsl/src/Numeric/GSL/Interpolation.hs b/packages/gsl/src/Numeric/GSL/Interpolation.hs index 4d72ee2..fb49e40 100644 --- a/packages/gsl/src/Numeric/GSL/Interpolation.hs +++ b/packages/gsl/src/Numeric/GSL/Interpolation.hs @@ -32,8 +32,7 @@ module Numeric.GSL.Interpolation ( , evaluateIntegralV ) where -import Data.Packed.Vector(Vector, fromList, dim) -import Data.Packed.Foreign(appVector) +import Numeric.LinearAlgebra(Vector, fromList, size, Numeric) import Foreign.C.Types import Foreign.Marshal.Alloc(alloca) import Foreign.Ptr(Ptr) @@ -57,6 +56,9 @@ methodToInt CSplinePeriodic = 3 methodToInt Akima = 4 methodToInt AkimaPeriodic = 5 +dim :: Numeric t => Vector t -> Int +dim = size + applyCFun hsname cname fun mth xs ys x | dim xs /= dim ys = error $ "Error: Vectors of unequal sizes " ++ -- cgit v1.2.3