diff --git a/demo/data/knn.csv b/demo/data/knn.csv new file mode 100644 index 0000000..e48ca5b --- /dev/null +++ b/demo/data/knn.csv @@ -0,0 +1,4740 @@ +86,86 +86,256 +86,380 +86,271 +86,117 +86,65 +86,1 +86,166 +86,433 +86,177 +353,353 +353,73 +353,150 +353,159 +353,417 +353,349 +353,428 +353,80 +353,375 +353,289 +257,257 +257,274 +257,455 +257,270 +257,315 +257,179 +257,45 +257,386 +257,328 +257,101 +66,66 +66,360 +66,442 +66,239 +66,416 +66,464 +66,241 +66,460 +66,343 +66,174 +168,168 +168,123 +168,96 +168,237 +168,169 +168,142 +168,394 +168,31 +168,107 +168,68 +183,183 +183,216 +183,59 +183,298 +183,336 +183,403 +183,285 +183,260 +183,213 +183,308 +136,136 +136,374 +136,278 +136,333 +136,38 +136,64 +136,37 +136,134 +136,115 +136,140 +10,10 +10,9 +10,458 +10,138 +10,79 +10,165 +10,465 +10,405 +10,155 +10,355 +321,321 +321,109 +321,126 +321,139 +321,198 +321,42 +321,277 +321,119 +321,365 +321,305 +254,254 +254,367 +254,72 +254,300 +254,462 +254,171 +254,459 +254,158 +254,118 +254,415 +52,52 +52,54 +52,316 +52,34 +52,375 +52,469 +52,243 +52,420 +52,89 +52,248 +325,325 +325,312 +325,259 +325,111 +325,412 +325,21 +325,108 +325,346 +325,33 +325,323 +282,282 +282,51 +282,90 +282,85 +282,35 +282,220 +282,314 +282,184 +282,473 +282,173 +285,285 +285,403 +285,246 +285,260 +285,161 +285,298 +285,5 +285,183 +285,434 +285,216 +414,414 +414,218 +414,192 +414,276 +414,211 +414,238 +414,46 +414,88 +414,149 +414,328 +441,441 +441,255 +441,351 +441,381 +441,307 +441,95 +441,55 +441,252 +441,7 +441,112 +378,378 +378,76 +378,82 +378,272 +378,454 +378,228 +378,164 +378,391 +378,453 +378,3 +151,151 +151,220 +151,90 +151,25 +151,411 +151,324 +151,348 +151,198 +151,42 +151,109 +44,44 +44,332 +44,235 +44,283 +44,436 +44,222 +44,153 +44,234 +44,30 +44,252 +403,403 +403,285 +403,260 +403,246 +403,298 +403,161 +403,5 +403,434 +403,183 +403,59 +25,25 +25,324 +25,26 +25,151 +25,49 +25,402 +25,411 +25,193 +25,313 +25,220 +31,31 +31,68 +31,39 +31,236 +31,141 +31,339 +31,123 +31,169 +31,95 +31,55 +386,386 +386,101 +386,455 +386,270 +386,179 +386,257 +386,418 +386,274 +386,45 +386,197 +410,410 +410,310 +410,103 +410,345 +410,187 +410,205 +410,208 +410,399 +410,387 +410,406 +349,349 +349,417 +349,150 +349,353 +349,428 +349,159 +349,262 +349,73 +349,466 +349,369 +157,157 +157,413 +157,167 +157,397 +157,57 +157,170 +157,302 +157,390 +157,377 +157,121 +362,362 +362,305 +362,363 +362,60 +362,126 +362,163 +362,250 +362,277 +362,119 +362,321 +425,425 +425,472 +425,19 +425,113 +425,226 +425,152 +425,184 +425,473 +425,196 +425,335 +418,418 +418,407 +418,101 +418,386 +418,45 +418,455 +418,230 +418,350 +418,23 +418,290 +390,390 +390,232 +390,170 +390,163 +390,377 +390,167 +390,363 +390,305 +390,397 +390,266 +135,135 +135,406 +135,468 +135,128 +135,97 +135,146 +135,187 +135,81 +135,470 +135,103 +163,163 +163,232 +163,363 +163,60 +163,196 +163,250 +163,362 +163,305 +163,390 +163,295 +53,53 +53,453 +53,419 +53,454 +53,233 +53,189 +53,112 +53,234 +53,102 +53,125 +153,153 +153,229 +153,436 +153,44 +153,189 +153,309 +153,235 +153,234 +153,332 +153,419 +30,30 +30,222 +30,331 +30,467 +30,332 +30,283 +30,235 +30,176 +30,445 +30,44 +182,182 +182,181 +182,40 +182,364 +182,8 +182,401 +182,191 +182,41 +182,431 +182,16 +341,341 +341,218 +341,414 +341,192 +341,327 +341,240 +341,88 +341,47 +341,238 +341,319 +328,328 +328,315 +328,276 +328,404 +328,211 +328,238 +328,274 +328,257 +328,46 +328,192 +63,63 +63,14 +63,385 +63,28 +63,350 +63,2 +63,290 +63,0 +63,287 +63,194 +376,376 +376,444 +376,457 +376,396 +376,253 +376,223 +376,176 +376,445 +376,467 +376,261 +319,319 +319,88 +319,149 +319,347 +319,327 +319,337 +319,344 +319,47 +319,443 +319,421 +326,326 +326,359 +326,352 +326,27 +326,110 +326,440 +326,185 +326,206 +326,188 +326,463 +448,448 +448,56 +448,383 +448,398 +448,303 +448,231 +448,205 +448,244 +448,87 +448,310 +191,191 +191,41 +191,156 +191,431 +191,401 +191,16 +191,249 +191,424 +191,247 +191,206 +327,327 +327,47 +327,347 +327,319 +327,337 +327,443 +327,88 +327,421 +327,218 +327,379 +219,219 +219,200 +219,389 +219,120 +219,365 +219,293 +219,119 +219,277 +219,266 +219,202 +189,189 +189,419 +189,229 +189,233 +189,309 +189,153 +189,53 +189,436 +189,294 +189,234 +256,256 +256,65 +256,380 +256,86 +256,433 +256,166 +256,373 +256,105 +256,91 +256,1 +57,57 +57,413 +57,152 +57,377 +57,167 +57,170 +57,390 +57,232 +57,196 +57,425 +412,412 +412,108 +412,111 +412,312 +412,325 +412,259 +412,203 +412,155 +412,458 +412,427 +440,440 +440,110 +440,326 +440,463 +440,352 +440,147 +440,368 +440,359 +440,206 +440,265 +26,26 +26,324 +26,25 +26,49 +26,402 +26,313 +26,314 +26,253 +26,151 +26,77 +385,385 +385,28 +385,290 +385,194 +385,2 +385,0 +385,197 +385,63 +385,387 +385,287 +238,238 +238,404 +238,192 +238,276 +238,328 +238,211 +238,240 +238,315 +238,414 +238,46 +112,112 +112,7 +112,102 +112,125 +112,361 +112,95 +112,391 +112,164 +112,195 +112,169 +271,271 +271,117 +271,1 +271,86 +271,380 +271,256 +271,65 +271,92 +271,177 +271,409 +330,330 +330,281 +330,114 +330,372 +330,215 +330,286 +330,172 +330,463 +330,301 +330,147 +102,102 +102,125 +102,112 +102,7 +102,361 +102,391 +102,164 +102,195 +102,454 +102,82 +200,200 +200,389 +200,219 +200,293 +200,120 +200,132 +200,266 +200,119 +200,277 +200,365 +276,276 +276,211 +276,328 +276,238 +276,46 +276,404 +276,315 +276,414 +276,192 +276,274 +308,308 +308,213 +308,336 +308,133 +308,177 +308,267 +308,166 +308,264 +308,59 +308,216 +464,464 +464,360 +464,292 +464,244 +464,66 +464,205 +464,343 +464,20 +464,398 +464,239 +11,11 +11,408 +11,393 +11,245 +11,154 +11,370 +11,354 +11,32 +11,437 +11,130 +381,381 +381,351 +381,252 +381,255 +381,234 +381,307 +381,441 +381,436 +381,55 +381,430 +427,427 +427,203 +427,371 +427,104 +427,24 +427,221 +427,108 +427,20 +427,111 +427,412 +252,252 +252,351 +252,255 +252,381 +252,307 +252,234 +252,441 +252,388 +252,430 +252,283 +179,179 +179,270 +179,455 +179,257 +179,274 +179,386 +179,101 +179,146 +179,315 +179,399 +357,357 +357,77 +357,36 +357,173 +357,261 +357,78 +357,314 +357,35 +357,26 +357,145 +108,108 +108,412 +108,111 +108,259 +108,203 +108,325 +108,312 +108,427 +108,24 +108,104 +351,351 +351,255 +351,252 +351,381 +351,307 +351,441 +351,234 +351,430 +351,55 +351,388 +164,164 +164,391 +164,125 +164,195 +164,82 +164,228 +164,322 +164,102 +164,454 +164,361 +396,396 +396,444 +396,376 +396,223 +396,457 +396,253 +396,445 +396,261 +396,176 +396,78 +154,154 +154,245 +154,317 +154,188 +154,32 +154,71 +154,11 +154,27 +154,461 +154,185 +422,422 +422,137 +422,450 +422,227 +422,207 +422,311 +422,43 +422,289 +422,80 +422,34 +38,38 +38,64 +38,136 +38,140 +38,131 +38,374 +38,129 +38,278 +38,405 +38,37 +344,344 +344,242 +344,337 +344,379 +344,319 +344,443 +344,347 +344,421 +344,175 +344,88 +27,27 +27,359 +27,185 +27,317 +27,326 +27,71 +27,352 +27,188 +27,154 +27,245 +234,234 +234,436 +234,381 +234,252 +234,351 +234,255 +234,44 +234,419 +234,153 +234,53 +20,20 +20,244 +20,292 +20,398 +20,427 +20,259 +20,111 +20,464 +20,56 +20,203 +437,437 +437,354 +437,130 +437,370 +437,100 +437,461 +437,62 +437,61 +437,11 +437,288 +206,206 +206,249 +206,265 +206,156 +206,185 +206,359 +206,41 +206,326 +206,191 +206,368 +84,84 +84,145 +84,439 +84,17 +84,357 +84,106 +84,36 +84,173 +84,77 +84,35 +268,268 +268,287 +268,231 +268,210 +268,303 +268,0 +268,87 +268,2 +268,186 +268,194 +34,34 +34,316 +34,52 +34,144 +34,80 +34,43 +34,54 +34,375 +34,227 +34,243 +67,67 +67,29 +67,432 +67,58 +67,47 +67,421 +67,443 +67,347 +67,379 +67,337 +377,377 +377,152 +377,232 +377,390 +377,170 +377,163 +377,196 +377,57 +377,167 +377,113 +43,43 +43,80 +43,227 +43,137 +43,422 +43,450 +43,34 +43,289 +43,311 +43,207 +140,140 +140,131 +140,129 +140,405 +140,465 +140,64 +140,38 +140,165 +140,452 +140,217 +301,301 +301,172 +301,372 +301,114 +301,48 +301,74 +301,281 +301,429 +301,456 +301,6 +472,472 +472,19 +472,226 +472,425 +472,335 +472,184 +472,113 +472,473 +472,13 +472,85 +75,75 +75,127 +75,224 +75,62 +75,100 +75,209 +75,130 +75,61 +75,437 +75,354 +228,228 +228,164 +228,391 +228,195 +228,322 +228,82 +228,378 +228,18 +228,93 +228,125 +314,314 +314,324 +314,173 +314,36 +314,282 +314,35 +314,26 +314,220 +314,90 +314,25 +338,338 +338,121 +338,171 +338,280 +338,118 +338,69 +338,447 +338,446 +338,275 +338,300 +400,400 +400,368 +400,94 +400,265 +400,147 +400,249 +400,424 +400,286 +400,247 +400,215 +193,193 +193,471 +193,143 +193,204 +193,435 +193,402 +193,12 +193,411 +193,49 +193,348 +35,35 +35,51 +35,173 +35,36 +35,106 +35,282 +35,314 +35,335 +35,439 +35,85 +147,147 +147,215 +147,94 +147,286 +147,368 +147,440 +147,400 +147,110 +147,463 +147,265 +384,384 +384,92 +384,264 +384,267 +384,336 +384,117 +384,308 +384,213 +384,177 +384,216 +165,165 +165,465 +165,217 +165,405 +165,79 +165,131 +165,9 +165,140 +165,129 +165,10 +311,311 +311,207 +311,450 +311,422 +311,137 +311,227 +311,289 +311,43 +311,423 +311,80 +132,132 +132,389 +132,293 +132,200 +132,266 +132,318 +132,302 +132,162 +132,120 +132,219 +370,370 +370,437 +370,354 +370,130 +370,100 +370,11 +370,62 +370,408 +370,461 +370,61 +192,192 +192,238 +192,414 +192,240 +192,276 +192,404 +192,211 +192,218 +192,328 +192,46 +248,248 +248,243 +248,420 +248,469 +248,470 +248,89 +248,52 +248,81 +248,54 +248,128 +467,467 +467,331 +467,445 +467,30 +467,176 +467,222 +467,376 +467,457 +467,223 +467,444 +203,203 +203,427 +203,104 +203,24 +203,108 +203,412 +203,111 +203,371 +203,221 +203,259 +210,210 +210,87 +210,186 +210,231 +210,268 +210,287 +210,323 +210,303 +210,122 +210,33 +46,46 +46,211 +46,276 +46,149 +46,328 +46,116 +46,414 +46,315 +46,238 +46,83 +329,329 +329,199 +329,309 +329,263 +329,235 +329,153 +329,229 +329,332 +329,44 +329,222 +439,439 +439,17 +439,106 +439,145 +439,173 +439,36 +439,35 +439,84 +439,51 +439,357 +245,245 +245,154 +245,32 +245,188 +245,317 +245,11 +245,393 +245,456 +245,27 +245,408 +12,12 +12,435 +12,430 +12,471 +12,402 +12,313 +12,193 +12,49 +12,279 +12,388 +41,41 +41,191 +41,156 +41,16 +41,431 +41,401 +41,249 +41,424 +41,247 +41,206 +141,141 +141,39 +141,339 +141,348 +141,204 +141,411 +141,143 +141,68 +141,31 +141,236 +178,178 +178,15 +178,382 +178,115 +178,37 +178,340 +178,297 +178,14 +178,50 +178,452 +225,225 +225,369 +225,174 +225,416 +225,460 +225,89 +225,428 +225,469 +225,442 +225,466 +310,310 +310,410 +310,345 +310,205 +310,383 +310,103 +310,303 +310,187 +310,448 +310,387 +470,470 +470,81 +470,128 +470,97 +470,468 +470,135 +470,406 +470,248 +470,175 +470,83 +32,32 +32,188 +32,245 +32,456 +32,154 +32,393 +32,352 +32,317 +32,27 +32,11 +42,42 +42,198 +42,109 +42,90 +42,321 +42,220 +42,126 +42,151 +42,60 +42,362 +171,171 +171,118 +171,459 +171,254 +171,72 +171,300 +171,366 +171,447 +171,415 +171,446 +298,298 +298,260 +298,403 +298,59 +298,285 +298,434 +298,5 +298,216 +298,183 +298,246 +430,430 +430,435 +430,12 +430,307 +430,471 +430,55 +430,143 +430,193 +430,255 +430,204 +242,242 +242,379 +242,337 +242,344 +242,421 +242,443 +242,347 +242,319 +242,47 +242,58 +124,124 +124,358 +124,299 +124,6 +124,201 +124,373 +124,74 +124,408 +124,393 +124,65 +258,258 +258,320 +258,342 +258,304 +258,5 +258,209 +258,434 +258,161 +258,260 +258,40 +438,438 +438,22 +438,350 +438,451 +438,407 +438,230 +438,23 +438,63 +438,284 +438,418 +101,101 +101,386 +101,455 +101,270 +101,179 +101,418 +101,257 +101,274 +101,45 +101,197 +95,95 +95,169 +95,441 +95,7 +95,68 +95,123 +95,112 +95,31 +95,55 +95,39 +197,197 +197,387 +197,194 +197,290 +197,399 +197,385 +197,28 +197,0 +197,2 +197,101 +15,15 +15,382 +15,178 +15,340 +15,14 +15,115 +15,297 +15,37 +15,63 +15,50 +214,214 +214,296 +214,212 +214,291 +214,284 +214,240 +214,23 +214,45 +214,404 +214,230 +287,287 +287,268 +287,2 +287,0 +287,210 +287,231 +287,28 +287,186 +287,194 +287,87 +324,324 +324,26 +324,25 +324,314 +324,151 +324,49 +324,402 +324,313 +324,220 +324,90 +50,50 +50,334 +50,452 +50,190 +50,148 +50,306 +50,297 +50,98 +50,346 +50,129 +304,304 +304,320 +304,209 +304,342 +304,258 +304,434 +304,395 +304,127 +304,5 +304,75 +98,98 +98,122 +98,33 +98,323 +98,190 +98,50 +98,186 +98,346 +98,306 +98,21 +64,64 +64,38 +64,140 +64,136 +64,131 +64,129 +64,405 +64,452 +64,374 +64,115 +274,274 +274,257 +274,315 +274,270 +274,455 +274,328 +274,179 +274,45 +274,404 +274,386 +322,322 +322,195 +322,93 +322,391 +322,107 +322,164 +322,361 +322,394 +322,228 +322,125 +175,175 +175,144 +175,83 +175,470 +175,344 +175,116 +175,81 +175,248 +175,97 +175,128 +19,19 +19,472 +19,425 +19,335 +19,226 +19,13 +19,184 +19,113 +19,473 +19,85 +24,24 +24,104 +24,203 +24,427 +24,221 +24,356 +24,371 +24,108 +24,155 +24,355 +158,158 +158,367 +158,18 +158,254 +158,462 +158,300 +158,72 +158,228 +158,93 +158,322 +221,221 +221,371 +221,104 +221,24 +221,427 +221,99 +221,203 +221,356 +221,20 +221,108 +465,465 +465,405 +465,165 +465,217 +465,131 +465,79 +465,129 +465,140 +465,9 +465,10 +196,196 +196,113 +196,295 +196,163 +196,250 +196,232 +196,473 +196,60 +196,184 +196,363 +380,380 +380,65 +380,256 +380,86 +380,1 +380,409 +380,271 +380,373 +380,433 +380,117 +29,29 +29,67 +29,47 +29,327 +29,347 +29,443 +29,421 +29,337 +29,432 +29,379 +169,169 +169,123 +169,95 +169,168 +169,394 +169,361 +169,68 +169,237 +169,7 +169,31 +375,375 +375,54 +375,52 +375,469 +375,316 +375,420 +375,159 +375,89 +375,243 +375,428 +106,106 +106,17 +106,439 +106,35 +106,51 +106,173 +106,36 +106,335 +106,13 +106,145 +446,446 +446,447 +446,426 +446,118 +446,69 +446,366 +446,280 +446,459 +446,142 +446,415 +240,240 +240,192 +240,238 +240,404 +240,276 +240,328 +240,414 +240,211 +240,315 +240,214 +74,74 +74,48 +74,301 +74,172 +74,6 +74,393 +74,456 +74,32 +74,429 +74,408 +409,409 +409,380 +409,1 +409,65 +409,256 +409,86 +409,271 +409,358 +409,373 +409,124 +226,226 +226,184 +226,473 +226,335 +226,85 +226,472 +226,19 +226,113 +226,295 +226,51 +305,305 +305,362 +305,363 +305,126 +305,60 +305,277 +305,119 +305,163 +305,250 +305,120 +407,407 +407,350 +407,418 +407,230 +407,438 +407,22 +407,23 +407,290 +407,451 +407,101 +232,232 +232,163 +232,390 +232,377 +232,363 +232,196 +232,60 +232,305 +232,362 +232,170 +9,9 +9,10 +9,79 +9,165 +9,465 +9,405 +9,217 +9,458 +9,138 +9,129 +45,45 +45,257 +45,455 +45,274 +45,315 +45,404 +45,418 +45,386 +45,328 +45,101 +194,194 +194,0 +194,28 +194,385 +194,2 +194,197 +194,290 +194,387 +194,287 +194,268 +185,185 +185,27 +185,359 +185,71 +185,317 +185,392 +185,326 +185,206 +185,154 +185,245 +297,297 +297,50 +297,452 +297,334 +297,115 +297,148 +297,190 +297,98 +297,306 +297,129 +55,55 +55,307 +55,430 +55,441 +55,143 +55,435 +55,204 +55,255 +55,39 +55,141 +33,33 +33,323 +33,122 +33,98 +33,21 +33,186 +33,87 +33,190 +33,346 +33,210 +59,59 +59,298 +59,216 +59,183 +59,434 +59,260 +59,213 +59,308 +59,403 +59,336 +399,399 +399,387 +399,197 +399,179 +399,194 +399,101 +399,386 +399,345 +399,270 +399,290 +358,358 +358,299 +358,124 +358,201 +358,373 +358,6 +358,408 +358,65 +358,393 +358,74 +65,65 +65,380 +65,256 +65,86 +65,373 +65,1 +65,433 +65,409 +65,271 +65,166 +394,394 +394,107 +394,237 +394,93 +394,361 +394,322 +394,169 +394,123 +394,195 +394,168 +408,408 +408,11 +408,393 +408,245 +408,201 +408,32 +408,370 +408,154 +408,299 +408,354 +402,402 +402,49 +402,313 +402,12 +402,193 +402,471 +402,25 +402,26 +402,435 +402,143 +138,138 +138,346 +138,306 +138,148 +138,190 +138,10 +138,334 +138,9 +138,312 +138,129 +207,207 +207,450 +207,311 +207,422 +207,137 +207,227 +207,43 +207,289 +207,423 +207,80 +209,209 +209,304 +209,320 +209,342 +209,127 +209,75 +209,434 +209,395 +209,62 +209,258 +227,227 +227,137 +227,422 +227,450 +227,43 +227,207 +227,311 +227,80 +227,34 +227,144 +107,107 +107,394 +107,93 +107,322 +107,195 +107,361 +107,237 +107,169 +107,391 +107,123 +279,279 +279,388 +279,176 +279,283 +279,12 +279,313 +279,435 +279,430 +279,402 +279,222 +127,127 +127,75 +127,62 +127,100 +127,209 +127,224 +127,61 +127,461 +127,130 +127,288 +291,291 +291,214 +291,296 +291,212 +291,240 +291,284 +291,23 +291,45 +291,404 +291,238 +269,269 +269,99 +269,239 +269,241 +269,466 +269,442 +269,360 +269,262 +269,292 +269,66 +244,244 +244,20 +244,398 +244,292 +244,464 +244,205 +244,56 +244,383 +244,448 +244,360 +16,16 +16,424 +16,156 +16,247 +16,41 +16,191 +16,249 +16,265 +16,206 +16,401 +100,100 +100,62 +100,130 +100,437 +100,354 +100,61 +100,461 +100,75 +100,370 +100,127 +331,331 +331,467 +331,30 +331,222 +331,445 +331,176 +331,332 +331,283 +331,457 +331,376 +421,421 +421,443 +421,379 +421,337 +421,347 +421,242 +421,47 +421,344 +421,327 +421,319 +0,0 +0,2 +0,194 +0,28 +0,385 +0,287 +0,268 +0,197 +0,387 +0,290 +156,156 +156,16 +156,41 +156,249 +156,191 +156,424 +156,265 +156,206 +156,247 +156,431 +388,388 +388,279 +388,283 +388,12 +388,176 +388,430 +388,435 +388,252 +388,307 +388,255 +229,229 +229,189 +229,153 +229,309 +229,419 +229,436 +229,233 +229,234 +229,294 +229,44 +450,450 +450,207 +450,422 +450,137 +450,311 +450,227 +450,43 +450,289 +450,80 +450,423 +103,103 +103,187 +103,410 +103,406 +103,468 +103,208 +103,135 +103,128 +103,310 +103,97 +173,173 +173,36 +173,35 +173,314 +173,106 +173,357 +173,439 +173,51 +173,282 +173,77 +278,278 +278,374 +278,333 +278,136 +278,134 +278,38 +278,37 +278,64 +278,115 +278,140 +68,68 +68,31 +68,39 +68,141 +68,236 +68,95 +68,339 +68,169 +68,123 +68,55 +339,339 +339,141 +339,236 +339,348 +339,39 +339,411 +339,31 +339,68 +339,204 +339,143 +17,17 +17,439 +17,106 +17,13 +17,35 +17,145 +17,173 +17,51 +17,335 +17,36 +230,230 +230,23 +230,284 +230,407 +230,22 +230,438 +230,451 +230,350 +230,418 +230,212 +123,123 +123,169 +123,168 +123,237 +123,394 +123,95 +123,31 +123,68 +123,96 +123,107 +237,237 +237,168 +237,394 +237,142 +237,107 +237,123 +237,96 +237,169 +237,93 +237,415 +293,293 +293,200 +293,389 +293,132 +293,318 +293,219 +293,162 +293,449 +293,266 +293,120 +387,387 +387,197 +387,399 +387,194 +387,345 +387,0 +387,28 +387,385 +387,290 +387,2 +417,417 +417,428 +417,150 +417,159 +417,349 +417,262 +417,375 +417,369 +417,353 +417,225 +73,73 +73,353 +73,150 +73,159 +73,80 +73,289 +73,417 +73,43 +73,375 +73,316 +89,89 +89,420 +89,469 +89,243 +89,54 +89,369 +89,225 +89,375 +89,251 +89,248 +142,142 +142,96 +142,237 +142,366 +142,168 +142,415 +142,426 +142,459 +142,123 +142,394 +117,117 +117,271 +117,86 +117,92 +117,1 +117,267 +117,177 +117,380 +117,256 +117,166 +259,259 +259,111 +259,325 +259,108 +259,312 +259,412 +259,56 +259,21 +259,20 +259,203 +379,379 +379,242 +379,421 +379,443 +379,337 +379,347 +379,344 +379,58 +379,47 +379,319 +454,454 +454,453 +454,82 +454,76 +454,125 +454,53 +454,164 +454,102 +454,378 +454,391 +181,181 +181,182 +181,364 +181,40 +181,401 +181,8 +181,191 +181,41 +181,16 +181,247 +37,37 +37,115 +37,178 +37,136 +37,374 +37,278 +37,64 +37,38 +37,15 +37,382 +118,118 +118,171 +118,459 +118,447 +118,366 +118,446 +118,72 +118,415 +118,254 +118,462 +416,416 +416,174 +416,460 +416,442 +416,225 +416,369 +416,241 +416,466 +416,66 +416,251 +39,39 +39,68 +39,31 +39,141 +39,339 +39,236 +39,55 +39,204 +39,348 +39,143 +109,109 +109,198 +109,321 +109,42 +109,126 +109,139 +109,220 +109,90 +109,362 +109,151 +18,18 +18,228 +18,158 +18,378 +18,3 +18,164 +18,322 +18,367 +18,391 +18,195 +323,323 +323,33 +323,122 +323,21 +323,186 +323,98 +323,87 +323,210 +323,231 +323,346 +213,213 +213,308 +213,336 +213,133 +213,177 +213,267 +213,59 +213,166 +213,216 +213,264 +283,283 +283,388 +283,279 +283,222 +283,44 +283,332 +283,252 +283,30 +283,176 +283,235 +104,104 +104,24 +104,203 +104,427 +104,221 +104,371 +104,356 +104,108 +104,155 +104,355 +411,411 +411,348 +411,204 +411,141 +411,193 +411,143 +411,471 +411,151 +411,339 +411,25 +462,462 +462,72 +462,415 +462,459 +462,254 +462,366 +462,367 +462,93 +462,107 +462,237 +134,134 +134,333 +134,278 +134,136 +134,374 +134,38 +134,64 +134,131 +134,140 +134,217 +249,249 +249,265 +249,206 +249,156 +249,16 +249,41 +249,424 +249,368 +249,191 +249,247 +143,143 +143,204 +143,471 +143,193 +143,435 +143,411 +143,430 +143,141 +143,348 +143,55 +350,350 +350,438 +350,22 +350,407 +350,451 +350,230 +350,63 +350,418 +350,290 +350,385 +364,364 +364,8 +364,40 +364,401 +364,182 +364,181 +364,431 +364,395 +364,191 +364,41 +457,457 +457,376 +457,444 +457,396 +457,253 +457,223 +457,176 +457,445 +457,467 +457,313 +251,251 +251,208 +251,343 +251,89 +251,420 +251,416 +251,243 +251,174 +251,248 +251,469 +69,69 +69,280 +69,275 +69,162 +69,121 +69,318 +69,447 +69,446 +69,293 +69,426 +116,116 +116,83 +116,46 +116,149 +116,175 +116,97 +116,211 +116,88 +116,146 +116,470 +334,334 +334,148 +334,452 +334,50 +334,306 +334,190 +334,129 +334,346 +334,297 +334,138 +190,190 +190,306 +190,346 +190,50 +190,148 +190,334 +190,98 +190,122 +190,138 +190,33 +4,4 +4,445 +4,467 +4,223 +4,331 +4,396 +4,376 +4,444 +4,457 +4,30 +202,202 +202,449 +202,365 +202,219 +202,139 +202,200 +202,293 +202,389 +202,426 +202,277 +272,272 +272,76 +272,3 +272,378 +272,273 +272,82 +272,454 +272,160 +272,453 +272,228 +428,428 +428,417 +428,159 +428,150 +428,369 +428,225 +428,375 +428,262 +428,54 +428,174 +111,111 +111,259 +111,108 +111,412 +111,325 +111,312 +111,203 +111,20 +111,21 +111,427 +292,292 +292,464 +292,360 +292,244 +292,20 +292,66 +292,371 +292,239 +292,398 +292,427 +94,94 +94,286 +94,147 +94,215 +94,400 +94,368 +94,440 +94,265 +94,110 +94,463 +76,76 +76,378 +76,82 +76,454 +76,272 +76,453 +76,273 +76,164 +76,228 +76,391 +458,458 +458,155 +458,355 +458,10 +458,9 +458,356 +458,138 +458,412 +458,108 +458,312 +239,239 +239,241 +239,442 +239,66 +239,360 +239,466 +239,460 +239,416 +239,174 +239,464 +368,368 +368,265 +368,400 +368,147 +368,249 +368,440 +368,206 +368,94 +368,110 +368,156 +265,265 +265,249 +265,368 +265,206 +265,156 +265,424 +265,16 +265,400 +265,41 +265,247 +1,1 +1,271 +1,380 +1,86 +1,117 +1,65 +1,409 +1,256 +1,166 +1,433 +170,170 +170,167 +170,390 +170,397 +170,377 +170,232 +170,163 +170,266 +170,57 +170,302 +280,280 +280,69 +280,121 +280,275 +280,162 +280,318 +280,447 +280,446 +280,302 +280,293 +420,420 +420,469 +420,243 +420,89 +420,54 +420,248 +420,52 +420,375 +420,251 +420,369 +335,335 +335,226 +335,472 +335,184 +335,51 +335,19 +335,85 +335,473 +335,13 +335,106 +6,6 +6,124 +6,358 +6,299 +6,74 +6,429 +6,201 +6,48 +6,373 +6,393 +148,148 +148,334 +148,306 +148,452 +148,190 +148,50 +148,129 +148,138 +148,346 +148,405 +93,93 +93,322 +93,107 +93,195 +93,394 +93,361 +93,391 +93,237 +93,164 +93,228 +404,404 +404,238 +404,328 +404,315 +404,276 +404,240 +404,211 +404,192 +404,274 +404,45 +419,419 +419,189 +419,233 +419,53 +419,229 +419,453 +419,234 +419,436 +419,153 +419,273 +355,355 +355,155 +355,458 +355,356 +355,10 +355,24 +355,412 +355,104 +355,108 +355,9 +303,303 +303,231 +303,268 +303,210 +303,448 +303,87 +303,345 +303,383 +303,56 +303,287 +99,99 +99,221 +99,371 +99,269 +99,427 +99,104 +99,292 +99,24 +99,203 +99,20 +443,443 +443,421 +443,337 +443,347 +443,379 +443,242 +443,47 +443,327 +443,344 +443,319 +398,398 +398,448 +398,56 +398,383 +398,244 +398,205 +398,20 +398,303 +398,259 +398,310 +366,366 +366,415 +366,459 +366,142 +366,72 +366,462 +366,118 +366,446 +366,237 +366,447 +241,241 +241,442 +241,466 +241,460 +241,239 +241,416 +241,174 +241,262 +241,66 +241,225 +180,180 +180,70 +180,247 +180,424 +180,16 +180,156 +180,400 +180,41 +180,265 +180,191 +177,177 +177,133 +177,166 +177,91 +177,308 +177,213 +177,105 +177,433 +177,336 +177,267 +159,159 +159,150 +159,417 +159,428 +159,375 +159,353 +159,73 +159,54 +159,316 +159,52 +346,346 +346,190 +346,306 +346,138 +346,148 +346,98 +346,33 +346,334 +346,122 +346,312 +429,429 +429,6 +429,301 +429,74 +429,172 +429,48 +429,124 +429,372 +429,114 +429,358 +49,49 +49,402 +49,313 +49,12 +49,193 +49,26 +49,471 +49,25 +49,324 +49,435 +144,144 +144,175 +144,34 +144,316 +144,52 +144,227 +144,248 +144,243 +144,470 +144,137 +146,146 +146,97 +146,135 +146,406 +146,128 +146,468 +146,81 +146,187 +146,179 +146,470 +413,413 +413,57 +413,167 +413,377 +413,152 +413,170 +413,157 +413,390 +413,397 +413,232 +286,286 +286,215 +286,94 +286,147 +286,400 +286,368 +286,440 +286,463 +286,110 +286,330 +473,473 +473,184 +473,85 +473,295 +473,226 +473,113 +473,335 +473,472 +473,250 +473,196 +312,312 +312,325 +312,111 +312,412 +312,259 +312,108 +312,21 +312,346 +312,138 +312,33 +22,22 +22,438 +22,350 +22,451 +22,407 +22,230 +22,23 +22,284 +22,418 +22,63 +62,62 +62,100 +62,61 +62,127 +62,461 +62,130 +62,75 +62,288 +62,354 +62,437 +262,262 +262,466 +262,460 +262,241 +262,428 +262,442 +262,174 +262,225 +262,417 +262,369 +449,449 +449,202 +449,426 +449,293 +449,219 +449,365 +449,200 +449,389 +449,96 +449,318 +461,461 +461,61 +461,288 +461,130 +461,62 +461,354 +461,100 +461,437 +461,317 +461,154 +235,235 +235,332 +235,44 +235,222 +235,153 +235,30 +235,283 +235,436 +235,331 +235,234 +105,105 +105,91 +105,433 +105,166 +105,133 +105,177 +105,224 +105,256 +105,370 +105,213 +96,96 +96,168 +96,142 +96,237 +96,426 +96,123 +96,449 +96,202 +96,169 +96,366 +266,266 +266,120 +266,389 +266,132 +266,200 +266,219 +266,119 +266,277 +266,293 +266,302 +56,56 +56,448 +56,398 +56,383 +56,21 +56,303 +56,259 +56,231 +56,87 +56,244 +85,85 +85,184 +85,473 +85,226 +85,295 +85,335 +85,51 +85,282 +85,113 +85,472 +149,149 +149,88 +149,46 +149,319 +149,116 +149,83 +149,414 +149,211 +149,218 +149,276 +447,447 +447,446 +447,118 +447,426 +447,69 +447,280 +447,459 +447,366 +447,171 +447,415 +365,365 +365,139 +365,202 +365,219 +365,277 +365,119 +365,200 +365,449 +365,120 +365,321 +139,139 +139,365 +139,321 +139,277 +139,119 +139,126 +139,219 +139,202 +139,109 +139,120 +426,426 +426,446 +426,449 +426,447 +426,96 +426,142 +426,202 +426,293 +426,318 +426,366 +307,307 +307,255 +307,351 +307,252 +307,430 +307,55 +307,381 +307,441 +307,435 +307,12 +336,336 +336,308 +336,213 +336,264 +336,267 +336,216 +336,177 +336,133 +336,183 +336,59 +275,275 +275,162 +275,318 +275,69 +275,302 +275,280 +275,121 +275,132 +275,293 +275,389 +36,36 +36,173 +36,35 +36,357 +36,314 +36,439 +36,106 +36,77 +36,51 +36,282 +273,273 +273,233 +273,76 +273,453 +273,454 +273,272 +273,294 +273,419 +273,189 +273,378 +233,233 +233,419 +233,189 +233,273 +233,53 +233,453 +233,229 +233,294 +233,454 +233,309 +352,352 +352,326 +352,110 +352,456 +352,359 +352,463 +352,188 +352,27 +352,440 +352,32 +211,211 +211,276 +211,46 +211,328 +211,238 +211,315 +211,404 +211,414 +211,192 +211,274 +315,315 +315,328 +315,274 +315,257 +315,404 +315,276 +315,211 +315,238 +315,45 +315,455 +277,277 +277,119 +277,120 +277,219 +277,126 +277,139 +277,305 +277,365 +277,200 +277,266 +122,122 +122,33 +122,98 +122,323 +122,186 +122,21 +122,190 +122,87 +122,346 +122,210 +397,397 +397,167 +397,170 +397,302 +397,390 +397,266 +397,132 +397,162 +397,275 +397,389 +77,77 +77,357 +77,261 +77,78 +77,36 +77,253 +77,26 +77,314 +77,173 +77,324 +121,121 +121,280 +121,69 +121,275 +121,162 +121,302 +121,318 +121,132 +121,447 +121,293 +131,131 +131,405 +131,140 +131,465 +131,217 +131,165 +131,129 +131,79 +131,64 +131,38 +270,270 +270,179 +270,455 +270,257 +270,386 +270,274 +270,101 +270,315 +270,45 +270,328 +373,373 +373,201 +373,299 +373,358 +373,124 +373,65 +373,256 +373,408 +373,380 +373,433 +415,415 +415,366 +415,459 +415,72 +415,462 +415,142 +415,237 +415,118 +415,446 +415,254 +162,162 +162,275 +162,318 +162,302 +162,132 +162,69 +162,293 +162,280 +162,389 +162,121 +83,83 +83,116 +83,175 +83,149 +83,46 +83,97 +83,470 +83,81 +83,146 +83,88 +201,201 +201,373 +201,299 +201,358 +201,124 +201,408 +201,11 +201,393 +201,65 +201,6 +264,264 +264,267 +264,336 +264,384 +264,308 +264,92 +264,213 +264,216 +264,183 +264,177 +460,460 +460,416 +460,442 +460,174 +460,241 +460,466 +460,225 +460,369 +460,262 +460,66 +354,354 +354,437 +354,130 +354,370 +354,100 +354,461 +354,61 +354,62 +354,11 +354,154 +459,459 +459,366 +459,415 +459,72 +459,118 +459,462 +459,171 +459,254 +459,446 +459,142 +114,114 +114,372 +114,281 +114,172 +114,301 +114,330 +114,48 +114,463 +114,74 +114,456 +359,359 +359,27 +359,326 +359,185 +359,71 +359,352 +359,317 +359,110 +359,206 +359,188 +87,87 +87,210 +87,186 +87,231 +87,323 +87,268 +87,21 +87,33 +87,122 +87,303 +126,126 +126,321 +126,305 +126,362 +126,109 +126,277 +126,119 +126,139 +126,363 +126,42 +195,195 +195,322 +195,391 +195,93 +195,164 +195,107 +195,361 +195,125 +195,228 +195,394 +82,82 +82,454 +82,378 +82,76 +82,164 +82,391 +82,125 +82,453 +82,228 +82,102 +263,263 +263,199 +263,4 +263,331 +263,30 +263,329 +263,467 +263,445 +263,222 +263,235 +212,212 +212,214 +212,296 +212,284 +212,23 +212,291 +212,45 +212,230 +212,240 +212,418 +58,58 +58,432 +58,379 +58,423 +58,421 +58,67 +58,443 +58,242 +58,207 +58,337 +176,176 +176,279 +176,457 +176,376 +176,444 +176,467 +176,388 +176,253 +176,396 +176,331 +288,288 +288,61 +288,461 +288,392 +288,62 +288,71 +288,130 +288,100 +288,395 +288,317 +289,289 +289,311 +289,43 +289,80 +289,207 +289,137 +289,450 +289,422 +289,227 +289,73 +342,342 +342,320 +342,304 +342,434 +342,209 +342,258 +342,5 +342,260 +342,298 +342,127 +333,333 +333,278 +333,374 +333,136 +333,134 +333,38 +333,64 +333,37 +333,115 +333,140 +393,393 +393,408 +393,11 +393,32 +393,245 +393,188 +393,456 +393,154 +393,48 +393,74 +54,54 +54,375 +54,52 +54,469 +54,420 +54,243 +54,89 +54,316 +54,34 +54,369 +222,222 +222,30 +222,332 +222,331 +222,283 +222,235 +222,44 +222,467 +222,279 +222,176 +216,216 +216,183 +216,59 +216,336 +216,298 +216,213 +216,308 +216,403 +216,264 +216,260 +290,290 +290,385 +290,28 +290,194 +290,197 +290,2 +290,0 +290,387 +290,63 +290,101 +360,360 +360,464 +360,66 +360,292 +360,239 +360,442 +360,343 +360,244 +360,241 +360,416 +150,150 +150,159 +150,417 +150,353 +150,428 +150,73 +150,375 +150,349 +150,54 +150,369 +445,445 +445,467 +445,223 +445,331 +445,4 +445,376 +445,396 +445,444 +445,457 +445,176 +317,317 +317,154 +317,71 +317,27 +317,245 +317,185 +317,359 +317,188 +317,392 +317,32 +172,172 +172,301 +172,372 +172,114 +172,48 +172,281 +172,74 +172,456 +172,429 +172,463 +120,120 +120,266 +120,119 +120,277 +120,389 +120,200 +120,219 +120,132 +120,293 +120,365 +14,14 +14,63 +14,382 +14,287 +14,15 +14,340 +14,2 +14,28 +14,385 +14,0 +167,167 +167,170 +167,397 +167,390 +167,377 +167,232 +167,57 +167,413 +167,302 +167,266 +260,260 +260,298 +260,403 +260,5 +260,285 +260,434 +260,161 +260,246 +260,59 +260,342 +347,347 +347,337 +347,443 +347,47 +347,421 +347,327 +347,319 +347,379 +347,242 +347,344 +217,217 +217,165 +217,465 +217,79 +217,131 +217,405 +217,140 +217,9 +217,129 +217,10 +174,174 +174,416 +174,460 +174,225 +174,369 +174,442 +174,466 +174,241 +174,89 +174,262 +406,406 +406,468 +406,135 +406,128 +406,187 +406,97 +406,81 +406,103 +406,146 +406,470 +243,243 +243,420 +243,469 +243,248 +243,89 +243,52 +243,54 +243,375 +243,316 +243,251 +3,3 +3,272 +3,160 +3,378 +3,76 +3,18 +3,82 +3,228 +3,273 +3,454 +281,281 +281,114 +281,372 +281,172 +281,301 +281,330 +281,463 +281,48 +281,352 +281,456 +79,79 +79,165 +79,217 +79,465 +79,9 +79,405 +79,10 +79,131 +79,129 +79,140 +284,284 +284,23 +284,230 +284,212 +284,296 +284,451 +284,22 +284,214 +284,438 +284,407 +137,137 +137,422 +137,227 +137,450 +137,207 +137,311 +137,43 +137,80 +137,289 +137,34 +78,78 +78,261 +78,77 +78,223 +78,396 +78,357 +78,253 +78,444 +78,376 +78,457 +434,434 +434,342 +434,298 +434,260 +434,320 +434,5 +434,209 +434,59 +434,304 +434,403 +51,51 +51,35 +51,335 +51,85 +51,282 +51,226 +51,184 +51,106 +51,173 +51,473 +356,356 +356,355 +356,155 +356,24 +356,458 +356,104 +356,203 +356,412 +356,108 +356,427 +130,130 +130,354 +130,437 +130,100 +130,461 +130,370 +130,62 +130,61 +130,288 +130,154 +332,332 +332,235 +332,44 +332,222 +332,283 +332,30 +332,436 +332,153 +332,331 +332,388 +436,436 +436,234 +436,153 +436,44 +436,381 +436,252 +436,419 +436,229 +436,351 +436,332 +471,471 +471,193 +471,143 +471,204 +471,435 +471,12 +471,430 +471,402 +471,411 +471,49 +186,186 +186,210 +186,87 +186,323 +186,122 +186,231 +186,33 +186,268 +186,98 +186,287 +220,220 +220,90 +220,151 +220,42 +220,198 +220,282 +220,25 +220,314 +220,109 +220,324 +302,302 +302,162 +302,132 +302,275 +302,318 +302,397 +302,266 +302,389 +302,293 +302,200 +343,343 +343,251 +343,208 +343,66 +343,205 +343,416 +343,464 +343,360 +343,174 +343,442 +466,466 +466,241 +466,262 +466,460 +466,442 +466,416 +466,174 +466,239 +466,225 +466,369 +115,115 +115,37 +115,178 +115,297 +115,382 +115,15 +115,64 +115,136 +115,38 +115,452 +71,71 +71,185 +71,317 +71,392 +71,27 +71,359 +71,154 +71,288 +71,461 +71,245 +456,456 +456,32 +456,188 +456,352 +456,245 +456,48 +456,393 +456,154 +456,27 +456,326 +88,88 +88,149 +88,319 +88,218 +88,414 +88,327 +88,46 +88,116 +88,347 +88,211 +5,5 +5,260 +5,161 +5,403 +5,285 +5,342 +5,246 +5,434 +5,298 +5,258 +382,382 +382,15 +382,178 +382,340 +382,14 +382,115 +382,297 +382,37 +382,63 +382,50 +224,224 +224,75 +224,127 +224,100 +224,62 +224,105 +224,91 +224,370 +224,437 +224,130 +299,299 +299,358 +299,201 +299,124 +299,373 +299,6 +299,408 +299,393 +299,11 +299,65 +47,47 +47,327 +47,347 +47,443 +47,421 +47,337 +47,319 +47,379 +47,29 +47,242 +367,367 +367,158 +367,254 +367,462 +367,72 +367,300 +367,459 +367,415 +367,171 +367,18 +383,383 +383,448 +383,398 +383,205 +383,56 +383,310 +383,303 +383,345 +383,244 +383,410 +435,435 +435,430 +435,12 +435,471 +435,143 +435,193 +435,204 +435,307 +435,55 +435,402 +247,247 +247,424 +247,16 +247,156 +247,41 +247,180 +247,191 +247,70 +247,249 +247,265 +199,199 +199,263 +199,329 +199,235 +199,30 +199,331 +199,222 +199,332 +199,4 +199,467 +90,90 +90,220 +90,151 +90,42 +90,282 +90,198 +90,314 +90,109 +90,25 +90,324 +246,246 +246,161 +246,285 +246,403 +246,260 +246,5 +246,298 +246,434 +246,183 +246,258 +92,92 +92,384 +92,267 +92,117 +92,264 +92,271 +92,336 +92,86 +92,177 +92,308 +463,463 +463,110 +463,440 +463,352 +463,326 +463,281 +463,456 +463,147 +463,215 +463,359 +433,433 +433,105 +433,91 +433,166 +433,256 +433,133 +433,177 +433,65 +433,86 +433,373 +316,316 +316,34 +316,52 +316,54 +316,375 +316,80 +316,43 +316,144 +316,469 +316,243 +145,145 +145,84 +145,439 +145,17 +145,36 +145,106 +145,357 +145,173 +145,35 +145,77 +345,345 +345,310 +345,410 +345,387 +345,303 +345,383 +345,399 +345,0 +345,194 +345,197 +395,395 +395,8 +395,288 +395,209 +395,431 +395,392 +395,61 +395,304 +395,127 +395,401 +468,468 +468,406 +468,128 +468,135 +468,97 +468,81 +468,187 +468,470 +468,103 +468,146 +133,133 +133,177 +133,166 +133,91 +133,213 +133,105 +133,308 +133,433 +133,336 +133,224 +81,81 +81,470 +81,128 +81,97 +81,468 +81,135 +81,406 +81,146 +81,248 +81,187 +452,452 +452,334 +452,50 +452,148 +452,129 +452,297 +452,306 +452,190 +452,140 +452,405 +110,110 +110,440 +110,463 +110,352 +110,326 +110,359 +110,27 +110,147 +110,456 +110,368 +97,97 +97,135 +97,128 +97,146 +97,468 +97,81 +97,406 +97,470 +97,187 +97,83 +389,389 +389,200 +389,132 +389,219 +389,266 +389,293 +389,120 +389,119 +389,318 +389,277 +424,424 +424,247 +424,16 +424,156 +424,41 +424,249 +424,265 +424,191 +424,180 +424,70 +119,119 +119,277 +119,120 +119,219 +119,126 +119,139 +119,305 +119,365 +119,266 +119,200 +309,309 +309,229 +309,189 +309,153 +309,294 +309,233 +309,419 +309,436 +309,234 +309,235 +431,431 +431,401 +431,191 +431,41 +431,392 +431,8 +431,156 +431,395 +431,364 +431,206 +250,250 +250,60 +250,295 +250,363 +250,163 +250,196 +250,362 +250,473 +250,305 +250,113 +313,313 +313,49 +313,402 +313,12 +313,193 +313,471 +313,26 +313,435 +313,25 +313,279 +405,405 +405,465 +405,165 +405,131 +405,129 +405,140 +405,217 +405,79 +405,9 +405,148 +8,8 +8,364 +8,401 +8,40 +8,431 +8,395 +8,191 +8,41 +8,182 +8,181 +469,469 +469,420 +469,89 +469,243 +469,54 +469,52 +469,375 +469,248 +469,369 +469,316 +361,361 +361,7 +361,112 +361,102 +361,125 +361,107 +361,394 +361,195 +361,322 +361,391 +91,91 +91,105 +91,166 +91,433 +91,133 +91,177 +91,224 +91,213 +91,308 +91,256 +80,80 +80,43 +80,316 +80,34 +80,289 +80,227 +80,73 +80,137 +80,422 +80,311 +218,218 +218,414 +218,192 +218,88 +218,149 +218,276 +218,238 +218,211 +218,46 +218,319 +125,125 +125,102 +125,391 +125,112 +125,164 +125,361 +125,7 +125,195 +125,82 +125,454 +300,300 +300,254 +300,367 +300,171 +300,158 +300,72 +300,462 +300,118 +300,459 +300,415 +451,451 +451,22 +451,438 +451,230 +451,350 +451,23 +451,407 +451,284 +451,340 +451,63 +455,455 +455,270 +455,386 +455,257 +455,101 +455,179 +455,274 +455,45 +455,315 +455,418 +188,188 +188,32 +188,245 +188,456 +188,154 +188,352 +188,317 +188,27 +188,393 +188,359 +253,253 +253,444 +253,376 +253,457 +253,396 +253,223 +253,261 +253,176 +253,313 +253,26 +184,184 +184,473 +184,226 +184,85 +184,295 +184,335 +184,113 +184,472 +184,51 +184,19 +204,204 +204,143 +204,471 +204,193 +204,411 +204,141 +204,348 +204,435 +204,430 +204,55 +392,392 +392,71 +392,185 +392,288 +392,431 +392,317 +392,27 +392,461 +392,61 +392,359 +236,236 +236,339 +236,31 +236,39 +236,68 +236,141 +236,139 +236,365 +236,348 +236,202 +294,294 +294,309 +294,233 +294,273 +294,189 +294,229 +294,419 +294,153 +294,53 +294,453 +371,371 +371,221 +371,427 +371,203 +371,104 +371,99 +371,24 +371,20 +371,292 +371,244 +129,129 +129,405 +129,140 +129,148 +129,452 +129,334 +129,465 +129,131 +129,165 +129,306 +160,160 +160,3 +160,272 +160,18 +160,378 +160,76 +160,273 +160,228 +160,82 +160,454 +60,60 +60,250 +60,363 +60,362 +60,305 +60,163 +60,295 +60,126 +60,196 +60,232 +7,7 +7,112 +7,361 +7,102 +7,125 +7,95 +7,169 +7,441 +7,391 +7,394 +423,423 +423,311 +423,207 +423,58 +423,450 +423,432 +423,422 +423,137 +423,289 +423,227 +363,363 +363,362 +363,305 +363,60 +363,163 +363,250 +363,126 +363,232 +363,119 +363,277 +40,40 +40,364 +40,8 +40,182 +40,181 +40,401 +40,395 +40,304 +40,431 +40,258 +61,61 +61,461 +61,288 +61,62 +61,130 +61,100 +61,354 +61,437 +61,127 +61,392 +70,70 +70,180 +70,247 +70,424 +70,16 +70,156 +70,41 +70,191 +70,181 +70,400 +296,296 +296,214 +296,212 +296,291 +296,284 +296,23 +296,45 +296,240 +296,230 +296,404 +374,374 +374,278 +374,136 +374,333 +374,37 +374,38 +374,64 +374,134 +374,115 +374,140 +2,2 +2,0 +2,28 +2,194 +2,385 +2,287 +2,268 +2,290 +2,197 +2,63 +295,295 +295,473 +295,250 +295,184 +295,196 +295,113 +295,85 +295,226 +295,60 +295,163 +208,208 +208,251 +208,103 +208,343 +208,187 +208,468 +208,406 +208,410 +208,128 +208,248 +432,432 +432,58 +432,67 +432,423 +432,421 +432,379 +432,443 +432,242 +432,337 +432,207 +28,28 +28,385 +28,194 +28,2 +28,0 +28,290 +28,197 +28,63 +28,287 +28,387 +161,161 +161,246 +161,285 +161,403 +161,5 +161,260 +161,298 +161,258 +161,434 +161,342 +23,23 +23,284 +23,230 +23,212 +23,407 +23,22 +23,438 +23,451 +23,418 +23,296 +187,187 +187,103 +187,406 +187,468 +187,135 +187,128 +187,410 +187,97 +187,208 +187,146 +113,113 +113,196 +113,295 +113,473 +113,184 +113,226 +113,425 +113,472 +113,250 +113,85 +337,337 +337,443 +337,347 +337,421 +337,379 +337,242 +337,344 +337,319 +337,47 +337,327 +21,21 +21,323 +21,33 +21,87 +21,122 +21,325 +21,186 +21,312 +21,56 +21,98 +223,223 +223,396 +223,444 +223,376 +223,457 +223,253 +223,445 +223,78 +223,261 +223,467 +255,255 +255,351 +255,307 +255,252 +255,381 +255,441 +255,430 +255,55 +255,435 +255,234 +205,205 +205,383 +205,310 +205,398 +205,343 +205,410 +205,448 +205,464 +205,244 +205,345 +13,13 +13,19 +13,335 +13,472 +13,17 +13,106 +13,226 +13,425 +13,51 +13,184 +155,155 +155,355 +155,458 +155,356 +155,412 +155,24 +155,10 +155,104 +155,108 +155,203 +340,340 +340,15 +340,382 +340,14 +340,178 +340,451 +340,438 +340,63 +340,22 +340,350 +166,166 +166,91 +166,433 +166,177 +166,133 +166,105 +166,256 +166,86 +166,308 +166,213 +442,442 +442,241 +442,460 +442,416 +442,466 +442,174 +442,66 +442,239 +442,225 +442,262 +48,48 +48,74 +48,172 +48,301 +48,456 +48,32 +48,393 +48,188 +48,372 +48,281 +128,128 +128,468 +128,135 +128,406 +128,81 +128,97 +128,470 +128,187 +128,146 +128,103 +348,348 +348,411 +348,141 +348,204 +348,339 +348,143 +348,193 +348,471 +348,151 +348,39 +152,152 +152,377 +152,113 +152,196 +152,425 +152,57 +152,232 +152,163 +152,295 +152,390 +320,320 +320,304 +320,342 +320,258 +320,209 +320,434 +320,5 +320,260 +320,127 +320,395 +401,401 +401,8 +401,431 +401,191 +401,364 +401,41 +401,156 +401,40 +401,16 +401,395 +453,453 +453,454 +453,53 +453,82 +453,102 +453,233 +453,125 +453,419 +453,76 +453,273 +306,306 +306,190 +306,148 +306,346 +306,334 +306,50 +306,138 +306,452 +306,98 +306,129 +261,261 +261,78 +261,77 +261,357 +261,223 +261,253 +261,396 +261,444 +261,376 +261,457 +267,267 +267,264 +267,336 +267,92 +267,308 +267,213 +267,384 +267,177 +267,117 +267,133 +391,391 +391,164 +391,195 +391,125 +391,322 +391,102 +391,228 +391,82 +391,361 +391,93 +444,444 +444,376 +444,396 +444,457 +444,253 +444,223 +444,176 +444,445 +444,261 +444,467 +198,198 +198,109 +198,42 +198,321 +198,220 +198,90 +198,126 +198,151 +198,139 +198,362 +369,369 +369,225 +369,174 +369,416 +369,89 +369,460 +369,428 +369,469 +369,420 +369,375 +215,215 +215,286 +215,147 +215,94 +215,463 +215,440 +215,110 +215,368 +215,400 +215,330 +372,372 +372,114 +372,281 +372,172 +372,301 +372,330 +372,48 +372,463 +372,74 +372,456 +72,72 +72,462 +72,459 +72,415 +72,254 +72,366 +72,367 +72,118 +72,171 +72,142 +318,318 +318,162 +318,275 +318,293 +318,132 +318,389 +318,69 +318,302 +318,200 +318,280 +231,231 +231,210 +231,87 +231,268 +231,303 +231,186 +231,287 +231,323 +231,21 +231,448 diff --git a/demo/data/knn.png b/demo/data/knn.png new file mode 100644 index 0000000..a5f6151 Binary files /dev/null and b/demo/data/knn.png differ diff --git a/demo/data/plot.py b/demo/data/plot.py new file mode 100644 index 0000000..827c6f0 --- /dev/null +++ b/demo/data/plot.py @@ -0,0 +1,34 @@ +import matplotlib.pyplot as plt +import numpy as np + +# Read the data +data = np.loadtxt("sparse.csv", delimiter=",", skiprows=1, dtype=float) + +# Read the edges +edges = np.loadtxt("knn.csv", delimiter=",", dtype=int) + +# Plot the edges +for edge in edges: + point1 = data[edge[0]] + point2 = data[edge[1]] + plt.plot([point1[0], point2[0]], [point1[1], point2[1]], c='salmon', linewidth=0.5) + +# Plot the data +plt.scatter(data[:, 0], data[:, 1], c='darkred', marker='o', s=1, zorder=2) + +# Remove axis labels +plt.xticks([]) +plt.yticks([]) + +# Remove white space +plt.gca().set_axis_off() +plt.subplots_adjust(top = 1, bottom = 0, right = 1, left = 0, + hspace = 0, wspace = 0) +plt.margins(0,0) +plt.gca().xaxis.set_major_locator(plt.NullLocator()) +plt.gca().yaxis.set_major_locator(plt.NullLocator()) +plt.gca().set_aspect('equal', adjustable='box') + +# Save the plot +plt.tight_layout() +plt.savefig("knn.png", dpi=300, transparent=True) \ No newline at end of file diff --git a/demo/data/plot_tree.py b/demo/data/plot_tree.py deleted file mode 100644 index c878717..0000000 --- a/demo/data/plot_tree.py +++ /dev/null @@ -1,42 +0,0 @@ -import matplotlib.pyplot as plt - - -# Read the data -lines = open("tree.csv").readlines() - -points = {} -bubbles = {} -for row in lines: - s = row.split(",") - id = int(s[0]) - height = int(s[1]) - if height == 0: - x, y = float(s[-2]), float(s[-1]) - points[id] = (x, y) - elif height == 1: - radius = float(s[-3]) - x, y = float(s[-2]), float(s[-1]) - children = s[3].split("+") - bubbles[id] = (x, y, radius, children) - -fig, ax = plt.subplots() -colors = ['r', 'g', 'b', 'y', 'c', 'm'] -for id, (x, y, radius, children) in bubbles.items(): - color = colors[id % len(colors)] - circle = plt.Circle((x, y), radius, color='b', alpha=0.25) - ax.add_artist(circle) - for child in children: - child = int(child) - x, y = points[child][0], points[child][1] - plt.scatter(x, y, color='b', s=2, marker='+') - -# remove coordinate axis names -plt.xticks([]) -plt.yticks([]) -plt.gca().set_aspect('equal') - -title = "N = " + str(len(points)) + ", L = " + str(len(bubbles)) -plt.title(title) - -# set axis limits -plt.savefig("tree.png", dpi=300) \ No newline at end of file diff --git a/demo/data/tree.csv b/demo/data/tree.csv deleted file mode 100644 index e2a6a33..0000000 --- a/demo/data/tree.csv +++ /dev/null @@ -1,419 +0,0 @@ -351,5,18446744073709551615,104+350,403.31946317952264,358.2197148990929,251.90231818033695,68.66896820415766 -104,4,351,28+270+168+405,305.0654473406951,331.3596355226699,157.3910079346905,53.3399471104363 -350,4,351,349+252+103,210.301628830634,396.84495301064334,387.8111444839938,68.66896820415766 -28,3,104,167+4+394+402,91.11928942207227,393.10888458463853,131.66977949821256,53.3399471104363 -103,3,350,274+102,127.10178571094647,345.9597895165923,344.48848131045304,54.9629540361904 -168,3,104,39+6+182+265,131.43672527518544,159.16065585654056,179.62711658809366,44.17649234496825 -252,3,350,159+27+308+340,132.16849424063048,473.1580466918169,371.0451535002185,51.22571581474572 -270,3,104,404+269+223,73.80703351391496,453.6004720135152,185.676223552402,33.897078204290885 -349,3,350,251+55+185+348,137.94547817266198,347.13225402498756,434.6548899215823,68.66896820415766 -405,3,104,381+82+136,91.70330544589214,461.8389290978392,118.01400061999679,51.540935996761895 -4,2,28,19+416,27.008877401843396,390.1588865654335,189.379995611723,32.03337127725533 -6,2,168,264+18+12+346,73.72934041886097,148.04461664741666,125.82043562232045,43.87915304085741 -27,2,252,276+51+260+382,48.867512066170235,506.277746414658,372.5273712229311,27.954403982468488 -39,2,168,163+1+257+330+342,66.94431309739375,178.96496201325525,236.4944698322742,43.639864650992955 -55,2,349,79+347+54+367,44.773103329528084,331.34070934583156,463.1160633737347,35.753182708526026 -82,2,405,230+380+33+297,35.084627057576,432.41646392747504,106.47873454107601,17.459233843127627 -102,2,103,62+126+153+317+389,80.63734389486808,381.4512517168381,339.5957000861916,47.858390642471186 -136,2,405,222+144+300+303,55.21321264299818,489.5807971348964,141.71876028083955,51.540935996761895 -159,2,252,101+3+358,73.67786294403645,474.8098653874662,312.57785114693036,36.33638358085972 -167,2,28,228+193+86+411,49.231113987125724,404.7554828718325,91.43327878548172,32.50696769375962 -182,2,168,151+36+241+344+414,67.97009256084999,111.7820832586146,188.56400470743338,35.254787848119115 -185,2,349,184+227+250+314,46.96881638417318,382.17948737586244,403.55836576050854,32.2201384223314 -223,2,270,219+195+268,38.9217510077348,475.390586306641,172.69520777546018,26.84746033134413 -251,2,349,76+26+200,71.6472221934921,404.80480183343815,467.3555928981471,68.66896820415766 -265,2,168,113+206+236+412,66.67659539754875,211.4326259573673,141.39734332762757,44.17649234496825 -269,2,270,253+43+332+385+204,56.11312934205593,435.9593052265729,187.04131667677677,33.897078204290885 -274,2,103,108+158+273+354,83.00685728432828,302.2779898855205,350.5103658941593,54.9629540361904 -308,2,252,162+235+360+397,46.99235671197329,440.5141876904717,368.13688574326454,30.242570799628023 -340,2,252,320+118+238,58.909372702653556,474.20959135225104,438.55026369679786,51.22571581474572 -348,2,349,47+248+188+377,62.13836145989495,294.39264812115596,424.0608118665308,44.96584254067102 -381,2,405,81+327,44.378543825205185,465.20012336445313,93.67501345615278,34.117593908173006 -394,2,28,29+393+173+93,41.25821836228593,399.18010986010086,154.46432916442112,24.926978704257532 -402,2,28,131+401+375,45.95082384652984,366.5299198097256,116.73028786367853,53.3399471104363 -404,2,270,132+135+336,20.178901786920253,461.6451627209922,199.17230702482965,19.865163585740277 -1,1,39,30+288+318+70,19.683069036994787,159.3547251565384,195.84037648591777,24.85012697727382 -3,1,159,32+94+100+245+403,34.97460811211399,436.11873373388426,311.60920985629673,36.33638358085972 -12,1,6,20+8+390,8.863344676270497,170.82120924389605,150.55014885952642,19.900113599821758 -18,1,6,214+90+78+37,16.97011777337637,141.71281609528623,119.95481506520761,27.7632027621769 -19,1,4,343+115+341+175,13.594599821946066,398.1684474535791,191.4828757931063,19.828930506815382 -26,1,251,116+249+53,8.03623922806124,367.13131999934063,460.8850505993925,28.237162575438433 -29,1,394,92+365,8.37212252517997,405.13407828586537,132.31242575399565,19.52731682201808 -33,1,82,309+207+296,12.022221073475368,431.63048043874346,107.56120194999137,15.920830607273686 -36,1,182,121+75+211+59,22.20508877859235,115.06244323462508,184.3346183457671,35.254787848119115 -43,1,269,331+201+225+58+174,9.507449817637143,440.3390397248433,168.74893321379892,15.84700826174194 -47,1,348,97+187+363,27.071139719335427,273.62390788218914,395.8053793005995,44.96584254067102 -51,1,27,275+107+133+368,9.683873708188013,486.5940117118406,368.3622841504347,19.751060014684622 -54,1,55,333+48,4.113392899212365,347.8203004036444,441.3928617642845,18.956197910622155 -62,1,102,147+2+388+231,7.908577735395944,406.0124736398171,351.383527812336,14.521366190192968 -76,1,251,84+160,30.902574064545604,415.50081062920833,484.2471027726867,68.66896820415766 -79,1,55,41+24+271,19.909050276457894,334.1674144595939,487.81891487767484,35.753182708526026 -81,1,381,83+123+46+304,23.18741151256367,478.4796278732157,105.9943011302187,28.311388257201326 -86,1,167,285+49,5.6146949212033155,385.8692237717869,104.08881366346696,20.8456864626752 -93,1,394,391+392+61+369,8.864720499586513,411.15725280835886,167.76356763477474,17.707119034765785 -101,1,159,221+23,7.003970118353692,529.2855850711396,303.8102367355449,36.07977121947355 -108,1,274,99+166+64,24.86081253924692,303.9842882075788,322.57965292197304,50.470700572119085 -113,1,265,15+42+216,11.578809023971788,236.15321302421216,133.3126421310778,42.74436658563029 -118,1,340,398+177+266+217,21.430746461919163,463.4511960124659,428.274162678707,31.446191444328377 -126,1,102,13+63+157+373,16.88956408027267,364.8784492787589,341.322008440026,25.291550840608206 -131,1,402,50+130+190,25.0360822182512,347.2055154180568,124.72990112213692,53.3399471104363 -132,1,404,329+399,6.018760804951701,462.42547792426967,213.3109314562501,19.865163585740277 -135,1,404,281+237+140+110,7.327261434734617,457.8218139089794,197.0575508523395,11.828936458475026 -144,1,136,52+302+202,7.154170887917105,466.84445798083675,144.16156948870295,15.877112067332416 -151,1,182,180+150+413+57,13.364369828109437,87.49808623731812,229.18242212292142,29.01902230003014 -153,1,102,146+197+96+355,41.08355905561105,377.65053727862596,300.2249436181047,47.858390642471186 -158,1,274,306+272+338,13.856580027576166,321.12762526354567,371.4194995978775,27.639727472939406 -162,1,308,334+161+210+143,23.66197233656264,436.3958751314208,380.73489317076417,27.643209826605915 -163,1,39,31+73+295+220+356,26.88957230158559,212.99199082203054,221.14224051598458,37.56456094338608 -173,1,394,67+114+199+386,17.07372626653756,374.99677242910514,154.70065230741983,24.926978704257532 -184,1,185,137+65+129,15.687644233916785,409.38929501455794,389.742839992348,25.40970877364665 -188,1,348,283+198+213,8.97956749466439,282.43584719184224,431.1255754560744,26.81867755896263 -193,1,167,400+339+156+7+417,23.61727184686694,401.23876978877496,66.06200293507268,32.50696769375962 -195,1,223,45+194+361,11.83853537434094,471.00795728444353,173.98305318063453,17.19928182942689 -200,1,251,88+145,25.272914290500577,450.6190157888142,460.1698964717393,44.30841815340586 -204,1,269,9+310+337,19.921366522606416,431.0060865377114,222.89252754335143,33.897078204290885 -206,1,265,205+149+325,8.9394608720813,197.43916519514252,85.38163339632347,44.17649234496825 -219,1,223,134+14+120+293,10.306220539641336,462.29679339150954,160.4262633797028,13.015648344710556 -222,1,136,138+154+203+255+263,36.0575845399302,506.2745764329957,151.11321719805406,51.540935996761895 -227,1,185,215+69,8.725930895230874,413.30609432248207,411.87107494718157,32.2201384223314 -228,1,167,315+44+21+112,6.222857082739498,414.6617624475974,102.01988324133998,16.631813332494026 -230,1,82,181+25+229+119,9.56009491899746,420.3153062452351,84.00511169911094,16.591772845761678 -235,1,308,321+172+298,11.670230810084865,457.60673827293203,369.8440889503019,15.23573831077763 -236,1,265,233+106+128+407,16.60079051656729,189.83129362017524,165.55581337828136,25.51242939408927 -238,1,340,262+56,15.236719194475482,491.9127125171749,420.9256260623001,31.351342513238844 -241,1,182,240+40+242+378+410,17.705739759141622,100.1658104915328,139.66035075831255,33.482668640748045 -248,1,348,247+178+278+186,21.013402336610906,322.2413856517337,419.6664250279899,27.639727472939406 -250,1,185,284+290+313+322+125,20.00813899995141,356.9828084206674,393.96641628999316,22.879452623664783 -253,1,269,127+261+142+384,11.443324494875435,429.14790609362666,198.03990410412604,17.915989495247807 -257,1,39,256+286+311+208,19.909567115897918,161.70471731760085,240.33979714228732,28.261726632565228 -260,1,27,22+282,14.926896063639322,480.8982359234475,395.0628069155862,21.153167493734745 -264,1,6,243+35+179+224,32.45997650349069,131.85794222959373,87.85792820683662,43.87915304085741 -268,1,223,66+267+364,12.385783813438216,497.2316058823471,187.7659548979624,26.84746033134413 -273,1,274,155+189+372,15.833668369271011,336.34852894240436,343.56548310151834,26.734330018195024 -276,1,27,105+139+287+289,20.36195365885157,520.8486004806501,352.1046073588147,27.954403982468488 -297,1,82,279+72+254+323,7.761070334068574,447.33254873684723,109.4405792558478,17.459233843127627 -300,1,136,299+259+77,9.219970394499489,494.44000056509213,120.92614340045729,17.052910688016347 -303,1,136,277+164+301,6.873523337150032,479.6349673619281,144.41113975800081,12.775814841805945 -314,1,185,98+176+212,11.636622468689513,376.2130733647457,427.8186678550794,25.930323165758008 -317,1,102,239+244,11.677538320826448,359.1411761803593,366.98676412070495,22.36950256380846 -320,1,340,319+312+395,33.33147284613503,476.7520376953485,464.00149014391747,51.22571581474572 -327,1,381,80+326+352,20.22679803895199,447.49411735276976,77.24929655739822,34.117593908173006 -330,1,39,165+74+328,15.401359114138632,154.3219110696465,281.76472657453996,43.639864650992955 -332,1,269,280+152,13.613900663486607,437.99201242251337,150.9756201514432,13.368757539267603 -336,1,404,171+141,4.849209661968842,468.51154514174016,189.26319493838946,16.83388842060309 -342,1,39,11+335+305,14.102923510261581,196.05694034540008,265.8896166656157,30.571912663853052 -344,1,182,218+291+196+246,14.798046188591039,146.27273921279817,189.99681431758518,18.333227476536276 -346,1,6,148+16+109,11.771129264137379,155.2926573442084,159.52822634857668,20.88230268096396 -347,1,55,91+34,11.101639937346764,318.0275019190645,481.79368347274533,35.33082161022631 -354,1,274,353+294+371+387,40.719135739424885,261.3081353177952,360.98521243999096,54.9629540361904 -358,1,159,307+357+383,23.27847100410773,502.97793835432066,320.0373295722434,36.07977121947355 -360,1,308,359+85+234+418+87,21.66237367625057,423.50122687160774,349.37076721103205,30.242570799628023 -367,1,55,124+5+366+292,11.135639085082865,327.6374886949869,446.11171550099937,20.437950100715792 -375,1,402,374+17+191,10.655100133817063,378.1287104522812,127.44765108870952,19.755147449297752 -377,1,348,10+95+376,13.878745024277368,289.98653924866613,451.1106632943067,27.762636239787106 -380,1,82,379+111+183,3.5195402791160206,429.4492112466969,131.41197130175163,16.39541422435852 -382,1,27,169+258+408+409,13.44619481377253,524.0803822970886,385.8475043132166,26.24777034939779 -385,1,269,38+209,6.0583915369239465,444.0298880841409,193.0639807049945,14.407992585291327 -389,1,102,68+226,4.483550389122083,395.3859171599413,363.91787682789436,19.794364277434877 -393,1,394,170+232+406,8.160914389366619,411.4857235532413,151.1848492869016,13.811492249054234 -397,1,308,396+117+316,8.360528670492437,457.2676552181858,380.90920351994873,18.470545929440306 -401,1,402,192+60,6.277487406241356,378.1183404333955,88.65482313844446,25.539588770140455 -411,1,167,0+324,6.475900643732955,412.6209655279921,121.03272462180256,18.621421087125864 -412,1,265,89+345+370,22.075112415940968,229.50727610233653,173.28646105460982,35.02855880242379 -414,1,182,362+122,8.793186824830766,113.84872735852413,235.17945825228847,35.05445946719307 -416,1,4,415+71,10.446852081470695,374.13976478914225,185.1742352489564,32.03337127725533 -0,0,411,,0,406.5085495788186,123.1718039592256,18.621421087125864 -2,0,62,,0,407.6221082598363,349.66567012234617,11.469220009365687 -5,0,367,,0,332.1600722430182,454.0129529078691,20.437950100715792 -7,0,193,,0,396.811716789951,75.52419093498092,19.60534601020132 -8,0,12,,0,166.30442566576198,145.72126856457703,16.424572812741346 -9,0,204,,0,439.7864842714855,222.41636258777385,23.32548783808653 -10,0,377,,0,277.62370916196267,457.4178017656107,27.762636239787106 -11,0,342,,0,210.0560306725783,267.59780914534224,27.310265899729327 -13,0,126,,0,364.91681852885984,344.3693127274331,12.811974062503237 -14,0,219,,0,467.18006893943175,164.96284672104554,12.749530083653296 -15,0,113,,0,230.4435713383629,124.94620201707671,42.74436658563029 -16,0,346,,0,151.82699384413047,153.47823704015133,20.88230268096396 -17,0,375,,0,378.4780049243903,123.33739859581408,19.755147449297752 -20,0,12,,0,171.86629050950765,159.35166486522908,14.721482393187282 -21,0,228,,0,412.28962266621664,103.56083122063885,16.631813332494026 -22,0,260,,0,468.13841123901545,402.8087155206015,19.56000047935577 -23,0,101,,0,531.97022594828,297.3412104734574,38.77123942076191 -24,0,79,,0,334.1936766710167,507.7279478327628,35.753182708526026 -25,0,230,,0,418.6357374442614,74.59371097960926,16.591772845761678 -30,0,1,,0,167.5391730759437,190.5264261378084,19.04587218850611 -31,0,163,,0,207.21829890011244,247.404639114608,34.13767523218111 -32,0,3,,0,404.129084679752,310.12093717117966,25.625107653739413 -34,0,347,,0,325.0206956813249,473.1715230531072,22.20327987469353 -35,0,264,,0,164.07546939423858,83.89800169204636,39.31200823761965 -37,0,18,,0,133.77098400699185,111.61910694723552,27.7632027621769 -38,0,385,,0,442.63325508731145,187.1687687251893,14.407992585291327 -40,0,241,,0,107.3058037793134,144.36918777810268,24.675781601006687 -41,0,79,,0,342.6805983542533,474.70663409709255,23.214433243531932 -42,0,113,,0,241.15835809869333,130.1217251536769,40.318149542995194 -44,0,228,,0,420.7228870575181,100.6103731366529,12.263817495034516 -45,0,195,,0,464.6008418627993,177.44876298863065,14.997662976025318 -46,0,81,,0,493.5938673327805,113.48429282022236,15.54378110459133 -48,0,54,,0,345.1678898325412,438.248864419249,17.92879753838338 -49,0,86,,0,380.2940604006896,104.75390947894124,18.67201449361927 -50,0,131,,0,322.5203542610964,128.90700915209334,53.3399471104363 -52,0,144,,0,461.2131803683335,140.96351108873762,15.877112067332416 -53,0,26,,0,373.6393952807529,460.06071666384736,27.8870115843804 -56,0,238,,0,477.1936488729609,416.98776150789047,23.508882844009037 -57,0,151,,0,97.06042678339188,227.65626965277423,21.813851893491336 -58,0,43,,0,430.9983785797966,166.97589869402674,15.84700826174194 -59,0,36,,0,128.14995931262638,166.39631043857514,26.971810924242778 -60,0,401,,0,378.9821855122209,82.43705667328128,22.355378209113077 -61,0,93,,0,404.6243150249356,163.1409145908786,14.716182797955385 -63,0,126,,0,373.3106331577088,344.5137402932216,21.196452175956 -64,0,108,,0,302.58866986821823,337.24067875579755,30.50528933538093 -65,0,184,,0,404.2045708011394,385.7384189482218,25.40970877364665 -66,0,268,,0,491.82116415478816,180.9410456050965,19.610614383977932 -67,0,173,,0,390.7788463225394,148.18618592506465,20.37991445166417 -68,0,389,,0,395.8653440354162,368.37572092149713,19.794364277434877 -69,0,227,,0,419.6692796263487,405.9001669109613,21.952290553871045 -70,0,1,,0,148.70316087414636,212.39233664334847,24.85012697727382 -71,0,416,,0,384.4756054246833,183.65531564317504,20.893704162941386 -72,0,297,,0,442.2540630489696,103.571746676162,13.278644602698886 -73,0,163,,0,216.2797832281072,205.45784119222185,35.655895998752115 -74,0,330,,0,155.33677681382727,274.38764335572625,30.571912663853052 -75,0,36,,0,108.23164811542654,187.4280717078823,31.04185621013731 -77,0,300,,0,490.469590578802,115.81677281672184,13.131162004612179 -78,0,18,,0,134.5912904178421,124.79908037434816,23.08228769041983 -80,0,327,,0,453.3607254595828,62.13620659059721,34.117593908173006 -83,0,81,,0,460.1065025592437,94.2420690645576,20.143298657480816 -84,0,76,,0,408.7664725791605,454.0872325003794,36.29109390204859 -85,0,360,,0,427.9061805805475,360.5701689200855,15.089058166638207 -87,0,360,,0,414.04238417806994,360.5391356447236,12.627438193575996 -88,0,200,,0,474.13125062005423,469.4378525557747,29.18027725574162 -89,0,412,,0,238.9278343497511,193.2505205236532,34.66594168871364 -90,0,18,,0,140.83614613145858,117.62385173714657,18.711908040111407 -91,0,347,,0,311.03430815680406,490.41584389238346,35.33082161022631 -92,0,29,,0,397.16889604867066,129.73399454395656,19.52731682201808 -94,0,3,,0,404.8063303164831,319.36830610724286,21.777410238228608 -95,0,377,,0,298.9817295966399,452.8067839843614,21.850092033377997 -96,0,153,,0,380.18942352839576,300.98098278267315,30.72597856628242 -97,0,47,,0,293.42809122623567,389.7363519618398,33.139364950140305 -98,0,314,,0,386.32822689461887,433.5714629623211,29.37153399788418 -99,0,108,,0,281.21680595803787,313.7670944123464,50.470700572119085 -100,0,3,,0,439.9173468633878,303.83340493581784,36.33638358085972 -105,0,276,,0,524.7502866367305,332.11996320524844,27.954403982468488 -106,0,236,,0,185.1690617970002,164.09511816020006,18.519165370321527 -107,0,51,,0,480.4754237401369,371.839700606847,15.23573831077763 -109,0,346,,0,163.11330286001714,154.6423290539098,13.784952164893298 -110,0,135,,0,455.3929879588037,203.97055053675308,11.553854381517086 -111,0,380,,0,429.0078826432695,129.6096935050652,14.845843313208285 -112,0,228,,0,414.10867609705593,106.17193924768036,13.536236712506295 -114,0,173,,0,368.9369166964261,163.3330107035203,24.926978704257532 -115,0,19,,0,396.83441281262105,195.04341025450373,16.88070483656861 -116,0,26,,0,359.11223156350843,461.40979967174286,21.13774764866544 -117,0,397,,0,456.3023911656518,377.35469727090697,12.48640824407091 -119,0,230,,0,425.6889185012368,87.51925040255232,12.217504232430104 -120,0,219,,0,453.599859238842,154.89620748885596,13.015648344710556 -121,0,36,,0,103.30561197779924,192.9590402518056,35.254787848119115 -122,0,414,,0,105.42386495809394,232.66115960633817,23.295424992855896 -123,0,81,,0,484.4284950977011,128.40561593766392,13.963302107147461 -124,0,367,,0,317.177376007614,442.2922259538629,19.022529453591662 -125,0,250,,0,345.7278217133453,398.14359409236096,22.36950256380846 -127,0,253,,0,426.2099512410161,186.9801528962987,17.153576691262025 -128,0,236,,0,193.43674692791603,159.2712672132954,22.96993306436864 -129,0,184,,0,399.8211975719054,399.0817183466514,23.266986556004962 -130,0,131,,0,354.51200766706336,106.49368457488696,33.801729808065524 -133,0,51,,0,487.5595954433536,373.5828448918823,15.027158769053012 -134,0,219,,0,468.3556233378248,162.92872473739845,11.85685937125202 -137,0,184,,0,424.142116670629,384.4083826821707,19.981860067746723 -138,0,222,,0,495.0505654505161,138.00410737050814,14.316403751170723 -139,0,276,,0,519.5639853681644,353.8389670029957,22.32964054379043 -140,0,135,,0,460.5788782820063,198.1865043868739,11.653859341965902 -141,0,336,,0,464.9152306866656,186.01029520339088,11.474320469795062 -142,0,253,,0,428.2276276642137,202.15627332791985,15.980918540501149 -143,0,162,,0,437.1610131339835,404.3844914483944,27.643209826605915 -145,0,200,,0,427.1067809575741,450.901940387704,44.30841815340586 -146,0,153,,0,339.7406207712995,284.3915278437552,47.858390642471186 -147,0,62,,0,400.2564313144812,345.9600991416755,14.521366190192968 -148,0,346,,0,150.9376753284776,170.46411295166894,19.964336991099245 -149,0,206,,0,199.98205172881688,82.94124346006988,51.887577706987024 -150,0,151,,0,87.22301099503112,238.2193475913096,22.379356267864257 -152,0,332,,0,448.818587886061,159.22931962546028,11.23736751390462 -154,0,222,,0,492.0820724192613,126.4901549538582,11.89046050956343 -155,0,273,,0,352.1192266940969,344.97620860735344,20.15119103636323 -156,0,193,,0,388.40546648841433,64.34475819409226,23.766241877901816 -157,0,126,,0,363.026654951499,350.62161467079386,12.281799575449181 -160,0,76,,0,422.2351486792562,514.406973044994,68.66896820415766 -161,0,162,,0,427.5832206448943,369.858208621742,16.43774234413823 -164,0,303,,0,480.73679238621634,146.85117837258932,12.775814841805945 -165,0,330,,0,140.3007546443187,280.8932786950205,43.639864650992955 -166,0,108,,0,328.1473887964802,316.73118559777515,34.35486124654144 -169,0,382,,0,534.366158360098,383.947368678537,24.759489167443117 -170,0,393,,0,416.4462532905093,147.96287668880555,13.679498349522696 -171,0,336,,0,472.1078595968147,192.516094673388,16.83388842060309 -172,0,235,,0,445.94861136632926,370.3754684664657,15.138302710432532 -174,0,43,,0,448.5563737845117,166.89497227132944,13.015648344710556 -175,0,19,,0,394.9999022602636,178.26268420308867,18.1229845323375 -176,0,314,,0,369.5740459841992,432.9628484618792,24.972032812742338 -177,0,118,,0,464.4136205355094,416.4834560234735,25.5826708914917 -178,0,248,,0,343.0643701533032,422.4889051798568,24.49057259762698 -179,0,264,,0,129.8090258337528,102.50637441976616,22.911348953540116 -180,0,151,,0,76.49329640309685,234.92519545726012,29.01902230003014 -181,0,230,,0,413.620702518353,85.61515674416358,12.217504232430104 -183,0,380,,0,431.4454111867569,130.05679143398106,16.39541422435852 -186,0,248,,0,313.98658389638126,437.97426574465067,21.098560374770074 -187,0,47,,0,279.623998255432,393.68990521123374,37.032781213869384 -189,0,273,,0,329.273396719614,331.0912363603958,27.38412476067052 -190,0,131,,0,364.5841843260106,138.78900963943042,20.779570127006153 -191,0,375,,0,384.0436529033775,122.93871019523638,18.56734824975235 -192,0,401,,0,377.25449535457,94.87258960360764,25.539588770140455 -194,0,195,,0,482.7284698972424,172.31556887703692,17.19928182942689 -196,0,344,,0,150.5086992589832,187.60788906169935,13.881358872749596 -197,0,153,,0,387.397962965656,306.7163912819822,21.520274221463662 -198,0,188,,0,289.6550408813298,431.3150961294129,23.42818322548367 -199,0,173,,0,371.16144045307976,150.79752517634878,14.747447556398823 -201,0,43,,0,436.7820478349354,172.56692914135766,13.573730841832525 -202,0,144,,0,470.6403410283015,140.44489811201407,11.957372487289 -203,0,222,,0,498.513477511849,164.91970386735252,25.347231557130588 -205,0,206,,0,202.39043438920805,92.6955836955823,42.74436658563029 -207,0,33,,0,429.1717781385488,113.30619390888006,15.250168050865367 -208,0,257,,0,145.92639031627195,252.48208933863884,28.261726632565228 -209,0,385,,0,445.4265210809703,198.95919268479972,12.116783073847879 -210,0,162,,0,438.3704039565786,371.4412178801774,15.089058166638207 -211,0,36,,0,120.56255353264818,190.55505098480535,24.028375222771487 -212,0,314,,0,372.736947215419,416.921692141038,28.136551371003932 -213,0,188,,0,273.46993404521106,431.6205843835691,26.129490472966626 -214,0,18,,0,157.65284382485245,125.7772212021002,26.637267111660194 -215,0,227,,0,406.94290901861547,417.84198298340186,32.2201384223314 -216,0,113,,0,236.85770963558028,144.86999922247986,25.008928420721688 -217,0,118,,0,473.85838838251817,440.25885108346114,23.508882844009037 -218,0,344,,0,142.16893841697106,201.06823071678,16.80579059598121 -220,0,163,,0,206.90760402938724,206.53330499815797,34.377585853387416 -221,0,101,,0,526.6009441939992,310.27926299763243,29.420744960877794 -224,0,264,,0,113.66253850250918,83.17134645798161,43.87915304085741 -225,0,43,,0,446.3127771825351,162.90197352483688,13.573730841832525 -226,0,389,,0,394.9064902844664,359.4600327342916,16.050435491594143 -229,0,230,,0,423.3158665170892,88.29232867011864,11.228322845852398 -231,0,62,,0,406.531996036688,358.575909195224,9.948631791452993 -232,0,393,,0,414.6501367838347,153.64142954144194,13.811492249054234 -233,0,236,,0,191.42099187542675,156.70882036311684,19.900113599821758 -234,0,360,,0,438.8218079721212,334.0561262412899,30.242570799628023 -237,0,135,,0,460.0981454746776,193.93022880945097,11.088127327773597 -239,0,317,,0,355.8295356490492,378.18488620549016,22.36950256380846 -240,0,241,,0,90.16137328884145,128.92334153131355,32.117150406693945 -242,0,241,,0,91.393246009725,125.50958272258542,33.482668640748045 -243,0,264,,0,119.88473518787433,81.8559902575523,41.45240083940114 -244,0,317,,0,362.4528167116694,355.7886420359198,15.652973752082472 -245,0,3,,0,471.0918349331844,311.2845483410806,32.05258561270336 -246,0,344,,0,153.84906611265404,177.28534541323765,15.766932460832738 -247,0,248,,0,317.90378565173285,399.7706536117664,27.639727472939406 -249,0,26,,0,368.6423331537606,461.1846354625873,28.237162575438433 -254,0,297,,0,442.112815345234,113.08051885831966,12.943004798471517 -255,0,222,,0,505.1009229529137,164.07807092385696,25.715246881017293 -256,0,257,,0,170.97917930680026,239.40222098876964,28.261726632565228 -258,0,382,,0,528.6628166467968,374.2975673782873,22.390691368354453 -259,0,300,,0,489.5218325178779,128.48521490833653,11.87178063348249 -261,0,253,,0,436.9068502044666,200.38990851930464,13.337740834479472 -262,0,238,,0,506.6317761613888,424.8634906167098,34.03085170715163 -263,0,222,,0,540.6258438304378,162.07404887469437,51.540935996761895 -266,0,118,,0,472.5884957428221,421.85577216096925,19.56000047935577 -267,0,268,,0,490.3662586803688,192.9438527061447,21.996861394978158 -271,0,79,,0,325.62796835351173,481.0221627031693,27.787871364857104 -272,0,158,,0,311.19238953275743,361.7605192668958,22.284177968485082 -275,0,51,,0,494.6918604629075,368.8895603801452,15.51783026659753 -277,0,303,,0,483.2458819600859,138.5624972803692,11.87178063348249 -278,0,248,,0,314.01080290551755,418.4318755756857,25.91689262603607 -279,0,297,,0,453.7532868826727,105.61974665615544,13.826196131492779 -280,0,332,,0,427.16543695896576,142.72192067742614,13.368757539267603 -281,0,135,,0,455.21724392043006,192.14291967627997,11.828936458475026 -282,0,260,,0,493.65806060787946,387.3168983105709,21.153167493734745 -283,0,188,,0,284.18256664898576,430.4410458552411,26.81867755896263 -284,0,250,,0,357.6214681895822,390.4090898523758,14.187366998144869 -285,0,86,,0,391.4443871428842,103.42371784799268,20.87117135181413 -286,0,257,,0,159.78139617884085,241.8427679152569,31.465142611588163 -287,0,276,,0,530.074293660455,359.5626972386202,24.759489167443117 -288,0,1,,0,164.38993425228472,187.6665338807828,14.794558970640974 -289,0,276,,0,509.0058362572503,362.8968019883944,22.72387135834029 -290,0,250,,0,353.7763792150048,396.13317646158623,18.065341803014167 -291,0,344,,0,138.56425306258438,194.02579207862368,18.333227476536276 -292,0,367,,0,327.3971174914086,440.6240342178062,14.21087195266342 -293,0,219,,0,460.0516220499396,158.91727457151114,11.23736751390462 -294,0,354,,0,301.93600699148226,358.2604998620988,29.180864778511907 -295,0,163,,0,229.93674981278636,205.4808890372896,37.56456094338608 -296,0,33,,0,433.8293830648768,113.83562360695235,15.920830607273686 -298,0,235,,0,461.0445996424092,371.5065506567357,15.138302710432532 -299,0,300,,0,503.3285785985965,118.47644247631352,17.052910688016347 -301,0,303,,0,474.9222277394821,147.81974362104393,12.44908950068685 -302,0,144,,0,468.6798525458752,151.07629926535714,11.85685937125202 -304,0,81,,0,475.7896465031374,87.84522669843089,31.214611817997874 -305,0,342,,0,185.90707242093293,274.07320668414553,30.571912663853052 -306,0,158,,0,326.76590574218386,373.5901768727766,27.639727472939406 -307,0,358,,0,490.4534228150477,318.1361837612505,34.82901238691512 -309,0,33,,0,431.8902801128049,95.54178833414169,12.263817495034516 -310,0,204,,0,439.5139499068096,213.47036576321565,15.980918540501149 -311,0,257,,0,170.1319034684904,227.6321103264839,34.69046445158614 -312,0,320,,0,485.0988432503182,451.2155620374061,31.914041679906934 -313,0,250,,0,376.5791427033611,398.0048948305208,23.266986556004962 -315,0,228,,0,411.52586396959913,97.7363893603878,12.30091983072661 -316,0,397,,0,460.55986035595504,376.433530142359,13.710257606576896 -318,0,1,,0,156.78663242377888,192.7762092817314,15.766932460832738 -319,0,320,,0,458.1434553144955,491.6548397397195,51.22571581474572 -321,0,235,,0,465.82700381005776,367.65024772770414,15.23573831077763 -322,0,250,,0,351.2092302820438,387.14132621312217,12.292100649747823 -323,0,297,,0,451.2100296705124,115.49030483275406,17.459233843127627 -324,0,411,,0,418.7333814771656,118.89364528437952,14.845843313208285 -325,0,206,,0,189.94500946740263,80.50807303331821,55.60647208565776 -326,0,327,,0,431.3163928845697,89.39032575345709,15.430872593244219 -328,0,330,,0,167.3282017507935,290.0132576728731,42.14308202068589 -329,0,132,,0,458.8240903972122,218.1333260385274,19.865163585740277 -331,0,43,,0,439.0456212424375,174.40489243744383,13.258493673632609 -333,0,54,,0,350.47271097474766,444.53685910932,20.619143798852036 -334,0,162,,0,442.4688627902266,377.25565473274287,16.62241110802083 -335,0,342,,0,192.207717942689,255.9978341673592,21.286655133997943 -337,0,204,,0,413.7178254348391,232.79085427906472,33.897078204290885 -338,0,158,,0,325.4245805156956,378.90780265396006,24.380847771648394 -339,0,193,,0,403.9527899348756,82.3201576792233,17.175903166434757 -341,0,19,,0,394.0683877971658,197.19073151575063,18.950954969745716 -343,0,19,,0,406.7710869442661,195.43467719908224,20.819177032710666 -345,0,412,,0,227.35907098387088,168.0048725637591,35.02855880242379 -352,0,327,,0,457.8052337141568,80.22135732814034,25.71957335537675 -353,0,354,,0,235.78305434630025,373.5686806447727,48.23786936523619 -355,0,153,,0,403.2741418491526,308.81087256400826,24.376451627268125 -356,0,163,,0,204.6175181397595,240.83452823764537,33.66881856400899 -357,0,358,,0,521.1590791699823,334.5746378144926,26.530815351113304 -359,0,360,,0,420.3674734592487,334.60334535151344,21.777410238228608 -361,0,195,,0,465.6945600932888,172.184827676236,13.847415161987508 -362,0,414,,0,122.27358975895432,237.69775689823877,35.05445946719307 -363,0,47,,0,247.81963416489975,403.989880728725,44.96584254067102 -364,0,268,,0,509.5073948118843,189.412966382646,26.84746033134413 -365,0,29,,0,413.09926052306,134.89085696403475,16.099157692538604 -366,0,367,,0,333.8153890379068,447.5176489244592,16.92192311853463 -368,0,51,,0,483.6491672009646,359.1370307228643,19.751060014684622 -369,0,93,,0,407.18399443246415,163.6115582974022,13.022934034092112 -370,0,412,,0,222.2349229733876,158.6039900764171,30.872156030185018 -371,0,354,,0,267.92541379507503,362.4562154827748,34.2684181009437 -372,0,273,,0,327.65296341350216,354.62900433680574,24.380847771648394 -373,0,126,,0,358.259690476968,325.7833660686555,25.291550840608206 -374,0,375,,0,371.8644735290759,136.06684447507808,17.90754924329314 -376,0,377,,0,293.3541789873959,443.107404132948,21.261355602165487 -378,0,241,,0,96.83866404377515,150.37529130719793,25.45498067138199 -379,0,380,,0,427.8943399100643,134.56942896620865,14.798570539938801 -383,0,358,,0,497.3213130779319,307.4011671409872,36.07977121947355 -384,0,253,,0,425.24719526481016,202.633281672981,17.915989495247807 -386,0,173,,0,369.1098862443752,156.48588742474556,20.604006068951726 -387,0,354,,0,239.5880661383232,349.65545377031765,54.9629540361904 -388,0,62,,0,409.6393589482627,351.33243279009827,10.205391155055517 -390,0,12,,0,174.29291155641846,146.5775131487732,19.900113599821758 -391,0,93,,0,412.8826289439411,175.3214846661254,17.707119034765785 -392,0,93,,0,419.9380728320948,168.98031298469283,16.224783910306027 -395,0,320,,0,487.0138145212319,449.13406865462673,30.857661632966106 -396,0,397,,0,454.9407141329503,388.9393831465803,18.470545929440306 -398,0,118,,0,442.9442793890141,434.4985714469241,31.446191444328377 -399,0,132,,0,466.0268654513272,208.4885368739728,15.71922562542587 -400,0,193,,0,422.9512434075008,56.76985469879551,30.871025267474998 -403,0,3,,0,460.6490718766141,313.43885272616257,30.172243100480774 -406,0,393,,0,403.3607805853801,151.9502416304573,13.13290467291011 -407,0,236,,0,189.298373880358,182.14804777651307,25.51242939408927 -408,0,382,,0,513.6246625754995,394.30197532407806,25.02643432720076 -409,0,382,,0,519.6678916059598,390.8431058719641,26.24777034939779 -410,0,241,,0,115.12996533600892,149.12435045236316,31.152238094704533 -413,0,151,,0,89.21561076775261,215.9288757903417,23.295424992855896 -415,0,416,,0,363.8039241536012,186.69315485473777,32.03337127725533 -417,0,193,,0,394.0726323231333,51.35105316827139,32.50696769375962 -418,0,360,,0,416.36828816805166,357.08505989754764,11.469220009365687 diff --git a/demo/data/tree.png b/demo/data/tree.png deleted file mode 100644 index 7a45ecd..0000000 Binary files a/demo/data/tree.png and /dev/null differ diff --git a/demo/src/main.rs b/demo/src/main.rs index dc8ec4c..9de13fd 100644 --- a/demo/src/main.rs +++ b/demo/src/main.rs @@ -1,6 +1,8 @@ -use rand::{rngs::StdRng, Rng, SeedableRng}; use rindex::Rindex; -use std::io::{BufRead, Write}; +use std::{ + collections::HashMap, + io::{BufRead, Write}, +}; fn main() { // Read the sparse dataset (https://www.kaggle.com/datasets/joonasyoon/clustering-exercises) @@ -19,38 +21,26 @@ fn main() { data.push([x, y]); } - // Configure the tree - let mut tree = Rindex::new(5); - let mut point_ids = Vec::new(); - let deletion_probability = 0.25; // 25% + // Configure the tree: we maintain 3 nearest neighbors for each point + let k = 10; + let mut tree = Rindex::new(k); // Perform random insertions and deletions - let mut rng = StdRng::seed_from_u64(0); - let mut num_insertions = 0; - let mut num_deletions = 0; - while !data.is_empty() { - let random = rng.gen::(); - if random <= deletion_probability && !point_ids.is_empty() { - let random_id = rng.gen_range(0..point_ids.len()); - let point_id = point_ids.swap_remove(random_id); - tree.delete(point_id); - num_deletions += 1; - } else { - let point = data.pop().unwrap(); - let point_id = tree.insert(point); - point_ids.push(point_id); - num_insertions += 1; - } + let mut point_ids = HashMap::new(); + for (order, point) in data.iter().enumerate() { + let point_id = tree.insert(*point); + point_ids.insert(point_id, order); } - - println!("Insertions: {num_insertions}"); - println!("Deletions: {num_deletions}"); println!("Tree height: {}", tree.height()); - let csv_rows = tree.nodes_to_string_rows(); - let filename = "demo/data/tree.csv"; + let filename = "demo/data/knn.csv"; let mut file = std::fs::File::create(filename).unwrap(); - for row in csv_rows { - file.write_all(row.as_bytes()).unwrap(); + for (point_id, point_order) in &point_ids { + let (neighbors, _) = tree.neighbors_of(*point_id); + for neighbor in neighbors { + let neighbor_order = point_ids[&neighbor]; + file.write_all(format!("{point_order},{neighbor_order}\n").as_bytes()) + .unwrap(); + } } }