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