2 * Copyright (C) 2002-2024 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.
20 JaggedVecEltBase::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.
31 JaggedVecEltBase::index_type JaggedVecEltBase::begin (size_t elt_ndx) const
33 // If the index is more than zero, return the end index from the
34 // element which is contiguously previous in memory.
36 return this[-1].m_end;
38 // Otherwise this is the first element. Return 0.
44 * @brief Return the index of the end of the range.
47 JaggedVecEltBase::index_type JaggedVecEltBase::end() const
54 * @brief Return the number of items in this range.
55 * @param elt_ndx The index of this element in its container.
58 size_t JaggedVecEltBase::size (size_t elt_ndx) const
60 return end() - begin (elt_ndx);
65 * @brief Equality test.
66 * @param other Other element with which to compare.
69 bool JaggedVecEltBase::operator== (const JaggedVecEltBase& other) const
71 return m_end == other.m_end;
77 JaggedVecEltBase::Shift::Shift (int offs)
83 /// Shift indices in @c e by the offset given to the constructor.
85 void JaggedVecEltBase::Shift::operator() (JaggedVecEltBase& e) const