1+ #pragma once
2+
3+ #include " ../global/Array_Operator.h"
4+
15#include < array>
26#include < map>
37#include < set>
4- # include < tuple >
8+
59#define NO_SEC_RETURN_TRUE if (this ->irreducible_sector_.empty()) return true ;
6- # include " ../global/Array_Operator.h "
10+
711namespace RI
812{
9- using namespace Array_Operator ;
10- template <typename TA, typename Tcell, std::size_t Ndim, typename Tdata>
13+ template <typename TA, typename TC, typename Tdata>
1114 class Symmetry_Filter
1215 {
13- using TC = std::array<Tcell, Ndim>;
1416 using TAC = std::pair<TA, TC>;
15-
1617 using TIJ = std::pair<TA, TA>;
1718 using TIJR = std::pair<TIJ, TC>;
1819 using Tsec = std::map<TIJ, std::set<TC>>;
19- public:
20+
21+ public:
2022 Symmetry_Filter (const TC& period_in, const Tsec& irsec)
2123 :period(period_in), irreducible_sector_(irsec) {}
2224 bool in_irreducible_sector (const TA& Aa, const TAC& Ab) const
2325 {
2426 NO_SEC_RETURN_TRUE;
27+ using namespace Array_Operator ;
2528 const TIJ& ap = { Aa, Ab.first };
2629 if (irreducible_sector_.find (ap) != irreducible_sector_.end ())
2730 if (irreducible_sector_.at (ap).find (Ab.second % this ->period ) != irreducible_sector_.at (ap).end ())
@@ -31,6 +34,7 @@ namespace RI
3134 bool in_irreducible_sector (const TAC& Aa, const TAC& Ab) const
3235 {
3336 NO_SEC_RETURN_TRUE;
37+ using namespace Array_Operator ;
3438 const TC dR = (Ab.second - Aa.second ) % this ->period ;
3539 const std::pair<TA, TA> ap = { Aa.first , Ab.first };
3640 if (irreducible_sector_.find (ap) != irreducible_sector_.end ())
@@ -60,9 +64,12 @@ namespace RI
6064 {
6165 return { {I.first ,J.first }, (J.second - I.second ) % this ->period };
6266 }
63- private:
64- const Tsec& irreducible_sector_;
67+
68+ public: // private:
6569 const TC& period;
70+ const Tsec& irreducible_sector_;
6671 };
6772
68- }
73+ }
74+
75+ #undef NO_SEC_RETURN_TRUE
0 commit comments