muendlein
34d7277eec
Switch to non recursive quicksort ( #70 )
...
* added test
* add Bentley-McIlroy 3-way partitioning
* switch to non recursive implementation
* fixed stack handling
* rename function
* escaped ts errors + enhanced performance
* remove escaped error
* additional performance enhancement
2025-12-08 00:56:17 +02:00
muendlein
1e87f4071d
Fix stack overflow for some degenerate data cases ( #65 )
...
* fix pivot selection
* add regression test
* fix linting
2025-05-18 23:37:55 +03:00
Vladimir Agafonkin
5729a98fac
switch to ESLint 9+, upgrade dev deps
2024-06-26 14:16:47 +03:00
Vladimir Agafonkin
2485486fd2
add maxX/maxY defaults to add for simpler point indexing, close #42
2024-01-29 13:21:15 +02:00
Kyle Barron
5d079a6b77
Accept byteOffset when creating an index from a buffer ( #55 )
...
* Support Uint8Array input
* extra space
* address comments
* commit test changes
* Update index.js
Co-authored-by: Volodymyr Agafonkin <agafonkin@gmail.com>
* Update index.js
Co-authored-by: Volodymyr Agafonkin <agafonkin@gmail.com>
* Update index.js
Co-authored-by: Volodymyr Agafonkin <agafonkin@gmail.com>
* Update index.js
Co-authored-by: Volodymyr Agafonkin <agafonkin@gmail.com>
* address comments
---------
Co-authored-by: Volodymyr Agafonkin <agafonkin@gmail.com>
2024-01-20 20:34:54 +02:00
Vladimir Agafonkin
f3d24b3ba3
fix index.neighbors freezing with just x/y args
2023-04-19 19:11:15 +03:00
Vladimir Agafonkin
4284a6e8bf
upgrade dev deps & minor updates
2023-04-10 15:44:00 +03:00
Jérôme Desboeufs
3e82ac6b91
Add SharedArrayBuffer support ( #46 )
...
* add SharedArrayBuffer support to Flatbush.from
* add an option to opt-in SharedArrayBuffer creation
* update README
* use global.SharedArrayBuffer to avoid exception and allow mocking
* ensure ArrayBufferType reflects data internal type
* add unit tests for SharedArrayBuffer support
* improve SharedArrayBuffer implementation
* update README
* remaining reference to useSharedArrayBuffer
* use duck-typing to check data is an ArrayBuffer-like
Co-authored-by: Volodymyr Agafonkin <agafonkin@gmail.com>
---------
Co-authored-by: Volodymyr Agafonkin <agafonkin@gmail.com>
2023-04-10 15:40:16 +03:00
Vladimir Agafonkin
06c70aa69e
switch to native node test runner
2022-10-26 16:30:41 +03:00
Vladimir Agafonkin
f84d4e4a25
upgrade deps & test on Node v14
2020-05-22 14:09:50 +03:00
Jedidiah Buck McCready
755478c0d2
skip sorting when there is only one node ( #28 )
2020-03-31 11:17:28 +03:00
Vladimir Agafonkin
afc6213866
stop quicksort earlier for faster indexing ( #29 )
2020-03-31 01:13:26 +03:00
Lucio Paiva
8d5257f4f1
Explain what item indices are (and expose them) ( #26 )
...
* expose item index
* add unit test
2020-02-06 09:52:31 +02:00
Vladimir Agafonkin
f87c6fbd1f
implement kNN queries
2018-10-10 11:30:40 +03:00
Vladimir Agafonkin
a5ffcdc445
clean up, modernize
2018-09-05 14:56:33 +03:00
Vladimir Agafonkin
4267248414
add a header to the buffer; close #12
2018-05-07 11:34:34 +03:00
Martin Raifer
1075031900
decouple indices from coordinates
...
This allows to use an independent array type for indices (which are always unsigned integers for which the smallest fitting type is automatically chosen).
see https://github.com/mourner/flatbush/pull/4#issuecomment-383980084
2018-04-25 10:37:53 +02:00
Vladimir Agafonkin
ade1fdfbee
safeguard against infinite loop
2018-03-21 17:31:46 +02:00
Vladimir Agafonkin
6fabe76fcd
fix error reporting on search
2018-03-21 16:46:55 +02:00
Vladimir Agafonkin
682036eb6a
accept array views for deserialization
2018-03-21 12:33:31 +02:00
Vladimir Agafonkin
a056d5567f
use let/const instead of var everywhere
2018-03-21 12:12:47 +02:00
Vladimir Agafonkin
3bb64a7257
(breaking!) export class instead of factory
2018-03-21 12:01:00 +02:00
Vladimir Agafonkin
bf24351a75
expose minX, minY, maxX, maxY
2018-03-21 11:53:18 +02:00
Vladimir Agafonkin
e94a2fbc24
accept data buffer for reconstructing index
2018-03-21 11:12:49 +02:00
Vladimir Agafonkin
3a08ca8198
Fix sorting bug that hindered search performance ( #7 )
...
* fix a bug in quicksort
* fix tests
* update benchmarks
2018-03-18 16:50:26 +02:00
Vladimir Agafonkin
7cc362a3e4
ES modules + browser build ( #5 )
...
* ES modules + browser build
* minor tweaks
2018-03-01 16:59:50 +02:00
Vladimir Agafonkin
bf0b547d3b
fix bad performance on certain inputs
2018-02-28 18:17:03 +02:00
Vladimir Agafonkin
2cdfe58d80
better search API
2018-02-28 17:49:35 +02:00
Vladimir Agafonkin
59971eef1e
fix search, add tests
2018-02-27 19:54:04 +02:00