/usr/share/doc/python-larch/html/btree.html is in python-larch 1.20151025-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Individual trees — larch 1.20151025 documentation</title>
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.20151025',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="larch 1.20151025 documentation" href="index.html" />
<link rel="next" title="Individual nodes" href="node.html" />
<link rel="prev" title="Forests of trees" href="forest.html" />
</head>
<body role="document">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="node.html" title="Individual nodes"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="forest.html" title="Forests of trees"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">larch 1.20151025 documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="module-larch.tree">
<span id="individual-trees"></span><h1>Individual trees<a class="headerlink" href="#module-larch.tree" title="Permalink to this headline">¶</a></h1>
<dl class="class">
<dt id="larch.tree.BTree">
<em class="property">class </em><code class="descclassname">larch.tree.</code><code class="descname">BTree</code><span class="sig-paren">(</span><em>forest</em>, <em>node_store</em>, <em>root_id</em><span class="sig-paren">)</span><a class="headerlink" href="#larch.tree.BTree" title="Permalink to this definition">¶</a></dt>
<dd><p>A balanced search tree (copy-on-write B-tree).</p>
<p>The tree belongs to a forest. The tree nodes are stored in an
external node store; see the <code class="docutils literal"><span class="pre">NodeStore</span></code> class.</p>
<p><code class="docutils literal"><span class="pre">root_id</span></code> gives the id of the root node of the tree. The
root node must be unique to this tree, as it is modified in
place. <code class="docutils literal"><span class="pre">root_id</span></code> may also be <code class="docutils literal"><span class="pre">None</span></code>, in which case a
new node is created automatically to serve as the root node.</p>
<dl class="method">
<dt id="larch.tree.BTree.count_range">
<code class="descname">count_range</code><span class="sig-paren">(</span><em>minkey</em>, <em>maxkey</em><span class="sig-paren">)</span><a class="headerlink" href="#larch.tree.BTree.count_range" title="Permalink to this definition">¶</a></dt>
<dd><p>Return number of keys in range.</p>
</dd></dl>
<dl class="method">
<dt id="larch.tree.BTree.insert">
<code class="descname">insert</code><span class="sig-paren">(</span><em>key</em>, <em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#larch.tree.BTree.insert" title="Permalink to this definition">¶</a></dt>
<dd><p>Insert a new key/value pair into the tree.</p>
<p>If the key already existed in the tree, the old value is silently
forgotten.</p>
</dd></dl>
<dl class="method">
<dt id="larch.tree.BTree.lookup">
<code class="descname">lookup</code><span class="sig-paren">(</span><em>key</em><span class="sig-paren">)</span><a class="headerlink" href="#larch.tree.BTree.lookup" title="Permalink to this definition">¶</a></dt>
<dd><p>Return value corresponding to <code class="docutils literal"><span class="pre">key</span></code>.</p>
<p>If the key is not in the tree, raise <code class="docutils literal"><span class="pre">KeyError</span></code>.</p>
</dd></dl>
<dl class="method">
<dt id="larch.tree.BTree.lookup_range">
<code class="descname">lookup_range</code><span class="sig-paren">(</span><em>minkey</em>, <em>maxkey</em><span class="sig-paren">)</span><a class="headerlink" href="#larch.tree.BTree.lookup_range" title="Permalink to this definition">¶</a></dt>
<dd><p>Return list of (key, value) pairs for all keys in a range.</p>
<p><code class="docutils literal"><span class="pre">minkey</span></code> and <code class="docutils literal"><span class="pre">maxkey</span></code> are included in range.</p>
</dd></dl>
<dl class="method">
<dt id="larch.tree.BTree.range_is_empty">
<code class="descname">range_is_empty</code><span class="sig-paren">(</span><em>minkey</em>, <em>maxkey</em><span class="sig-paren">)</span><a class="headerlink" href="#larch.tree.BTree.range_is_empty" title="Permalink to this definition">¶</a></dt>
<dd><p>Is a range empty in the tree?</p>
<p>This is faster than doing a range lookup for the same range,
and checking if there are any keys returned.</p>
</dd></dl>
<dl class="method">
<dt id="larch.tree.BTree.remove">
<code class="descname">remove</code><span class="sig-paren">(</span><em>key</em><span class="sig-paren">)</span><a class="headerlink" href="#larch.tree.BTree.remove" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove <code class="docutils literal"><span class="pre">key</span></code> and its associated value from tree.</p>
<p>If key is not in the tree, <code class="docutils literal"><span class="pre">KeyValue</span></code> is raised.</p>
</dd></dl>
<dl class="method">
<dt id="larch.tree.BTree.remove_range">
<code class="descname">remove_range</code><span class="sig-paren">(</span><em>minkey</em>, <em>maxkey</em><span class="sig-paren">)</span><a class="headerlink" href="#larch.tree.BTree.remove_range" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove all keys in the given range.</p>
<p>Range is inclusive.</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="larch.tree.KeySizeMismatch">
<em class="property">exception </em><code class="descclassname">larch.tree.</code><code class="descname">KeySizeMismatch</code><span class="sig-paren">(</span><em>key</em>, <em>wanted_size</em><span class="sig-paren">)</span><a class="headerlink" href="#larch.tree.KeySizeMismatch" title="Permalink to this definition">¶</a></dt>
<dd><p>User tried to use key of wrong size.</p>
</dd></dl>
<dl class="exception">
<dt id="larch.tree.ValueTooLarge">
<em class="property">exception </em><code class="descclassname">larch.tree.</code><code class="descname">ValueTooLarge</code><span class="sig-paren">(</span><em>value</em>, <em>max_size</em><span class="sig-paren">)</span><a class="headerlink" href="#larch.tree.ValueTooLarge" title="Permalink to this definition">¶</a></dt>
<dd><p>User tried ot use a vlaue htat is too large for a node.</p>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="forest.html"
title="previous chapter">Forests of trees</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="node.html"
title="next chapter">Individual nodes</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/btree.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="node.html" title="Individual nodes"
>next</a> |</li>
<li class="right" >
<a href="forest.html" title="Forests of trees"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">larch 1.20151025 documentation</a> »</li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2011, Lars Wirzenius.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3.1.
</div>
</body>
</html>
|