gather


function gather<Type>(a:Integer[_], x:Type[_]) -> Type[_]

Gather.

  • a Indices.
  • x Source vector.

Returns a vector y where y[n] == x[a[n]].