9 MTRand &_mtrand,
Index _n_config)
10 : mtrand(_mtrand), n_config(_n_config) {}
19 : m_n_config(_n_config),
22 _in_config.configuration().supercell().max_allowed_occupation()),
23 m_site_selection(_in_config.sites().begin(), _in_config.sites().end()) {
25 throw std::runtime_error(
26 "Error in ConfigEnumRandomOccupations: n_config < 0");
49 "ConfigEnumRandomOccupations";
Enumerate n random occupations in a particular Supercell.
Eigen::VectorXi m_max_allowed
void increment() override
Implements increment.
ConfigEnumRandomOccupations(ConfigEnumInput const &_in_config, ConfigEnumRandomOccupationsParams const ¶ms)
std::vector< Index > m_site_selection
static const std::string enumerator_name
std::string name() const override
Derived enumerators must implement name, via ENUM_MEMBERS.
notstd::cloneable_ptr< Configuration > m_current
virtual jsonParser source(step_type step) const
void _invalidate()
Call if enumeration complete.
void _increment_step()
Increment current step value.
step_type step() const
Increments with each enumerated object.
void _set_step(step_type val)
Set current step value.
Configuration const & configuration() const
void reset_properties(ConfigType &config)
INDEX_TYPE Index
For long integer indexing:
Parameters controlling ConfigEnumRandomOccupations.
ConfigEnumRandomOccupationsParams(MTRand &_mtrand, Index _n_config)