MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/CompactNSearch / compare_with_bruteforce_search

Function compare_with_bruteforce_search

demo/main.cpp:82–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82void
83compare_with_bruteforce_search(NeighborhoodSearch const& nsearch)
84{
85 auto brute_force_neighbors = brute_force_search();
86 PointSet const& d0 = nsearch.point_set(0);
87 for (int i = 0; i < N; ++i)
88 {
89 auto const& bfn = brute_force_neighbors[i];
90 if (bfn.size() != d0.n_neighbors(i))
91 {
92 std::cerr << "ERROR: Not the same number of neighbors." << std::endl;
93 }
94 for (int j = 0; j < d0.n_neighbors(i); ++j)
95 {
96 if (std::find(bfn.begin(), bfn.end(), d0.neighbor(i, j).point_id) == bfn.end())
97 {
98 std::cerr << "ERROR: Neighbor not found in brute force list." << std::endl;
99 }
100 }
101 }
102}
103
104std::array<Real, 3>
105enright_velocity_field(std::array<Real, 3> const& x)

Callers

nothing calls this directly

Calls 2

brute_force_searchFunction · 0.85
n_neighborsMethod · 0.80

Tested by

no test coverage detected