Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4ce3c84

Browse files
Update src/geometry/nearest_points.md
Better formattingCo-authored-by: Oleksandr Kulkov <adamant.pwn@gmail.com>
1 parent50bb91b commit4ce3c84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/geometry/nearest_points.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ An alternative method arises from a very simple idea to heuristically improve th
173173
</div>
174174

175175

176-
We will consider only the squares containing at least one point. Denote by $n_1, n_2, \dots, n_k$ the number of points in each of the $k$ remaining squares. Assuming at least two points are in the same or in adjacent squares, the time complexity is $\Theta(\sum_{i=1}^{k} n_i^2)$.
176+
We will consider only the squares containing at least one point. Denote by $n_1, n_2, \dots, n_k$ the number of points in each of the $k$ remaining squares. Assuming at least two points are in the same or in adjacent squares, the time complexity is $\Theta\left(\sum\limits_{i=1}^k n_i^2\right)$.
177177

178178
??? info "Proof"
179179
For the $i$-th square containing $n_i$ points, the number of pairs inside is $\Theta(n_i^2)$. If the $i$-th square is adjacent to the $j$-th square, then we also perform $n_i n_j \le \max(n_i, n_j)^2 \le n_i^2 + n_j^2$ distance comparisons. Notice that each cube has at most $8$ adjacent cubes, so we can bound the sum of all comparisons by $\Theta(\sum_{i=1}^{k} n_i^2)$. $\quad \blacksquare$

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp