OrderedSet#
module wntr.utils.ordered_set
- class OrderedSet[source]#
Bases:
MutableSet
An ordered set.
- __init__(iterable=None)[source]#
- Parameters:
iterable (Iterable) – An iterable with wich to initialize the set.
- add(value)[source]#
Add an element to the set.
- Parameters:
value (object) – The object to be added to the set.
- clear()#
This is slow (creates N new iterators!) but effective.
- discard(value)[source]#
Discard and element from the set.
- Parameters:
value (object) – The object to be discarded.
- isdisjoint(other)#
Return True if two sets have a null intersection.
- pop()#
Return the popped value. Raise KeyError if empty.
- remove(value)#
Remove an element. If not a member, raise a KeyError.