10 #include <tracking/trackFindingCDC/utilities/Range.h>
21 namespace TrackFindingCDC {
24 template<
class AIterator>
36 using Reference =
typename std::iterator_traits<AIterator>::reference;
40 template<
class AOtherIterator>
41 explicit SortedRange(
const std::pair<AOtherIterator, AOtherIterator>& itPair)
42 :
Super(AIterator(itPair.first), AIterator(itPair.second))
46 template<
class Ts,
class ItT = GetIterator<Ts>>
73 return relevant_range.
count(t);
A pair of iterators usable with the range base for loop.
Iterator begin() const
Begin of the range for range based for.
typename std::iterator_traits< AIterator >::reference Reference
The type the iterator references.
Iterator end() const
End of the range for range based for.
bool count(Reference t)
Counts the number of equivalent items in the range.
std::pair< AIterator, AIterator > Super
Type of the base class.
AIterator Iterator
Iterator type of the range.
A pair of iterators usable with the range base for loop.
SortedRange< AIterator > upper_bound(const T &t) const
Access to a upper bound to mimic the behaviour of a sorted container.
SortedRange(const Ts &ts)
Constructor from another range.
SortedRange(const std::pair< AOtherIterator, AOtherIterator > &itPair)
Constructor to adapt a pair as returned by e.g. std::equal_range.
SortedRange< AIterator > lowers_bound(const T &t) const
Access to a lower bound to mimic the behaviour of a sorted container.
bool count(Reference t) const
Counts the number of equivalent items in the range.
SortedRange< AIterator > equal_range(const T &t) const
Access to a sub range to mimic the behaviour of a sorted container.
Abstract base class for different kinds of events.