ATLAS Offline Software
|
A helper class that provides iterators over elements in two separate ordered containers as if the elements were merged in a single container and sorted, but without any CPU overhead. More...
Classes | |
class | combined_ordered_container |
class | combined_ordered_iterator |
struct | DummyMerger |
Functions | |
template<class C1 , class CMP , class MERGER > | |
std::vector< typename C1::value_type > | mergeDuplicateEntries (const C1 &c1, const CMP &cmp, const MERGER &merger) |
A helper class that provides iterators over elements in two separate ordered containers as if the elements were merged in a single container and sorted, but without any CPU overhead.
Merges elements in the container that are equivalent according to the ordering defined by the binary predicate CMP.
An iterator that provides transparant iteration over the elements of two sorted containers, presenting the elements in sorted order, as if the two containers were merged and the result sorted, but without the CPU and memory overheads of merging and sorting.
This implementation is sufficient for forward iteration, but not much else.
The merge operation is provided by the template argument MERGER. The result is returned in a std::vector< C::value_type> where C is the type of the input container. PRECONDITION: the input container is sorted according to CMP. This function is a generalization of the algorithm std::unique
std::vector<typename C1::value_type> LArBadChanImpl::mergeDuplicateEntries | ( | const C1 & | c1, |
const CMP & | cmp, | ||
const MERGER & | merger | ||
) |
Definition at line 22 of file mergeDuplicateEntries.h.