Last Modified
2015-05-06 10:24:33 -0700
Requires
  • tsort
  • rbtree

Description

Copyright © 2002-2013 Akinori MUSHA <knu@iDaemons.org>

Documentation by Akinori MUSHA and Gavin Sinclair.

All rights reserved. You can redistribute and/or modify it under the same terms as Ruby.

$Id: set.rb 43808 2013-11-22 23:50:06Z tmm1 $

Overview

This library provides the Set class, which deals with a collection of unordered values with no duplicates. It is a hybrid of Array’s intuitive inter-operation facilities and Hash’s fast lookup. If you need to keep values sorted in some order, use the SortedSet class.

The method to_set is added to Enumerable for convenience.

See the Set and SortedSet documentation for examples of usage.

blog comments powered by Disqus