devel/ruby-rbtree 0.4.7 NetBSD
Sorted associative collection using Red-Black Trees for Ruby
- System
- NetBSD
- Repository
- pkgsrc
- Maintainer
- [email protected]
- License
- mit
- Categories
- devel, ruby
- Package size
- 69.9 KiB, 268.9 KiB installed
Description
RBTree is a sorted associative collection using Red-Black Tree as the internal data structure. The elements of RBTree are ordered and the interface is the almost same as Hash, so simply you can consider RBTree sorted Hash.
Red-Black Tree is a kind of binary tree that automatically balances by itself when a node is inserted or deleted. Thus the complexity for insert, search and delete is O(log N) in expected and worst case. On the other hand the complexity of Hash is O(1). Because Hash is unordered the data structure is more effective than Red-Black Tree as an associative collection.
The interface of RBTree is the almost same as Hash although there are some limitations.
Install
Binary package:
pkgin install ruby33-rbtree
From pkgsrc:
cd /usr/pkgsrc/devel/ruby-rbtree && make install clean
Packages
The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.
| Repository | Version |
|---|---|
| NetBSD 10.1 x86_64 | 0.4.7 |
| NetBSD 10.1 aarch64 | 0.4.6 |
| SmartOS / illumos x86_64 | 0.4.7 |
| macOS 15 arm64 | 0.4.7 |
Dependencies
Run dependencies 1
Required by 1
Configuration
No options to configure.
- Service scripts
- none
- Flavors
ruby34-rbtree-0.4.7,ruby40-rbtree-0.4.7