Project Euler Homework
Public Member Functions

perm032 Class Reference

#include <032_permutation.h>

List of all members.

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

Detailed Description

list all permutations from 1 to N

Definition at line 12 of file 032_permutation.h.


Constructor & Destructor Documentation

perm032::perm032 ( unsigned  N)

sequence of digits (1~N)

Parameters:
Nnumber of digits

Definition at line 31 of file 032_permutation.h.

perm032::perm032 ( digit *  perm2,
unsigned  length 
)

Construct initial permutation 123...N.

Parameters:
perm2array of digits
lengthnumber of digits

Definition at line 43 of file 032_permutation.h.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables