26 #ifndef TILEDARRAY_IRREP_H__INCLUDED 27 #define TILEDARRAY_IRREP_H__INCLUDED 79 std::unique_ptr<unsigned int[]> data_;
91 data_(
std::make_unique<unsigned int[]>(other.degree_ << 1)),
92 degree_(other.degree_)
94 std::copy_n(other.data_.get(), other.degree_ << 1, data_.get());
98 Irrep(
const std::initializer_list<unsigned int>& mu,
99 const std::initializer_list<unsigned int>& M) :
100 data_(
std::make_unique<unsigned int[]>(M.
size() << 1u)), degree_(M.
size())
107 std::fill(
std::copy(mu.begin(), mu.end(), data_.get()), data_.get() + degree_, 0u);
108 std::copy(M.begin(), M.end(), data_.get() + degree_);
112 const unsigned int* MADNESS_RESTRICT
const M = data_.get() + degree_;
113 const unsigned int* MADNESS_RESTRICT
const mu = data_.get();
114 unsigned int M_max = 0u;
115 unsigned int mu_sum = 0u;
116 for(
unsigned int i = 0u; i < degree_; ++i) {
125 TA_ASSERT(std::count(M, M + degree_, i + 1u) == mu[i]);
139 if(degree_ != other.degree_) {
140 data_ = std::make_unique<unsigned int[]>(other.degree_ << 1);
141 degree_ = other.degree_;
143 std::copy_n(other.data_.get(), other.degree_ << 1, data_.get());
151 unsigned int degree()
const {
return degree_; }
157 const unsigned int*
data()
const {
return data_.get(); }
163 #endif // TILEDARRAY_IRREP_H__INCLUDED Irrep of an symmetric group.
Irrep(const Irrep &other)
KroneckerDeltaTile< _N >::numeric_type max(const KroneckerDeltaTile< _N > &arg)
size_t size(const DistArray< Tile, Policy > &a)
Irrep & operator=(const Irrep &other)
Copy operator.
unsigned int degree() const
Irrep degree accessor.
DistArray< Tile, Policy > copy(const DistArray< Tile, Policy > &a)
Irrep & operator=(Irrep &&)=default
Irrep(const std::initializer_list< unsigned int > &mu, const std::initializer_list< unsigned int > &M)
Irrep constructor.
const unsigned int * data() const
Data accessor.