scatter


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

Scatter.

  • a Indices.
  • x Source vector.

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

If the same index appears more than once in a, the result is undefined.