Path to this page:
./
devel/ruby-rbtree,
Sorted associative collection using Red-Black Trees for Ruby
Branch: pkgsrc-2015Q2,
Version: 0.4.2,
Package name: ruby200-rbtree-0.4.2,
Maintainer: pkgsrc-usersRBTree 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.
Master sites:
SHA1: 64faf89d36b4564ee4af8ce72b18889204611d54
RMD160: c886da1060ab6fd7ab24d912419032a63895f810
Filesize: 29.5 KB
Version history: (Expand)
- (2015-07-04) Package added to pkgsrc.se, version ruby200-rbtree-0.4.2 (created)