/usr/include/mapbox/geometry/wagyu/scanbeam.hpp is in libmapbox-wagyu-dev 0.4.3-1.
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 28 29 30 31 32 33 34 35 36 | #pragma once
#include <mapbox/geometry/wagyu/config.hpp>
#include <mapbox/geometry/wagyu/local_minimum.hpp>
#include <algorithm>
namespace mapbox {
namespace geometry {
namespace wagyu {
template <typename T>
using scanbeam_list = std::vector<T>;
template <typename T>
bool pop_from_scanbeam(T& Y, scanbeam_list<T>& scanbeam) {
if (scanbeam.empty()) {
return false;
}
std::sort(scanbeam.begin(), scanbeam.end());
scanbeam.erase(std::unique(scanbeam.begin(), scanbeam.end()), scanbeam.end());
Y = scanbeam.back();
scanbeam.pop_back();
return true;
}
template <typename T>
void setup_scanbeam(local_minimum_list<T>& minima_list, scanbeam_list<T>& scanbeam) {
for (auto lm = minima_list.begin(); lm != minima_list.end(); ++lm) {
scanbeam.push_back(lm->y);
}
}
}
}
}
|