25#ifndef __BITPIT_PIERCED_KERNEL_RANGE_TPP__
26#define __BITPIT_PIERCED_KERNEL_RANGE_TPP__
33template<
typename id_t>
45template<
typename id_t>
58template<
typename id_t>
61 initialize(kernel, first, last);
70template<
typename id_t>
73 initialize(begin, end);
81template<
typename id_t>
85 m_cend = kernel->
cend();
95template<
typename id_t>
98 m_cbegin = kernel->
find(first);
99 m_cend = ++(kernel->
find(last));
108template<
typename id_t>
112 throw std::runtime_error(
"The two iterators belong to different kernels");
124template<
typename id_t>
127 std::swap(m_cbegin, other.m_cbegin);
128 std::swap(m_cend, other.m_cend);
136template<
typename id_t>
141 std::size_t flatBegin = kernel.
evalFlatIndex(m_cbegin.getId());
147 flatEnd = kernel.
size();
150 std::size_t size = (flatEnd - flatBegin);
160template<
typename id_t>
173template<
typename id_t>
184template<
typename id_t>
197template<
typename id_t>
Iterator for the class PiercedKernel.
const kernel_type & getKernel() const
The PiercedKernelRange allow to iterate using range-based loops over a PiercedStorage.
const_iterator cend() const noexcept
const_iterator end() const noexcept
void initialize(const kernel_t *kernel)
void swap(PiercedKernelRange &other) noexcept
std::size_t evalSize() const
const_iterator cbegin() const noexcept
const_iterator begin() const noexcept
Metafunction for generating a pierced kernel.
const_iterator cend() const noexcept
const_iterator find(const id_t &id) const noexcept
const_iterator cbegin() const noexcept
std::size_t evalFlatIndex(id_t id) const
std::size_t getLastUsedPos() const