template<typename F, typename A>
requires (Array<A> && NdaSymmetry<F, A>)
class nda::sym_grp< F, A >
Class representing a symmetry group.
A symmetry group detects and stores all different symmetry classes associated with a given nda::Array object.
A symmetry class is simply a set of all the elements of the array that are related to each other by some symmetry. The elements in a symmetry class have all the same values except for a possible sign flip or complex conjugation, i.e. an nda::operation. The symmetry classes form a partition of all the elements of the array.
- Template Parameters
-
Definition at line 145 of file sym_grp.hpp.
|
| sym_grp ()=default |
| Default constructor for a symmetry group.
|
|
| sym_grp (A const &a, std::vector< F > const &sym_list, long const max_length=0) |
| Construct a symmetry group for a given array and a list of its symmetries.
|
|
std::vector< get_value_t< A > > | get_representative_data (A const &a) const |
| Reduce an nda::Array to its representative data using symmetries.
|
|
std::vector< sym_class_t > const & | get_sym_classes () const |
| Get the symmetry classes.
|
|
template<typename H >
requires (NdaInitFunc<H, A>) |
void | init (A &a, H const &init_func, bool parallel=false) const |
| Initialize an nda::Array using an nda::NdaInitFunc.
|
|
template<typename V > |
void | init_from_representative_data (A &a, V const &vec) const |
| Initialize a multi-dimensional array from its representative data using symmetries.
|
|
long | num_classes () const |
| Get the number of symmetry classes.
|
|
std::pair< double, arr_idx_t > | symmetrize (A &a) const |
| Symmetrize an array and return the maximum symmetry violation and its corresponding array index.
|
|
template<typename F , typename A >
template<typename H >
requires (NdaInitFunc<H, A>)
void nda::sym_grp< F, A >::init |
( |
A & | a, |
|
|
H const & | init_func, |
|
|
bool | parallel = false ) const |
|
inline |
Initialize an nda::Array using an nda::NdaInitFunc.
The nda::NdaInitFunc object is evaluated only once per symmetry class. The result is then assigned to all elements in the symmetry class after applying the nda::operation.
- Template Parameters
-
- Parameters
-
a | nda::Array object to be initialized. |
init_func | Callable that is used to initialize the array. |
parallel | Parallelize using openmp and mpi. |
Definition at line 192 of file sym_grp.hpp.