24template <
size_t Size,
typename Expo>
27 std::copy(il.begin(), il.end(), this->v.begin());
28 for (Expo i = il.size(); i < Size; i++)
32template <
size_t Size,
typename Expo>
42template <
size_t Size,
typename Expo>
45 for (uint64_t i = 0; i < Size; i++)
50template <
size_t Size,
typename Expo>
52 static std::random_device rd;
53 static std::mt19937 g(rd());
56 std::shuffle(
res.v.begin(),
res.v.end(), g);
60template <
size_t Size,
typename Expo>
63 for (
size_t i = 0; i < Size; i++)
64 for (
size_t j = i + 1; j < Size; j++)
65 if (this->v[i] > this->v[j])
70template <
size_t Size,
typename Expo>
73 for (
size_t i = 0; i < Size; i++)
74 for (
size_t j = i + 1; j < Size; j++)
75 if (this->v[i] > this->v[j])
80template <
size_t Size,
typename Expo>
83 for (
size_t i = 0; i < Size - 1; i++)
84 if (this->v[i] > this->v[i + 1])
89template <
size_t Size,
typename Expo>
91 std::array<bool, Size> b{};
93 for (
size_t i = 0; i < Size; i++) {
95 for (
size_t j = i; !b[j]; j = this->v[j])
103template <
size_t Size,
typename Expo>
105 for (
size_t i = 0; i < Size; i++) {
106 for (
size_t j = i + 1; j < Size; j++) {
107 if ((this->v[i] > this->v[j]) && (other[i] < other[j]))
118template <
size_t Size,
typename Expo>
119struct hash<
HPCombi::PermGeneric<Size, Expo>> {
121 return hash<HPCombi::VectGeneric<Size, Expo>>()(ar);
#define HPCOMBI_ASSERT(x)
Definition debug.hpp:28
std::array< std::tuple< uint16_t, uint16_t, std::array< uint16_t, gens.size()> >, 65536 > res
Definition image.cpp:66
Definition perm_generic.hpp:39
uint64_t length() const
Definition perm_generic_impl.hpp:71
bool left_weak_leq(PermGeneric other) const
Definition perm_generic_impl.hpp:104
static PermGeneric elementary_transposition(uint64_t i)
Definition perm_generic_impl.hpp:34
static PermGeneric random()
Definition perm_generic_impl.hpp:51
PermGeneric inverse() const
Definition perm_generic_impl.hpp:43
uint64_t nb_cycles() const
Definition perm_generic_impl.hpp:90
vect lehmer() const
Definition perm_generic_impl.hpp:61
uint64_t nb_descents() const
Definition perm_generic_impl.hpp:81
A generic class for combinatorial integer vectors.
Definition vect_generic.hpp:48
size_t operator()(const HPCombi::PermGeneric< Size, Expo > &ar) const
Definition perm_generic_impl.hpp:120