2 * Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration.
5 * @file AthContainers/JaggedVecImpl.icc
6 * @author scott snyder <snyder@bnl.gov>
8 * @brief Definition of JaggedVecElt.
17 * @param end Index of the end of the range.
20JaggedVecEltBase::JaggedVecEltBase (index_type end)
27 * @brief Return the index of the beginning of the range.
28 * @param elt_ndx The index of this element in its container.
31JaggedVecEltBase::index_type JaggedVecEltBase::begin (size_t elt_ndx) const
33 // Return 0 if we're looking at the first element, or our end index is 0.
34 if (elt_ndx == 0 || m_end == 0) [[unlikely]] {
38 // Normal case: returm the end index from the elemente which is
39 // contiguously previous in memory.
40 return this[-1].m_end;
45 * @brief Return the index of the end of the range.
48JaggedVecEltBase::index_type JaggedVecEltBase::end() const
55 * @brief Return the number of items in this range.
56 * @param elt_ndx The index of this element in its container.
59size_t JaggedVecEltBase::size (size_t elt_ndx) const
61 return end() - begin (elt_ndx);
66 * @brief Equality test.
67 * @param other Other element with which to compare.
70bool JaggedVecEltBase::operator== (const JaggedVecEltBase& other) const
72 return m_end == other.m_end;
78JaggedVecEltBase::Shift::Shift (int offs)
84/// Shift indices in @c e by the offset given to the constructor.
86void JaggedVecEltBase::Shift::operator() (JaggedVecEltBase& e) const