Assigning values in one vector to indices in another vector (in SWIFT)

Basically I have been trying to assign a new vector with values from another.This can be done sequentially using :


vDSP_vindex(A,B,Stride,C,Stride,Length)


So if A has 10 elements,B has 20 indices and C has 20 elements; we assign all the values in C using the elements in A at indices defined in B.

But what if I want to have the indices of C in B? to be populated with elements from A.


Hope someone can help with this.


Best,


Feras A.