19 std::vector<std::vector<size_t>> &nodeNeighs) {
20 nodeNeighs.resize(nodes.size());
22 auto nsearch_p = std::make_unique<NSearch>(nodes);
23 double set_tree_time = nsearch_p->updatePointCloud(nodes,
true);
24 set_tree_time += nsearch_p->setInputCloud();
25 std::cout << fmt::format(
"Tree setup time (ms) = {}. \n", set_tree_time);
27 for (
size_t i=0; i<nodes.size(); i++) {
28 std::vector<size_t> neighs;
29 std::vector<double> sqr_dist;
30 nodeNeighs[i].resize(0);
32 if (nsearch_p->radiusSearch(nodes[i], horizon, neighs, sqr_dist) > 0) {
33 for (std::size_t j = 0; j < neighs.size(); ++j)
35 nodeNeighs[i].push_back(neighs[j]);
void computeNonlocalNeighborhood(const std::vector< util::Point > &nodes, double horizon, std::vector< std::vector< size_t > > &nodeNeighs)
Partitions the nodes based on node neighborlist supplied. Function first creates a graph with nodes a...