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

13 lines
271 B
C++

#pragma once
#include <vector>
/**
* Generate all permutations of a vector.
*
* @param a: vector containing the elements to permute.
*
* @return a vector with all permutations of `a`.
*/
template<typename T>
std::vector<std::vector<T>> perm(std::vector<T> a);