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

Function Documentation

template<typename T>
inline auto Pennylane::Util::sorting_indices(const T *arr, size_t length) -> std::vector<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.