diff options
Diffstat (limited to 'c++/descriptor.h')
-rw-r--r-- | c++/descriptor.h | 54 |
1 files changed, 50 insertions, 4 deletions
diff --git a/c++/descriptor.h b/c++/descriptor.h index 63d6a5c..8c0036a 100644 --- a/c++/descriptor.h +++ b/c++/descriptor.h @@ -47,9 +47,9 @@ public: static constexpr std::array<std::array<int32_t, D>, Q> directions = {{ { 0, 0}, {-1, 0}, + { 1, 0}, { 0,-1}, { 0, 1}, - { 1, 0} }}; static constexpr std::array<typename saw::native_data_type<T>::type,Q> weights = { @@ -62,15 +62,61 @@ public: static constexpr std::array<uint64_t,Q> opposite_index = { 0, - 3, - 4, + 2, 1, - 2 + 4, + 3 }; static constexpr typename saw::native_data_type<T>::type inv_cs2 = 3.0; static constexpr typename saw::native_data_type<T>::type cs2 = 1./3.; }; + +template<typename T> +class df_info<T,sch::Descriptor<2, 9>> { +public: + static constexpr uint64_t D = 2u; + static constexpr uint64_t Q = 9u; + + static constexpr std::array<std::array<int32_t, D>, Q> directions = {{ + { 0, 0}, + {-1, 0}, + { 1, 0}, + { 0,-1}, + { 0, 1}, + {-1,-1}, + { 1, 1}, + {-1, 1}, + { 1,-1} + }}; + + static constexpr std::array<typename saw::native_data_type<T>::type,Q> weights = { + 4./9., + 1./9., + 1./9., + 1./9., + 1./9., + 1./36., + 1./36., + 1./36., + 1./36. + }; + + static constexpr std::array<uint64_t,Q> opposite_index = { + 0, + 2, + 1, + 4, + 3, + 6, + 5, + 8, + 7 + }; + + static constexpr typename saw::native_data_type<T>::type inv_cs2 = 3.0; + static constexpr typename saw::native_data_type<T>::type cs2 = 1./3.; +}; } } |