template<typename Comparator, typename Arbitrator>
class pat::GenericDuplicateRemover< Comparator, Arbitrator >
Definition at line 11 of file GenericDuplicateRemover.h.
template<typename Comparator , typename Arbitrator >
template<typename Collection >
Indices of duplicated items to remove Comparator is used to check for duplication, Arbiter to pick the best one e.g. comparator(x1, x2) should return true if they are duplicates arbitrator(x1, x2) should return true if x1 is better, that is we want to keep x1 and delete x2 Collection can be vector, View, or anything with the same interface
Definition at line 40 of file GenericDuplicateRemover.h.
References cond::ecalcond::bad(), i, run_regression::ret, and findQualityFiles::size.
Referenced by pat::DuplicatedPhotonRemover::duplicatesBySeed(), pat::DuplicatedPhotonRemover::duplicatesBySuperCluster(), and pat::DuplicatedElectronRemover::duplicatesToRemove().
42 size_t size = items.size();
44 std::vector<bool>
bad(size,
false);
46 for (
size_t ie = 0; ie <
size; ++ie) {
47 if (
bad[ie])
continue;
49 for (
size_t je = ie+1; je <
size; ++je) {
51 if (
bad[je])
continue;
54 int toRemove =
arbiter_(items[ie], items[je]) ? je : ie;
60 std::auto_ptr< std::vector<size_t> >
ret(
new std::vector<size_t>());
62 for (
size_t i = 0;
i <
size; ++
i) {
int bad(Items const &cont)
tuple size
Write out results.