本文整理匯總了Python中pyebset.BitSet.lnot_inplace方法的典型用法代碼示例。如果您正苦於以下問題:Python BitSet.lnot_inplace方法的具體用法?Python BitSet.lnot_inplace怎麽用?Python BitSet.lnot_inplace使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pyebset.BitSet
的用法示例。
在下文中一共展示了BitSet.lnot_inplace方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: bit_ne
# 需要導入模塊: from pyebset import BitSet [as 別名]
# 或者: from pyebset.BitSet import lnot_inplace [as 別名]
def bit_ne(self, ix, key):
_, idb, _, column = self.dbs[ix]
rval = BitSet()
key = self._vid_for_value(column, key)
if key is not None:
val = idb.get(self.txn, key)
if val is not None:
rval.loads(val)
rval |= ZERO_BS
rval.set(self.number_rows)
rval.lnot_inplace()
return rval
示例2: bit_ne_ex
# 需要導入模塊: from pyebset import BitSet [as 別名]
# 或者: from pyebset.BitSet import lnot_inplace [as 別名]
def bit_ne_ex(self, ix, keys):
from collections import Iterable
_, idb, _, column = self.dbs[ix]
rval = BitSet()
for key in keys:
if isinstance(key, Iterable) and not isinstance(key, (basestring, unicode)):
# in case the key is a composite object, just grab the first one
key = key[0]
zkey = self._vid_for_value(column, key)
if zkey is not None:
val = idb.get(self.txn, zkey)
if val is not None:
bitset = BitSet()
bitset.loads(val)
rval |= bitset
rval |= ZERO_BS
rval.set(self.number_rows)
rval.lnot_inplace()
return rval