9 #include <boost/test/unit_test.hpp>
21 std::vector<int> spacepointIds(16);
22 std::iota(spacepointIds.begin(), spacepointIds.end(), 100);
25 std::vector<std::vector<int>> refTracks;
26 for (
auto t = 0ul;
t < 4; ++
t) {
27 refTracks.emplace_back(spacepointIds.begin() + 4 *
t,
28 spacepointIds.begin() + 4 * (
t + 1));
32 std::vector<int64_t>
edges;
33 for (
const auto &track : refTracks) {
34 for (
auto it = track.begin();
it != track.end() - 1; ++
it) {
36 edges.push_back(*
it - 100);
43 auto dummyWeights = torch::ones(edges.size() / 2, torch::kFloat32);
49 auto testTracks = trackBuilder({}, edgeTensor, dummyWeights, spacepointIds);
52 std::for_each(testTracks.begin(), testTracks.end(),
54 std::for_each(refTracks.begin(), refTracks.end(),
58 for (
const auto &refTrack : refTracks) {
59 auto found = std::find(testTracks.begin(), testTracks.end(), refTrack);
60 BOOST_CHECK(found != testTracks.end());