Current section

Files

Jump to
trie doc btrie.html
Raw

doc/btrie.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Module btrie</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
</head>
<body bgcolor="white">
<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
<hr>
<h1>Module btrie</h1>
<ul class="index"><li><a href="#description">Description</a></li><li><a href="#types">Data Types</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>
<h3><a name="A_trie_data_structure_implementation.">A trie data structure implementation.</a></h3><p>
The trie (i.e., from "retrieval") data structure was invented by
Edward Fredkin (it is a form of radix sort). The implementation stores
string suffixes as a list because it is a PATRICIA trie
(PATRICIA - Practical Algorithm to Retrieve Information
Coded in Alphanumeric, D.R.Morrison (1968)).</p>
This Erlang trie implementation uses binary keys.
<p>Copyright © 2010-2013 Michael Truog</p>
<p><b>Version:</b> 1.4.0 Sep 9 2016 14:16:27
------------------------------------------------------------------------</p>
<p><b>Authors:</b> Michael Truog (<a href="mailto:mjtruog [at] gmail (dot) com"><tt>mjtruog [at] gmail (dot) com</tt></a>).</p>
<h2><a name="description">Description</a></h2>
<h3><a name="A_trie_data_structure_implementation.">A trie data structure implementation.</a></h3><p>
The trie (i.e., from "retrieval") data structure was invented by
Edward Fredkin (it is a form of radix sort). The implementation stores
string suffixes as a list because it is a PATRICIA trie
(PATRICIA - Practical Algorithm to Retrieve Information
Coded in Alphanumeric, D.R.Morrison (1968)).</p>
This Erlang trie implementation uses binary keys. Using binary keys
means that other data structures are quicker alternatives, so this
module is probably not a good choice, unless it is used for functions
not available elsewhere.
<h2><a name="types">Data Types</a></h2>
<h3 class="typedecl"><a name="type-empty_trie">empty_trie()</a></h3>
<p><tt>empty_trie() = '?TYPE_EMPTY'</tt></p>
<h3 class="typedecl"><a name="type-nonempty_trie">nonempty_trie()</a></h3>
<p><tt>nonempty_trie() = {integer(), integer(), tuple()}</tt></p>
<h3 class="typedecl"><a name="type-trie">trie()</a></h3>
<p><tt>trie() = <a href="#type-nonempty_trie">nonempty_trie()</a> | <a href="#type-empty_trie">empty_trie()</a></tt></p>
<h2><a name="index">Function Index</a></h2>
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#append-3">append/3</a></td><td>
<h4><a name="Append_a_value_as_a_list_element_in_a_trie_instance.">Append a value as a list element in a trie instance.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#append_list-3">append_list/3</a></td><td>
<h4><a name="Append_a_list_of_values_as_a_list_element_in_a_trie_instance.">Append a list of values as a list element in a trie instance.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#erase-2">erase/2</a></td><td>
<h4><a name="Erase_a_value_in_a_trie.">Erase a value in a trie.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#erase_similar-2">erase_similar/2</a></td><td>
<h4><a name="Erase_all_entries_within_a_trie_that_share_a_common_prefix.">Erase all entries within a trie that share a common prefix.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#fetch-2">fetch/2</a></td><td>
<h4><a name="Fetch_a_value_from_a_trie.">Fetch a value from a trie.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#fetch_keys-1">fetch_keys/1</a></td><td>
<h4><a name="Fetch_all_the_keys_in_a_trie.">Fetch all the keys in a trie.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#fetch_keys_similar-2">fetch_keys_similar/2</a></td><td>
<h4><a name="Fetch_the_keys_within_a_trie_that_share_a_common_prefix.">Fetch the keys within a trie that share a common prefix.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#filter-2">filter/2</a></td><td>
<h4><a name="Filter_a_trie_with_a_predicate_function.">Filter a trie with a predicate function.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#find-2">find/2</a></td><td>
<h4><a name="Find_a_value_in_a_trie.">Find a value in a trie.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#find_prefix-2">find_prefix/2</a></td><td>
<h4><a name="Find_a_value_in_a_trie_by_prefix.">Find a value in a trie by prefix.</a></h4>
The atom 'prefix' is returned if the string supplied is a prefix
for a key that has previously been stored within the trie, but no
value was found, since there was no exact match for the string supplied.</td></tr>
<tr><td valign="top"><a href="#find_prefix_longest-2">find_prefix_longest/2</a></td><td>
<h4><a name="Find_the_longest_key_in_a_trie_that_is_a_prefix_to_the_passed_string.">Find the longest key in a trie that is a prefix to the passed string.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#find_prefixes-2">find_prefixes/2</a></td><td>
<h4><a name="Find_all_the_keys_in_a_trie_that_are_prefixes_to_the_passed_string.">Find all the keys in a trie that are prefixes to the passed string.</a></h4>
The entries are returned in alphabetical order.</td></tr>
<tr><td valign="top"><a href="#fold-3">fold/3</a></td><td>
<h4><a name="Fold_a_function_over_the_trie.">Fold a function over the trie.</a></h4>
Traverses in alphabetical order.</td></tr>
<tr><td valign="top"><a href="#fold_similar-4">fold_similar/4</a></td><td>
<h4><a name="Fold_a_function_over_the_keys_within_a_trie_that_share_a_common_prefix.">Fold a function over the keys within a trie that share a common prefix.</a></h4>
Traverses in alphabetical order.</td></tr>
<tr><td valign="top"><a href="#foldl-3">foldl/3</a></td><td>
<h4><a name="Fold_a_function_over_the_trie.">Fold a function over the trie.</a></h4>
Traverses in alphabetical order.</td></tr>
<tr><td valign="top"><a href="#foldl_similar-4">foldl_similar/4</a></td><td>
<h4><a name="Fold_a_function_over_the_keys_within_a_trie_that_share_a_common_prefix.">Fold a function over the keys within a trie that share a common prefix.</a></h4>
Traverses in alphabetical order.</td></tr>
<tr><td valign="top"><a href="#foldr-3">foldr/3</a></td><td>
<h4><a name="Fold_a_function_over_the_trie_in_reverse.">Fold a function over the trie in reverse.</a></h4>
Traverses in reverse alphabetical order.</td></tr>
<tr><td valign="top"><a href="#foldr_similar-4">foldr_similar/4</a></td><td>
<h4><a name="Fold_a_function_over_the_keys_within_a_trie_that_share_a_common_prefix_in_reverse.">Fold a function over the keys within a trie that share a common prefix in reverse.</a></h4>
Traverses in reverse alphabetical order.</td></tr>
<tr><td valign="top"><a href="#foreach-2">foreach/2</a></td><td>
<h4><a name="Call_a_function_for_each_element.">Call a function for each element.</a></h4>
Traverses in alphabetical order.</td></tr>
<tr><td valign="top"><a href="#from_list-1">from_list/1</a></td><td>
<h4><a name="Create_a_trie_from_a_list.">Create a trie from a list.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#is_key-2">is_key/2</a></td><td>
<h4><a name="Determine_if_a_key_exists_in_a_trie.">Determine if a key exists in a trie.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#map-2">map/2</a></td><td>
<h4><a name="Map_a_function_over_a_trie.">Map a function over a trie.</a></h4>
Traverses in reverse alphabetical order.</td></tr>
<tr><td valign="top"><a href="#merge-3">merge/3</a></td><td>
<h4><a name="Merge_two_trie_instance.">Merge two trie instance.</a></h4>
Update the second trie parameter with all of the elements
found within the first trie parameter.</td></tr>
<tr><td valign="top"><a href="#new-0">new/0</a></td><td>
<h4><a name="Create_a_new_trie_instance.">Create a new trie instance.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#new-1">new/1</a></td><td>
<h4><a name="Create_a_new_trie_instance_from_a_list.">Create a new trie instance from a list.</a></h4>
The list may contain either: strings, 2 element tuples with a string as the
first tuple element, or tuples with more than 2 elements (including records)
with a string as the first element (second element if it is a record).</td></tr>
<tr><td valign="top"><a href="#prefix-3">prefix/3</a></td><td>
<h4><a name="Insert_a_value_as_the_first_list_element_in_a_trie_instance.">Insert a value as the first list element in a trie instance.</a></h4>
The reverse of append/3.</td></tr>
<tr><td valign="top"><a href="#size-1">size/1</a></td><td>
<h4><a name="Size_of_a_trie_instance.">Size of a trie instance.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#store-2">store/2</a></td><td>
<h4><a name="Store_only_a_key_in_a_trie_instance.">Store only a key in a trie instance.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#store-3">store/3</a></td><td>
<h4><a name="Store_a_key/value_pair_in_a_trie_instance.">Store a key/value pair in a trie instance.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#to_list-1">to_list/1</a></td><td>
<h4><a name="Convert_all_entries_in_a_trie_to_a_list.">Convert all entries in a trie to a list.</a></h4>
The list is in alphabetical order.</td></tr>
<tr><td valign="top"><a href="#to_list_similar-2">to_list_similar/2</a></td><td>
<h4><a name="Return_a_list_of_all_entries_within_a_trie_that_share_a_common_prefix.">Return a list of all entries within a trie that share a common prefix.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#update-3">update/3</a></td><td>
<h4><a name="Update_a_value_in_a_trie.">Update a value in a trie.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#update-4">update/4</a></td><td>
<h4><a name="Update_or_add_a_value_in_a_trie.">Update or add a value in a trie.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#update_counter-3">update_counter/3</a></td><td>
<h4><a name="Update_a_counter_in_a_trie.">Update a counter in a trie.</a></h4>.</td></tr>
</table>
<h2><a name="functions">Function Details</a></h2>
<h3 class="function"><a name="append-3">append/3</a></h3>
<div class="spec">
<p><tt>append(Key::'?TYPE_NAME', Value::any(), Node::<a href="#type-trie">trie()</a>) -&gt; <a href="#type-nonempty_trie">nonempty_trie()</a></tt><br></p>
</div><p>
<h4><a name="Append_a_value_as_a_list_element_in_a_trie_instance.">Append a value as a list element in a trie instance.</a></h4>
</p>
<h3 class="function"><a name="append_list-3">append_list/3</a></h3>
<div class="spec">
<p><tt>append_list(Key::'?TYPE_NAME', ValueList::list(), Node::<a href="#type-trie">trie()</a>) -&gt; <a href="#type-nonempty_trie">nonempty_trie()</a></tt><br></p>
</div><p>
<h4><a name="Append_a_list_of_values_as_a_list_element_in_a_trie_instance.">Append a list of values as a list element in a trie instance.</a></h4>
</p>
<h3 class="function"><a name="erase-2">erase/2</a></h3>
<div class="spec">
<p><tt>erase(Key::'?TYPE_NAME', Node::<a href="#type-trie">trie()</a>) -&gt; <a href="#type-trie">trie()</a></tt><br></p>
</div><p>
<h4><a name="Erase_a_value_in_a_trie.">Erase a value in a trie.</a></h4>
</p>
<h3 class="function"><a name="erase_similar-2">erase_similar/2</a></h3>
<div class="spec">
<p><tt>erase_similar(Similar::'?TYPE_NAME', Node::<a href="#type-trie">trie()</a>) -&gt; ['?TYPE_NAME']</tt><br></p>
</div><p>
<h4><a name="Erase_all_entries_within_a_trie_that_share_a_common_prefix.">Erase all entries within a trie that share a common prefix.</a></h4>
</p>
<h3 class="function"><a name="fetch-2">fetch/2</a></h3>
<div class="spec">
<p><tt>fetch(X1::'?TYPE_NAME', Node::<a href="#type-nonempty_trie">nonempty_trie()</a>) -&gt; any()</tt><br></p>
</div><p>
<h4><a name="Fetch_a_value_from_a_trie.">Fetch a value from a trie.</a></h4>
</p>
<h3 class="function"><a name="fetch_keys-1">fetch_keys/1</a></h3>
<div class="spec">
<p><tt>fetch_keys(Node::<a href="#type-trie">trie()</a>) -&gt; ['?TYPE_NAME']</tt><br></p>
</div><p>
<h4><a name="Fetch_all_the_keys_in_a_trie.">Fetch all the keys in a trie.</a></h4>
</p>
<h3 class="function"><a name="fetch_keys_similar-2">fetch_keys_similar/2</a></h3>
<div class="spec">
<p><tt>fetch_keys_similar(Similar::'?TYPE_NAME', Node::<a href="#type-trie">trie()</a>) -&gt; ['?TYPE_NAME']</tt><br></p>
</div><p>
<h4><a name="Fetch_the_keys_within_a_trie_that_share_a_common_prefix.">Fetch the keys within a trie that share a common prefix.</a></h4>
</p>
<h3 class="function"><a name="filter-2">filter/2</a></h3>
<div class="spec">
<p><tt>filter(F::fun(('?TYPE_NAME', any()) -&gt; boolean()), Node::<a href="#type-trie">trie()</a>) -&gt; <a href="#type-trie">trie()</a></tt><br></p>
</div><p>
<h4><a name="Filter_a_trie_with_a_predicate_function.">Filter a trie with a predicate function.</a></h4>
</p>
<h3 class="function"><a name="find-2">find/2</a></h3>
<div class="spec">
<p><tt>find(X1::'?TYPE_NAME', Node::<a href="#type-trie">trie()</a>) -&gt; {ok, any()} | error</tt><br></p>
</div><p>
<h4><a name="Find_a_value_in_a_trie.">Find a value in a trie.</a></h4>
</p>
<h3 class="function"><a name="find_prefix-2">find_prefix/2</a></h3>
<div class="spec">
<p><tt>find_prefix(X1::'?TYPE_NAME', X2::<a href="#type-trie">trie()</a>) -&gt; {ok, any()} | prefix | error</tt><br></p>
</div><p>
<h4><a name="Find_a_value_in_a_trie_by_prefix.">Find a value in a trie by prefix.</a></h4>
The atom 'prefix' is returned if the string supplied is a prefix
for a key that has previously been stored within the trie, but no
value was found, since there was no exact match for the string supplied.</p>
<h3 class="function"><a name="find_prefix_longest-2">find_prefix_longest/2</a></h3>
<div class="spec">
<p><tt>find_prefix_longest(Match::'?TYPE_NAME', Node::<a href="#type-trie">trie()</a>) -&gt; {ok, '?TYPE_NAME', any()} | error</tt><br></p>
</div><p>
<h4><a name="Find_the_longest_key_in_a_trie_that_is_a_prefix_to_the_passed_string.">Find the longest key in a trie that is a prefix to the passed string.</a></h4>
</p>
<h3 class="function"><a name="find_prefixes-2">find_prefixes/2</a></h3>
<div class="spec">
<p><tt>find_prefixes(Match::'?TYPE_NAME', Node::<a href="#type-trie">trie()</a>) -&gt; [{'?TYPE_NAME', any()}]</tt><br></p>
</div><p>
<h4><a name="Find_all_the_keys_in_a_trie_that_are_prefixes_to_the_passed_string.">Find all the keys in a trie that are prefixes to the passed string.</a></h4>
The entries are returned in alphabetical order.</p>
<h3 class="function"><a name="fold-3">fold/3</a></h3>
<div class="spec">
<p><tt>fold(F::fun(('?TYPE_NAME', any(), any()) -&gt; any()), A::any(), Node::<a href="#type-trie">trie()</a>) -&gt; any()</tt><br></p>
</div><p>
<h4><a name="Fold_a_function_over_the_trie.">Fold a function over the trie.</a></h4>
Traverses in alphabetical order.</p>
<h3 class="function"><a name="fold_similar-4">fold_similar/4</a></h3>
<div class="spec">
<p><tt>fold_similar(Similar::'?TYPE_NAME', F::fun(('?TYPE_NAME', any(), any()) -&gt; any()), A::any(), Node::<a href="#type-trie">trie()</a>) -&gt; any()</tt><br></p>
</div><p>
<h4><a name="Fold_a_function_over_the_keys_within_a_trie_that_share_a_common_prefix.">Fold a function over the keys within a trie that share a common prefix.</a></h4>
Traverses in alphabetical order.</p>
<h3 class="function"><a name="foldl-3">foldl/3</a></h3>
<div class="spec">
<p><tt>foldl(F::fun(('?TYPE_NAME', any(), any()) -&gt; any()), A::any(), Node::<a href="#type-trie">trie()</a>) -&gt; any()</tt><br></p>
</div><p>
<h4><a name="Fold_a_function_over_the_trie.">Fold a function over the trie.</a></h4>
Traverses in alphabetical order.</p>
<h3 class="function"><a name="foldl_similar-4">foldl_similar/4</a></h3>
<div class="spec">
<p><tt>foldl_similar(Similar::'?TYPE_NAME', F::fun(('?TYPE_NAME', any(), any()) -&gt; any()), A::any(), Node::<a href="#type-trie">trie()</a>) -&gt; any()</tt><br></p>
</div><p>
<h4><a name="Fold_a_function_over_the_keys_within_a_trie_that_share_a_common_prefix.">Fold a function over the keys within a trie that share a common prefix.</a></h4>
Traverses in alphabetical order.</p>
<h3 class="function"><a name="foldr-3">foldr/3</a></h3>
<div class="spec">
<p><tt>foldr(F::fun(('?TYPE_NAME', any(), any()) -&gt; any()), A::any(), Node::<a href="#type-trie">trie()</a>) -&gt; any()</tt><br></p>
</div><p>
<h4><a name="Fold_a_function_over_the_trie_in_reverse.">Fold a function over the trie in reverse.</a></h4>
Traverses in reverse alphabetical order.</p>
<h3 class="function"><a name="foldr_similar-4">foldr_similar/4</a></h3>
<div class="spec">
<p><tt>foldr_similar(Similar::'?TYPE_NAME', F::fun(('?TYPE_NAME', any(), any()) -&gt; any()), A::any(), Node::<a href="#type-trie">trie()</a>) -&gt; any()</tt><br></p>
</div><p>
<h4><a name="Fold_a_function_over_the_keys_within_a_trie_that_share_a_common_prefix_in_reverse.">Fold a function over the keys within a trie that share a common prefix in reverse.</a></h4>
Traverses in reverse alphabetical order.</p>
<h3 class="function"><a name="foreach-2">foreach/2</a></h3>
<div class="spec">
<p><tt>foreach(F::fun(('?TYPE_NAME', any()) -&gt; any()), Node::<a href="#type-trie">trie()</a>) -&gt; any()</tt><br></p>
</div><p>
<h4><a name="Call_a_function_for_each_element.">Call a function for each element.</a></h4>
Traverses in alphabetical order.</p>
<h3 class="function"><a name="from_list-1">from_list/1</a></h3>
<div class="spec">
<p><tt>from_list(L::list()) -&gt; <a href="#type-trie">trie()</a></tt><br></p>
</div><p>
<h4><a name="Create_a_trie_from_a_list.">Create a trie from a list.</a></h4>
</p>
<h3 class="function"><a name="is_key-2">is_key/2</a></h3>
<div class="spec">
<p><tt>is_key(X1::'?TYPE_NAME', Node::<a href="#type-trie">trie()</a>) -&gt; boolean()</tt><br></p>
</div><p>
<h4><a name="Determine_if_a_key_exists_in_a_trie.">Determine if a key exists in a trie.</a></h4>
</p>
<h3 class="function"><a name="map-2">map/2</a></h3>
<div class="spec">
<p><tt>map(F::fun(('?TYPE_NAME', any()) -&gt; any()), Node::<a href="#type-trie">trie()</a>) -&gt; <a href="#type-trie">trie()</a></tt><br></p>
</div><p>
<h4><a name="Map_a_function_over_a_trie.">Map a function over a trie.</a></h4>
Traverses in reverse alphabetical order.</p>
<h3 class="function"><a name="merge-3">merge/3</a></h3>
<div class="spec">
<p><tt>merge(F::fun(('?TYPE_NAME', any(), any()) -&gt; any()), Node1::<a href="#type-trie">trie()</a>, Node2::<a href="#type-trie">trie()</a>) -&gt; <a href="#type-trie">trie()</a></tt><br></p>
</div><p>
<h4><a name="Merge_two_trie_instance.">Merge two trie instance.</a></h4>
Update the second trie parameter with all of the elements
found within the first trie parameter.</p>
<h3 class="function"><a name="new-0">new/0</a></h3>
<div class="spec">
<p><tt>new() -&gt; <a href="#type-empty_trie">empty_trie()</a></tt><br></p>
</div><p>
<h4><a name="Create_a_new_trie_instance.">Create a new trie instance.</a></h4>
</p>
<h3 class="function"><a name="new-1">new/1</a></h3>
<div class="spec">
<p><tt>new(L::list()) -&gt; <a href="#type-trie">trie()</a></tt><br></p>
</div><p>
<h4><a name="Create_a_new_trie_instance_from_a_list.">Create a new trie instance from a list.</a></h4>
The list may contain either: strings, 2 element tuples with a string as the
first tuple element, or tuples with more than 2 elements (including records)
with a string as the first element (second element if it is a record).
If a list of records (or tuples larger than 2 elements) is provided,
the whole record/tuple is stored as the value.</p>
<h3 class="function"><a name="prefix-3">prefix/3</a></h3>
<div class="spec">
<p><tt>prefix(Key::'?TYPE_NAME', Value::any(), Node::<a href="#type-trie">trie()</a>) -&gt; <a href="#type-nonempty_trie">nonempty_trie()</a></tt><br></p>
</div><p>
<h4><a name="Insert_a_value_as_the_first_list_element_in_a_trie_instance.">Insert a value as the first list element in a trie instance.</a></h4>
The reverse of append/3.</p>
<h3 class="function"><a name="size-1">size/1</a></h3>
<div class="spec">
<p><tt>size(Node::<a href="#type-trie">trie()</a>) -&gt; non_neg_integer()</tt><br></p>
</div><p>
<h4><a name="Size_of_a_trie_instance.">Size of a trie instance.</a></h4>
</p>
<h3 class="function"><a name="store-2">store/2</a></h3>
<div class="spec">
<p><tt>store(Key::'?TYPE_NAME', Node::<a href="#type-trie">trie()</a>) -&gt; <a href="#type-nonempty_trie">nonempty_trie()</a></tt><br></p>
</div><p>
<h4><a name="Store_only_a_key_in_a_trie_instance.">Store only a key in a trie instance.</a></h4>
</p>
<h3 class="function"><a name="store-3">store/3</a></h3>
<div class="spec">
<p><tt>store(Key::'?TYPE_NAME', NewValue::any(), Node::<a href="#type-trie">trie()</a>) -&gt; <a href="#type-nonempty_trie">nonempty_trie()</a></tt><br></p>
</div><p>
<h4><a name="Store_a_key/value_pair_in_a_trie_instance.">Store a key/value pair in a trie instance.</a></h4>
</p>
<h3 class="function"><a name="to_list-1">to_list/1</a></h3>
<div class="spec">
<p><tt>to_list(Node::<a href="#type-trie">trie()</a>) -&gt; [{'?TYPE_NAME', any()}]</tt><br></p>
</div><p>
<h4><a name="Convert_all_entries_in_a_trie_to_a_list.">Convert all entries in a trie to a list.</a></h4>
The list is in alphabetical order.</p>
<h3 class="function"><a name="to_list_similar-2">to_list_similar/2</a></h3>
<div class="spec">
<p><tt>to_list_similar(Similar::'?TYPE_NAME', Node::<a href="#type-trie">trie()</a>) -&gt; [{'?TYPE_NAME', any()}]</tt><br></p>
</div><p>
<h4><a name="Return_a_list_of_all_entries_within_a_trie_that_share_a_common_prefix.">Return a list of all entries within a trie that share a common prefix.</a></h4>
</p>
<h3 class="function"><a name="update-3">update/3</a></h3>
<div class="spec">
<p><tt>update(X1::'?TYPE_NAME', F::fun((any()) -&gt; any()), Node::<a href="#type-nonempty_trie">nonempty_trie()</a>) -&gt; <a href="#type-nonempty_trie">nonempty_trie()</a></tt><br></p>
</div><p>
<h4><a name="Update_a_value_in_a_trie.">Update a value in a trie.</a></h4>
</p>
<h3 class="function"><a name="update-4">update/4</a></h3>
<div class="spec">
<p><tt>update(Key::'?TYPE_NAME', F::fun((any()) -&gt; any()), Initial::any(), Node::<a href="#type-trie">trie()</a>) -&gt; <a href="#type-nonempty_trie">nonempty_trie()</a></tt><br></p>
</div><p>
<h4><a name="Update_or_add_a_value_in_a_trie.">Update or add a value in a trie.</a></h4>
</p>
<h3 class="function"><a name="update_counter-3">update_counter/3</a></h3>
<div class="spec">
<p><tt>update_counter(Key::'?TYPE_NAME', Increment::number(), Node::<a href="#type-trie">trie()</a>) -&gt; <a href="#type-nonempty_trie">nonempty_trie()</a></tt><br></p>
</div><p>
<h4><a name="Update_a_counter_in_a_trie.">Update a counter in a trie.</a></h4>
</p>
<hr>
<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
<p><i>Generated by EDoc, Sep 9 2016, 14:16:27.</i></p>
</body>
</html>