2023-04-01 21:33:29 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
/**
|
2023-04-02 00:06:12 +00:00
|
|
|
* Generate all permutations of a vector.
|
2023-04-01 21:33:29 +00:00
|
|
|
*
|
2023-04-02 00:06:12 +00:00
|
|
|
* @param a: vector containing the elements to permute.
|
2023-04-01 21:33:29 +00:00
|
|
|
*
|
2023-04-02 00:06:12 +00:00
|
|
|
* @return a vector with all permutations of `a`.
|
2023-04-01 21:33:29 +00:00
|
|
|
*/
|
2023-04-02 00:06:12 +00:00
|
|
|
template<typename T>
|
|
|
|
std::vector<std::vector<T>> perm(std::vector<T> a);
|