OrderedSet

(class from pyomo.common.collections.orderedset)

class pyomo.common.collections.orderedset.OrderedSet(iterable=None)[source]

Bases: Mixin, MutableSet

__init__(iterable=None)[source]

Methods

__init__([iterable])

add(val)

Add an element.

clear()

Remove all elements from this set.

discard(val)

Remove an element.

intersection(other)

isdisjoint(other)

Return True if two sets have a null intersection.

pop()

Return the popped value.

remove(val)

Remove an element.

union(other)

update(iterable)

Member Documentation

add(val)[source]

Add an element.

clear()[source]

Remove all elements from this set.

discard(val)[source]

Remove an element. Do not raise an exception if absent.

isdisjoint(other)

Return True if two sets have a null intersection.

pop()

Return the popped value. Raise KeyError if empty.

remove(val)[source]

Remove an element. If not a member, raise a KeyError.