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

📄 classinput__output__manager.html

📁 APRIOR算法的源程序.希望对大家有用,谁有FP-GROWTH算法的程序请给我发一份,谢谢.anne2422843@sina.com.cn
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!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: Input_Output_Manager 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>Input_Output_Manager Class Reference</h1>This class is responsible for the input, output and recode operations.  <a href="#_details">More...</a><p><code>#include &lt;<a class="el" href="Input__Output__Manager_8hpp-source.html">Input_Output_Manager.hpp</a>&gt;</code><p><a href="classInput__Output__Manager-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="classInput__Output__Manager.html#a0">Input_Output_Manager</a> (ifstream &amp;<a class="el" href="classInput__Output__Manager.html#r0">basket_file</a>, const char *output_file_name)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInput__Output__Manager.html#a1">read_in_a_line</a> (set&lt; <a class="el" href="common_8hpp.html#a0">itemtype</a> &gt; &amp;basket)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reads in one transaction from the basketfile.  <a href="#a1"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="common_8hpp.html#a1">countertype</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInput__Output__Manager.html#a2">find_frequent_items</a> (const double min_supp, vector&lt; <a class="el" href="common_8hpp.html#a1">countertype</a> &gt; &amp;support_of_items)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Determines the frequent items, fills in the new_code an new_code_inverse vectors.  <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="classInput__Output__Manager.html#a3">basket_recode</a> (const set&lt; <a class="el" href="common_8hpp.html#a0">itemtype</a> &gt; &amp;original_basket, vector&lt; <a class="el" href="common_8hpp.html#a0">itemtype</a> &gt; &amp;new_basket)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates an other basket that contains only the frequent items recoded.  <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="classInput__Output__Manager.html#a4">write_out_basket</a> (const set&lt; <a class="el" href="common_8hpp.html#a0">itemtype</a> &gt; &amp;itemset)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Writes out an itemset to the output file.  <a href="#a4"></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="classInput__Output__Manager.html#a5">write_out_basket_and_counter</a> (const set&lt; <a class="el" href="common_8hpp.html#a0">itemtype</a> &gt; &amp;itemset, const <a class="el" href="common_8hpp.html#a1">countertype</a> counter)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Writes out an itemset and its counter to the output file.  <a href="#a5"></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="classInput__Output__Manager.html#a6">rewind</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInput__Output__Manager.html#a7">~Input_Output_Manager</a> ()</td></tr><tr><td colspan="2"><br><h2>Private Attributes</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">ifstream &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInput__Output__Manager.html#r0">basket_file</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The file that contain the transactions (i.e baskets).  <a href="#r0"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">vector&lt; <a class="el" href="common_8hpp.html#a0">itemtype</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInput__Output__Manager.html#r1">new_code</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The new codes of the frequent items.  <a href="#r1"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">vector&lt; <a class="el" href="common_8hpp.html#a0">itemtype</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInput__Output__Manager.html#r2">new_code_inverse</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The inverse of new_code vector.  <a href="#r2"></a><br></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>This class is responsible for the input, output and recode operations. <p>In frequent itemset mining (FIM) algorithms only frequent items are of interest. Hence it is useful to represent frequent items with integers: <em>1, 2, ..., n</em>, where <em>n</em> is the number of frequent items. In the original transactional database, the items are also represented with integers, so we have to assign new integers to the frequent items. <p><p>Definition at line <a class="el" href="Input__Output__Manager_8hpp-source.html#l00034">34</a> of file <a class="el" href="Input__Output__Manager_8hpp-source.html">Input_Output_Manager.hpp</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2><a class="anchor" name="a0" doxytag="Input_Output_Manager::Input_Output_Manager"></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">Input_Output_Manager::Input_Output_Manager           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">ifstream &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>basket_file</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const char *&nbsp;</td>          <td class="mdname" nowrap> <em>output_file_name</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><dl compact><dt><b>Author:</b></dt><dd>Ferenc Bodon </dd></dl><p>Definition at line <a class="el" href="Input__Output__Manager_8cpp-source.html#l00017">17</a> of file <a class="el" href="Input__Output__Manager_8cpp-source.html">Input_Output_Manager.cpp</a>.    </td>  </tr></table><a class="anchor" name="a7" doxytag="Input_Output_Manager::~Input_Output_Manager"></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">Input_Output_Manager::~<a class="el" href="classInput__Output__Manager.html">Input_Output_Manager</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></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="Input__Output__Manager_8cpp-source.html#l00158">158</a> of file <a class="el" href="Input__Output__Manager_8cpp-source.html">Input_Output_Manager.cpp</a>.    </td>  </tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="a3" doxytag="Input_Output_Manager::basket_recode"></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 Input_Output_Manager::basket_recode           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const set&lt; <a class="el" href="common_8hpp.html#a0">itemtype</a> &gt; &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>original_basket</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>vector&lt; <a class="el" href="common_8hpp.html#a0">itemtype</a> &gt; &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>new_basket</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>Creates an other basket that contains only the frequent items recoded. <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>original_basket</em>&nbsp;</td><td>The basket to filter and recode. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>new_basket</em>&nbsp;</td><td>The created reduced basket </td></tr>  </table></dl><p>Definition at line <a class="el" href="Input__Output__Manager_8cpp-source.html#l00118">118</a> of file <a class="el" href="Input__Output__Manager_8cpp-source.html">Input_Output_Manager.cpp</a>.<p>References <a class="el" href="Input__Output__Manager_8hpp-source.html#l00074">new_code</a>.<p>Referenced by <a class="el" href="Apriori_8cpp-source.html#l00021">Apriori::support()</a>.    </td>  </tr></table><a class="anchor" name="a2" doxytag="Input_Output_Manager::find_frequent_items"></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"><a class="el" href="common_8hpp.html#a1">countertype</a> Input_Output_Manager::find_frequent_items           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const double&nbsp;</td>          <td class="mdname" nowrap> <em>min_supp</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>vector&lt; <a class="el" href="common_8hpp.html#a1">countertype</a> &gt; &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>support_of_items</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>Determines the frequent items, fills in the new_code an new_code_inverse vectors. <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>min_supp</em>&nbsp;</td><td>The (relative) support threshold. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>support_of_items</em>&nbsp;</td><td>The support of the items. The i<sup>th</sup> least frequent item's support is given by support_of_items[i]. </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The number of transactions that the basketfile contains.</dd></dl><p>Determining the support of the items<p>Finding the frequent items <p>Definition at line <a class="el" href="Input__Output__Manager_8cpp-source.html#l00059">59</a> of file <a class="el" href="Input__Output__Manager_8cpp-source.html">Input_Output_Manager.cpp</a>.<p>References <a class="el" href="common_8hpp-source.html#l00032">countertype</a>, <a class="el" href="Input__Output__Manager_8hpp-source.html#l00074">new_code</a>, <a class="el" href="Input__Output__Manager_8hpp-source.html#l00080">new_code_inverse</a>, and <a class="el" href="Input__Output__Manager_8cpp-source.html#l00027">read_in_a_line()</a>.    </td>  </tr></table><a class="anchor" name="a1" doxytag="Input_Output_Manager::read_in_a_line"></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">int Input_Output_Manager::read_in_a_line           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">set&lt; <a class="el" href="common_8hpp.html#a0">itemtype</a> &gt; &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>basket</em>          </td>

⌨️ 快捷键说明

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