有序集合
(类来自 pyomo.common.collections.orderedset)
- class pyomo.common.collections.orderedset.OrderedSet(iterable=None)[源代码]
基础类:
Mixin,MutableSet方法
__init__([iterable])add(val)添加一个元素。
clear()从该集合中移除所有元素。
discard(val)移除一个元素。
intersection(other)isdisjoint(other)如果两个集合的交集为空,则返回True。
pop()返回弹出的值。
remove(val)移除一个元素。
union(other)update(iterable)成员文档
- isdisjoint(other)
如果两个集合的交集为空,则返回True。
- pop()
返回弹出的值。如果为空则引发KeyError。