scatter

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

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.