|
@@ -1,6 +1,8 @@
|
|
|
#ifndef PERMUTATION_H
|
|
|
#define PERMUTATION_H
|
|
|
|
|
|
+#include <vector>
|
|
|
+
|
|
|
// permutation with fixpoint pi[0]=0
|
|
|
class permutation {
|
|
|
public:
|
|
@@ -9,7 +11,8 @@ class permutation {
|
|
|
void random();
|
|
|
int operator[](int i); // return the image of i (i and its image 0-based)
|
|
|
protected:
|
|
|
- int *sigma, size; // data[i] is the image of i
|
|
|
+ int size;
|
|
|
+ std::vector<int> sigma; // sigma[i] is the image of i
|
|
|
};
|
|
|
|
|
|
#endif // PERMUTATION_H
|