CARVIEW |
Select Language
HTTP/2 200
date: Mon, 13 Oct 2025 01:11:39 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=9194666cbb43d2bde83eb3f8a76ef8273b636150211ae16762740493d40d9757a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22I8y3MRP55sNDI7PK2Vb4EVq3NyK6NNCj%22%3B%7D; HttpOnly; Path=/
cf-ray: 98daf6d75865a8b0-BLR
Recursive simple clustering of 2d data based on distance. - Pastebin.com
SHARE
TWEET

Recursive simple clustering of 2d data based on distance.
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function split(list: TPointArray; w,h: Int32): T2DPointArray;
- var
- lo,hi: Int32;
- function extract_connections_of(p: TPoint): TPointArray;
- var i: Int32;
- begin
- for i:=hi downto lo+1 do
- // the distance parameter
- if (Abs(p.x-list[i].x) <= w) and (Abs(p.y-list[i].y) <= h) then
- begin
- Result += list[i];
- Swap(list[i], list[hi]); //move towards end
- Dec(hi); //and ever look at it again
- end;
- end;
- function recurse_connections(p: TPoint): TPointArray;
- var i: Int32;
- begin
- Result := extract_connections_of(p);
- for i:=0 to High(result) do
- Result += recurse_connections(result[i]); //extend
- end;
- begin
- lo := 0;
- hi := High(list);
- while lo <= hi do
- begin
- Result += recurse_connections(list[lo]) + [list[lo]]; //append
- inc(lo);
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
-
🔥 Exchange profit method
JavaScript | 9 sec ago | 0.24 KB
-
📝 MAKE $2500 IN 15 MIN ✅ Working
JavaScript | 18 sec ago | 0.24 KB
-
⚡ Crypto Swap Glitch ✅ Working ⚡
JavaScript | 28 sec ago | 0.24 KB
-
💡 Instant BTC Profit Method ✅ Working
JavaScript | 38 sec ago | 0.24 KB
-
📝 EASY MONEY GUIDE ✅ Working P
JavaScript | 57 sec ago | 0.25 KB
-
⭐⭐⭐ChangeNOW Exploit⭐⭐
Java | 1 min ago | 0.15 KB
-
📌 Instant BTC Profit Method ✅ Working L
JavaScript | 1 min ago | 0.25 KB
-
✅ Make $2500 in 20 minutes⭐ 6
JavaScript | 1 min ago | 0.25 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand