github.com/jiajun1992/watercarver@v0.0.0-20191031150618-dfc2b17c0c4a/StadiumForWaterCarver/src/Permutation.h (about) 1 /* 2 * Permutation.h 3 * 4 * Created on: 22.10.2010 5 * Author: stephaniebayer 6 * 7 * Class permutation contains a function which creates a random permutation to the values 1 to N and one which 8 * represent a permutation as a matrix containing the position of the values 9 * 10 */ 11 12 13 14 #ifndef PERMUTATION_H_ 15 #define PERMUTATION_H_ 16 #include<vector> 17 #include "G_q.h" 18 #include "FakeZZ.h" 19 NTL_CLIENT 20 21 #include "Mod_p.h" 22 23 class Permutation { 24 public: 25 Permutation(); 26 virtual ~Permutation(); 27 28 //creates permutation of length N and returns is as a vector 29 static vector<long>* permutation(long N); 30 //creates a permutation of a mxn matrix 31 static void perm_matrix(vector<vector<vector<long>* >* >* pi,long n, long m); 32 static void perm_matrix(vector<vector<vector<long>* >* >* pi, const vector<long>& v,long n, long m); 33 }; 34 35 #endif /* PERMUTATION_H_ */