ReadonlycapacityThe members are the integers from 0 up to this number, which is left out.
Whether member is in the set. A value outside the capacity is in no set.
Puts member into the set, and returns whether the member is new.
Takes every member out of the set.
Yields the members in the order of insertion. A member that is added during the loop is yielded as well, so the loop of a search ends when the search finds nothing new.
A set of the integers from 0 up to a fixed capacity, which is left out, that remembers the order in which its members arrived. A search uses it as its work list and as its set of visited nodes at once.
has,addandcleartake constant time, and a loop over the members takes time linear in their number. The memory is two integers for every possible member.