00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef PARTITION_MATRIX_AUTOMORPHISM_SEARCH_H_
00034 #define PARTITION_MATRIX_AUTOMORPHISM_SEARCH_H_
00035
00036 #include "search/partition/r_base.h"
00037 #include "search/partition/matrix_refinement1.h"
00038 #include "search/partition/refinement_family.h"
00039 #include "predicate/matrix_automorphism_predicate.h"
00040
00041 namespace permlib {
00042 namespace partition {
00043
00045 template<class BSGSIN,class TRANSRET>
00046 class MatrixAutomorphismSearch : public RBase<BSGSIN,TRANSRET> {
00047 public:
00048 typedef typename RBase<BSGSIN,TRANSRET>::PERM PERM;
00049
00051
00055 MatrixAutomorphismSearch(const BSGSIN& bsgs, uint pruningLevelDCM);
00056
00058
00061 template<class MATRIX>
00062 void construct(const MATRIX& matrix);
00063 };
00064
00065 template<class BSGSIN,class TRANSRET>
00066 MatrixAutomorphismSearch<BSGSIN,TRANSRET>::MatrixAutomorphismSearch(const BSGSIN& bsgs, uint pruningLevelDCM)
00067 : RBase<BSGSIN,TRANSRET>(bsgs, pruningLevelDCM)
00068 { }
00069
00070 template<class BSGSIN,class TRANSRET>
00071 template<class MATRIX>
00072 void MatrixAutomorphismSearch<BSGSIN,TRANSRET>::construct(const MATRIX& matrix) {
00073 MatrixAutomorphismPredicate<PERM,MATRIX>* matrixPred = new MatrixAutomorphismPredicate<PERM,MATRIX>(matrix);
00074
00075 MatrixRefinement1<PERM,MATRIX> matRef(RBase<BSGSIN,TRANSRET>::m_bsgs.n, matrix);
00076 matRef.initializeAndApply(RBase<BSGSIN,TRANSRET>::m_partition);
00077 PERM empty(RBase<BSGSIN,TRANSRET>::m_bsgs.n);
00078 matRef.apply2(RBase<BSGSIN,TRANSRET>::m_partition2, empty);
00079
00080 RBase<BSGSIN,TRANSRET>::construct(matrixPred,
00081 new MatrixAutomorphismRefinementFamily<PERM,MATRIX>(RBase<BSGSIN,TRANSRET>::m_bsgs.n, matrix));
00082 }
00083
00084 }
00085 }
00086
00087 #endif // -- PARTITION_MATRIX_AUTOMORPHISM_SEARCH_H_