Project Euler Homework
|
#include <032_permutation.h>
Public Member Functions | |
perm032 (unsigned) | |
sequence of digits (1~N) | |
perm032 (digit *, unsigned) | |
Construct initial permutation 123...N. | |
~perm032 () | |
Construct permutation from existing array. | |
bool | next () |
Destructor. | |
void | print_perm () |
find next permutation | |
int | operator[] (idx) |
print the permutation to stdout | |
unsigned | length () |
find the i-th digit |
list all permutations from 1 to N
Definition at line 12 of file 032_permutation.h.
perm032::perm032 | ( | unsigned | N | ) |
sequence of digits (1~N)
N | number of digits |
Definition at line 31 of file 032_permutation.h.
perm032::perm032 | ( | digit * | perm2, |
unsigned | length | ||
) |
Construct initial permutation 123...N.
perm2 | array of digits |
length | number of digits |
Definition at line 43 of file 032_permutation.h.