From 7e2112d463b0d622131f289619a9d2fafaa8bf85 Mon Sep 17 00:00:00 2001 From: Matt Bauman Date: Sun, 9 Aug 2015 17:04:33 -0400 Subject: [PATCH] Add brief documentation for IntSet --- README.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.rst b/README.rst index ab50cff95..e6271551e 100644 --- a/README.rst +++ b/README.rst @@ -27,6 +27,7 @@ This package implements a variety of data structures, including * Trie * Linked List * Sorted Dict, Sorted Multi-Dict and Sorted Set +* DataStructures.IntSet ------ Deque @@ -363,6 +364,21 @@ A list of sequentially linked nodes. This allows efficient insertion of nodes to julia> for i in l5; print(i); end 246 +--------------------- +DataStructures.IntSet +--------------------- + +`DataStructures.IntSet` is a drop-in replacement for the Base `IntSet` type. It +efficiently stores dense collections of small non-negative `Int`s as a sorted +set. The constructor `IntSet([itr])` constructs a sorted set of the integers +generated by the given iterable object, or an empty set if no argument is +given. If the set will be sparse (for example holding a few very large +integers), use `Set` or `SortedSet` instead. + +A complement IntSet may be constructed with `complement` or `complement!`. The +complement of an empty `IntSet` contains `typemax(Int)` elements from 0 to +`typemax(Int)-1`. + ---------------------------------------- Overview of Sorted Containers ----------------------------------------