Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
403 changes: 403 additions & 0 deletions bench/bench_performance.py

Large diffs are not rendered by default.

Binary file added docs/html/_images/build_trie_with_add.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/html/_images/build_trie_with_update.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/html/_images/key_in_trie.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/html/_images/key_not_in_trie.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
457 changes: 457 additions & 0 deletions docs/html/_sources/benchmarks.rst.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ Contents

usage
reference
benchmarks
gentrie
2 changes: 2 additions & 0 deletions docs/html/_sources/reference.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ This section provides detailed information about the API of **gen-trie**.
It includes descriptions of the main classes, methods, and attributes
available in the library.

.. toctree::

.. index::
single: gentrie; GeneralizedTrie
single: gentrie; API Reference
Expand Down
3 changes: 3 additions & 0 deletions docs/html/_sources/usage.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ Using gen-trie
.. _gentrie-installation:


.. toctree::
:maxdepth: 4

.. index::

------------
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/html/_static/benchmarks/key_in_trie.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/html/_static/benchmarks/key_not_in_trie.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,019 changes: 1,019 additions & 0 deletions docs/html/benchmarks.html

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions docs/html/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,15 @@
<div class="relative overflow-hidden md:overflow-auto my-4 md:my-0 h-[calc(100vh-8rem)] md:h-auto">
<div class="overflow-y-auto h-full w-full relative pr-6"><nav class="table w-full min-w-full my-6 lg:my-8">
<ul>
<li class="toctree-l1"><a class="reference internal" href="usage.html">Using gen-trie</a></li>
<li class="toctree-l1"><a class="reference internal" href="reference.html">API Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="usage.html">Using gen-trie</a><ul class="simple">
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="reference.html">API Reference</a><ul class="simple">
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="benchmarks.html">Benchmarks</a><ul class="simple">
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="gentrie.html">gentrie package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="gentrie.trie.html">gentrie.trie package</a></li>
</ul>
Expand Down
17 changes: 12 additions & 5 deletions docs/html/gentrie.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<link href="search.html" rel="search" title="Search"/>
<link href="genindex.html" rel="index" title="Index"/>
<link href="gentrie.trie.html" rel="next" title="gentrie.trie package"/>
<link href="reference.html" rel="prev" title="API Reference"/>
<link href="benchmarks.html" rel="prev" title="Benchmarks"/>
<script>
<!-- Prevent Flash of wrong theme -->
const userPreference = localStorage.getItem('darkMode');
Expand Down Expand Up @@ -69,8 +69,15 @@
<div class="relative overflow-hidden md:overflow-auto my-4 md:my-0 h-[calc(100vh-8rem)] md:h-auto">
<div class="overflow-y-auto h-full w-full relative pr-6"><nav class="table w-full min-w-full my-6 lg:my-8">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="usage.html">Using gen-trie</a></li>
<li class="toctree-l1"><a class="reference internal" href="reference.html">API Reference</a></li>
<li class="toctree-l1" x-data="{ expanded: $el.classList.contains('current') ? true : false }"><a :class="{ 'expanded' : expanded }" @click="expanded = !expanded" class="reference internal expandable" href="usage.html">Using gen-trie<button @click.prevent.stop="expanded = !expanded" type="button"><span class="sr-only"></span><svg fill="currentColor" height="18px" stroke="none" viewbox="0 0 24 24" width="18px" xmlns="http://www.w3.org/2000/svg"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"></path></svg></button></a><ul class="simple" x-show="expanded">
</ul>
</li>
<li class="toctree-l1" x-data="{ expanded: $el.classList.contains('current') ? true : false }"><a :class="{ 'expanded' : expanded }" @click="expanded = !expanded" class="reference internal expandable" href="reference.html">API Reference<button @click.prevent.stop="expanded = !expanded" type="button"><span class="sr-only"></span><svg fill="currentColor" height="18px" stroke="none" viewbox="0 0 24 24" width="18px" xmlns="http://www.w3.org/2000/svg"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"></path></svg></button></a><ul class="simple" x-show="expanded">
</ul>
</li>
<li class="toctree-l1" x-data="{ expanded: $el.classList.contains('current') ? true : false }"><a :class="{ 'expanded' : expanded }" @click="expanded = !expanded" class="reference internal expandable" href="benchmarks.html">Benchmarks<button @click.prevent.stop="expanded = !expanded" type="button"><span class="sr-only"></span><svg fill="currentColor" height="18px" stroke="none" viewbox="0 0 24 24" width="18px" xmlns="http://www.w3.org/2000/svg"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"></path></svg></button></a><ul class="simple" x-show="expanded">
</ul>
</li>
<li class="toctree-l1 current" x-data="{ expanded: $el.classList.contains('current') ? true : false }"><a :class="{ 'expanded' : expanded }" @click="expanded = !expanded" class="current reference internal expandable" href="#">gentrie package<button @click.prevent.stop="expanded = !expanded" type="button"><span class="sr-only"></span><svg fill="currentColor" height="18px" stroke="none" viewbox="0 0 24 24" width="18px" xmlns="http://www.w3.org/2000/svg"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"></path></svg></button></a><ul x-show="expanded">
<li class="toctree-l2"><a class="reference internal" href="gentrie.trie.html">gentrie.trie package</a></li>
</ul>
Expand Down Expand Up @@ -329,7 +336,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi
<p>Internal node implementation for the gentrie package.</p>
<dl class="py class">
<dt class="sig sig-object py" id="gentrie.nodes.Node">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">gentrie.nodes.</span></span><span class="sig-name descname"><span class="pre">Node</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">token</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="reference.html#gentrie.protocols.TrieKeyToken" title="gentrie.protocols.TrieKeyToken"><span class="pre">TrieKeyToken</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">parent</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="reference.html#gentrie.GeneralizedTrie" title="gentrie.GeneralizedTrie"><span class="pre">GeneralizedTrie</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference internal" href="#gentrie.nodes.Node" title="gentrie.nodes.Node"><span class="pre">Node</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">value</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.13)"><span class="pre">Any</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.13)"><span class="pre">None</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#gentrie.nodes.Node" title="Link to this definition" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#gentrie.nodes.Node'">¶</a></dt>
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">gentrie.nodes.</span></span><span class="sig-name descname"><span class="pre">Node</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">token</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="reference.html#gentrie.protocols.TrieKeyToken" title="gentrie.protocols.TrieKeyToken"><span class="pre">TrieKeyToken</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">parent</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="gentrie.trie.html#gentrie.trie.GeneralizedTrie" title="gentrie.trie.GeneralizedTrie"><span class="pre">GeneralizedTrie</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference internal" href="#gentrie.nodes.Node" title="gentrie.nodes.Node"><span class="pre">Node</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">value</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.13)"><span class="pre">Any</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.13)"><span class="pre">None</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#gentrie.nodes.Node" title="Link to this definition" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#gentrie.nodes.Node'">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>A node in the trie.</p>
<p>A node is a container for a key in the trie. It has a unique identifier
Expand Down Expand Up @@ -360,7 +367,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi
<dd><p>Reference to the parent node.</p>
<dl class="field-list simple">
<dt class="field-odd">Type<span class="colon">:</span></dt>
<dd class="field-odd"><p>Optional[<a class="reference internal" href="reference.html#gentrie.GeneralizedTrie" title="gentrie.GeneralizedTrie">GeneralizedTrie</a> | <a class="reference internal" href="#gentrie.nodes.Node" title="gentrie.nodes.Node">Node</a></p>
<dd class="field-odd"><p>Optional[<a class="reference internal" href="gentrie.trie.html#gentrie.trie.GeneralizedTrie" title="gentrie.trie.GeneralizedTrie">GeneralizedTrie</a> | <a class="reference internal" href="#gentrie.nodes.Node" title="gentrie.nodes.Node">Node</a></p>
</dd>
</dl>
</dd></dl>
Expand Down
Loading