/usr/lib/R/site-library/dplyr/include/dplyr/visitor_set/VisitorSetGreater.h is in r-cran-dplyr 0.7.4-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | #ifndef dplyr_VisitorSetGreater_H
#define dplyr_VisitorSetGreater_H
namespace dplyr {
template <typename Class>
class VisitorSetGreater {
public:
bool greater(int i, int j) const {
if (i == j) return false;
const Class& obj = static_cast<const Class&>(*this);
int n = obj.size();
for (int k = 0; k < n; k++) {
typename Class::visitor_type* visitor = obj.get(k);
if (! visitor->equal(i, j)) {
return visitor->greater(i, j);
}
}
// if we end up here, it means rows i and j are equal
// we break the tie using the indices
return i < j;
}
};
}
#endif
|