Skip to content

Commit

Permalink
Update tree.h
Browse files Browse the repository at this point in the history
  • Loading branch information
axionbuster authored Feb 18, 2024
1 parent f003a54 commit 1b07b08
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dyn/tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Node {
std::complex<float> xy, ll;
float m{}, s{};

void place(size_t p, Kids kids, int precision, auto get_xy, auto get_mass) {
void place(size_t p, Kids &kids, int precision, auto get_xy, auto get_mass) {
// Compute geometric center of this.
auto center = ll + 0.5f * std::complex{s, s};
auto pxy = get_xy(p);
Expand All @@ -39,6 +39,7 @@ class Node {
} else if (precision) {
Kids kids;
for (auto &&k : kids)
// FIXME: Set center, side length
k = std::make_unique<Node>();
for (auto q = b; q != e; q++)
place(q, kids, precision, get_xy, get_mass);
Expand Down

0 comments on commit 1b07b08

Please sign in to comment.