51 template <
typename value_t>
54 using Iterator =
typename std::vector<value_t>::const_iterator;
55 using Size =
typename std::vector<value_t>::size_type;
64 template <
typename id_getter_t = detail::DefaultGeometryIdGetter>
66 id_getter_t getId = id_getter_t());
115 if (
id.sensitive() != 0
u) {
119 if (
id.approach() != 0
u) {
120 return mask.setSensitive(0
u).value();
123 return mask.setSensitive(0
u).setApproach(0
u).value();
125 if (
id.boundary() != 0
u) {
126 return mask.setSensitive(0
u).setApproach(0
u).setLayer(0
u).value();
129 return mask.setSensitive(0
u)
142 return (lhs & mask) == (rhs &
mask);
148 template <
typename id_getter_t>
163 template <
typename value_t>
164 template <
typename id_getter_t>
166 std::vector<Value>&&
elements, id_getter_t getId)
170 [&](
const auto& lhs,
const auto& rhs) {
171 return getId(lhs) < getId(rhs);
175 [&](
const auto& lhs,
const auto& rhs) {
176 return getId(lhs) == getId(rhs);
179 throw std::invalid_argument(
"Input elements contain duplicates");
184 template <
typename value_t>
187 assert((m_elements.size() == m_ids.size()) and
188 "Inconsistent container state: #elements != #ids");
189 assert((m_elements.size() == m_masks.size()) and
190 "Inconsistent container state: #elements != #masks");
196 const auto it = std::upper_bound(m_ids.begin(), m_ids.end(),
id.value());
197 auto i = std::distance(m_ids.begin(),
it);
218 if (not equalWithinMask(
id.
value(), m_ids[i], makeHighestLevelMask())) {
225 if (equalWithinMask(
id.
value(), m_ids[i], m_masks[i])) {
226 return std::next(begin(), i);