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

All Samples(8)  |  Call(4)  |  Derive(0)  |  Import(4)
weightedIntersection(o1, o2 [, w1, w2]) -- compute the intersection of o1 and o2

w1 and w2 are weights.

src/c/o/collective.notices-1.0/src/collective/notices/catalog.py   collective.notices(Download)
from datetime import datetime
 
from dateutil.tz import gettz
 
from BTrees.IFBTree import weightedIntersection, union, difference, IFSet
    def intersection(a, b):
        _, res = weightedIntersection(a or IFSet(), b or IFSet())
        return res
 
    @staticmethod

src/h/u/hurry.query-1.1.1/src/hurry/query/query.py   hurry.query(Download)
$Id: query.py 114320 2010-07-08 08:26:20Z janwijbrand $
"""
from BTrees.IFBTree import weightedIntersection, union, difference, IFBTree
from zope.catalog.catalog import ResultSet
from zope.catalog.field import IFieldIndex
        _, result = results.pop(0)
        for _, r in results:
            _, result = weightedIntersection(result, r)
        return result
 

src/g/e/getpaid.core-0.9.2/src/getpaid/core/order.py   getpaid.core(Download)
from persistent.dict import PersistentDict
 
from BTrees.IFBTree import weightedIntersection, intersection
 
from zope import component
        _, result = results.pop(0)
        for _, r in results:
            _, result = weightedIntersection(result, r)
 
        return result

src/z/3/z3c.multifieldindex-3.4.0/src/z3c/multifieldindex/index.py   z3c.multifieldindex(Download)
$Id: index.py 105085 2009-10-15 15:57:42Z nadako $
"""
from BTrees.IFBTree import weightedIntersection
from zope.app.container.btree import BTreeContainer
from zope.app.container.interfaces import IObjectAddedEvent
        _, result = results.pop(0)
        for _, r in results:
            _, result = weightedIntersection(result, r)
 
        return result