Template Function Pennylane::Util::sorting_indices(const T *, std::size_t)

Function Documentation

template<typename T>
inline auto Pennylane::Util::sorting_indices(const T *arr, std::size_t length) -> std::vector<std::size_t>

Determines the indices that would sort an array.

Template Parameters:

T – Vector data type.

Parameters:
  • arr – Array to be inspected.

  • length – Size of the array

Returns:

a vector with indices that would sort the array.