wntr.utils.ordered_set module

class wntr.utils.ordered_set.OrderedSet(iterable=None)[source]

Bases: collections.abc.MutableSet

An ordered set.

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.

discard(value)[source]

Discard and element from the set.

Parameters

value (object) – The object to be discarded.

update(iterable)[source]

Update the set with the objects in iterable.

Parameters

iterable (Iterable) –

clear()

This is slow (creates N new iterators!) but effective.

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.