Or login with:
| intcycles( | int | n | |
| int* | p | ) |
#include <codecogs/maths/combinatorics/permutations/cycles.h> #include <iostream> int main() { int beta[9] = {2, 3, 9, 6, 7, 8, 5, 4, 1}; std::cout << "The number of cycles of the Beta permutation: "; std::cout << Maths::Combinatorics::Permutations::cycles(9, beta); std::cout << std::endl; return 0; }
The number of cycles of the Beta permutation: 3| n | the size of the permutation |
| p | the actual permutation stored as an array |
Source code is available when you agree to a GP Licence or buy a Commercial Licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.
You must login to leave a messge