vext-0.1.8.0: Array library monomorphized with backpack
Safe HaskellNone
LanguageHaskell2010

PermuteVector

Synopsis

Documentation

permute Source #

Arguments

:: forall (m :: Nat) (n :: Nat) (a :: TYPE R). Nat# m

indices length

-> Vector m (Finite# n)

indices

-> Vector n a

source

-> Vector m a

output

Permute the source array according to the indices:

forall ix. output[ix] = source[indices[ix]]