Added some STL code to reorder an array based on an ordering array.