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

📄 group__gdsl__perm.html

📁 一个通用的C语言实现的数据结构
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<p>Set the name of a permutation. <p>Change the previous name of the permutation P to a copy of NEW_NAME.<p><dl compact><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl><dl compact><dt><b>Precondition:</b></dt><dd>P must be a valid gdsl_perm_t </dd></dl><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>P</em>&nbsp;</td><td>The permutation to change the name </td></tr>    <tr><td valign="top"></td><td valign="top"><em>NEW_NAME</em>&nbsp;</td><td>The new name of P </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>the modified permutation in case of success. <p>NULL in case of insufficient memory. </dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__perm.html#gb4feda5cbd58558d67c49244c33a4481">gdsl_perm_get_name()</a> </dd></dl>    </td>  </tr></table><a class="anchor" name="g96c51be096313fb40d8ef6a216b5ee54"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_linear_next" ref="g96c51be096313fb40d8ef6a216b5ee54" args="(gdsl_perm_t P)" --><p><table class="mdTable" 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="group__gdsl__perm.html#gd6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> gdsl_perm_linear_next           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="group__gdsl__perm.html#gd6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>P</em>          </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>Get the next permutation from a linear permutation. <p>The permutation P is modified to become the next permutation after P.<p><dl compact><dt><b>Note:</b></dt><dd>Complexity: O( |P| ) </dd></dl><dl compact><dt><b>Precondition:</b></dt><dd>P must be a valid linear gdsl_perm_t &amp; |P| &gt; 1 </dd></dl><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>P</em>&nbsp;</td><td>The linear permutation to modify </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>the next permutation after the permutation P. <p>NULL if P is already the last permutation. </dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__perm.html#gab88f0c950081d8ffa112e54bb7435fc">gdsl_perm_linear_prev()</a> </dd></dl>    </td>  </tr></table><a class="anchor" name="gab88f0c950081d8ffa112e54bb7435fc"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_linear_prev" ref="gab88f0c950081d8ffa112e54bb7435fc" args="(gdsl_perm_t P)" --><p><table class="mdTable" 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="group__gdsl__perm.html#gd6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> gdsl_perm_linear_prev           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="group__gdsl__perm.html#gd6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>P</em>          </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>Get the previous permutation from a linear permutation. <p>The permutation P is modified to become the previous permutation before P.<p><dl compact><dt><b>Note:</b></dt><dd>Complexity: O( |P| ) </dd></dl><dl compact><dt><b>Precondition:</b></dt><dd>P must be a valid linear gdsl_perm_t &amp; |P| &gt;= 2 </dd></dl><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>P</em>&nbsp;</td><td>The linear permutation to modify </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>the previous permutation before the permutation P. <p>NULL if P is already the first permutation. </dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__perm.html#g96c51be096313fb40d8ef6a216b5ee54">gdsl_perm_linear_next()</a> </dd></dl>    </td>  </tr></table><a class="anchor" name="gb6a8108d042d230f0838e975d439656a"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_set_elements_array" ref="gb6a8108d042d230f0838e975d439656a" args="(gdsl_perm_t P, const ulong *ARRAY)" --><p><table class="mdTable" 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="group__gdsl__perm.html#gd6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> gdsl_perm_set_elements_array           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="group__gdsl__perm.html#gd6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&nbsp;</td>          <td class="mdname" nowrap> <em>P</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const <a class="el" href="group__gdsl__types.html#g9c34ac44da309b004570530c8cec8a0e">ulong</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>ARRAY</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>Initialize a permutation with an array of values. <p>Initialize the permutation P with the values contained in the array of values ARRAY. If ARRAY does not design a permutation, then P is left unchanged.<p><dl compact><dt><b>Note:</b></dt><dd>Complexity: O( |P| ) </dd></dl><dl compact><dt><b>Precondition:</b></dt><dd>P must be a valid gdsl_perm_t &amp; V != NULL &amp; |V| == |P| </dd></dl><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>P</em>&nbsp;</td><td>The permutation to initialize </td></tr>    <tr><td valign="top"></td><td valign="top"><em>ARRAY</em>&nbsp;</td><td>The array of values to initialize P </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>the modified permutation in case of success. <p>NULL in case V does not design a valid permutation. </dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__perm.html#ga5e0d0afabe6d79d5ce04da174b8667b">gdsl_perm_get_elements_array()</a> </dd></dl>    </td>  </tr></table><a class="anchor" name="gd38dd48e3815e438a53d119c39753ee0"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_multiply" ref="gd38dd48e3815e438a53d119c39753ee0" args="(gdsl_perm_t RESULT, const gdsl_perm_t ALPHA, const gdsl_perm_t BETA)" --><p><table class="mdTable" 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="group__gdsl__perm.html#gd6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> gdsl_perm_multiply           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="group__gdsl__perm.html#gd6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&nbsp;</td>          <td class="mdname" nowrap> <em>RESULT</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const <a class="el" href="group__gdsl__perm.html#gd6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&nbsp;</td>          <td class="mdname" nowrap> <em>ALPHA</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const <a class="el" href="group__gdsl__perm.html#gd6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&nbsp;</td>          <td class="mdname" nowrap> <em>BETA</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>Multiply two permutations. <p>Compute the product of the permutations ALPHA x BETA and puts the result in RESULT without modifying ALPHA and BETA.<p><dl compact><dt><b>Note:</b></dt><dd>Complexity: O( |RESULT| ) </dd></dl><dl compact><dt><b>Precondition:</b></dt><dd>RESULT, ALPHA and BETA must be valids gdsl_perm_t &amp; |RESULT| == |ALPHA| == |BETA| </dd></dl><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>RESULT</em>&nbsp;</td><td>The result of the product ALPHA x BETA </td></tr>    <tr><td valign="top"></td><td valign="top"><em>ALPHA</em>&nbsp;</td><td>The first permutation used in the product </td></tr>    <tr><td valign="top"></td><td valign="top"><em>BETA</em>&nbsp;</td><td>The second permutation used in the product </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>RESULT, the result of the multiplication of the permutations A and B. </dd></dl>    </td>  </tr></table><a class="anchor" name="gd015b546ff3bad397617661869a1fcfb"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_linear_to_canonical" ref="gd015b546ff3bad397617661869a1fcfb" args="(gdsl_perm_t Q, const gdsl_perm_t P)" --><p><table class="mdTable" 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="group__gdsl__perm.html#gd6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> gdsl_perm_linear_to_canonical           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="group__gdsl__perm.html#gd6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&nbsp;</td>          <td class="mdname" nowrap> <em>Q</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const <a class="el" href="group__gdsl__perm.html#gd6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&nbsp;</td>          <td class="mdname" nowrap> <em>P</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>

⌨️ 快捷键说明

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