Path to this page:
./
devel/ruby-rbtree,
Sorted associative collection using Red-Black Trees for Ruby
Branch: pkgsrc-2007Q4,
Version: 0.2.0,
Package name: ruby18-rbtree-0.2.0,
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.
Required to run:[
lang/ruby18-base]
Master sites:
SHA1: 25f22403caaa99e3f11ed0e9932ff127401956f7
RMD160: 6d6d1f5f0d6fb4c5baf82ce31699b53cb74b3add
Filesize: 23.812 KB
Version history: (Expand)
- (2008-01-12) Package added to pkgsrc.se, version ruby18-rbtree-0.2.0 (created)