Hi,I recently wrote a simple particle filter for a robotics project and needed an arg_min function. This function returns the argument that results in a minimum value of a function (as opposed to the minimum argument value itself https://en.wikipedia.org/wiki/Arg_max). In my case, from a list of points I needed to find the point that was closest to another given point.I based my implementation on the examples given on cppreference for std::transform and std::min_element. The major advantage of a combined algorithm as opposed to using std::transform and std::min_element individually is that it cuts the number of function evaluations in half by caching the result.