Skip to content

Commit

Permalink
More docs tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
wyhaines committed Nov 2, 2020
1 parent 0826b43 commit e7ba7dd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ <h1><a id="splay-tree-map" class="anchor" href="#splay-tree-map">
</svg>
</a>Splay Tree Map</h1>

<p><a href="https://github.com/wyhaines/splay_tree_map.cr/releases" target="_blank"><img src="https://img.shields.io/github/release/wyhaines/splay_tree_map.cr.svg" alt="GitHub release"/></a></p>

<p>A splay tree is a type of binary search tree that self organizes so that the
most frequently accessed items tend to be towards the root of the tree, where
they can be accessed more quickly.</p>
Expand All @@ -92,7 +94,7 @@ <h3><a id="leaf-pruning" class="anchor" href="#leaf-pruning">
accessed elements towards the root of the tree, the least frequently accessed
items tend to migrate towards the leaves of the tree. This implementation
offers a method that can be used to prune its leaves, which generally has the
effect of removing the least frequently accessed items from the hash.</p>
effect of removing the least frequently accessed items from the tree.</p>

<p>This is useful if the data structure is being used to implement a cache, as
it can be used to control the size of the cache while generaly keeping the
Expand Down Expand Up @@ -136,7 +138,7 @@ <h2><a id="usage" class="anchor" href="#usage">
</svg>
</a>Usage</h2>

<p>Full documentation can be found at: https://wyhaines.github.io/splay_tree_map.cr/index.html</p>
<p>Full documentation can be found at: <a href="https://wyhaines.github.io/splay_tree_map.cr/index.html" target="_blank">https://wyhaines.github.io/splay_tree_map.cr/index.html</a></p>

<pre><code class="language-crystal"><span class="k">require</span> <span class="s">&quot;splay_tree_map&quot;</span></code></pre>

Expand All @@ -154,7 +156,7 @@ <h2><a id="usage" class="anchor" href="#usage">

stm.delete(<span class="s">&quot;junk&quot;</span>)

puts stm.find(<span class="s">&quot;something&quot;</span>) <span class="c"># This finds, but doesn&#39;t splay.</span>
puts stm.obtain(<span class="s">&quot;something&quot;</span>) <span class="c"># This finds, but doesn&#39;t splay.</span>

stm.prune <span class="c"># remove all leaves</span></code></pre>

Expand Down
2 changes: 1 addition & 1 deletion docs/index.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/search-index.js

Large diffs are not rendered by default.

0 comments on commit e7ba7dd

Please sign in to comment.