I'm using hMatrix and the first lines of my code are:
import Numeric.LinearAlgebra
import qualified Data.Vector as V
The problem is that in my code the vector type is V.Vector
, but some methods defined by hMatrix have type Vector -> ...
and GHC does not understand when I try to use these methods, saying that they are not defined for the type V.Vector
. How can I solve this problem?
Update:
From the documentation of hMatrix:
The
Vector
type is aStorable
vector from Roman Leshchinskiy’s vector package, so all array processing tools provided by this library are directly available.
However, some basic operators like (++)
(which is present in Data.Vector.Storable
) are not included in hMatrix. Is it impossible to use these from hMatrix or is there some simple way to tell the compiler that these types are the same?