|
EcGen 1.1.8
|
Permutation generation (SJT and EHR algorithms). More...
#include <py2cpp/gen.hpp>#include <type_traits>Go to the source code of this file.
Namespaces | |
| namespace | ecgen |
Functions | |
| auto | ecgen::sjt_gen (int n) -> py::Generator< int > |
| Generate permutation indices using Steinhaus-Johnson-Trotter algorithm. | |
| auto | ecgen::ehr_gen (int n) -> py::Generator< int > |
| Generate permutation indices using Eades-Hickey-Read (EHR) algorithm. | |
| template<int N> | |
| constexpr auto | ecgen::Factorial () |
| Compute factorial N! at compile time. | |
| template<typename Container> | |
| auto | ecgen::sjt (Container &perm) -> py::Generator< Container & > |
| Generate all permutations via adjacent transpositions (SJT algorithm). | |
Permutation generation (SJT and EHR algorithms).