Template Function Pennylane::Util::reverse_pairs¶
Defined in File ConstantUtil.hpp
Function Documentation¶
-
template<class T, class U, std::size_t size>
constexpr auto Pennylane::Util::reverse_pairs(const std::array<std::pair<T, U>, size> &arr) -> std::array<std::pair<U, T>, size>¶ Swap positions of elements in each pair.
- Template Parameters
T – Type of first elements
U – Type of second elements
size – Size of the array
- Parameters
arr – Array to reverse
- Returns
reversed array
api/function_ConstantUtil_8hpp_1ab474d8a4eb7d491459dd992e8ab8db63
Download Python script
Download Notebook
View on GitHub