Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(3)  |  Derive(0)  |  Import(5)
weightedUnion(o1, o2 [, w1, w2]) -- compute the union of o1 and o2

w1 and w2 are weights.

src/p/r/Products.ZCTextIndex-2.13.5/src/Products/ZCTextIndex/SetOps.py   Products.ZCTextIndex(Download)
from BTrees.IIBTree import IIBucket
from BTrees.IIBTree import weightedIntersection
from BTrees.IIBTree import weightedUnion
 
from Products.ZCTextIndex.NBest import NBest
        (x, wx), dummy = merge.pop_smallest()
        (y, wy), dummy = merge.pop_smallest()
        dummy, z = weightedUnion(x, y, wx, wy)
        merge.add((z, 1), len(z))
    (result, weight), dummy = merge.pop_smallest()
    [(result, weight)] = L
    if weight != 1:
        dummy, result = weightedUnion(IIBucket(), result, 0, weight)
    return result
 

src/p/r/Products.ZCatalog-3.0.2/src/Products/PluginIndexes/common/ResultList.py   Products.ZCatalog(Download)
from BTrees.IIBTree import IIBucket
from BTrees.IIBTree import weightedIntersection
from BTrees.IIBTree import weightedUnion
from BTrees.OOBTree import OOSet
from BTrees.OOBTree import union
    def __or__(self, x):
        return self.__class__(
            weightedUnion(self._dict, x._dict),
            union(self._words, x._words),
            self._index,

src/b/t/BTrees-4.0.8/BTrees/tests/test_IIBTree.py   BTrees(Download)
    def weightedUnion(self):
        from BTrees.IIBTree import weightedUnion
        return weightedUnion
 
    def weightedIntersection(self):

src/e/x/experimental.catalogqueryplan-3.2.8/experimental/catalogqueryplan/tests/test_plan.py   experimental.catalogqueryplan(Download)
    def weightedIntersection(self, o1, o2, w1=1, w2=1):
        return iiweightedIntersection(o1, o2, w1, w2)
    from BTrees.IIBTree import weightedUnion, union
    from BTrees.IIBTree import IIBucket as mkbucket
    builders = IIBucket, IIBTree, testSetOps.itemsToSet(IISet), testSetOps.itemsToSet(IITreeSet)

src/e/x/experimental.btree-1.1/experimental/btree/tests/test_sets.py   experimental.btree(Download)
    def weightedIntersection(self, o1, o2, w1=1, w2=1):
        return iiweightedIntersection(o1, o2, w1, w2)
    from BTrees.IIBTree import weightedUnion, union
    from BTrees.IIBTree import IIBucket as mkbucket
    builders = IIBucket, IIBTree, testSetOps.itemsToSet(IISet), testSetOps.itemsToSet(IITreeSet)