File indexing completed on 2025-07-05 08:11:10
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Utilities/Holders.hpp"
0012 #include "Acts/Utilities/detail/grid_helper.hpp"
0013
0014 #include <array>
0015 #include <tuple>
0016
0017 #include <boost/container/small_vector.hpp>
0018
0019 namespace Acts {
0020
0021 template <typename grid_t>
0022 class BinnedGroup;
0023
0024 template <typename grid_t>
0025 class BinnedGroupIterator {
0026 public:
0027 static constexpr std::size_t DIM = grid_t::DIM;
0028
0029
0030
0031
0032
0033
0034
0035 BinnedGroupIterator(
0036 BinnedGroup<grid_t>&& group, std::array<std::size_t, DIM> index,
0037 std::array<std::vector<std::size_t>, DIM> navigation) = delete;
0038
0039
0040
0041
0042
0043
0044
0045 BinnedGroupIterator(
0046 const BinnedGroup<grid_t>&& group, std::array<std::size_t, DIM> index,
0047 std::array<std::vector<std::size_t>, DIM> navigation) = delete;
0048
0049
0050
0051
0052
0053 BinnedGroupIterator(const BinnedGroup<grid_t>& group,
0054 std::array<std::size_t, DIM> index,
0055 std::array<std::vector<std::size_t>, DIM> navigation);
0056
0057
0058
0059
0060
0061 BinnedGroupIterator(const BinnedGroupIterator<grid_t>& other) = delete;
0062
0063
0064
0065 BinnedGroupIterator<grid_t>& operator=(
0066 const BinnedGroupIterator<grid_t>& other) = delete;
0067
0068
0069
0070 BinnedGroupIterator(BinnedGroupIterator<grid_t>&& other) noexcept = default;
0071
0072
0073
0074 BinnedGroupIterator<grid_t>& operator=(BinnedGroupIterator&& other) noexcept =
0075 default;
0076
0077
0078 ~BinnedGroupIterator() = default;
0079
0080
0081
0082
0083 bool operator==(const BinnedGroupIterator<grid_t>& other) const;
0084
0085
0086
0087 BinnedGroupIterator<grid_t>& operator++();
0088
0089
0090
0091
0092
0093 std::tuple<
0094 boost::container::small_vector<std::size_t, detail::ipow(3, grid_t::DIM)>,
0095 std::size_t,
0096 boost::container::small_vector<std::size_t, detail::ipow(3, grid_t::DIM)>>
0097 operator*() const;
0098
0099 private:
0100
0101 void findNotEmptyBin();
0102
0103 private:
0104
0105 detail::RefHolder<const BinnedGroup<grid_t>> m_group{nullptr};
0106
0107 typename grid_t::local_iterator_t m_gridItr;
0108
0109 typename grid_t::local_iterator_t m_gridItrEnd;
0110 };
0111
0112 }
0113
0114 #include "Acts/Seeding/BinnedGroupIterator.ipp"