[Haskell-cafe] Sorting a Repa Array
Hans Georg Schaathun
georg+haskell at schaathun.net
Thu Jan 23 18:40:42 UTC 2014
On Thu, Jan 23, 2014 at 05:59:55PM +0100, Chaddaï Fouché wrote:
> Convert to a vector (that should be efficient since I understand that it is
> the underlying representation anyway), then use the sort algorithms
> available in the vector-algorithms package then convert back. You'll need
> to use modify to apply the sort (since it works on MVector).
Thanks a lot; I think I am starting to comprehend.
I suppose this is the modify you mean:
modify :: (forall s. MVector s a -> ST s ()) -> Vector a -> Vector a
forall is a chapter of Haskell which I have not made it through,
but with a concrete example which I need, I should manage tomorrow.
Thanks again, to both responders.
:-- Hans Georg
More information about the Haskell-Cafe