Eigen::StaticSGroup< Gen > Class Template Reference

Static symmetry group. More...

#include <StaticSymmetry.h>

Public Member Functions

constexpr StaticSGroup ()
 
constexpr StaticSGroup (const StaticSGroup< Gen... > &)
 
constexpr StaticSGroup (StaticSGroup< Gen... > &&)
 
template<typename Tensor_ , typename... IndexTypes>
internal::tensor_symmetry_value_setter< Tensor_, StaticSGroup< Gen... > > operator() (Tensor_ &tensor, typename Tensor_::Index firstIndex, IndexTypes... otherIndices) const
 
template<typename Tensor_ >
internal::tensor_symmetry_value_setter< Tensor_, StaticSGroup< Gen... > > operator() (Tensor_ &tensor, std::array< typename Tensor_::Index, Tensor_::NumIndices > const &indices) const
 

Static Public Member Functions

template<typename Op , typename RV , typename Index , std::size_t N, typename... Args>
static RV apply (const std::array< Index, N > &idx, RV initial, Args &&... args)
 
template<typename Op , typename RV , typename Index , typename... Args>
static RV apply (const std::vector< Index > &idx, RV initial, Args &&... args)
 
constexpr static std::size_t size ()
 
constexpr static int globalFlags ()
 

Static Public Attributes

constexpr static std::size_t static_size = ge::count
 

Private Types

typedef internal::group_theory::enumerate_group_elements< internal::tensor_static_symgroup_multiply, internal::tensor_static_symgroup_equality, typename internal::tensor_static_symgroup_identity_ctor< NumIndices >::type, internal::type_list< typename internal::tensor_static_symgroup_element_ctor< Gen, NumIndices >::type... > > group_elements
 
typedef group_elements::type ge
 

Static Private Attributes

constexpr static std::size_t NumIndices = internal::tensor_symmetry_num_indices<Gen...>::value
 

Detailed Description

template<typename... Gen>
class Eigen::StaticSGroup< Gen >

Static symmetry group.

This class represents a symmetry group that is known and resolved completely at compile time. Ideally, no run-time penalty is incurred compared to the manual unrolling of the symmetry.

CAUTION:

Do not use this class directly for large symmetry groups. The compiler may run into a limit, or segfault or in the very least will take a very, very, very long time to compile the code. Use the SGroup class instead if you want a static group. That class contains logic that will automatically select the DynamicSGroup class instead if the symmetry group becomes too large. (In that case, unrolling may not even be beneficial.)

Member Typedef Documentation

◆ ge

template<typename... Gen>
typedef group_elements::type Eigen::StaticSGroup< Gen >::ge
private

◆ group_elements

Constructor & Destructor Documentation

◆ StaticSGroup() [1/3]

template<typename... Gen>
constexpr Eigen::StaticSGroup< Gen >::StaticSGroup ( )
inlineconstexpr
182 {}

◆ StaticSGroup() [2/3]

template<typename... Gen>
constexpr Eigen::StaticSGroup< Gen >::StaticSGroup ( const StaticSGroup< Gen... > &  )
inlineconstexpr
183 {}

◆ StaticSGroup() [3/3]

template<typename... Gen>
constexpr Eigen::StaticSGroup< Gen >::StaticSGroup ( StaticSGroup< Gen... > &&  )
inlineconstexpr
184 {}

Member Function Documentation

◆ apply() [1/2]

template<typename... Gen>
template<typename Op , typename RV , typename Index , std::size_t N, typename... Args>
static RV Eigen::StaticSGroup< Gen >::apply ( const std::array< Index, N > &  idx,
RV  initial,
Args &&...  args 
)
inlinestatic
187  {
188  return internal::tensor_static_symgroup_do_apply<ge>::template run<Op, RV, NumIndices>(idx, initial, args...);
189  }
args
Definition: compute_granudrum_aor.py:143

References compute_granudrum_aor::args.

Referenced by test_symgroups_selection(), and test_symgroups_static().

◆ apply() [2/2]

template<typename... Gen>
template<typename Op , typename RV , typename Index , typename... Args>
static RV Eigen::StaticSGroup< Gen >::apply ( const std::vector< Index > &  idx,
RV  initial,
Args &&...  args 
)
inlinestatic
192  {
193  eigen_assert(idx.size() == NumIndices);
194  return internal::tensor_static_symgroup_do_apply<ge>::template run<Op, RV, NumIndices>(idx, initial, args...);
195  }
#define eigen_assert(x)
Definition: Macros.h:910
constexpr static std::size_t NumIndices
Definition: StaticSymmetry.h:173

References compute_granudrum_aor::args, eigen_assert, and Eigen::StaticSGroup< Gen >::NumIndices.

◆ globalFlags()

◆ operator()() [1/2]

template<typename... Gen>
template<typename Tensor_ >
internal::tensor_symmetry_value_setter<Tensor_, StaticSGroup<Gen...> > Eigen::StaticSGroup< Gen >::operator() ( Tensor_ &  tensor,
std::array< typename Tensor_::Index, Tensor_::NumIndices > const &  indices 
) const
inline
212  {
213  return internal::tensor_symmetry_value_setter<Tensor_, StaticSGroup<Gen...>>(tensor, *this, indices);
214  }
constexpr StaticSGroup()
Definition: StaticSymmetry.h:182

◆ operator()() [2/2]

template<typename... Gen>
template<typename Tensor_ , typename... IndexTypes>
internal::tensor_symmetry_value_setter<Tensor_, StaticSGroup<Gen...> > Eigen::StaticSGroup< Gen >::operator() ( Tensor_ &  tensor,
typename Tensor_::Index  firstIndex,
IndexTypes...  otherIndices 
) const
inline
204  {
205  static_assert(sizeof...(otherIndices) + 1 == Tensor_::NumIndices,
206  "Number of indices used to access a tensor coefficient must be equal to the rank of the tensor.");
207  return operator()(tensor, std::array<typename Tensor_::Index, Tensor_::NumIndices>{{firstIndex, otherIndices...}});
208  }
internal::tensor_symmetry_value_setter< Tensor_, StaticSGroup< Gen... > > operator()(Tensor_ &tensor, typename Tensor_::Index firstIndex, IndexTypes... otherIndices) const
Definition: StaticSymmetry.h:203

◆ size()

template<typename... Gen>
constexpr static std::size_t Eigen::StaticSGroup< Gen >::size ( )
inlinestaticconstexpr
199 { return ge::count; }

Referenced by test_symgroups_selection(), and test_symgroups_static().

Member Data Documentation

◆ NumIndices

template<typename... Gen>
constexpr static std::size_t Eigen::StaticSGroup< Gen >::NumIndices = internal::tensor_symmetry_num_indices<Gen...>::value
staticconstexprprivate

◆ static_size

template<typename... Gen>
constexpr static std::size_t Eigen::StaticSGroup< Gen >::static_size = ge::count
staticconstexpr

The documentation for this class was generated from the following file: