Template Function Pennylane::Util::sorting_indices(const std::vector<T>&)

Function Documentation

template<typename T>
inline auto Pennylane::Util::sorting_indices(const std::vector<T> &vec) -> std::vector<size_t>

Determines the indices that would sort a vector.

Template Parameters

T – Array data type.

Parameters

vec – Vector to be inspected.

Returns

a vector with indices that would sort the vector.