data-structure-typed 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/CMakeLists.txt +52 -0
- package/README.md +4 -4
- package/README_CN.md +5 -5
- package/benchmark/report.html +141 -12
- package/benchmark/report.json +1969 -38
- package/build/CMakeCache.txt +603 -0
- package/build/CMakeFiles/4.0.3/CMakeCXXCompiler.cmake +104 -0
- package/build/CMakeFiles/4.0.3/CMakeDetermineCompilerABI_CXX.bin +0 -0
- package/build/CMakeFiles/4.0.3/CMakeSystem.cmake +15 -0
- package/build/CMakeFiles/4.0.3/CompilerIdCXX/CMakeCXXCompilerId.cpp +920 -0
- package/build/CMakeFiles/4.0.3/CompilerIdCXX/a.out +0 -0
- package/build/CMakeFiles/4.0.3/CompilerIdCXX/apple-sdk.cpp +1 -0
- package/build/CMakeFiles/CMakeConfigureLog.yaml +2146 -0
- package/build/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
- package/build/CMakeFiles/InstallScripts.json +9 -0
- package/build/CMakeFiles/Makefile.cmake +100 -0
- package/build/CMakeFiles/Makefile2 +720 -0
- package/build/CMakeFiles/TargetDirectories.txt +23 -0
- package/build/CMakeFiles/avl-rb-range-search-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/avl-rb-range-search-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/avl-rb-range-search-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/avl-rb-range-search-benchmark.dir/compiler_depend.internal +839 -0
- package/build/CMakeFiles/avl-rb-range-search-benchmark.dir/compiler_depend.make +2506 -0
- package/build/CMakeFiles/avl-rb-range-search-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/avl-rb-range-search-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/avl-rb-range-search-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/avl-rb-range-search-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/avl-rb-range-search-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/avl-rb-range-search-benchmark.dir/test/performance/data-structures/binary-tree/avl-rb-range-search.test.cpp.o +0 -0
- package/build/CMakeFiles/avl-rb-range-search-benchmark.dir/test/performance/data-structures/binary-tree/avl-rb-range-search.test.cpp.o.d +835 -0
- package/build/CMakeFiles/avl-tree-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/avl-tree-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/avl-tree-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/avl-tree-benchmark.dir/compiler_depend.internal +839 -0
- package/build/CMakeFiles/avl-tree-benchmark.dir/compiler_depend.make +2506 -0
- package/build/CMakeFiles/avl-tree-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/avl-tree-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/avl-tree-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/avl-tree-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/avl-tree-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/avl-tree-benchmark.dir/test/performance/data-structures/binary-tree/avl-tree.test.cpp.o +0 -0
- package/build/CMakeFiles/avl-tree-benchmark.dir/test/performance/data-structures/binary-tree/avl-tree.test.cpp.o.d +835 -0
- package/build/CMakeFiles/cmake.check_cache +1 -0
- package/build/CMakeFiles/deque-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/deque-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/deque-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/deque-benchmark.dir/compiler_depend.internal +791 -0
- package/build/CMakeFiles/deque-benchmark.dir/compiler_depend.make +2362 -0
- package/build/CMakeFiles/deque-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/deque-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/deque-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/deque-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/deque-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/deque-benchmark.dir/test/performance/data-structures/queue/deque.test.cpp.o +0 -0
- package/build/CMakeFiles/deque-benchmark.dir/test/performance/data-structures/queue/deque.test.cpp.o.d +787 -0
- package/build/CMakeFiles/doubly-linked-list-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/doubly-linked-list-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/doubly-linked-list-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/doubly-linked-list-benchmark.dir/compiler_depend.internal +790 -0
- package/build/CMakeFiles/doubly-linked-list-benchmark.dir/compiler_depend.make +2359 -0
- package/build/CMakeFiles/doubly-linked-list-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/doubly-linked-list-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/doubly-linked-list-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/doubly-linked-list-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/doubly-linked-list-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/doubly-linked-list-benchmark.dir/test/performance/data-structures/linked-list/doubly-linked-list.test.cpp.o +0 -0
- package/build/CMakeFiles/doubly-linked-list-benchmark.dir/test/performance/data-structures/linked-list/doubly-linked-list.test.cpp.o.d +786 -0
- package/build/CMakeFiles/hash-map-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/hash-map-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/hash-map-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/hash-map-benchmark.dir/compiler_depend.internal +790 -0
- package/build/CMakeFiles/hash-map-benchmark.dir/compiler_depend.make +2359 -0
- package/build/CMakeFiles/hash-map-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/hash-map-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/hash-map-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/hash-map-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/hash-map-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/hash-map-benchmark.dir/test/performance/data-structures/hash/hash-map.test.cpp.o +0 -0
- package/build/CMakeFiles/hash-map-benchmark.dir/test/performance/data-structures/hash/hash-map.test.cpp.o.d +786 -0
- package/build/CMakeFiles/heap-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/heap-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/heap-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/heap-benchmark.dir/compiler_depend.internal +843 -0
- package/build/CMakeFiles/heap-benchmark.dir/compiler_depend.make +2518 -0
- package/build/CMakeFiles/heap-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/heap-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/heap-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/heap-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/heap-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/heap-benchmark.dir/test/performance/data-structures/heap/heap.test.cpp.o +0 -0
- package/build/CMakeFiles/heap-benchmark.dir/test/performance/data-structures/heap/heap.test.cpp.o.d +839 -0
- package/build/CMakeFiles/priority-queue-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/priority-queue-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/priority-queue-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/priority-queue-benchmark.dir/compiler_depend.internal +793 -0
- package/build/CMakeFiles/priority-queue-benchmark.dir/compiler_depend.make +2368 -0
- package/build/CMakeFiles/priority-queue-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/priority-queue-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/priority-queue-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/priority-queue-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/priority-queue-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/priority-queue-benchmark.dir/test/performance/data-structures/priority-queue/priority-queue.test.cpp.o +0 -0
- package/build/CMakeFiles/priority-queue-benchmark.dir/test/performance/data-structures/priority-queue/priority-queue.test.cpp.o.d +789 -0
- package/build/CMakeFiles/progress.marks +1 -0
- package/build/CMakeFiles/queue-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/queue-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/queue-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/queue-benchmark.dir/compiler_depend.internal +793 -0
- package/build/CMakeFiles/queue-benchmark.dir/compiler_depend.make +2368 -0
- package/build/CMakeFiles/queue-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/queue-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/queue-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/queue-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/queue-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/queue-benchmark.dir/test/performance/data-structures/queue/queue.test.cpp.o +0 -0
- package/build/CMakeFiles/queue-benchmark.dir/test/performance/data-structures/queue/queue.test.cpp.o.d +789 -0
- package/build/CMakeFiles/red-black-tree-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/red-black-tree-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/red-black-tree-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/red-black-tree-benchmark.dir/compiler_depend.internal +839 -0
- package/build/CMakeFiles/red-black-tree-benchmark.dir/compiler_depend.make +2506 -0
- package/build/CMakeFiles/red-black-tree-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/red-black-tree-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/red-black-tree-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/red-black-tree-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/red-black-tree-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/red-black-tree-benchmark.dir/test/performance/data-structures/binary-tree/red-black-tree.test.cpp.o +0 -0
- package/build/CMakeFiles/red-black-tree-benchmark.dir/test/performance/data-structures/binary-tree/red-black-tree.test.cpp.o.d +835 -0
- package/build/CMakeFiles/singly-linked-list-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/singly-linked-list-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/singly-linked-list-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/singly-linked-list-benchmark.dir/compiler_depend.internal +790 -0
- package/build/CMakeFiles/singly-linked-list-benchmark.dir/compiler_depend.make +2359 -0
- package/build/CMakeFiles/singly-linked-list-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/singly-linked-list-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/singly-linked-list-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/singly-linked-list-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/singly-linked-list-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/singly-linked-list-benchmark.dir/test/performance/data-structures/linked-list/singly-linked-list.test.cpp.o +0 -0
- package/build/CMakeFiles/singly-linked-list-benchmark.dir/test/performance/data-structures/linked-list/singly-linked-list.test.cpp.o.d +786 -0
- package/build/CMakeFiles/stack-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/stack-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/stack-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/stack-benchmark.dir/compiler_depend.internal +793 -0
- package/build/CMakeFiles/stack-benchmark.dir/compiler_depend.make +2368 -0
- package/build/CMakeFiles/stack-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/stack-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/stack-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/stack-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/stack-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/stack-benchmark.dir/test/performance/data-structures/stack/stack.test.cpp.o +0 -0
- package/build/CMakeFiles/stack-benchmark.dir/test/performance/data-structures/stack/stack.test.cpp.o.d +789 -0
- package/build/CMakeFiles/tree-map-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/tree-map-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/tree-map-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/tree-map-benchmark.dir/compiler_depend.internal +839 -0
- package/build/CMakeFiles/tree-map-benchmark.dir/compiler_depend.make +2506 -0
- package/build/CMakeFiles/tree-map-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/tree-map-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/tree-map-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/tree-map-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/tree-map-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/tree-map-benchmark.dir/test/performance/data-structures/binary-tree/tree-map.test.cpp.o +0 -0
- package/build/CMakeFiles/tree-map-benchmark.dir/test/performance/data-structures/binary-tree/tree-map.test.cpp.o.d +835 -0
- package/build/CMakeFiles/tree-multi-map-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/tree-multi-map-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/tree-multi-map-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/tree-multi-map-benchmark.dir/compiler_depend.internal +839 -0
- package/build/CMakeFiles/tree-multi-map-benchmark.dir/compiler_depend.make +2506 -0
- package/build/CMakeFiles/tree-multi-map-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/tree-multi-map-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/tree-multi-map-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/tree-multi-map-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/tree-multi-map-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/tree-multi-map-benchmark.dir/test/performance/data-structures/binary-tree/tree-multi-map.test.cpp.o +0 -0
- package/build/CMakeFiles/tree-multi-map-benchmark.dir/test/performance/data-structures/binary-tree/tree-multi-map.test.cpp.o.d +835 -0
- package/build/CMakeFiles/tree-multi-set-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/tree-multi-set-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/tree-multi-set-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/tree-multi-set-benchmark.dir/compiler_depend.internal +839 -0
- package/build/CMakeFiles/tree-multi-set-benchmark.dir/compiler_depend.make +2506 -0
- package/build/CMakeFiles/tree-multi-set-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/tree-multi-set-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/tree-multi-set-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/tree-multi-set-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/tree-multi-set-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/tree-multi-set-benchmark.dir/test/performance/data-structures/binary-tree/tree-multi-set.test.cpp.o +0 -0
- package/build/CMakeFiles/tree-multi-set-benchmark.dir/test/performance/data-structures/binary-tree/tree-multi-set.test.cpp.o.d +835 -0
- package/build/CMakeFiles/tree-set-benchmark.dir/DependInfo.cmake +23 -0
- package/build/CMakeFiles/tree-set-benchmark.dir/build.make +114 -0
- package/build/CMakeFiles/tree-set-benchmark.dir/cmake_clean.cmake +11 -0
- package/build/CMakeFiles/tree-set-benchmark.dir/compiler_depend.internal +839 -0
- package/build/CMakeFiles/tree-set-benchmark.dir/compiler_depend.make +2506 -0
- package/build/CMakeFiles/tree-set-benchmark.dir/compiler_depend.ts +2 -0
- package/build/CMakeFiles/tree-set-benchmark.dir/depend.make +2 -0
- package/build/CMakeFiles/tree-set-benchmark.dir/flags.make +10 -0
- package/build/CMakeFiles/tree-set-benchmark.dir/link.txt +1 -0
- package/build/CMakeFiles/tree-set-benchmark.dir/progress.make +3 -0
- package/build/CMakeFiles/tree-set-benchmark.dir/test/performance/data-structures/binary-tree/tree-set.test.cpp.o +0 -0
- package/build/CMakeFiles/tree-set-benchmark.dir/test/performance/data-structures/binary-tree/tree-set.test.cpp.o.d +835 -0
- package/build/Makefile +783 -0
- package/build/_deps/benchmark-build/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
- package/build/_deps/benchmark-build/CMakeFiles/progress.marks +1 -0
- package/build/_deps/benchmark-build/Makefile +140 -0
- package/build/_deps/benchmark-build/benchmark.pc +12 -0
- package/build/_deps/benchmark-build/benchmarkConfig.cmake +14 -0
- package/build/_deps/benchmark-build/benchmarkConfigVersion.cmake +65 -0
- package/build/_deps/benchmark-build/benchmarkTargets.cmake +84 -0
- package/build/_deps/benchmark-build/cmake_install.cmake +50 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/DependInfo.cmake +41 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/benchmark.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/benchmark.cc.o.d +875 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/benchmark_api_internal.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/benchmark_api_internal.cc.o.d +802 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/benchmark_name.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/benchmark_name.cc.o.d +772 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/benchmark_register.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/benchmark_register.cc.o.d +841 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/benchmark_runner.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/benchmark_runner.cc.o.d +833 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/build.make +402 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/check.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/check.cc.o.d +784 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/cmake_clean.cmake +47 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/cmake_clean_target.cmake +3 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/colorprint.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/colorprint.cc.o.d +791 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/commandlineflags.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/commandlineflags.cc.o.d +795 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/compiler_depend.internal +15519 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/compiler_depend.make +17500 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/compiler_depend.ts +2 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/complexity.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/complexity.cc.o.d +793 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/console_reporter.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/console_reporter.cc.o.d +802 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/counter.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/counter.cc.o.d +773 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/csv_reporter.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/csv_reporter.cc.o.d +799 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/depend.make +2 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/flags.make +10 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/json_reporter.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/json_reporter.cc.o.d +800 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/link.txt +2 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/perf_counters.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/perf_counters.cc.o.d +807 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/progress.make +21 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/reporter.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/reporter.cc.o.d +798 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/statistics.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/statistics.cc.o.d +800 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/string_util.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/string_util.cc.o.d +795 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/sysinfo.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/sysinfo.cc.o.d +933 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/timers.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark.dir/timers.cc.o.d +904 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark_main.dir/DependInfo.cmake +23 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark_main.dir/benchmark_main.cc.o +0 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark_main.dir/benchmark_main.cc.o.d +772 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark_main.dir/build.make +114 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark_main.dir/cmake_clean.cmake +11 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark_main.dir/cmake_clean_target.cmake +3 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark_main.dir/compiler_depend.internal +776 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark_main.dir/compiler_depend.make +2317 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark_main.dir/compiler_depend.ts +2 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark_main.dir/depend.make +2 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark_main.dir/flags.make +10 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark_main.dir/link.txt +2 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/benchmark_main.dir/progress.make +3 -0
- package/build/_deps/benchmark-build/src/CMakeFiles/progress.marks +1 -0
- package/build/_deps/benchmark-build/src/Makefile +710 -0
- package/build/_deps/benchmark-build/src/cmake_install.cmake +45 -0
- package/build/_deps/benchmark-build/src/libbenchmark.a +0 -0
- package/build/_deps/benchmark-build/src/libbenchmark_main.a +0 -0
- package/build/_deps/benchmark-src/.clang-format +5 -0
- package/build/_deps/benchmark-src/.clang-tidy +7 -0
- package/build/_deps/benchmark-src/.github/ISSUE_TEMPLATE/bug_report.md +32 -0
- package/build/_deps/benchmark-src/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- package/build/_deps/benchmark-src/.github/install_bazel.sh +13 -0
- package/build/_deps/benchmark-src/.github/libcxx-setup.sh +26 -0
- package/build/_deps/benchmark-src/.github/workflows/bazel.yml +35 -0
- package/build/_deps/benchmark-src/.github/workflows/build-and-test-min-cmake.yml +46 -0
- package/build/_deps/benchmark-src/.github/workflows/build-and-test-perfcounters.yml +51 -0
- package/build/_deps/benchmark-src/.github/workflows/build-and-test.yml +114 -0
- package/build/_deps/benchmark-src/.github/workflows/clang-format-lint.yml +17 -0
- package/build/_deps/benchmark-src/.github/workflows/clang-tidy.yml +38 -0
- package/build/_deps/benchmark-src/.github/workflows/doxygen.yml +28 -0
- package/build/_deps/benchmark-src/.github/workflows/pylint.yml +28 -0
- package/build/_deps/benchmark-src/.github/workflows/sanitizer.yml +96 -0
- package/build/_deps/benchmark-src/.github/workflows/test_bindings.yml +29 -0
- package/build/_deps/benchmark-src/.github/workflows/wheels.yml +79 -0
- package/build/_deps/benchmark-src/.travis.yml +208 -0
- package/build/_deps/benchmark-src/.ycm_extra_conf.py +115 -0
- package/build/_deps/benchmark-src/AUTHORS +71 -0
- package/build/_deps/benchmark-src/BUILD.bazel +87 -0
- package/build/_deps/benchmark-src/CMakeLists.txt +340 -0
- package/build/_deps/benchmark-src/CONTRIBUTING.md +58 -0
- package/build/_deps/benchmark-src/CONTRIBUTORS +95 -0
- package/build/_deps/benchmark-src/LICENSE +202 -0
- package/build/_deps/benchmark-src/MODULE.bazel +24 -0
- package/build/_deps/benchmark-src/README.md +223 -0
- package/build/_deps/benchmark-src/WORKSPACE +22 -0
- package/build/_deps/benchmark-src/WORKSPACE.bzlmod +2 -0
- package/build/_deps/benchmark-src/_config.yml +2 -0
- package/build/_deps/benchmark-src/appveyor.yml +50 -0
- package/build/_deps/benchmark-src/bazel/benchmark_deps.bzl +65 -0
- package/build/_deps/benchmark-src/bindings/python/BUILD +3 -0
- package/build/_deps/benchmark-src/bindings/python/build_defs.bzl +25 -0
- package/build/_deps/benchmark-src/bindings/python/google_benchmark/BUILD +40 -0
- package/build/_deps/benchmark-src/bindings/python/google_benchmark/__init__.py +162 -0
- package/build/_deps/benchmark-src/bindings/python/google_benchmark/benchmark.cc +184 -0
- package/build/_deps/benchmark-src/bindings/python/google_benchmark/example.py +136 -0
- package/build/_deps/benchmark-src/bindings/python/nanobind.BUILD +17 -0
- package/build/_deps/benchmark-src/bindings/python/python_headers.BUILD +6 -0
- package/build/_deps/benchmark-src/cmake/AddCXXCompilerFlag.cmake +78 -0
- package/build/_deps/benchmark-src/cmake/CXXFeatureCheck.cmake +82 -0
- package/build/_deps/benchmark-src/cmake/Config.cmake.in +7 -0
- package/build/_deps/benchmark-src/cmake/GetGitVersion.cmake +58 -0
- package/build/_deps/benchmark-src/cmake/GoogleTest.cmake +58 -0
- package/build/_deps/benchmark-src/cmake/GoogleTest.cmake.in +59 -0
- package/build/_deps/benchmark-src/cmake/benchmark.pc.in +12 -0
- package/build/_deps/benchmark-src/cmake/gnu_posix_regex.cpp +12 -0
- package/build/_deps/benchmark-src/cmake/llvm-toolchain.cmake +8 -0
- package/build/_deps/benchmark-src/cmake/posix_regex.cpp +14 -0
- package/build/_deps/benchmark-src/cmake/pthread_affinity.cpp +16 -0
- package/build/_deps/benchmark-src/cmake/split_list.cmake +3 -0
- package/build/_deps/benchmark-src/cmake/std_regex.cpp +10 -0
- package/build/_deps/benchmark-src/cmake/steady_clock.cpp +7 -0
- package/build/_deps/benchmark-src/cmake/thread_safety_attributes.cpp +4 -0
- package/build/_deps/benchmark-src/docs/AssemblyTests.md +149 -0
- package/build/_deps/benchmark-src/docs/_config.yml +3 -0
- package/build/_deps/benchmark-src/docs/assets/images/icon.png +0 -0
- package/build/_deps/benchmark-src/docs/assets/images/icon.xcf +0 -0
- package/build/_deps/benchmark-src/docs/assets/images/icon_black.png +0 -0
- package/build/_deps/benchmark-src/docs/assets/images/icon_black.xcf +0 -0
- package/build/_deps/benchmark-src/docs/dependencies.md +13 -0
- package/build/_deps/benchmark-src/docs/index.md +12 -0
- package/build/_deps/benchmark-src/docs/perf_counters.md +35 -0
- package/build/_deps/benchmark-src/docs/platform_specific_build_instructions.md +48 -0
- package/build/_deps/benchmark-src/docs/python_bindings.md +34 -0
- package/build/_deps/benchmark-src/docs/random_interleaving.md +13 -0
- package/build/_deps/benchmark-src/docs/reducing_variance.md +100 -0
- package/build/_deps/benchmark-src/docs/releasing.md +41 -0
- package/build/_deps/benchmark-src/docs/tools.md +343 -0
- package/build/_deps/benchmark-src/docs/user_guide.md +1266 -0
- package/build/_deps/benchmark-src/include/benchmark/benchmark.h +1991 -0
- package/build/_deps/benchmark-src/include/benchmark/export.h +47 -0
- package/build/_deps/benchmark-src/pyproject.toml +50 -0
- package/build/_deps/benchmark-src/setup.py +113 -0
- package/build/_deps/benchmark-src/src/CMakeLists.txt +170 -0
- package/build/_deps/benchmark-src/src/arraysize.h +33 -0
- package/build/_deps/benchmark-src/src/benchmark.cc +779 -0
- package/build/_deps/benchmark-src/src/benchmark_api_internal.cc +118 -0
- package/build/_deps/benchmark-src/src/benchmark_api_internal.h +87 -0
- package/build/_deps/benchmark-src/src/benchmark_main.cc +18 -0
- package/build/_deps/benchmark-src/src/benchmark_name.cc +59 -0
- package/build/_deps/benchmark-src/src/benchmark_register.cc +520 -0
- package/build/_deps/benchmark-src/src/benchmark_register.h +109 -0
- package/build/_deps/benchmark-src/src/benchmark_runner.cc +497 -0
- package/build/_deps/benchmark-src/src/benchmark_runner.h +131 -0
- package/build/_deps/benchmark-src/src/check.cc +11 -0
- package/build/_deps/benchmark-src/src/check.h +106 -0
- package/build/_deps/benchmark-src/src/colorprint.cc +200 -0
- package/build/_deps/benchmark-src/src/colorprint.h +33 -0
- package/build/_deps/benchmark-src/src/commandlineflags.cc +298 -0
- package/build/_deps/benchmark-src/src/commandlineflags.h +133 -0
- package/build/_deps/benchmark-src/src/complexity.cc +244 -0
- package/build/_deps/benchmark-src/src/complexity.h +55 -0
- package/build/_deps/benchmark-src/src/console_reporter.cc +206 -0
- package/build/_deps/benchmark-src/src/counter.cc +80 -0
- package/build/_deps/benchmark-src/src/counter.h +32 -0
- package/build/_deps/benchmark-src/src/csv_reporter.cc +161 -0
- package/build/_deps/benchmark-src/src/cycleclock.h +230 -0
- package/build/_deps/benchmark-src/src/internal_macros.h +115 -0
- package/build/_deps/benchmark-src/src/json_reporter.cc +320 -0
- package/build/_deps/benchmark-src/src/log.h +88 -0
- package/build/_deps/benchmark-src/src/mutex.h +155 -0
- package/build/_deps/benchmark-src/src/perf_counters.cc +282 -0
- package/build/_deps/benchmark-src/src/perf_counters.h +200 -0
- package/build/_deps/benchmark-src/src/re.h +158 -0
- package/build/_deps/benchmark-src/src/reporter.cc +118 -0
- package/build/_deps/benchmark-src/src/statistics.cc +209 -0
- package/build/_deps/benchmark-src/src/statistics.h +44 -0
- package/build/_deps/benchmark-src/src/string_util.cc +254 -0
- package/build/_deps/benchmark-src/src/string_util.h +70 -0
- package/build/_deps/benchmark-src/src/sysinfo.cc +855 -0
- package/build/_deps/benchmark-src/src/thread_manager.h +63 -0
- package/build/_deps/benchmark-src/src/thread_timer.h +86 -0
- package/build/_deps/benchmark-src/src/timers.cc +272 -0
- package/build/_deps/benchmark-src/src/timers.h +48 -0
- package/build/_deps/benchmark-src/test/AssemblyTests.cmake +67 -0
- package/build/_deps/benchmark-src/test/BUILD +127 -0
- package/build/_deps/benchmark-src/test/CMakeLists.txt +309 -0
- package/build/_deps/benchmark-src/test/args_product_test.cc +77 -0
- package/build/_deps/benchmark-src/test/basic_test.cc +180 -0
- package/build/_deps/benchmark-src/test/benchmark_gtest.cc +169 -0
- package/build/_deps/benchmark-src/test/benchmark_min_time_flag_iters_test.cc +66 -0
- package/build/_deps/benchmark-src/test/benchmark_min_time_flag_time_test.cc +90 -0
- package/build/_deps/benchmark-src/test/benchmark_name_gtest.cc +82 -0
- package/build/_deps/benchmark-src/test/benchmark_random_interleaving_gtest.cc +126 -0
- package/build/_deps/benchmark-src/test/benchmark_setup_teardown_test.cc +157 -0
- package/build/_deps/benchmark-src/test/benchmark_test.cc +274 -0
- package/build/_deps/benchmark-src/test/clobber_memory_assembly_test.cc +64 -0
- package/build/_deps/benchmark-src/test/commandlineflags_gtest.cc +228 -0
- package/build/_deps/benchmark-src/test/complexity_test.cc +228 -0
- package/build/_deps/benchmark-src/test/cxx03_test.cc +62 -0
- package/build/_deps/benchmark-src/test/diagnostics_test.cc +91 -0
- package/build/_deps/benchmark-src/test/display_aggregates_only_test.cc +45 -0
- package/build/_deps/benchmark-src/test/donotoptimize_assembly_test.cc +201 -0
- package/build/_deps/benchmark-src/test/donotoptimize_test.cc +69 -0
- package/build/_deps/benchmark-src/test/filter_test.cc +117 -0
- package/build/_deps/benchmark-src/test/fixture_test.cc +51 -0
- package/build/_deps/benchmark-src/test/internal_threading_test.cc +185 -0
- package/build/_deps/benchmark-src/test/link_main_test.cc +9 -0
- package/build/_deps/benchmark-src/test/map_test.cc +59 -0
- package/build/_deps/benchmark-src/test/memory_manager_test.cc +47 -0
- package/build/_deps/benchmark-src/test/min_time_parse_gtest.cc +30 -0
- package/build/_deps/benchmark-src/test/multiple_ranges_test.cc +96 -0
- package/build/_deps/benchmark-src/test/options_test.cc +77 -0
- package/build/_deps/benchmark-src/test/output_test.h +211 -0
- package/build/_deps/benchmark-src/test/output_test_helper.cc +519 -0
- package/build/_deps/benchmark-src/test/perf_counters_gtest.cc +307 -0
- package/build/_deps/benchmark-src/test/perf_counters_test.cc +92 -0
- package/build/_deps/benchmark-src/test/register_benchmark_test.cc +196 -0
- package/build/_deps/benchmark-src/test/repetitions_test.cc +214 -0
- package/build/_deps/benchmark-src/test/report_aggregates_only_test.cc +41 -0
- package/build/_deps/benchmark-src/test/reporter_output_test.cc +1130 -0
- package/build/_deps/benchmark-src/test/skip_with_error_test.cc +199 -0
- package/build/_deps/benchmark-src/test/spec_arg_test.cc +105 -0
- package/build/_deps/benchmark-src/test/spec_arg_verbosity_test.cc +43 -0
- package/build/_deps/benchmark-src/test/state_assembly_test.cc +68 -0
- package/build/_deps/benchmark-src/test/statistics_gtest.cc +35 -0
- package/build/_deps/benchmark-src/test/string_util_gtest.cc +199 -0
- package/build/_deps/benchmark-src/test/templated_fixture_test.cc +28 -0
- package/build/_deps/benchmark-src/test/time_unit_gtest.cc +37 -0
- package/build/_deps/benchmark-src/test/user_counters_tabular_test.cc +558 -0
- package/build/_deps/benchmark-src/test/user_counters_test.cc +561 -0
- package/build/_deps/benchmark-src/test/user_counters_thousands_test.cc +186 -0
- package/build/_deps/benchmark-src/tools/BUILD.bazel +19 -0
- package/build/_deps/benchmark-src/tools/compare.py +432 -0
- package/build/_deps/benchmark-src/tools/gbench/Inputs/test1_run1.json +127 -0
- package/build/_deps/benchmark-src/tools/gbench/Inputs/test1_run2.json +127 -0
- package/build/_deps/benchmark-src/tools/gbench/Inputs/test2_run.json +81 -0
- package/build/_deps/benchmark-src/tools/gbench/Inputs/test3_run0.json +65 -0
- package/build/_deps/benchmark-src/tools/gbench/Inputs/test3_run1.json +65 -0
- package/build/_deps/benchmark-src/tools/gbench/Inputs/test4_run.json +96 -0
- package/build/_deps/benchmark-src/tools/gbench/Inputs/test4_run0.json +21 -0
- package/build/_deps/benchmark-src/tools/gbench/Inputs/test4_run1.json +21 -0
- package/build/_deps/benchmark-src/tools/gbench/__init__.py +8 -0
- package/build/_deps/benchmark-src/tools/gbench/report.py +1201 -0
- package/build/_deps/benchmark-src/tools/gbench/util.py +203 -0
- package/build/_deps/benchmark-src/tools/libpfm.BUILD.bazel +22 -0
- package/build/_deps/benchmark-src/tools/requirements.txt +2 -0
- package/build/_deps/benchmark-src/tools/strip_asm.py +151 -0
- package/build/_deps/benchmark-subbuild/CMakeCache.txt +133 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/4.0.3/CMakeSystem.cmake +15 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/CMakeConfigureLog.yaml +11 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/CMakeRuleHashes.txt +11 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/InstallScripts.json +7 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/Makefile.cmake +52 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/Makefile2 +122 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/TargetDirectories.txt +3 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/benchmark-populate.dir/DependInfo.cmake +22 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/benchmark-populate.dir/Labels.json +46 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/benchmark-populate.dir/Labels.txt +14 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/benchmark-populate.dir/build.make +162 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/benchmark-populate.dir/cmake_clean.cmake +17 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/benchmark-populate.dir/compiler_depend.make +2 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/benchmark-populate.dir/compiler_depend.ts +2 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/benchmark-populate.dir/progress.make +10 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/cmake.check_cache +1 -0
- package/build/_deps/benchmark-subbuild/CMakeFiles/progress.marks +1 -0
- package/build/_deps/benchmark-subbuild/CMakeLists.txt +42 -0
- package/build/_deps/benchmark-subbuild/Makefile +162 -0
- package/build/_deps/benchmark-subbuild/benchmark-populate-prefix/src/benchmark-populate-stamp/benchmark-populate-gitclone-lastrun.txt +15 -0
- package/build/_deps/benchmark-subbuild/benchmark-populate-prefix/src/benchmark-populate-stamp/benchmark-populate-gitinfo.txt +15 -0
- package/build/_deps/benchmark-subbuild/benchmark-populate-prefix/src/benchmark-populate-stamp/benchmark-populate-patch-info.txt +6 -0
- package/build/_deps/benchmark-subbuild/benchmark-populate-prefix/src/benchmark-populate-stamp/benchmark-populate-update-info.txt +7 -0
- package/build/_deps/benchmark-subbuild/benchmark-populate-prefix/tmp/benchmark-populate-cfgcmd.txt +1 -0
- package/build/_deps/benchmark-subbuild/benchmark-populate-prefix/tmp/benchmark-populate-gitclone.cmake +87 -0
- package/build/_deps/benchmark-subbuild/benchmark-populate-prefix/tmp/benchmark-populate-gitupdate.cmake +317 -0
- package/build/_deps/benchmark-subbuild/benchmark-populate-prefix/tmp/benchmark-populate-mkdirs.cmake +27 -0
- package/build/_deps/benchmark-subbuild/cmake_install.cmake +56 -0
- package/build/bin/avl-rb-range-search-benchmark +0 -0
- package/build/bin/avl-tree-benchmark +0 -0
- package/build/bin/deque-benchmark +0 -0
- package/build/bin/doubly-linked-list-benchmark +0 -0
- package/build/bin/hash-map-benchmark +0 -0
- package/build/bin/heap-benchmark +0 -0
- package/build/bin/priority-queue-benchmark +0 -0
- package/build/bin/queue-benchmark +0 -0
- package/build/bin/red-black-tree-benchmark +0 -0
- package/build/bin/singly-linked-list-benchmark +0 -0
- package/build/bin/stack-benchmark +0 -0
- package/build/bin/tree-map-benchmark +0 -0
- package/build/bin/tree-multi-map-benchmark +0 -0
- package/build/bin/tree-multi-set-benchmark +0 -0
- package/build/bin/tree-set-benchmark +0 -0
- package/build/cmake_install.cmake +66 -0
- package/dist/cjs/index.cjs +1270 -1201
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs-legacy/index.cjs +1309 -1210
- package/dist/cjs-legacy/index.cjs.map +1 -1
- package/dist/esm/index.mjs +1268 -1196
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm-legacy/index.mjs +1307 -1205
- package/dist/esm-legacy/index.mjs.map +1 -1
- package/dist/types/data-structures/binary-tree/binary-tree.d.ts +3 -3
- package/dist/types/data-structures/binary-tree/index.d.ts +3 -3
- package/dist/types/data-structures/binary-tree/tree-map.d.ts +177 -0
- package/dist/types/data-structures/binary-tree/tree-multi-map.d.ts +230 -147
- package/dist/types/data-structures/binary-tree/tree-multi-set.d.ts +263 -0
- package/dist/types/data-structures/binary-tree/tree-set.d.ts +170 -0
- package/dist/types/interfaces/binary-tree.d.ts +1 -1
- package/dist/types/types/data-structures/binary-tree/index.d.ts +3 -3
- package/dist/types/types/data-structures/binary-tree/tree-map.d.ts +28 -0
- package/dist/types/types/data-structures/binary-tree/tree-multi-set.d.ts +11 -0
- package/dist/types/types/data-structures/binary-tree/tree-set.d.ts +28 -0
- package/dist/umd/data-structure-typed.js +1303 -1194
- package/dist/umd/data-structure-typed.js.map +1 -1
- package/dist/umd/data-structure-typed.min.js +10 -3
- package/dist/umd/data-structure-typed.min.js.map +1 -1
- package/eslint.config.mjs +5 -1
- package/package.json +4 -3
- package/src/data-structures/binary-tree/avl-tree.ts +1 -1
- package/src/data-structures/binary-tree/binary-tree.ts +40 -16
- package/src/data-structures/binary-tree/bst.ts +6 -6
- package/src/data-structures/binary-tree/index.ts +3 -3
- package/src/data-structures/binary-tree/red-black-tree.ts +34 -52
- package/src/data-structures/binary-tree/tree-map.ts +417 -0
- package/src/data-structures/binary-tree/tree-multi-map.ts +467 -325
- package/src/data-structures/binary-tree/tree-multi-set.ts +491 -0
- package/src/data-structures/binary-tree/tree-set.ts +394 -0
- package/src/interfaces/binary-tree.ts +1 -1
- package/src/types/data-structures/binary-tree/index.ts +3 -3
- package/src/types/data-structures/binary-tree/tree-map.ts +39 -0
- package/src/types/data-structures/binary-tree/tree-multi-set.ts +13 -0
- package/src/types/data-structures/binary-tree/tree-set.ts +33 -0
- package/test/config.ts +2 -2
- package/test/performance/benchmark-runner-enhanced.mjs +818 -0
- package/test/performance/cmake-benchmark-runner.mjs +234 -0
- package/test/performance/data-structures/binary-tree/avl-rb-range-search.test.cpp +112 -0
- package/test/performance/data-structures/binary-tree/avl-rb-range-search.test.mjs +51 -0
- package/test/performance/data-structures/binary-tree/avl-tree.test.cpp +181 -0
- package/test/performance/data-structures/binary-tree/avl-tree.test.mjs +138 -0
- package/test/performance/data-structures/binary-tree/binary-tree-overall.test.mjs +85 -0
- package/test/performance/data-structures/binary-tree/binary-tree.test.mjs +100 -0
- package/test/performance/data-structures/binary-tree/bst.test.mjs +61 -0
- package/test/performance/data-structures/binary-tree/red-black-tree-cjs.test.mjs +259 -0
- package/test/performance/data-structures/binary-tree/red-black-tree.test.cpp +213 -0
- package/test/performance/data-structures/binary-tree/red-black-tree.test.mjs +275 -0
- package/test/performance/data-structures/binary-tree/tree-map.test.cpp +129 -0
- package/test/performance/data-structures/binary-tree/tree-map.test.mjs +171 -0
- package/test/performance/data-structures/binary-tree/tree-multi-map.test.cpp +205 -0
- package/test/performance/data-structures/binary-tree/tree-multi-map.test.mjs +106 -0
- package/test/performance/data-structures/binary-tree/tree-multi-set.test.cpp +217 -0
- package/test/performance/data-structures/binary-tree/tree-multi-set.test.mjs +91 -0
- package/test/performance/data-structures/binary-tree/tree-set.test.cpp +127 -0
- package/test/performance/data-structures/binary-tree/tree-set.test.mjs +174 -0
- package/test/performance/data-structures/comparison/{comparison.test.ts → comparison.test.mjs} +17 -17
- package/test/performance/data-structures/graph/{directed-graph.test.ts → directed-graph.test.mjs} +4 -4
- package/test/performance/data-structures/hash/hash-map.test.cpp +183 -0
- package/test/performance/data-structures/hash/hash-map.test.mjs +187 -0
- package/test/performance/data-structures/heap/heap.test.cpp +61 -0
- package/test/performance/data-structures/heap/heap.test.mjs +31 -0
- package/test/performance/data-structures/linked-list/doubly-linked-list.test.cpp +84 -0
- package/test/performance/data-structures/linked-list/doubly-linked-list.test.mjs +125 -0
- package/test/performance/data-structures/linked-list/singly-linked-list.test.cpp +77 -0
- package/test/performance/data-structures/linked-list/singly-linked-list.test.mjs +84 -0
- package/test/performance/data-structures/priority-queue/max-priority-queue.test.mjs +40 -0
- package/test/performance/data-structures/priority-queue/priority-queue.test.cpp +59 -0
- package/test/performance/data-structures/priority-queue/priority-queue.test.mjs +64 -0
- package/test/performance/data-structures/queue/deque.test.cpp +119 -0
- package/test/performance/data-structures/queue/deque.test.mjs +144 -0
- package/test/performance/data-structures/queue/queue.test.cpp +59 -0
- package/test/performance/data-structures/queue/queue.test.mjs +77 -0
- package/test/performance/data-structures/stack/stack.test.cpp +40 -0
- package/test/performance/data-structures/stack/stack.test.mjs +69 -0
- package/test/performance/data-structures/trie/trie.test.mjs +43 -0
- package/test/performance/reportor-enhanced.mjs +871 -0
- package/test/performance/runner-config.json +33 -21
- package/test/unit/data-structures/base/iterable-element-base.more-branches.coverage.test.ts +6 -6
- package/test/unit/data-structures/base/linear-base.array.coverage.test.ts +5 -5
- package/test/unit/data-structures/base/linear-base.concat-else.coverage.test.ts +10 -10
- package/test/unit/data-structures/base/linear-base.more-branches.coverage.test.ts +7 -10
- package/test/unit/data-structures/binary-tree/avl-tree.test.ts +5 -5
- package/test/unit/data-structures/binary-tree/binary-tree.remaining-branches.coverage.test.ts +7 -4
- package/test/unit/data-structures/binary-tree/binary-tree.test.ts +7 -7
- package/test/unit/data-structures/binary-tree/bst.more-branches-3.coverage.test.ts +1 -1
- package/test/unit/data-structures/binary-tree/bst.test.ts +4 -4
- package/test/unit/data-structures/binary-tree/overall.test.ts +18 -31
- package/test/unit/data-structures/binary-tree/red-black-tree.boundary-max-update.coverage.test.ts +1 -1
- package/test/unit/data-structures/binary-tree/red-black-tree.cache-stale-insert.coverage.test.ts +2 -2
- package/test/unit/data-structures/binary-tree/red-black-tree.hint-mapmode-defined.coverage.test.ts +4 -4
- package/test/unit/data-structures/binary-tree/red-black-tree.hint-mapmode-undefined.coverage.test.ts +5 -5
- package/test/unit/data-structures/binary-tree/red-black-tree.hint-more.coverage.test.ts +3 -3
- package/test/unit/data-structures/binary-tree/red-black-tree.remaining-branches.coverage.test.ts +2 -2
- package/test/unit/data-structures/binary-tree/red-black-tree.set-inputs.coverage.test.ts +1 -1
- package/test/unit/data-structures/binary-tree/red-black-tree.setkvnode-parent-cache.coverage.test.ts +1 -1
- package/test/unit/data-structures/binary-tree/red-black-tree.setkvnode-remaining.coverage.test.ts +4 -4
- package/test/unit/data-structures/binary-tree/red-black-tree.setkvnode-uncovered.coverage.test.ts +1 -1
- package/test/unit/data-structures/binary-tree/red-black-tree.test.ts +2 -2
- package/test/unit/data-structures/binary-tree/red-black-tree.update-branches.coverage.test.ts +4 -4
- package/test/unit/data-structures/binary-tree/tree-map.test.ts +270 -0
- package/test/unit/data-structures/binary-tree/tree-multi-map.coverage.test.ts +144 -3
- package/test/unit/data-structures/binary-tree/{tree-multi-map.test.ts → tree-multi-map.legacy.test.ts.skip} +16 -16
- package/test/unit/data-structures/binary-tree/tree-multi-map.rfc.test.ts +99 -0
- package/test/unit/data-structures/binary-tree/tree-multi-map.simplified.test.ts +482 -0
- package/test/unit/data-structures/binary-tree/tree-multi-set.test.ts +545 -0
- package/test/unit/data-structures/binary-tree/tree-set.test.ts +187 -0
- package/test/unit/unrestricted-interconversion.test.ts +12 -10
- package/test/utils/patch.ts +3 -3
- package/test/utils/perf.mjs +34 -0
- package/dist/types/data-structures/binary-tree/avl-tree-counter.d.ts +0 -236
- package/dist/types/data-structures/binary-tree/avl-tree-multi-map.d.ts +0 -197
- package/dist/types/data-structures/binary-tree/tree-counter.d.ts +0 -243
- package/dist/types/types/data-structures/binary-tree/avl-tree-counter.d.ts +0 -2
- package/dist/types/types/data-structures/binary-tree/avl-tree-multi-map.d.ts +0 -2
- package/dist/types/types/data-structures/binary-tree/tree-counter.d.ts +0 -2
- package/src/data-structures/binary-tree/avl-tree-counter.ts +0 -539
- package/src/data-structures/binary-tree/avl-tree-multi-map.ts +0 -438
- package/src/data-structures/binary-tree/tree-counter.ts +0 -587
- package/src/types/data-structures/binary-tree/avl-tree-counter.ts +0 -3
- package/src/types/data-structures/binary-tree/avl-tree-multi-map.ts +0 -3
- package/src/types/data-structures/binary-tree/tree-counter.ts +0 -3
- package/test/performance/benchmark-runner.ts +0 -531
- package/test/performance/data-structures/binary-tree/avl-tree.test.ts +0 -40
- package/test/performance/data-structures/binary-tree/binary-tree-overall.test.ts +0 -37
- package/test/performance/data-structures/binary-tree/binary-tree.test.ts +0 -40
- package/test/performance/data-structures/binary-tree/bst.test.ts +0 -28
- package/test/performance/data-structures/binary-tree/red-black-tree.test.ts +0 -60
- package/test/performance/data-structures/hash/hash-map.test.ts +0 -99
- package/test/performance/data-structures/heap/heap.test.ts +0 -26
- package/test/performance/data-structures/heap/min-heap.test.ts +0 -0
- package/test/performance/data-structures/linked-list/doubly-linked-list.test.ts +0 -59
- package/test/performance/data-structures/linked-list/linked-list.test.ts +0 -0
- package/test/performance/data-structures/linked-list/singly-linked-list.test.ts +0 -35
- package/test/performance/data-structures/linked-list/skip-linked-list.test.ts +0 -0
- package/test/performance/data-structures/linked-list/skip-list.test.ts +0 -0
- package/test/performance/data-structures/matrix/matrix.test.ts +0 -0
- package/test/performance/data-structures/matrix/navigator.test.ts +0 -0
- package/test/performance/data-structures/priority-queue/max-priority-queue.test.ts +0 -17
- package/test/performance/data-structures/priority-queue/min-priority-queue.test.ts +0 -0
- package/test/performance/data-structures/priority-queue/priority-queue.test.ts +0 -34
- package/test/performance/data-structures/queue/deque.test.ts +0 -59
- package/test/performance/data-structures/queue/queue.test.ts +0 -35
- package/test/performance/data-structures/stack/stack.test.ts +0 -37
- package/test/performance/data-structures/trie/trie.test.ts +0 -18
- package/test/performance/reportor.ts +0 -279
- package/test/performance/single-suite-runner.ts +0 -72
- package/test/performance/types/index.ts +0 -1
- package/test/performance/types/reportor.ts +0 -7
- package/test/unit/data-structures/binary-tree/avl-tree-counter.more-branches-3.coverage.test.ts +0 -146
- package/test/unit/data-structures/binary-tree/avl-tree-counter.more-branches.coverage.test.ts +0 -93
- package/test/unit/data-structures/binary-tree/avl-tree-counter.test.ts +0 -878
- package/test/unit/data-structures/binary-tree/avl-tree-multi-map.coverage.test.ts +0 -108
- package/test/unit/data-structures/binary-tree/avl-tree-multi-map.more-branches-2.coverage.test.ts +0 -85
- package/test/unit/data-structures/binary-tree/avl-tree-multi-map.test.ts +0 -740
- package/test/unit/data-structures/binary-tree/tree-counter.coverage.test.ts +0 -115
- package/test/unit/data-structures/binary-tree/tree-counter.more-branches.coverage.test.ts +0 -244
- package/test/unit/data-structures/binary-tree/tree-counter.test.ts +0 -979
- /package/{test/performance/data-structures/binary-tree/binary-index-tree.test.ts → build/_deps/benchmark-subbuild/CMakeFiles/benchmark-populate-complete} +0 -0
- /package/{test/performance/data-structures/binary-tree/segment-tree.test.ts → build/_deps/benchmark-subbuild/benchmark-populate-prefix/src/benchmark-populate-stamp/benchmark-populate-build} +0 -0
- /package/{test/performance/data-structures/binary-tree/tree-multimap.test.ts → build/_deps/benchmark-subbuild/benchmark-populate-prefix/src/benchmark-populate-stamp/benchmark-populate-configure} +0 -0
- /package/{test/performance/data-structures/graph/abstract-graph.test.ts → build/_deps/benchmark-subbuild/benchmark-populate-prefix/src/benchmark-populate-stamp/benchmark-populate-done} +0 -0
- /package/{test/performance/data-structures/graph/map-graph.test.ts → build/_deps/benchmark-subbuild/benchmark-populate-prefix/src/benchmark-populate-stamp/benchmark-populate-download} +0 -0
- /package/{test/performance/data-structures/graph/overall.test.ts → build/_deps/benchmark-subbuild/benchmark-populate-prefix/src/benchmark-populate-stamp/benchmark-populate-install} +0 -0
- /package/{test/performance/data-structures/graph/undirected-graph.test.ts → build/_deps/benchmark-subbuild/benchmark-populate-prefix/src/benchmark-populate-stamp/benchmark-populate-mkdir} +0 -0
- /package/{test/performance/data-structures/hash/hash-table.test.ts → build/_deps/benchmark-subbuild/benchmark-populate-prefix/src/benchmark-populate-stamp/benchmark-populate-patch} +0 -0
- /package/{test/performance/data-structures/heap/max-heap.test.ts → build/_deps/benchmark-subbuild/benchmark-populate-prefix/src/benchmark-populate-stamp/benchmark-populate-test} +0 -0
- /package/test/unit/data-structures/binary-tree/{tree-multi-map.more-branches-2.coverage.test.ts → tree-multi-map.more-branches-2.coverage.test.ts.skip} +0 -0
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TreeMultiSet (ordered multiset) — a restricted, native-like API backed by RedBlackTree.
|
|
3
|
+
*
|
|
4
|
+
* Design goals:
|
|
5
|
+
* - No node exposure
|
|
6
|
+
* - Strict default comparator (number/string/Date), otherwise require comparator
|
|
7
|
+
* - Default iteration is expanded (each element yielded `count(x)` times)
|
|
8
|
+
* - `delete(x)` removes one occurrence by default
|
|
9
|
+
*/
|
|
10
|
+
import type { Comparator, TreeMultiSetOptions } from '../../types';
|
|
11
|
+
export declare class TreeMultiSet<K = any> implements Iterable<K> {
|
|
12
|
+
#private;
|
|
13
|
+
private _size;
|
|
14
|
+
/**
|
|
15
|
+
* Creates a new TreeMultiSet.
|
|
16
|
+
* @param elements - Initial elements to add
|
|
17
|
+
* @param options - Configuration options
|
|
18
|
+
* @remarks Time O(m log m), Space O(m) where m is the number of initial elements
|
|
19
|
+
*/
|
|
20
|
+
constructor(elements?: Iterable<K>, options?: TreeMultiSetOptions<K>);
|
|
21
|
+
/**
|
|
22
|
+
* Validates the key against the default comparator rules.
|
|
23
|
+
* @remarks Time O(1), Space O(1)
|
|
24
|
+
*/
|
|
25
|
+
private _validateKey;
|
|
26
|
+
/**
|
|
27
|
+
* Validates that count is a non-negative safe integer.
|
|
28
|
+
* @remarks Time O(1), Space O(1)
|
|
29
|
+
*/
|
|
30
|
+
private _validateCount;
|
|
31
|
+
/**
|
|
32
|
+
* Total occurrences (sumCounts).
|
|
33
|
+
* @remarks Time O(1), Space O(1)
|
|
34
|
+
*/
|
|
35
|
+
get size(): number;
|
|
36
|
+
/**
|
|
37
|
+
* Number of distinct keys.
|
|
38
|
+
* @remarks Time O(1), Space O(1)
|
|
39
|
+
*/
|
|
40
|
+
get distinctSize(): number;
|
|
41
|
+
/**
|
|
42
|
+
* Whether the multiset is empty.
|
|
43
|
+
* @remarks Time O(1), Space O(1)
|
|
44
|
+
*/
|
|
45
|
+
isEmpty(): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Whether the multiset contains the given key.
|
|
48
|
+
* @remarks Time O(log n), Space O(1)
|
|
49
|
+
*/
|
|
50
|
+
has(key: K): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Returns the count of occurrences for the given key.
|
|
53
|
+
* @remarks Time O(log n), Space O(1)
|
|
54
|
+
*/
|
|
55
|
+
count(key: K): number;
|
|
56
|
+
/**
|
|
57
|
+
* Add `n` occurrences of `key`.
|
|
58
|
+
* @returns True if the multiset changed.
|
|
59
|
+
* @remarks Time O(log n), Space O(1)
|
|
60
|
+
*/
|
|
61
|
+
add(key: K, n?: number): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Set count for `key` to exactly `n`.
|
|
64
|
+
* @returns True if changed.
|
|
65
|
+
* @remarks Time O(log n), Space O(1)
|
|
66
|
+
*/
|
|
67
|
+
setCount(key: K, n: number): boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Delete `n` occurrences of `key` (default 1).
|
|
70
|
+
* @returns True if any occurrence was removed.
|
|
71
|
+
* @remarks Time O(log n), Space O(1)
|
|
72
|
+
*/
|
|
73
|
+
delete(key: K, n?: number): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Delete all occurrences of the given key.
|
|
76
|
+
* @returns True if any occurrence was removed.
|
|
77
|
+
* @remarks Time O(log n), Space O(1)
|
|
78
|
+
*/
|
|
79
|
+
deleteAll(key: K): boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Iterates over distinct keys (each key yielded once).
|
|
82
|
+
* @remarks Time O(n), Space O(1)
|
|
83
|
+
*/
|
|
84
|
+
keysDistinct(): IterableIterator<K>;
|
|
85
|
+
/**
|
|
86
|
+
* Iterates over entries as [key, count] pairs.
|
|
87
|
+
* @remarks Time O(n), Space O(1)
|
|
88
|
+
*/
|
|
89
|
+
entries(): IterableIterator<[K, number]>;
|
|
90
|
+
/**
|
|
91
|
+
* Expanded iteration (default). Each key is yielded `count(key)` times.
|
|
92
|
+
* @remarks Time O(size), Space O(1) where size is total occurrences
|
|
93
|
+
*/
|
|
94
|
+
[Symbol.iterator](): Iterator<K>;
|
|
95
|
+
/**
|
|
96
|
+
* Returns an array with all elements (expanded).
|
|
97
|
+
* @remarks Time O(size), Space O(size)
|
|
98
|
+
*/
|
|
99
|
+
toArray(): K[];
|
|
100
|
+
/**
|
|
101
|
+
* Returns an array with distinct keys only.
|
|
102
|
+
* @remarks Time O(n), Space O(n)
|
|
103
|
+
*/
|
|
104
|
+
toDistinctArray(): K[];
|
|
105
|
+
/**
|
|
106
|
+
* Returns an array of [key, count] entries.
|
|
107
|
+
* @remarks Time O(n), Space O(n)
|
|
108
|
+
*/
|
|
109
|
+
toEntries(): Array<[K, number]>;
|
|
110
|
+
/**
|
|
111
|
+
* Expose comparator for advanced usage/testing (read-only).
|
|
112
|
+
* @remarks Time O(1), Space O(1)
|
|
113
|
+
*/
|
|
114
|
+
get comparator(): Comparator<K>;
|
|
115
|
+
/**
|
|
116
|
+
* Remove all elements from the multiset.
|
|
117
|
+
* @remarks Time O(1), Space O(1)
|
|
118
|
+
* @example
|
|
119
|
+
* const ms = new TreeMultiSet([1, 2, 2, 3]);
|
|
120
|
+
* ms.clear();
|
|
121
|
+
* ms.size; // 0
|
|
122
|
+
*/
|
|
123
|
+
clear(): void;
|
|
124
|
+
/**
|
|
125
|
+
* Returns the smallest key, or undefined if empty.
|
|
126
|
+
* @remarks Time O(log n), Space O(1)
|
|
127
|
+
* @example
|
|
128
|
+
* const ms = new TreeMultiSet([3, 1, 4]);
|
|
129
|
+
* ms.first(); // 1
|
|
130
|
+
*/
|
|
131
|
+
first(): K | undefined;
|
|
132
|
+
/**
|
|
133
|
+
* Returns the largest key, or undefined if empty.
|
|
134
|
+
* @remarks Time O(log n), Space O(1)
|
|
135
|
+
* @example
|
|
136
|
+
* const ms = new TreeMultiSet([3, 1, 4]);
|
|
137
|
+
* ms.last(); // 4
|
|
138
|
+
*/
|
|
139
|
+
last(): K | undefined;
|
|
140
|
+
/**
|
|
141
|
+
* Removes all occurrences of the smallest key and returns it.
|
|
142
|
+
* @remarks Time O(log n), Space O(1)
|
|
143
|
+
* @example
|
|
144
|
+
* const ms = new TreeMultiSet([1, 1, 2, 3]);
|
|
145
|
+
* ms.pollFirst(); // 1
|
|
146
|
+
* ms.has(1); // false
|
|
147
|
+
*/
|
|
148
|
+
pollFirst(): K | undefined;
|
|
149
|
+
/**
|
|
150
|
+
* Removes all occurrences of the largest key and returns it.
|
|
151
|
+
* @remarks Time O(log n), Space O(1)
|
|
152
|
+
* @example
|
|
153
|
+
* const ms = new TreeMultiSet([1, 2, 3, 3]);
|
|
154
|
+
* ms.pollLast(); // 3
|
|
155
|
+
* ms.has(3); // false
|
|
156
|
+
*/
|
|
157
|
+
pollLast(): K | undefined;
|
|
158
|
+
/**
|
|
159
|
+
* Returns the smallest key >= given key, or undefined.
|
|
160
|
+
* @remarks Time O(log n), Space O(1)
|
|
161
|
+
* @example
|
|
162
|
+
* const ms = new TreeMultiSet([10, 20, 30]);
|
|
163
|
+
* ms.ceiling(15); // 20
|
|
164
|
+
* ms.ceiling(20); // 20
|
|
165
|
+
*/
|
|
166
|
+
ceiling(key: K): K | undefined;
|
|
167
|
+
/**
|
|
168
|
+
* Returns the largest key <= given key, or undefined.
|
|
169
|
+
* @remarks Time O(log n), Space O(1)
|
|
170
|
+
* @example
|
|
171
|
+
* const ms = new TreeMultiSet([10, 20, 30]);
|
|
172
|
+
* ms.floor(25); // 20
|
|
173
|
+
* ms.floor(20); // 20
|
|
174
|
+
*/
|
|
175
|
+
floor(key: K): K | undefined;
|
|
176
|
+
/**
|
|
177
|
+
* Returns the smallest key > given key, or undefined.
|
|
178
|
+
* @remarks Time O(log n), Space O(1)
|
|
179
|
+
* @example
|
|
180
|
+
* const ms = new TreeMultiSet([10, 20, 30]);
|
|
181
|
+
* ms.higher(10); // 20
|
|
182
|
+
* ms.higher(15); // 20
|
|
183
|
+
*/
|
|
184
|
+
higher(key: K): K | undefined;
|
|
185
|
+
/**
|
|
186
|
+
* Returns the largest key < given key, or undefined.
|
|
187
|
+
* @remarks Time O(log n), Space O(1)
|
|
188
|
+
* @example
|
|
189
|
+
* const ms = new TreeMultiSet([10, 20, 30]);
|
|
190
|
+
* ms.lower(20); // 10
|
|
191
|
+
* ms.lower(15); // 10
|
|
192
|
+
*/
|
|
193
|
+
lower(key: K): K | undefined;
|
|
194
|
+
/**
|
|
195
|
+
* Iterates over distinct keys with their counts.
|
|
196
|
+
* @remarks Time O(n), Space O(1)
|
|
197
|
+
* @example
|
|
198
|
+
* const ms = new TreeMultiSet([1, 1, 2, 3, 3, 3]);
|
|
199
|
+
* ms.forEach((key, count) => console.log(`${key}: ${count}`));
|
|
200
|
+
* // 1: 2, 2: 1, 3: 3
|
|
201
|
+
*/
|
|
202
|
+
forEach(callback: (key: K, count: number) => void): void;
|
|
203
|
+
/**
|
|
204
|
+
* Creates a new TreeMultiSet with entries that match the predicate.
|
|
205
|
+
* @remarks Time O(n log n), Space O(n)
|
|
206
|
+
* @example
|
|
207
|
+
* const ms = new TreeMultiSet([1, 1, 2, 3, 3, 3]);
|
|
208
|
+
* const filtered = ms.filter((key, count) => count >= 2);
|
|
209
|
+
* // TreeMultiSet { 1: 2, 3: 3 }
|
|
210
|
+
*/
|
|
211
|
+
filter(predicate: (key: K, count: number) => boolean): TreeMultiSet<K>;
|
|
212
|
+
/**
|
|
213
|
+
* Reduces the multiset to a single value.
|
|
214
|
+
* @remarks Time O(n), Space O(1)
|
|
215
|
+
* @example
|
|
216
|
+
* const ms = new TreeMultiSet([1, 1, 2, 3, 3, 3]);
|
|
217
|
+
* const total = ms.reduce((acc, key, count) => acc + count, 0); // 6
|
|
218
|
+
*/
|
|
219
|
+
reduce<U>(callback: (accumulator: U, key: K, count: number) => U, initialValue: U): U;
|
|
220
|
+
/**
|
|
221
|
+
* Maps keys and counts to a new TreeMultiSet.
|
|
222
|
+
* When multiple keys map to the same new key, counts are merged (added).
|
|
223
|
+
* @remarks Time O(n log n), Space O(n)
|
|
224
|
+
* @example
|
|
225
|
+
* const ms = new TreeMultiSet([1, 1, 2, 3, 3, 3]);
|
|
226
|
+
* const mapped = ms.map((key, count) => [key * 10, count]);
|
|
227
|
+
* // TreeMultiSet { 10: 2, 20: 1, 30: 3 }
|
|
228
|
+
* @example
|
|
229
|
+
* // Collision: counts merge
|
|
230
|
+
* const ms = new TreeMultiSet([1, 2, 3]);
|
|
231
|
+
* const merged = ms.map((key, count) => [key % 2, count]);
|
|
232
|
+
* // { 0: 1, 1: 2 } (1 and 3 both map to 1, counts add)
|
|
233
|
+
*/
|
|
234
|
+
map<K2>(mapper: (key: K, count: number) => [K2, number], options?: {
|
|
235
|
+
comparator?: Comparator<K2>;
|
|
236
|
+
}): TreeMultiSet<K2>;
|
|
237
|
+
/**
|
|
238
|
+
* Creates an independent copy of this multiset.
|
|
239
|
+
* @remarks Time O(n log n), Space O(n)
|
|
240
|
+
* @example
|
|
241
|
+
* const ms = new TreeMultiSet([1, 1, 2]);
|
|
242
|
+
* const copy = ms.clone();
|
|
243
|
+
* copy.add(3);
|
|
244
|
+
* ms.has(3); // false (original unchanged)
|
|
245
|
+
*/
|
|
246
|
+
clone(): TreeMultiSet<K>;
|
|
247
|
+
/**
|
|
248
|
+
* Returns keys within the given range.
|
|
249
|
+
* @remarks Time O(log n + k), Space O(k) where k is result size
|
|
250
|
+
* @example
|
|
251
|
+
* const ms = new TreeMultiSet([10, 20, 30, 40, 50]);
|
|
252
|
+
* ms.rangeSearch([15, 45]); // [20, 30, 40]
|
|
253
|
+
*/
|
|
254
|
+
rangeSearch<C extends (key: K) => any>(range: [K, K], callback?: C): (C extends undefined ? K : ReturnType<C>)[];
|
|
255
|
+
/**
|
|
256
|
+
* Prints the internal tree structure (for debugging).
|
|
257
|
+
* @remarks Time O(n), Space O(n)
|
|
258
|
+
* @example
|
|
259
|
+
* const ms = new TreeMultiSet([1, 2, 3]);
|
|
260
|
+
* ms.print();
|
|
261
|
+
*/
|
|
262
|
+
print(): void;
|
|
263
|
+
}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TreeSet (ordered set) — a restricted, native-like API backed by RedBlackTree.
|
|
3
|
+
*
|
|
4
|
+
* Design goals:
|
|
5
|
+
* - No node exposure (no node inputs/outputs)
|
|
6
|
+
* - Native Set-like surface + Java NavigableSet-like helpers
|
|
7
|
+
* - Strict default comparator (number/string/Date), otherwise require comparator
|
|
8
|
+
*/
|
|
9
|
+
import type { Comparator } from '../../types';
|
|
10
|
+
import type { TreeSetElementCallback, TreeSetOptions, TreeSetRangeOptions, TreeSetReduceCallback } from '../../types';
|
|
11
|
+
/**
|
|
12
|
+
* An ordered Set backed by a red-black tree.
|
|
13
|
+
*
|
|
14
|
+
* - Iteration order is ascending by key.
|
|
15
|
+
* - No node exposure: all APIs use keys only.
|
|
16
|
+
*/
|
|
17
|
+
export declare class TreeSet<K = any> implements Iterable<K> {
|
|
18
|
+
#private;
|
|
19
|
+
/**
|
|
20
|
+
* Create a TreeSet from an iterable of keys.
|
|
21
|
+
*
|
|
22
|
+
* @throws {TypeError} When using the default comparator and encountering unsupported key types,
|
|
23
|
+
* or invalid keys (e.g. `NaN`, invalid `Date`).
|
|
24
|
+
*/
|
|
25
|
+
constructor(elements?: Iterable<K>, options?: TreeSetOptions<K>);
|
|
26
|
+
/**
|
|
27
|
+
* Create the strict default comparator.
|
|
28
|
+
*
|
|
29
|
+
* Supports:
|
|
30
|
+
* - `number` (rejects `NaN`; treats `-0` and `0` as equal)
|
|
31
|
+
* - `string`
|
|
32
|
+
* - `Date` (orders by `getTime()`, rejects invalid dates)
|
|
33
|
+
*
|
|
34
|
+
* For other key types, a custom comparator must be provided.
|
|
35
|
+
*/
|
|
36
|
+
static createDefaultComparator<K>(): Comparator<K>;
|
|
37
|
+
/**
|
|
38
|
+
* Number of elements in the set.
|
|
39
|
+
*/
|
|
40
|
+
get size(): number;
|
|
41
|
+
/**
|
|
42
|
+
* Whether the set is empty.
|
|
43
|
+
*/
|
|
44
|
+
isEmpty(): boolean;
|
|
45
|
+
private _validateKey;
|
|
46
|
+
/**
|
|
47
|
+
* Add a key to the set (no-op if already present).
|
|
48
|
+
* @remarks Expected time O(log n)
|
|
49
|
+
*/
|
|
50
|
+
add(key: K): this;
|
|
51
|
+
/**
|
|
52
|
+
* Test whether a key exists.
|
|
53
|
+
* @remarks Expected time O(log n)
|
|
54
|
+
*/
|
|
55
|
+
has(key: K): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Delete a key.
|
|
58
|
+
* @returns `true` if the key existed; otherwise `false`.
|
|
59
|
+
* @remarks Expected time O(log n)
|
|
60
|
+
*/
|
|
61
|
+
delete(key: K): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Remove all keys.
|
|
64
|
+
*/
|
|
65
|
+
clear(): void;
|
|
66
|
+
/**
|
|
67
|
+
* Iterate over keys in ascending order.
|
|
68
|
+
*/
|
|
69
|
+
keys(): IterableIterator<K>;
|
|
70
|
+
/**
|
|
71
|
+
* Iterate over values in ascending order.
|
|
72
|
+
*
|
|
73
|
+
* Note: for Set-like containers, `values()` is the same as `keys()`.
|
|
74
|
+
*/
|
|
75
|
+
values(): IterableIterator<K>;
|
|
76
|
+
/**
|
|
77
|
+
* Iterate over `[value, value]` pairs (native Set convention).
|
|
78
|
+
*
|
|
79
|
+
* Note: TreeSet stores only keys internally; `[k, k]` is created on-the-fly during iteration.
|
|
80
|
+
*/
|
|
81
|
+
entries(): IterableIterator<[K, K]>;
|
|
82
|
+
[Symbol.iterator](): IterableIterator<K>;
|
|
83
|
+
/**
|
|
84
|
+
* Visit each value in ascending order.
|
|
85
|
+
*
|
|
86
|
+
* Callback follows native Set convention: `(value, value2, set)`.
|
|
87
|
+
*/
|
|
88
|
+
forEach(cb: (value: K, value2: K, set: TreeSet<K>) => void, thisArg?: any): void;
|
|
89
|
+
/**
|
|
90
|
+
* Create a new TreeSet by mapping each value to a new key.
|
|
91
|
+
*
|
|
92
|
+
* This mirrors `RedBlackTree.map`: mapping produces a new ordered container.
|
|
93
|
+
* @remarks Time O(n log n) expected, Space O(n)
|
|
94
|
+
*/
|
|
95
|
+
map<MK>(callbackfn: TreeSetElementCallback<K, MK, TreeSet<K>>, options?: TreeSetOptions<MK>, thisArg?: unknown): TreeSet<MK>;
|
|
96
|
+
/**
|
|
97
|
+
* Create a new TreeSet containing only values that satisfy the predicate.
|
|
98
|
+
* @remarks Time O(n log n) expected, Space O(n)
|
|
99
|
+
*/
|
|
100
|
+
filter(callbackfn: TreeSetElementCallback<K, boolean, TreeSet<K>>, thisArg?: unknown): TreeSet<K>;
|
|
101
|
+
/**
|
|
102
|
+
* Reduce values into a single accumulator.
|
|
103
|
+
* @remarks Time O(n), Space O(1)
|
|
104
|
+
*/
|
|
105
|
+
reduce<A>(callbackfn: TreeSetReduceCallback<K, A, TreeSet<K>>, initialValue: A): A;
|
|
106
|
+
/**
|
|
107
|
+
* Test whether all values satisfy a predicate.
|
|
108
|
+
* @remarks Time O(n), Space O(1)
|
|
109
|
+
*/
|
|
110
|
+
every(callbackfn: TreeSetElementCallback<K, boolean, TreeSet<K>>, thisArg?: unknown): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Test whether any value satisfies a predicate.
|
|
113
|
+
* @remarks Time O(n), Space O(1)
|
|
114
|
+
*/
|
|
115
|
+
some(callbackfn: TreeSetElementCallback<K, boolean, TreeSet<K>>, thisArg?: unknown): boolean;
|
|
116
|
+
/**
|
|
117
|
+
* Find the first value that satisfies a predicate.
|
|
118
|
+
* @remarks Time O(n), Space O(1)
|
|
119
|
+
*/
|
|
120
|
+
find(callbackfn: TreeSetElementCallback<K, boolean, TreeSet<K>>, thisArg?: unknown): K | undefined;
|
|
121
|
+
/**
|
|
122
|
+
* Materialize the set into an array of keys.
|
|
123
|
+
* @remarks Time O(n), Space O(n)
|
|
124
|
+
*/
|
|
125
|
+
toArray(): K[];
|
|
126
|
+
/**
|
|
127
|
+
* Print a human-friendly representation.
|
|
128
|
+
* @remarks Time O(n), Space O(n)
|
|
129
|
+
*/
|
|
130
|
+
print(): void;
|
|
131
|
+
/**
|
|
132
|
+
* Smallest key in the set.
|
|
133
|
+
*/
|
|
134
|
+
first(): K | undefined;
|
|
135
|
+
/**
|
|
136
|
+
* Largest key in the set.
|
|
137
|
+
*/
|
|
138
|
+
last(): K | undefined;
|
|
139
|
+
/**
|
|
140
|
+
* Remove and return the smallest key.
|
|
141
|
+
*/
|
|
142
|
+
pollFirst(): K | undefined;
|
|
143
|
+
/**
|
|
144
|
+
* Remove and return the largest key.
|
|
145
|
+
*/
|
|
146
|
+
pollLast(): K | undefined;
|
|
147
|
+
/**
|
|
148
|
+
* Smallest key that is >= the given key.
|
|
149
|
+
*/
|
|
150
|
+
ceiling(key: K): K | undefined;
|
|
151
|
+
/**
|
|
152
|
+
* Largest key that is <= the given key.
|
|
153
|
+
*/
|
|
154
|
+
floor(key: K): K | undefined;
|
|
155
|
+
/**
|
|
156
|
+
* Smallest key that is > the given key.
|
|
157
|
+
*/
|
|
158
|
+
higher(key: K): K | undefined;
|
|
159
|
+
/**
|
|
160
|
+
* Largest key that is < the given key.
|
|
161
|
+
*/
|
|
162
|
+
lower(key: K): K | undefined;
|
|
163
|
+
/**
|
|
164
|
+
* Return all keys in a given range.
|
|
165
|
+
*
|
|
166
|
+
* @param range `[low, high]`
|
|
167
|
+
* @param options Inclusive/exclusive bounds (defaults to inclusive).
|
|
168
|
+
*/
|
|
169
|
+
rangeSearch(range: [K, K], options?: TreeSetRangeOptions): K[];
|
|
170
|
+
}
|
|
@@ -11,7 +11,7 @@ export interface IBinaryTree<K = any, V = any, R = any> {
|
|
|
11
11
|
readonly isMapMode: boolean;
|
|
12
12
|
iterationType: IterationType;
|
|
13
13
|
readonly NIL: BinaryTreeNode<K, V>;
|
|
14
|
-
readonly store: Map<K, V
|
|
14
|
+
readonly store: Map<K, BinaryTreeNode<K, V>>;
|
|
15
15
|
readonly toEntryFn?: ToEntryFn<K, V, R>;
|
|
16
16
|
readonly isDuplicate: boolean;
|
|
17
17
|
createNode(key: K, value?: BinaryTreeNode<K, V>['value']): BinaryTreeNode<K, V>;
|
|
@@ -2,8 +2,8 @@ export * from './binary-tree';
|
|
|
2
2
|
export * from './bst';
|
|
3
3
|
export * from './avl-tree';
|
|
4
4
|
export * from './segment-tree';
|
|
5
|
-
export * from './avl-tree-multi-map';
|
|
6
5
|
export * from './red-black-tree';
|
|
7
6
|
export * from './tree-multi-map';
|
|
8
|
-
export * from './tree-
|
|
9
|
-
export * from './
|
|
7
|
+
export * from './tree-set';
|
|
8
|
+
export * from './tree-map';
|
|
9
|
+
export * from './tree-multi-set';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Comparator } from '../../common';
|
|
2
|
+
export interface TreeMapOptions<K> {
|
|
3
|
+
comparator?: Comparator<K>;
|
|
4
|
+
/**
|
|
5
|
+
* Pass-through to the underlying RedBlackTree/BST `isMapMode` option.
|
|
6
|
+
*
|
|
7
|
+
* - `true` (default in core): store values in an internal key→value store.
|
|
8
|
+
* - `false`: store values on tree nodes (Node Mode).
|
|
9
|
+
*/
|
|
10
|
+
isMapMode?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export type TreeMapRangeOptions = {
|
|
13
|
+
lowInclusive?: boolean;
|
|
14
|
+
highInclusive?: boolean;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Callback used by TreeMap entry-wise utilities.
|
|
18
|
+
*
|
|
19
|
+
* `SELF` is intentionally generic to avoid type-layer circular imports.
|
|
20
|
+
* Implementations (e.g. `TreeMap<K, V>`) should bind `SELF` at use sites.
|
|
21
|
+
*/
|
|
22
|
+
export type TreeMapEntryCallback<K, V, R, SELF> = (value: V | undefined, key: K, index: number, map: SELF) => R;
|
|
23
|
+
/**
|
|
24
|
+
* Reducer callback used by TreeMap.
|
|
25
|
+
*
|
|
26
|
+
* `SELF` is intentionally generic to avoid type-layer circular imports.
|
|
27
|
+
*/
|
|
28
|
+
export type TreeMapReduceCallback<K, V, A, SELF> = (acc: A, value: V | undefined, key: K, index: number, map: SELF) => A;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Comparator } from '../../common';
|
|
2
|
+
export interface TreeMultiSetOptions<K> {
|
|
3
|
+
comparator?: Comparator<K>;
|
|
4
|
+
/**
|
|
5
|
+
* Pass-through to the underlying RedBlackTree/BST `isMapMode` option.
|
|
6
|
+
*
|
|
7
|
+
* - `true` (recommended): MapMode store uses key→node index for fast lookups.
|
|
8
|
+
* - `false`: Node Mode.
|
|
9
|
+
*/
|
|
10
|
+
isMapMode?: boolean;
|
|
11
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Comparator } from '../../common';
|
|
2
|
+
export interface TreeSetOptions<K> {
|
|
3
|
+
comparator?: Comparator<K>;
|
|
4
|
+
/**
|
|
5
|
+
* Pass-through to the underlying RedBlackTree/BST `isMapMode` option.
|
|
6
|
+
*
|
|
7
|
+
* - `true` (default in core): store values in an internal key→value store.
|
|
8
|
+
* - `false`: store values on tree nodes (Node Mode).
|
|
9
|
+
*/
|
|
10
|
+
isMapMode?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export type TreeSetRangeOptions = {
|
|
13
|
+
lowInclusive?: boolean;
|
|
14
|
+
highInclusive?: boolean;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Callback used by TreeSet element-wise utilities.
|
|
18
|
+
*
|
|
19
|
+
* `SELF` is intentionally generic to avoid type-layer circular imports.
|
|
20
|
+
* Implementations (e.g. `TreeSet<K>`) should bind `SELF` at use sites.
|
|
21
|
+
*/
|
|
22
|
+
export type TreeSetElementCallback<K, R, SELF> = (value: K, index: number, set: SELF) => R;
|
|
23
|
+
/**
|
|
24
|
+
* Reducer callback used by TreeSet.
|
|
25
|
+
*
|
|
26
|
+
* `SELF` is intentionally generic to avoid type-layer circular imports.
|
|
27
|
+
*/
|
|
28
|
+
export type TreeSetReduceCallback<K, A, SELF> = (acc: A, value: K, index: number, set: SELF) => A;
|