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

📄 a00090.html

📁 This library defines basic operation on polynomials, and contains also 3 different roots (zeroes)-fi
💻 HTML
📖 第 1 页 / 共 5 页
字号:
    <td><p>evaluates polynomial value <em>p(a)</em>, and computes <img class="formulaInl" alt="$\frac{p(x)}{(x - a)}$" src="form_22.png"> .<p>Evaluates <img class="formulaInl" alt="$p(a)$" src="form_23.png"> and polynomial <img class="formulaInl" alt="$q(x)=\frac{p(x)-p(a)}{(x - a)}$" src="form_24.png"> at the same time by Horner's recurence.<p>It can be shown that <img class="formulaInl" alt="$p(x)=q(x)(x - a)+p(a)$" src="form_25.png"> , which essentially means that <img class="formulaInl" alt="$p(a)$" src="form_23.png"> is the remainder of <img class="formulaInl" alt="$\frac{p(x)}{(x - a)}$" src="form_22.png"> . For the special case where <img class="formulaInl" alt="$a$" src="form_26.png"> is a root of <img class="formulaInl" alt="$p(x)$" src="form_21.png"> (i.e. <img class="formulaInl" alt="$p(a)=0$" src="form_27.png"> ), this operation is called <em>deflation</em>. That is, on exit <img class="formulaInl" alt="$q(x)$" src="form_28.png"> will have all the roots of <img class="formulaInl" alt="$p(x)$" src="form_21.png"> , except for the root <img class="formulaInl" alt="$a$" src="form_26.png"> .<p>No error checking is performed, so any validation for overflow, or underflow is the responsibility of the caller.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>a</em>&nbsp;</td><td>parameter of <img class="formulaInl" alt="$p(a)$" src="form_23.png"> . </td></tr>    <tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>q</em>&nbsp;</td><td>on exit contains the quotient <img class="formulaInl" alt="$q(x)=\frac{p(x)-p(a)}{(x - a)}$" src="form_24.png"> . </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd><img class="formulaInl" alt="$p(a)$" src="form_23.png"> , the remainder of <img class="formulaInl" alt="$\frac{p(x)}{(x - a)}$" src="form_22.png"> .</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a00100.html#g2fe3a1cb7b5ae7739c3f228758d9f1fd">evalAndDeflate(const Polynomial&lt;T&gt;&amp; p, const U&amp; x, Polynomial&lt;U&gt;&amp; q, V&amp; e)</a> </dd></dl><p>Definition at line <a class="el" href="a00107.html#l00339">339</a> of file <a class="el" href="a00107.html">Polynomial.h</a>.    </td>  </tr></table><a class="anchor" name="3035df8b06fcc5015efb56762fc68f93"></a><!-- doxytag: member="Polynomial::evalAndDerive" ref="3035df8b06fcc5015efb56762fc68f93" args="(const T &amp;x, T &amp;ppx) const " --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="mdPrefix" colspan="4">template&lt;class T&gt; </td>        </tr>        <tr>          <td class="md" nowrap valign="top">T <a class="el" href="a00090.html">Polynomial</a>&lt; T &gt;::evalAndDerive           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const T &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>x</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>T &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>ppx</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"> const<code> [inline]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>evaluates <img class="formulaInl" alt="$p(x)$" src="form_21.png"> and derivate <img class="formulaInl" alt="$dy=p'(x)$" src="form_29.png"> at the same time.<p>Evaluates efficiently <img class="formulaInl" alt="$p(x)$" src="form_21.png"> and first derivative <img class="formulaInl" alt="$p'(x)$" src="form_30.png"> at the same time.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>x</em>&nbsp;</td><td>variable to evaluate. </td></tr>    <tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>ppx</em>&nbsp;</td><td>on exit contains <img class="formulaInl" alt="$p'(x)$" src="form_30.png"> . </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The value of <img class="formulaInl" alt="$p(x)$" src="form_21.png"> . </dd></dl><p>Definition at line <a class="el" href="a00107.html#l00354">354</a> of file <a class="el" href="a00107.html">Polynomial.h</a>.    </td>  </tr></table><a class="anchor" name="c107df05015e0113aee17e6665ab8a60"></a><!-- doxytag: member="Polynomial::getDerivative" ref="c107df05015e0113aee17e6665ab8a60" args="(Polynomial&lt; T &gt; &amp;pp) const " --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="mdPrefix" colspan="4">template&lt;class T&gt; </td>        </tr>        <tr>          <td class="md" nowrap valign="top">void <a class="el" href="a00090.html">Polynomial</a>&lt; T &gt;::getDerivative           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="a00090.html">Polynomial</a>&lt; T &gt; &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>pp</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap> const<code> [inline]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>get derivative of <img class="formulaInl" alt="$p(x)$" src="form_21.png"> .<p>Computes the first derivative polynomial <img class="formulaInl" alt="$p'(x)$" src="form_30.png"> of polynomial <img class="formulaInl" alt="$p(x)$" src="form_21.png"> .<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>pp</em>&nbsp;</td><td>on exit, contains the first derivative <img class="formulaInl" alt="$p'(x)$" src="form_30.png"> .</td></tr>  </table></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a00090.html#3035df8b06fcc5015efb56762fc68f93">evalAndDerive(const T&amp; x, T&amp; ppx) const</a> </dd></dl><p>Definition at line <a class="el" href="a00107.html#l00287">287</a> of file <a class="el" href="a00107.html">Polynomial.h</a>.    </td>  </tr></table><a class="anchor" name="2fd33ef58c1d4dc24877322027a8bb50"></a><!-- doxytag: member="Polynomial::isMonic" ref="2fd33ef58c1d4dc24877322027a8bb50" args="() const " --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="mdPrefix" colspan="4">template&lt;class T&gt; </td>        </tr>        <tr>          <td class="md" nowrap valign="top">bool <a class="el" href="a00090.html">Polynomial</a>&lt; T &gt;::isMonic           </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> const<code> [inline]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>indicates if polynomial is monic. Indicates if polynomial is monic. A polynomial is said monic if its highest degree coeficient equals 1.<p><dl compact><dt><b>Returns:</b></dt><dd><code>true</code> if polynomial is monic.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a00090.html#246af5c906ec9a1a2fb7befea6d991ae">makeMonic()</a> </dd></dl><p>Definition at line <a class="el" href="a00107.html#l00273">273</a> of file <a class="el" href="a00107.html">Polynomial.h</a>.    </td>  </tr></table><a class="anchor" name="246af5c906ec9a1a2fb7befea6d991ae"></a><!-- doxytag: member="Polynomial::makeMonic" ref="246af5c906ec9a1a2fb7befea6d991ae" args="()" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="mdPrefix" colspan="4">template&lt;class T&gt; </td>        </tr>        <tr>          <td class="md" nowrap valign="top">void <a class="el" href="a00090.html">Polynomial</a>&lt; T &gt;::makeMonic           </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>makes polynomial monic.<p>Makes polynomial monic. A polynomial is said monic if its highest degree coeficient equals 1.<p><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a00090.html#2fd33ef58c1d4dc24877322027a8bb50">isMonic() const</a> </dd></dl><p>Definition at line <a class="el" href="a00107.html#l00257">257</a> of file <a class="el" href="a00107.html">Polynomial.h</a>.    </td>  </tr></table><a class="anchor" name="b2f6bf0ca6914dfcfb6e03862d162c7e"></a><!-- doxytag: member="Polynomial::operator *=" ref="b2f6bf0ca6914dfcfb6e03862d162c7e" args="(const T &amp;f)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="mdPrefix" colspan="4">template&lt;class T&gt; </td>        </tr>        <tr>          <td class="md" nowrap valign="top">const <a class="el" href="a00090.html">Polynomial</a>&lt;T&gt;&amp; <a class="el" href="a00090.html">Polynomial</a>&lt; T &gt;::operator *=           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const T &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>f</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>in-place polynomial scaling.<p>Polynomial scaling, performs the operation <img class="formulaInl" alt="$p(x)\leftarrow s.p(x)$" src="form_17.png"> .<p><dl compact><dt><b>Returns:</b></dt><dd>A constant reference to <code>this</code>.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a00101.html#g4db05aa06bba6b0f29a0c2608a479ec1">mul(Polynomial&lt;T&gt;&amp; r, const T&amp; s, const Polynomial&lt;T&gt;&amp; p)</a><br> Polynomial&lt;T&gt;::operator*= (const T&amp; f)<br> <a class="el" href="a00090.html#fedcfef27cf2f0a1f0075272a849b951">operator/</a> (const T&amp; f, const <a class="el" href="a00090.html#7de9b11369dc2daf64bbc609b3454baa">Polynomial&lt;T&gt;</a>&amp; p) </dd></dl><p>Definition at line <a class="el" href="a00107.html#l00451">451</a> of file <a class="el" href="a00107.html">Polynomial.h</a>.    </td>  </tr></table><a class="anchor" name="9c6951d37215e36ec4d171d26f90f487"></a><!-- doxytag: member="Polynomial::operator *=" ref="9c6951d37215e36ec4d171d26f90f487" args="(const Polynomial&lt; T &gt; &amp;p)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="mdPrefix" colspan="4">template&lt;class T&gt; </td>        </tr>        <tr>          <td class="md" nowrap valign="top">const <a class="el" href="a00090.html">Polynomial</a>&lt;T&gt; <a class="el" href="a00090.html">Polynomial</a>&lt; T &gt;::operator *=           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="a00090.html">Polynomial</a>&lt; T &gt; &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>p</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>

⌨️ 快捷键说明

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