wynnbuilder-forked-for-changes/js/c++/utils.h

14 lines
271 B
C
Raw Normal View History

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