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
|
@@ -1,587 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* data-structure-typed
|
|
3
|
-
*
|
|
4
|
-
* @author Pablo Zeng
|
|
5
|
-
* @copyright Copyright (c) 2022 Pablo Zeng <zrwusa@gmail.com>
|
|
6
|
-
* @license MIT License
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import type {
|
|
10
|
-
BinaryTreeDeleteResult,
|
|
11
|
-
BSTNOptKeyOrNode, BTNRep,
|
|
12
|
-
EntryCallback,
|
|
13
|
-
FamilyPosition,
|
|
14
|
-
IterationType, NodePredicate,
|
|
15
|
-
OptNode,
|
|
16
|
-
RBTNColor,
|
|
17
|
-
TreeCounterOptions
|
|
18
|
-
} from '../../types';
|
|
19
|
-
import { BSTNode } from './bst';
|
|
20
|
-
import { IBinaryTree } from '../../interfaces';
|
|
21
|
-
import { RedBlackTree, RedBlackTreeNode } from './red-black-tree';
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* RB-tree node with an extra 'count' field; keeps parent/child links.
|
|
25
|
-
* @remarks Time O(1), Space O(1)
|
|
26
|
-
* @template K
|
|
27
|
-
* @template V
|
|
28
|
-
*/
|
|
29
|
-
export class TreeCounterNode<K = any, V = any> {
|
|
30
|
-
key: K;
|
|
31
|
-
value?: V;
|
|
32
|
-
parent?: TreeCounterNode<K, V> = undefined;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Create a tree counter node.
|
|
36
|
-
* @remarks Time O(1), Space O(1)
|
|
37
|
-
* @param key - Key of the node.
|
|
38
|
-
* @param [value] - Value associated with the key (ignored in map mode).
|
|
39
|
-
* @param [count] - Initial count for this node (default 1).
|
|
40
|
-
* @param color - Initial color ('RED' or 'BLACK').
|
|
41
|
-
* @returns New TreeCounterNode instance.
|
|
42
|
-
*/
|
|
43
|
-
constructor(key: K, value?: V, count = 1, color: RBTNColor = 'BLACK') {
|
|
44
|
-
this.key = key;
|
|
45
|
-
this.value = value;
|
|
46
|
-
this.color = color;
|
|
47
|
-
this.count = count;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
_left?: TreeCounterNode<K, V> | null | undefined = undefined;
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Get the left child pointer.
|
|
54
|
-
* @remarks Time O(1), Space O(1)
|
|
55
|
-
* @returns Left child node, or null/undefined.
|
|
56
|
-
*/
|
|
57
|
-
get left(): TreeCounterNode<K, V> | null | undefined {
|
|
58
|
-
return this._left;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Set the left child and update its parent pointer.
|
|
63
|
-
* @remarks Time O(1), Space O(1)
|
|
64
|
-
* @param v - New left child node, or null/undefined.
|
|
65
|
-
* @returns void
|
|
66
|
-
*/
|
|
67
|
-
set left(v: TreeCounterNode<K, V> | null | undefined) {
|
|
68
|
-
if (v) {
|
|
69
|
-
v.parent = this;
|
|
70
|
-
}
|
|
71
|
-
this._left = v;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
_right?: TreeCounterNode<K, V> | null | undefined = undefined;
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Get the right child pointer.
|
|
78
|
-
* @remarks Time O(1), Space O(1)
|
|
79
|
-
* @returns Right child node, or null/undefined.
|
|
80
|
-
*/
|
|
81
|
-
get right(): TreeCounterNode<K, V> | null | undefined {
|
|
82
|
-
return this._right;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Set the right child and update its parent pointer.
|
|
87
|
-
* @remarks Time O(1), Space O(1)
|
|
88
|
-
* @param v - New right child node, or null/undefined.
|
|
89
|
-
* @returns void
|
|
90
|
-
*/
|
|
91
|
-
set right(v: TreeCounterNode<K, V> | null | undefined) {
|
|
92
|
-
if (v) {
|
|
93
|
-
v.parent = this;
|
|
94
|
-
}
|
|
95
|
-
this._right = v;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
_height: number = 0;
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Gets the height of the node (used in self-balancing trees).
|
|
102
|
-
* @remarks Time O(1), Space O(1)
|
|
103
|
-
*
|
|
104
|
-
* @returns The height.
|
|
105
|
-
*/
|
|
106
|
-
get height(): number {
|
|
107
|
-
return this._height;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Sets the height of the node.
|
|
112
|
-
* @remarks Time O(1), Space O(1)
|
|
113
|
-
*
|
|
114
|
-
* @param value - The new height.
|
|
115
|
-
*/
|
|
116
|
-
set height(value: number) {
|
|
117
|
-
this._height = value;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
_color: RBTNColor = 'BLACK';
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Gets the color of the node (used in Red-Black trees).
|
|
124
|
-
* @remarks Time O(1), Space O(1)
|
|
125
|
-
*
|
|
126
|
-
* @returns The node's color.
|
|
127
|
-
*/
|
|
128
|
-
get color(): RBTNColor {
|
|
129
|
-
return this._color;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Sets the color of the node.
|
|
134
|
-
* @remarks Time O(1), Space O(1)
|
|
135
|
-
*
|
|
136
|
-
* @param value - The new color.
|
|
137
|
-
*/
|
|
138
|
-
set color(value: RBTNColor) {
|
|
139
|
-
this._color = value;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
_count: number = 1;
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Gets the count of nodes in the subtree rooted at this node (used in order-statistic trees).
|
|
146
|
-
* @remarks Time O(1), Space O(1)
|
|
147
|
-
*
|
|
148
|
-
* @returns The subtree node count.
|
|
149
|
-
*/
|
|
150
|
-
get count(): number {
|
|
151
|
-
return this._count;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Sets the count of nodes in the subtree.
|
|
156
|
-
* @remarks Time O(1), Space O(1)
|
|
157
|
-
*
|
|
158
|
-
* @param value - The new count.
|
|
159
|
-
*/
|
|
160
|
-
set count(value: number) {
|
|
161
|
-
this._count = value;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* Gets the position of the node relative to its parent.
|
|
166
|
-
* @remarks Time O(1), Space O(1)
|
|
167
|
-
*
|
|
168
|
-
* @returns The family position (e.g., 'ROOT', 'LEFT', 'RIGHT').
|
|
169
|
-
*/
|
|
170
|
-
get familyPosition(): FamilyPosition {
|
|
171
|
-
if (!this.parent) {
|
|
172
|
-
return this.left || this.right ? 'ROOT' : 'ISOLATED';
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
if (this.parent.left === this) {
|
|
176
|
-
return this.left || this.right ? 'ROOT_LEFT' : 'LEFT';
|
|
177
|
-
} else if (this.parent.right === this) {
|
|
178
|
-
return this.left || this.right ? 'ROOT_RIGHT' : 'RIGHT';
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
return 'MAL_NODE';
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* Red-Black Tree–based counter map (key → value with per-node count). Supports O(log N) updates and map-like mode.
|
|
187
|
-
* @remarks Time O(1), Space O(1)
|
|
188
|
-
* @template K
|
|
189
|
-
* @template V
|
|
190
|
-
* @template R
|
|
191
|
-
*/
|
|
192
|
-
export class TreeCounter<K = any, V = any, R = any> extends RedBlackTree<K, V, R> implements IBinaryTree<K, V, R> {
|
|
193
|
-
/**
|
|
194
|
-
* Create a TreeCounter and optionally bulk-insert items.
|
|
195
|
-
* @remarks Time O(N log N), Space O(N)
|
|
196
|
-
* @param [keysNodesEntriesOrRaws] - Iterable of keys/nodes/entries/raw items to insert.
|
|
197
|
-
* @param [options] - Options for TreeCounter (comparator, reverse, map mode).
|
|
198
|
-
* @returns New TreeCounter instance.
|
|
199
|
-
*/
|
|
200
|
-
constructor(
|
|
201
|
-
keysNodesEntriesOrRaws: Iterable<
|
|
202
|
-
K | TreeCounterNode<K, V> | [K | null | undefined, V | undefined] | null | undefined | R
|
|
203
|
-
> = [],
|
|
204
|
-
options?: TreeCounterOptions<K, V, R>
|
|
205
|
-
) {
|
|
206
|
-
super([], options);
|
|
207
|
-
if (keysNodesEntriesOrRaws) this.setMany(keysNodesEntriesOrRaws);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
protected _count = 0;
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* Get the total aggregate count across all nodes.
|
|
214
|
-
* @remarks Time O(1), Space O(1)
|
|
215
|
-
* @returns Total count.
|
|
216
|
-
*/
|
|
217
|
-
|
|
218
|
-
get count(): number {
|
|
219
|
-
return this._count;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* Compute the total count by traversing the tree (sums node.count).
|
|
224
|
-
* @remarks Time O(N), Space O(H)
|
|
225
|
-
* @returns Total count recomputed from nodes.
|
|
226
|
-
*/
|
|
227
|
-
|
|
228
|
-
getComputedCount(): number {
|
|
229
|
-
let sum = 0;
|
|
230
|
-
this.dfs(node => (sum += node ? node.count : 0));
|
|
231
|
-
return sum;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
override createNode(key: K, value?: V, color: RBTNColor = 'BLACK', count?: number): TreeCounterNode<K, V> {
|
|
235
|
-
return new TreeCounterNode(key, this._isMapMode ? undefined : value, count, color) as TreeCounterNode<K, V>;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
/**
|
|
239
|
-
* Type guard: check whether the input is a TreeCounterNode.
|
|
240
|
-
* @remarks Time O(1), Space O(1)
|
|
241
|
-
* @returns True if the value is a TreeCounterNode.
|
|
242
|
-
*/
|
|
243
|
-
|
|
244
|
-
override isNode(
|
|
245
|
-
keyNodeOrEntry: K | TreeCounterNode<K, V> | [K | null | undefined, V | undefined] | null | undefined
|
|
246
|
-
): keyNodeOrEntry is TreeCounterNode<K, V> {
|
|
247
|
-
return keyNodeOrEntry instanceof TreeCounterNode;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* Insert or increment a node and update aggregate count.
|
|
252
|
-
* @remarks Time O(log N), Space O(1)
|
|
253
|
-
* @param keyNodeOrEntry - Key, node, or [key, value] entry to insert.
|
|
254
|
-
* @param [value] - Value when a bare key is provided (ignored in map mode).
|
|
255
|
-
* @param [count] - How much to increase the node's count (default 1).
|
|
256
|
-
* @returns True if inserted/updated; false if ignored.
|
|
257
|
-
*/
|
|
258
|
-
override set(
|
|
259
|
-
keyNodeOrEntry: K | TreeCounterNode<K, V> | [K | null | undefined, V | undefined] | null | undefined,
|
|
260
|
-
value?: V,
|
|
261
|
-
count = 1
|
|
262
|
-
): boolean {
|
|
263
|
-
const [newNode, newValue] = this._keyValueNodeOrEntryToNodeAndValue(keyNodeOrEntry, value, count);
|
|
264
|
-
const orgCount = newNode?.count || 0;
|
|
265
|
-
const isSuccessAdded = super.set(newNode, newValue);
|
|
266
|
-
if (isSuccessAdded) {
|
|
267
|
-
this._count += orgCount;
|
|
268
|
-
return true;
|
|
269
|
-
} else {
|
|
270
|
-
return false;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
* Delete a node (or decrement its count) and rebalance if needed.
|
|
276
|
-
* @remarks Time O(log N), Space O(1)
|
|
277
|
-
* @param keyNodeEntryRawOrPredicate - Key, node, or [key, value] entry identifying the node.
|
|
278
|
-
* @param [ignoreCount] - If true, remove the node regardless of its count.
|
|
279
|
-
* @returns Array of deletion results including deleted node and a rebalance hint when present.
|
|
280
|
-
*/
|
|
281
|
-
override delete(
|
|
282
|
-
keyNodeEntryRawOrPredicate: BTNRep<K, V, TreeCounterNode<K, V>> | NodePredicate<TreeCounterNode<K, V> | null>,
|
|
283
|
-
ignoreCount = false
|
|
284
|
-
): BinaryTreeDeleteResult<TreeCounterNode<K, V>>[] {
|
|
285
|
-
if (keyNodeEntryRawOrPredicate === null) return [];
|
|
286
|
-
|
|
287
|
-
const results: BinaryTreeDeleteResult<TreeCounterNode<K, V>>[] = [];
|
|
288
|
-
|
|
289
|
-
let nodeToDelete: OptNode<TreeCounterNode<K, V>>;
|
|
290
|
-
if (this._isPredicate(keyNodeEntryRawOrPredicate)) nodeToDelete = this.getNode(keyNodeEntryRawOrPredicate);
|
|
291
|
-
else nodeToDelete = this.isRealNode(keyNodeEntryRawOrPredicate) ? keyNodeEntryRawOrPredicate : this.getNode(keyNodeEntryRawOrPredicate);
|
|
292
|
-
if (!nodeToDelete) {
|
|
293
|
-
return results;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
let originalColor = nodeToDelete.color;
|
|
297
|
-
let replacementNode: TreeCounterNode<K, V> | undefined;
|
|
298
|
-
|
|
299
|
-
if (!this.isRealNode(nodeToDelete.left)) {
|
|
300
|
-
if (nodeToDelete.right !== null) replacementNode = nodeToDelete.right;
|
|
301
|
-
if (ignoreCount || nodeToDelete.count <= 1) {
|
|
302
|
-
if (nodeToDelete.right !== null) {
|
|
303
|
-
this._transplant(nodeToDelete, nodeToDelete.right);
|
|
304
|
-
this._count -= nodeToDelete.count;
|
|
305
|
-
}
|
|
306
|
-
} else {
|
|
307
|
-
nodeToDelete.count--;
|
|
308
|
-
this._count--;
|
|
309
|
-
results.push({ deleted: nodeToDelete, needBalanced: undefined });
|
|
310
|
-
return results;
|
|
311
|
-
}
|
|
312
|
-
} else if (!this.isRealNode(nodeToDelete.right)) {
|
|
313
|
-
replacementNode = nodeToDelete.left;
|
|
314
|
-
if (ignoreCount || nodeToDelete.count <= 1) {
|
|
315
|
-
this._transplant(nodeToDelete, nodeToDelete.left);
|
|
316
|
-
this._count -= nodeToDelete.count;
|
|
317
|
-
} else {
|
|
318
|
-
nodeToDelete.count--;
|
|
319
|
-
this._count--;
|
|
320
|
-
results.push({ deleted: nodeToDelete, needBalanced: undefined });
|
|
321
|
-
return results;
|
|
322
|
-
}
|
|
323
|
-
} else {
|
|
324
|
-
const successor = this.getLeftMost(node => node, nodeToDelete.right);
|
|
325
|
-
if (successor) {
|
|
326
|
-
originalColor = successor.color;
|
|
327
|
-
if (successor.right !== null) replacementNode = successor.right;
|
|
328
|
-
if (successor.parent === nodeToDelete) {
|
|
329
|
-
if (this.isRealNode(replacementNode)) {
|
|
330
|
-
replacementNode.parent = successor;
|
|
331
|
-
}
|
|
332
|
-
} else {
|
|
333
|
-
if (ignoreCount || nodeToDelete.count <= 1) {
|
|
334
|
-
// Removing the successor from its original position should NOT change total count;
|
|
335
|
-
// only removing the target node should affect the aggregate count.
|
|
336
|
-
if (successor.right !== null) {
|
|
337
|
-
this._transplant(successor, successor.right);
|
|
338
|
-
}
|
|
339
|
-
} else {
|
|
340
|
-
nodeToDelete.count--;
|
|
341
|
-
this._count--;
|
|
342
|
-
results.push({ deleted: nodeToDelete, needBalanced: undefined });
|
|
343
|
-
return results;
|
|
344
|
-
}
|
|
345
|
-
successor.right = nodeToDelete.right;
|
|
346
|
-
if (this.isRealNode(successor.right)) {
|
|
347
|
-
successor.right.parent = successor;
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
if (ignoreCount || nodeToDelete.count <= 1) {
|
|
351
|
-
this._transplant(nodeToDelete, successor);
|
|
352
|
-
this._count -= nodeToDelete.count;
|
|
353
|
-
} else {
|
|
354
|
-
nodeToDelete.count--;
|
|
355
|
-
this._count--;
|
|
356
|
-
results.push({ deleted: nodeToDelete, needBalanced: undefined });
|
|
357
|
-
return results;
|
|
358
|
-
}
|
|
359
|
-
successor.left = nodeToDelete.left;
|
|
360
|
-
if (this.isRealNode(successor.left)) {
|
|
361
|
-
successor.left.parent = successor;
|
|
362
|
-
}
|
|
363
|
-
successor.color = nodeToDelete.color;
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
this._size--;
|
|
367
|
-
if (originalColor === 'BLACK') {
|
|
368
|
-
this._deleteFixup(replacementNode);
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
results.push({ deleted: nodeToDelete, needBalanced: undefined });
|
|
372
|
-
|
|
373
|
-
return results;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
/**
|
|
377
|
-
* Remove all nodes and reset aggregate counters.
|
|
378
|
-
* @remarks Time O(N), Space O(1)
|
|
379
|
-
* @returns void
|
|
380
|
-
*/
|
|
381
|
-
override clear() {
|
|
382
|
-
super.clear();
|
|
383
|
-
this._count = 0;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
/**
|
|
387
|
-
* Rebuild the tree into a perfectly balanced form using in-order nodes.
|
|
388
|
-
* @remarks Time O(N), Space O(N)
|
|
389
|
-
* @param [iterationType] - Traversal style to use when constructing the balanced tree.
|
|
390
|
-
* @returns True if rebalancing succeeded (tree not empty).
|
|
391
|
-
*/
|
|
392
|
-
override perfectlyBalance(iterationType: IterationType = this.iterationType): boolean {
|
|
393
|
-
const nodes = this.dfs(node => node, 'IN', false, this._root, iterationType);
|
|
394
|
-
const n = nodes.length;
|
|
395
|
-
if (n < 1) return false;
|
|
396
|
-
|
|
397
|
-
let total = 0;
|
|
398
|
-
for (const nd of nodes) total += nd ? nd.count : 0;
|
|
399
|
-
|
|
400
|
-
this._clearNodes();
|
|
401
|
-
|
|
402
|
-
const build = (l: number, r: number, parent?: TreeCounterNode<K, V>): TreeCounterNode<K, V> | undefined => {
|
|
403
|
-
if (l > r) return undefined;
|
|
404
|
-
const m = l + ((r - l) >> 1);
|
|
405
|
-
const root = nodes[m]! as TreeCounterNode<K, V>;
|
|
406
|
-
const leftChild = build(l, m - 1, root);
|
|
407
|
-
const rightChild = build(m + 1, r, root);
|
|
408
|
-
root.left = leftChild;
|
|
409
|
-
root.right = rightChild;
|
|
410
|
-
root.parent = parent;
|
|
411
|
-
return root;
|
|
412
|
-
};
|
|
413
|
-
|
|
414
|
-
const newRoot = build(0, n - 1, undefined);
|
|
415
|
-
this._setRoot(newRoot);
|
|
416
|
-
this._size = n;
|
|
417
|
-
this._count = total;
|
|
418
|
-
return true;
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
/**
|
|
422
|
-
* Create a new TreeCounter by mapping each [key, value] entry.
|
|
423
|
-
* @remarks Time O(N log N), Space O(N)
|
|
424
|
-
* @template MK
|
|
425
|
-
* @template MV
|
|
426
|
-
* @template MR
|
|
427
|
-
* @param callback - Function mapping (key, value, index, tree) → [newKey, newValue].
|
|
428
|
-
* @param [options] - Options for the output tree.
|
|
429
|
-
* @param [thisArg] - Value for `this` inside the callback.
|
|
430
|
-
* @returns A new TreeCounter with mapped entries.
|
|
431
|
-
*/
|
|
432
|
-
override map<MK = K, MV = V, MR = any>(
|
|
433
|
-
callback: EntryCallback<K, V | undefined, [MK, MV]>,
|
|
434
|
-
options?: Partial<TreeCounterOptions<MK, MV, MR>>,
|
|
435
|
-
thisArg?: unknown
|
|
436
|
-
): TreeCounter<MK, MV, MR> {
|
|
437
|
-
const out = this._createLike<MK, MV, MR>([], options);
|
|
438
|
-
|
|
439
|
-
let index = 0;
|
|
440
|
-
for (const [key, value] of this) {
|
|
441
|
-
out.set(callback.call(thisArg, value, key, index++, this));
|
|
442
|
-
}
|
|
443
|
-
return out;
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
/**
|
|
447
|
-
* Deep copy this tree, preserving map mode and aggregate counts.
|
|
448
|
-
* @remarks Time O(N), Space O(N)
|
|
449
|
-
* @returns A deep copy of this tree.
|
|
450
|
-
*/
|
|
451
|
-
override clone(): this {
|
|
452
|
-
const out = this._createInstance<K, V, R>();
|
|
453
|
-
this._clone(out as unknown as any);
|
|
454
|
-
|
|
455
|
-
// Preserve aggregate count and per-node counts.
|
|
456
|
-
(out as any)._count = (this as any)._count;
|
|
457
|
-
|
|
458
|
-
// NOTE: RedBlackTree._clone copies structure/keys/values, but TreeCounter nodes also track `count`.
|
|
459
|
-
// Copy counts by key to keep getComputedCount() consistent.
|
|
460
|
-
for (const node of this.dfs(n => n, 'IN')) {
|
|
461
|
-
if (!node) continue;
|
|
462
|
-
const outNode = (out as unknown as TreeCounter<K, V, R>).getNode(node.key) as any;
|
|
463
|
-
if (outNode) outNode.count = node.count;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
return out as unknown as this;
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
/**
|
|
470
|
-
* (Protected) Create an empty instance of the same concrete class.
|
|
471
|
-
* @remarks Time O(1), Space O(1)
|
|
472
|
-
* @template TK
|
|
473
|
-
* @template TV
|
|
474
|
-
* @template TR
|
|
475
|
-
* @param [options] - Optional constructor options for the like-kind instance.
|
|
476
|
-
* @returns An empty like-kind instance.
|
|
477
|
-
*/
|
|
478
|
-
protected override _createInstance<TK = K, TV = V, TR = R>(options?: Partial<TreeCounterOptions<TK, TV, TR>>): this {
|
|
479
|
-
const Ctor = this.constructor as unknown as new (
|
|
480
|
-
iter?: Iterable<TK | BSTNode<TK, TV> | [TK | null | undefined, TV | undefined] | null | undefined | TR>,
|
|
481
|
-
opts?: TreeCounterOptions<TK, TV, TR>
|
|
482
|
-
) => this;
|
|
483
|
-
return new Ctor([], { ...this._snapshotOptions<TK, TV, TR>(), ...(options ?? {}) }) as unknown as this;
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
/**
|
|
487
|
-
* (Protected) Create a like-kind instance and seed it from an iterable.
|
|
488
|
-
* @remarks Time O(N log N), Space O(N)
|
|
489
|
-
* @template TK
|
|
490
|
-
* @template TV
|
|
491
|
-
* @template TR
|
|
492
|
-
* @param iter - Iterable used to seed the new tree.
|
|
493
|
-
* @param [options] - Options merged with the current snapshot.
|
|
494
|
-
* @returns A like-kind TreeCounter built from the iterable.
|
|
495
|
-
*/
|
|
496
|
-
protected override _createLike<TK = K, TV = V, TR = R>(
|
|
497
|
-
iter: Iterable<TK | BSTNode<TK, TV> | [TK | null | undefined, TV | undefined] | null | undefined | TR> = [],
|
|
498
|
-
options?: Partial<TreeCounterOptions<TK, TV, TR>>
|
|
499
|
-
): TreeCounter<TK, TV, TR> {
|
|
500
|
-
const Ctor = this.constructor as unknown as new (
|
|
501
|
-
iter?: Iterable<TK | BSTNode<TK, TV> | [TK | null | undefined, TV | undefined] | null | undefined | TR>,
|
|
502
|
-
opts?: TreeCounterOptions<TK, TV, TR>
|
|
503
|
-
) => TreeCounter<TK, TV, TR>;
|
|
504
|
-
return new Ctor(iter as unknown as Iterable<TK | any>, {
|
|
505
|
-
...this._snapshotOptions<TK, TV, TR>(),
|
|
506
|
-
...(options ?? {})
|
|
507
|
-
});
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
/**
|
|
511
|
-
* (Protected) Normalize input into a node plus its effective value and count.
|
|
512
|
-
* @remarks Time O(1), Space O(1)
|
|
513
|
-
* @param keyNodeOrEntry - Key, node, or [key, value] entry.
|
|
514
|
-
* @param [value] - Value used when a bare key is provided.
|
|
515
|
-
* @param [count] - Count increment to apply (default 1).
|
|
516
|
-
* @returns Tuple [node, value] where node may be undefined.
|
|
517
|
-
*/
|
|
518
|
-
protected override _keyValueNodeOrEntryToNodeAndValue(
|
|
519
|
-
keyNodeOrEntry: K | TreeCounterNode<K, V> | [K | null | undefined, V | undefined] | null | undefined,
|
|
520
|
-
value?: V,
|
|
521
|
-
count = 1
|
|
522
|
-
): [TreeCounterNode<K, V> | undefined, V | undefined] {
|
|
523
|
-
if (keyNodeOrEntry === undefined || keyNodeOrEntry === null) return [undefined, undefined];
|
|
524
|
-
|
|
525
|
-
if (this.isNode(keyNodeOrEntry)) return [keyNodeOrEntry, value];
|
|
526
|
-
|
|
527
|
-
if (this.isEntry(keyNodeOrEntry)) {
|
|
528
|
-
const [key, entryValue] = keyNodeOrEntry;
|
|
529
|
-
if (key === undefined || key === null) return [undefined, undefined];
|
|
530
|
-
const finalValue = value ?? entryValue;
|
|
531
|
-
return [this.createNode(key, finalValue, 'BLACK', count), finalValue];
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
return [this.createNode(keyNodeOrEntry, value, 'BLACK', count), value];
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
/**
|
|
538
|
-
* (Protected) Swap keys/values/counters between the source and destination nodes.
|
|
539
|
-
* @remarks Time O(1), Space O(1)
|
|
540
|
-
* @param srcNode - Source node (or key) whose properties will be moved.
|
|
541
|
-
* @param destNode - Destination node (or key) to receive properties.
|
|
542
|
-
* @returns Destination node after swap, or undefined.
|
|
543
|
-
*/
|
|
544
|
-
protected override _swapProperties(
|
|
545
|
-
srcNode: BSTNOptKeyOrNode<K, TreeCounterNode<K, V>>,
|
|
546
|
-
destNode: BSTNOptKeyOrNode<K, TreeCounterNode<K, V>>
|
|
547
|
-
): TreeCounterNode<K, V> | undefined {
|
|
548
|
-
srcNode = this.ensureNode(srcNode);
|
|
549
|
-
destNode = this.ensureNode(destNode);
|
|
550
|
-
if (srcNode && destNode) {
|
|
551
|
-
const { key, value, count, color } = destNode;
|
|
552
|
-
const tempNode = this.createNode(key, value, color, count);
|
|
553
|
-
if (tempNode) {
|
|
554
|
-
tempNode.color = color;
|
|
555
|
-
|
|
556
|
-
destNode.key = srcNode.key;
|
|
557
|
-
if (!this._isMapMode) destNode.value = srcNode.value;
|
|
558
|
-
destNode.count = srcNode.count;
|
|
559
|
-
destNode.color = srcNode.color;
|
|
560
|
-
|
|
561
|
-
srcNode.key = tempNode.key;
|
|
562
|
-
if (!this._isMapMode) srcNode.value = tempNode.value;
|
|
563
|
-
srcNode.count = tempNode.count;
|
|
564
|
-
srcNode.color = tempNode.color;
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
return destNode;
|
|
568
|
-
}
|
|
569
|
-
return undefined;
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
/**
|
|
573
|
-
* (Protected) Replace one node by another and adjust counters accordingly.
|
|
574
|
-
* @remarks Time O(1), Space O(1)
|
|
575
|
-
* @param oldNode - Node being replaced.
|
|
576
|
-
* @param newNode - Replacement node.
|
|
577
|
-
* @returns The new node after replacement.
|
|
578
|
-
*/
|
|
579
|
-
|
|
580
|
-
protected override _replaceNode(
|
|
581
|
-
oldNode: TreeCounterNode<K, V>,
|
|
582
|
-
newNode: TreeCounterNode<K, V>
|
|
583
|
-
): TreeCounterNode<K, V> {
|
|
584
|
-
newNode.count = oldNode.count + newNode.count;
|
|
585
|
-
return super._replaceNode(oldNode, newNode);
|
|
586
|
-
}
|
|
587
|
-
}
|