11using namespace Kernel;
15 : m_hklMin(hklMin), m_hklMax(hklMax),
m_size(getSize(m_hklMin, m_hklMax)), m_begin(getBeginIterator()),
16 m_end(getEndIterator()) {}
21 : m_hklMin(hklMinMax * -1), m_hklMax(hklMinMax),
m_size(getSize(m_hklMin, m_hklMax)), m_begin(getBeginIterator()),
22 m_end(getEndIterator()) {}
36 : m_hklMax(floor(unitCell.a() / dMin), floor(unitCell.b() / dMin), floor(unitCell.c() / dMin)) {
46 V3D diff = (max - min) +
V3D(1, 1, 1);
47 return static_cast<size_t>(diff.
X() * diff.
Y() * diff.
Z());
63 : m_h(0), m_k(0), m_l(0), m_hkl(
V3D(0, 0, 0)), m_hMax(0), m_kMin(0), m_kMax(0), m_lMin(0), m_lMax(0) {}
67 : m_h(static_cast<int>(current.
X())), m_k(static_cast<int>(current.
Y())), m_l(static_cast<int>(current.
Z())),
68 m_hkl(current), m_hMax(m_h), m_kMin(m_k), m_kMax(m_k), m_lMin(m_l), m_lMax(m_l) {}
72 : m_h(static_cast<int>(hklMin.
X())), m_k(static_cast<int>(hklMin.
Y())), m_l(static_cast<int>(hklMin.
Z())),
73 m_hkl(hklMin), m_hMax(static_cast<int>(hklMax.
X())), m_kMin(m_k), m_kMax(static_cast<int>(hklMax.
Y())),
74 m_lMin(m_l), m_lMax(static_cast<int>(hklMax.
Z())) {}
91 m_hkl =
V3D(m_h, m_k, m_l);
size_t m_size
Maximum size of the store.
The const_iterator class.
const_iterator()
Default constructor, requirement from boost::iterator_facade.
void increment()
Increments HKL, l moves fastest, h moves slowest, wrapping around at the max for each index.
size_t getSize(const Kernel::V3D &min, const Kernel::V3D &max) const
Returns the number of indices between min and max.
HKLGenerator(const Kernel::V3D &hklMin, const Kernel::V3D &hklMax)
Constructs a generator that creates all indices from hklMin to hklMax.
const_iterator getEndIterator() const
Constructs an iterator that points to an HKL one past the maximum.
Kernel::V3D getEndHKL() const
Returns the HKL "one past the maximum".
const_iterator getBeginIterator() const
Constructs an iterator that points to the beginning of the sequence.
Class to implement unit cell of crystals.
constexpr double X() const noexcept
Get x.
constexpr double Y() const noexcept
Get y.
constexpr double Z() const noexcept
Get z.