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

All Samples(101)  |  Call(53)  |  Derive(0)  |  Import(48)
intersection(o1, o2) -- compute the intersection of o1 and o2

src/p/r/Products.ZCatalog-3.0.2/src/Products/PluginIndexes/common/UnIndex.py   Products.ZCatalog(Download)
 
from BTrees.IIBTree import difference
from BTrees.IIBTree import intersection
from BTrees.IIBTree import IITreeSet
from BTrees.IIBTree import IISet
                for s in setlist:
                    # the result is bound by the resultset
                    r = intersection(r, s)
 
        else:  # not a range search
                    smalllist = []
                    for s in setlist:
                        smalllist.append(intersection(resultset, s))
                    r = multiunion(smalllist)
                else:
                r = resultset
                for s in setlist:
                    r = intersection(r, s)
 
        if isinstance(r, int):

src/e/x/experimental.catalogqueryplan-3.2.8/experimental/catalogqueryplan/extendedpathindex.py   experimental.catalogqueryplan(Download)
from BTrees.IIBTree import union, multiunion
from BTrees.IIBTree import intersection
from Products.PluginIndexes.common.util import parseIndexRequest
from BTrees.IIBTree import IISet
 
            pathset = IISet()
            if not navtree: return pathset
        pathset = intersection(pathset, res)
 
        if navtree and i + level >= navtree_start:
            depthset = union(depthset, intersection(pathset,
        if navtree: start = max(start, (navtree_start - level))
        depthset = multiunion(filter(None, [depthset] + [
            intersection(pathset, self._index.get(None, {}).get(i + level))
            for i in xrange(start, start + depth + 1)]))
 

src/p/r/Products.ZCatalog-3.0.2/src/Products/PluginIndexes/DateRangeIndex/DateRangeIndex.py   Products.ZCatalog(Download)
from BTrees.IIBTree import IITreeSet
from BTrees.IIBTree import difference
from BTrees.IIBTree import intersection
from BTrees.IIBTree import multiunion
from BTrees.IOBTree import IOBTree
            # Total result is bound by resultset
            if REQUEST is None:
                until = intersection(resultset, until)
 
            since = multiunion(self._since.values(None, term))
            bounded = intersection(until, since)

src/p/r/Products.ZCatalog-3.0.2/src/Products/PluginIndexes/BooleanIndex/BooleanIndex.py   Products.ZCatalog(Download)
from App.special_dtml import DTMLFile
from BTrees.IIBTree import IIBTree, IITreeSet, IISet
from BTrees.IIBTree import union, intersection, difference
import BTrees.Length
from ZODB.POSException import ConflictError
            if bool(key) is bool(indexed):
                # If we match the indexed value, check index
                return (intersection(index, resultset), (self.id, ))
            else:
                # Otherwise, remove from resultset or _unindex

src/s/i/silva.app.news-3.0.4/src/silva/app/news/indexing.py   silva.app.news(Download)
from Products.PluginIndexes.common.util import parseIndexRequest
from Products.PluginIndexes.common import safe_callable
from BTrees.IIBTree import IISet, multiunion, difference, intersection, union
from BTrees.OIBTree import OIBTree
import BTrees
        start = multiunion(self._since_index.values(max=qstart))
        end = multiunion(self._until_index.values(min=qstart))
        start_into = intersection(start, end)
 
        # end inside range
        start = multiunion(self._since_index.values(max=qend))
        end = multiunion(self._until_index.values(min=qend))
        end_into = intersection(start, end)
        start = multiunion(self._since_index.values(min=qstart))
        end = multiunion(self._until_index.values(max=qend))
        start_before_end_after = intersection(start, end)
 
        result = union(start_into, end_into)

src/e/x/experimental.catalogqueryplan-3.2.8/experimental/catalogqueryplan/unindex.py   experimental.catalogqueryplan(Download)
from cgi import escape
from BTrees.IIBTree import union, multiunion
from BTrees.IIBTree import intersection
from Products.PluginIndexes.common.util import parseIndexRequest
from BTrees.IIBTree import IISet
            r = res
            for s in setlist:
                r = intersection(r, s)
 
    else: # not a range search
                smalllist = []
                for s in setlist:
                    smalllist.append(intersection(res, s))
                r = multiunion(smalllist)
            else:
            r = res
            for s in setlist:
                r = intersection(r, s)
 
    if isinstance(r, int):  r=IISet((r,))

src/p/r/Products.ExtendedPathIndex-3.1/Products/ExtendedPathIndex/ExtendedPathIndex.py   Products.ExtendedPathIndex(Download)
import logging
 
from App.special_dtml import DTMLFile
from BTrees.IIBTree import IISet, IITreeSet, intersection, union, multiunion
from BTrees.OOBTree import OOBTree
                if not navtree:
                    return pathset
            pathset = intersection(pathset, res)
 
            if navtree and i + level >= navtree_start:
                depthset = union(depthset, intersection(pathset,
                start = max(start, (navtree_start - level))
            depthset = multiunion(filter(None, [depthset] + [
                intersection(pathset, self._index.get(None, {}).get(i + level))
                for i in xrange(start, start + depth + 1)]))
 

src/e/x/experimental.catalogqueryplan-3.2.8/experimental/catalogqueryplan/daterangeindex.py   experimental.catalogqueryplan(Download)
from datetime import datetime
 
from Acquisition import aq_inner, aq_parent
from BTrees.IIBTree import multiunion
from BTrees.IIBTree import intersection
        # Total result is bound by res
        if REQUEST is None:
            until = intersection(res, until)
 
        since = multiunion(self._since.values(None, term))
        bounded = intersection(until, since)

src/p/r/Products.ZCatalog-3.0.2/src/Products/PluginIndexes/PathIndex/PathIndex.py   Products.ZCatalog(Download)
from BTrees.IIBTree import IITreeSet
from BTrees.IIBTree import IISet
from BTrees.IIBTree import intersection
from BTrees.IIBTree import multiunion
from BTrees.IIBTree import union
            if tree2 is None:
                return IISet()
            results = intersection(results, tree2)
        return results
 

src/p/r/Products.ZCatalog-3.0.2/src/Products/ZCatalog/Catalog.py   Products.ZCatalog(Download)
from Acquisition import aq_parent
import BTrees.Length
from BTrees.IIBTree import intersection, IISet
from BTrees.IIBTree import weightedIntersection
from BTrees.OIBTree import OIBTree
                    _, rs = weightedIntersection(rs, r)
                else:
                    rs = intersection(rs, r)
 
                cr.stop_split(intersect_id)
            length = 0
            try:
                intersection(rs, IISet(()))
            except TypeError:
                # rs is not an object in the IIBTree family.
                    # each sort key, so we intersect with each set and
                    # get a sorted sequence of the intersections.
                    intset = intersection(rs, intset)
                    if intset:
                        keys = getattr(intset, 'keys', None)
                    # each sort key, so we intersect with each set and
                    # get a sorted sequence of the intersections.
                    intset = intersection(rs, intset)
                    if intset:
                        keys = getattr(intset, 'keys', None)

  1 | 2 | 3 | 4 | 5  Next