1 // --------------------------------------------------------------------------- 2 // 3 // This file is part of SymPol 4 // 5 // Copyright (C) 2006-2010 Thomas Rehn <thomas@carmen76.de> 6 // 7 // This program is free software; you can redistribute it and/or 8 // modify it under the terms of the GNU General Public License 9 // as published by the Free Software Foundation; either version 2 10 // of the License, or (at your option) any later version. 11 // 12 // This program is distributed in the hope that it will be useful, 13 // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 // GNU General Public License for more details. 16 // 17 // You should have received a copy of the GNU General Public License 18 // along with this program; if not, write to the Free Software 19 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 // 21 // --------------------------------------------------------------------------- 22 23 #ifndef SYMPOL_COMMON_H_ 24 #define SYMPOL_COMMON_H_ 25 26 #include <boost/dynamic_bitset.hpp> 27 #include <set> 28 #include <map> 29 #include <iostream> 30 31 #include "config.h" 32 #include "types.h" 33 34 #include <permlib/permutation.h> 35 //#include <permlib/transversal/explicit_transversal.h> 36 #include <permlib/transversal/schreier_tree_transversal.h> 37 #include <permlib/bsgs.h> 38 39 namespace sympol { 40 41 typedef boost::dynamic_bitset<> Face; 42 typedef permlib::Permutation PERM; 43 //typedef permlib::ExplicitTransversal<PERM> TRANSVERSAL; 44 typedef permlib::SchreierTreeTransversal<PERM> TRANSVERSAL; 45 typedef permlib::BSGS<PERM,TRANSVERSAL> PermutationGroup; 46 47 struct FaceAction { operatorFaceAction48 Face operator()(const PERM &p, const Face &f) const { 49 Face ret(f.size()); 50 for (uint i = 0; i < f.size(); ++i) { 51 if (f[i]) 52 ret.set(p / i, 1); 53 } 54 return ret; 55 } 56 }; 57 58 enum SymmetryComputationMethod { DIRECT, ADM, IDM }; 59 60 } 61 62 #endif // COMMON_H_ 63