⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 classapriori__trie.html

📁 APRIOR算法的源程序.希望对大家有用,谁有FP-GROWTH算法的程序请给我发一份,谢谢.anne2422843@sina.com.cn
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>APRIORI algorithm: Apriori_Trie Class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3.9.1 --><div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div><h1>Apriori_Trie Class Reference</h1>Apriori_Trie (or prefix-tree) is a tree-based datastructure.  <a href="#_details">More...</a><p><code>#include &lt;<a class="el" href="Apriori__Trie_8hpp-source.html">Apriori_Trie.hpp</a>&gt;</code><p>Collaboration diagram for Apriori_Trie:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classApriori__Trie-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr><tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classApriori__Trie.html#a0">Apriori_Trie</a> (const <a class="el" href="common_8hpp.html#a1">countertype</a> counter_of_emptyset)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classApriori__Trie.html#a1">insert_frequent_items</a> (const vector&lt; <a class="el" href="common_8hpp.html#a1">countertype</a> &gt; &amp;counters)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Insert the frequent items and their counters into the trie;.  <a href="#a1"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classApriori__Trie.html#a2">candidate_generation</a> (const <a class="el" href="common_8hpp.html#a0">itemtype</a> &amp;frequent_size, <a class="el" href="classInput__Output__Manager.html">Input_Output_Manager</a> &amp;input_output_manager)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Generates candidates.  <a href="#a2"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classApriori__Trie.html#a3">find_candidate</a> (const vector&lt; <a class="el" href="common_8hpp.html#a0">itemtype</a> &gt; &amp;basket, const <a class="el" href="common_8hpp.html#a0">itemtype</a> candidate_size, const <a class="el" href="common_8hpp.html#a1">countertype</a> counter=1)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Increases the counter of those candidates that are contained by the given basket.  <a href="#a3"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classApriori__Trie.html#a4">delete_infrequent</a> (const double min_occurrence, const <a class="el" href="common_8hpp.html#a0">itemtype</a> candidate_size)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes unfrequent itemsets.  <a href="#a4"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classApriori__Trie.html#a5">is_there_any_candidate</a> () const </td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if trie is not empty.  <a href="#a5"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classApriori__Trie.html#a6">~Apriori_Trie</a> ()</td></tr><tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classApriori__Trie.html#b0">is_all_subset_frequent</a> (const set&lt; <a class="el" href="common_8hpp.html#a0">itemtype</a> &gt; &amp;maybe_candidate) const </td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Decides if all subset of an itemset is contained in the Apriori_Trie.  <a href="#b0"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classApriori__Trie.html#b1">candidate_generation_two</a> ()</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Generates candidate of size two.  <a href="#b1"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classApriori__Trie.html#b2">candidate_generation_assist</a> (<a class="el" href="classTrie.html">Trie</a> *trie, set&lt; <a class="el" href="common_8hpp.html#a0">itemtype</a> &gt; &amp;maybe_candidate, <a class="el" href="classInput__Output__Manager.html">Input_Output_Manager</a> &amp;input_output_manager)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Generates candidate of size more than two.  <a href="#b2"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classApriori__Trie.html#b3">find_candidate_two</a> (const vector&lt; <a class="el" href="common_8hpp.html#a0">itemtype</a> &gt; &amp;basket, const <a class="el" href="common_8hpp.html#a1">countertype</a> counter=1)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Increases the counter for those itempairs that are in the given basket.  <a href="#b3"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classApriori__Trie.html#b4">delete_infrequent_two</a> (const double min_occurrence)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes the Tries that represent infrequent itemsets of size 2.  <a href="#b4"></a><br></td></tr><tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classTrie.html">Trie</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classApriori__Trie.html#p0">main_trie</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classTrie.html">Trie</a> to store the candidates.  <a href="#p0"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">vector&lt; vector&lt; <a class="el" href="common_8hpp.html#a1">countertype</a> &gt; &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classApriori__Trie.html#p1">temp_counter_array</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">temp_counter_array stores the occurences of the itempairs  <a href="#p1"></a><br></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Apriori_Trie (or prefix-tree) is a tree-based datastructure. <p>Apriori_Trie is a special tree designed to provide efficient methods for the apriori algorithm. It mostly uses a regular trie except when there exist faster solution. For example for storing one and two itemset candidate where a simple vector and array gives better performance. Apriori_Trie extends the functions provided by the regular trie with a candidate generation process. <p><p>Definition at line <a class="el" href="Apriori__Trie_8hpp-source.html#l00035">35</a> of file <a class="el" href="Apriori__Trie_8hpp-source.html">Apriori_Trie.hpp</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2><a class="anchor" name="a0" doxytag="Apriori_Trie::Apriori_Trie"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">Apriori_Trie::Apriori_Trie           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="common_8hpp.html#a1">countertype</a>&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>counter_of_emptyset</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap><code> [inline]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>counter_of_emptyset</em>&nbsp;</td><td>The support of the empty set, i.e. the number of transactions. </td></tr>  </table></dl><p>Definition at line <a class="el" href="Apriori__Trie_8hpp-source.html#l00043">43</a> of file <a class="el" href="Apriori__Trie_8hpp-source.html">Apriori_Trie.hpp</a>.    </td>  </tr></table><a class="anchor" name="a6" doxytag="Apriori_Trie::~Apriori_Trie"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">Apriori_Trie::~<a class="el" href="classApriori__Trie.html">Apriori_Trie</a>           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap><code> [inline]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p><p>Definition at line <a class="el" href="Apriori__Trie_8hpp-source.html#l00074">74</a> of file <a class="el" href="Apriori__Trie_8hpp-source.html">Apriori_Trie.hpp</a>.    </td>  </tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="a2" doxytag="Apriori_Trie::candidate_generation"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">void Apriori_Trie::candidate_generation           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="common_8hpp.html#a0">itemtype</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>frequent_size</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap><a class="el" href="classInput__Output__Manager.html">Input_Output_Manager</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>input_output_manager</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Generates candidates. <p>Generates candidates and writes frequent itemset that are obtained in the previous iteration to disk. <p>Definition at line <a class="el" href="Apriori__Trie_8cpp-source.html#l00032">32</a> of file <a class="el" href="Apriori__Trie_8cpp-source.html">Apriori_Trie.cpp</a>.<p>References <a class="el" href="Apriori__Trie_8cpp-source.html#l00121">candidate_generation_assist()</a>, <a class="el" href="Apriori__Trie_8cpp-source.html#l00104">candidate_generation_two()</a>, and <a class="el" href="Apriori__Trie_8hpp-source.html#l00105">main_trie</a>.    </td>  </tr></table><a class="anchor" name="b2" doxytag="Apriori_Trie::candidate_generation_assist"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">void Apriori_Trie::candidate_generation_assist           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="classTrie.html">Trie</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>trie</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>set&lt; <a class="el" href="common_8hpp.html#a0">itemtype</a> &gt; &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>maybe_candidate</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap><a class="el" href="classInput__Output__Manager.html">Input_Output_Manager</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>input_output_manager</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [protected]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -