[top] / BTrees / Interfaces / IIMerge
Merge collections with integer value type.
A primary intent is to support operations with no or integer values, which are used as "scores" to rate indiviual keys. That is, in this context, a BTree or Bucket is viewed as a set with scored keys, using integer scores.
There are no attributes or fields specified.
weightedIntersection(c1, c2, weight1=1, weight2=1)
Compute the weighted intersection of c1 and c2.
If c1 and c2 are None, the output is (0, None).
If c1 is None and c2 is not None, the output is (weight2, c2).
If c1 is not None and c2 is None, the output is (weight1, c1).
Else, and hereafter, c1 is not None and c2 is not None.
If c1 and c2 are both sets, the output is the sum of the weights and the (unweighted) intersection of the sets.
Else the output is 1 and a Bucket whose keys are the intersection of c1 and c2's keys, and whose values are:
v1*weight1 + v2*weight2 where: v1 is 1 if c1 is a set c1[key] if c1 is a mapping v2 is 1 if c2 is a set c2[key] if c2 is a mapping
Note that c1 and c2 must be collections.
union(c1, c2)
Compute the Union of c1 and c2.
If c1 is None, then c2 is returned, otherwise, if c2 is None, then c1 is returned.
The output is a Set containing keys from the input collections.
difference(c1, c2)
Return the keys or items in c1 for which there is no key in c2.
If c1 is None, then None is returned. If c2 is None, then c1 is returned.
If neither c1 nor c2 is None, the output is a Set if c1 is a Set or TreeSet, and is a Bucket if c1 is a Bucket or BTree.
intersection(c1, c2)
Compute the intersection of c1 and c2.
If c1 is None, then c2 is returned, otherwise, if c2 is None, then c1 is returned.
The output is a Set containing matching keys from the input collections.
weightedUnion(c1, c2, weight1=1, weight2=1)
Compute the weighted union of c1 and c2.
If c1 and c2 are None, the output is (0, None).
If c1 is None and c2 is not None, the output is (weight2, c2).
If c1 is not None and c2 is None, the output is (weight1, c1).
Else, and hereafter, c1 is not None and c2 is not None.
If c1 and c2 are both sets, the output is 1 and the (unweighted) union of the sets.
Else the output is 1 and a Bucket whose keys are the union of c1 and c2's keys, and whose values are:
v1*weight1 + v2*weight2 where: v1 is 0 if the key is not in c1 1 if the key is in c1 and c1 is a set c1[key] if the key is in c1 and c1 is a mapping v2 is 0 if the key is not in c2 1 if the key is in c2 and c2 is a set c2[key] if the key is in c2 and c2 is a mapping
Note that c1 and c2 must be collections.
There are no specific adapters registered for this interface.
There are no extended adapters registered for this interface.
zope.viewlet.metaconfigure.JavaScriptViewlet
(name: boston.js)
zope.viewlet.manager.<ViewletManager providing IJavaScript>
(name: zope.app.boston.IJavaScript)
zope.viewlet.viewlet.SimpleViewletClass from /opt/zope/sr/apidoc/src/zope/app/boston/viewlets/toolbar/viewlet.pt
(name: toolbar)
zope.traversing.namespace.lang
(name: lang)
zope.viewlet.manager.<ViewletManager providing ICSS>
(name: zope.app.boston.ICSS)
zope.traversing.namespace.acquire
(name: acquire)
zope.traversing.namespace.acquire
(name: acquire)
zope.traversing.namespace.acquire
(name: acquire)
zope.traversing.namespace.acquire
(name: acquire)
zope.app.apidoc.codemodule.browser.introspector.annotationsNamespace
(name: annotations)
zope.app.apidoc.codemodule.browser.introspector.annotationsNamespace
(name: annotations)
zope.app.apidoc.codemodule.browser.introspector.annotationsNamespace
(name: annotations)
zope.app.apidoc.codemodule.browser.introspector.annotationsNamespace
(name: annotations)
zope.viewlet.metaconfigure.CSSViewlet
(name: xmltree.css)
zope.app.pagetemplate.urlquote.URLQuote
(name: url)
zope.viewlet.viewlet.SimpleViewletClass from /opt/zope/sr/apidoc/src/zope/app/boston/viewlets/xmltree/xmltree.pt
(name: xmltree)
zope.viewlet.metaconfigure.CSSViewlet
(name: skin.css)
zope.app.preference.preference.preferencesNamespace
(name: preferences)
zope.app.preference.default.DefaultPreferences
(name: preferences)
zope.traversing.namespace.attr
(name: attribute)
zope.traversing.namespace.attr
(name: attribute)
zope.traversing.namespace.attr
(name: attribute)
zope.traversing.namespace.attr
(name: attribute)
zope.viewlet.manager.<ViewletManager providing IHead>
(name: zope.app.boston.IHead)
zope.app.component.back35.RegistrationManagerNamespace
(name: registrations)
zope.viewlet.manager.<ViewletManager providing ILeft>
(name: zope.app.boston.ILeft)
zope.traversing.namespace.resource
(name: resource)
zope.traversing.namespace.resource
(name: resource)
zope.traversing.namespace.resource
(name: resource)
zope.traversing.namespace.resource
(name: resource)
zope.traversing.namespace.etc
(name: etc)
zope.traversing.namespace.etc
(name: etc)
zope.traversing.namespace.etc
(name: etc)
zope.traversing.namespace.etc
(name: etc)
zope.traversing.namespace.etc
(name: etc)
zope.app.apidoc.apidoc.apidocNamespace
(name: apidoc)
zope.app.apidoc.apidoc.apidocNamespace
(name: apidoc)
zope.app.apidoc.apidoc.apidocNamespace
(name: apidoc)
zope.app.apidoc.apidoc.apidocNamespace
(name: apidoc)
zope.traversing.namespace.acquire
(name: acquire)
zope.traversing.namespace.lang
(name: lang)
zope.traversing.namespace.lang
(name: lang)
zope.traversing.namespace.lang
(name: lang)
zope.traversing.namespace.lang
(name: lang)
zope.traversing.namespace.item
(name: item)
zope.traversing.namespace.item
(name: item)
zope.traversing.namespace.item
(name: item)
zope.traversing.namespace.item
(name: item)
zope.traversing.namespace.item
(name: item)
zope.viewlet.metaconfigure.JavaScriptViewlet
(name: xmltree)
zope.viewlet.metaconfigure.CSSViewlet
(name: toolbar-css)
zope.traversing.namespace.adapter
(name: adapter)
zope.app.apidoc.apidoc.apidocNamespace
(name: apidoc)
zope.traversing.namespace.vh
(name: vh)
zope.traversing.namespace.vh
(name: vh)
zope.traversing.namespace.vh
(name: vh)
zope.traversing.namespace.vh
(name: vh)
zope.app.onlinehelp.helpNamespace
(name: help)
zope.app.onlinehelp.helpNamespace
(name: help)
zope.app.onlinehelp.helpNamespace
(name: help)
zope.app.onlinehelp.helpNamespace
(name: help)
zope.app.onlinehelp.helpNamespace
(name: help)
zope.traversing.namespace.adapter
(name: adapter)
zope.traversing.namespace.adapter
(name: adapter)
zope.traversing.namespace.adapter
(name: adapter)
zope.traversing.namespace.adapter
(name: adapter)
zope.traversing.namespace.debug
(name: debug)
zope.traversing.namespace.debug
(name: debug)
zope.traversing.namespace.debug
(name: debug)
zope.traversing.namespace.debug
(name: debug)
zope.app.pagetemplate.talesapi.ZopeTalesAPI
(name: zope)
zope.traversing.namespace.attr
(name: attribute)
zope.app.preference.preference.preferencesNamespace
(name: preferences)
zope.app.preference.preference.preferencesNamespace
(name: preferences)
zope.app.preference.preference.preferencesNamespace
(name: preferences)
zope.app.preference.preference.preferencesNamespace
(name: preferences)
zope.app.apidoc.codemodule.browser.introspector.annotationsNamespace
(name: annotations)
zope.traversing.namespace.view
(name: view)
zope.traversing.namespace.view
(name: view)
zope.traversing.namespace.view
(name: view)
zope.traversing.namespace.view
(name: view)
zope.formlib.namedtemplate.NamedTemplatePathAdapter
(name: template)
zope.viewlet.manager.<ViewletManager providing IToolBar>
(name: zope.app.boston.IToolBar)
zope.viewlet.metaconfigure.CSSViewlet
(name: widget.css)
There are no views available.
There are no views available.
There are no views available.
There are no views available.
There are no views available.
There are no views available.
There are no views available.
There are no views available.
There are no views available.
There are no views available.
There are no views available.
There are no views available.