📄 a00100.html
字号:
<td class="md"></td> <td class="md" nowrap><a class="el" href="a00090.html">Polynomial</a>< U > & </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>V & </td> <td class="mdname" nowrap> <em>e</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <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> </td><td valign="top"><em>p</em> </td><td>a polynomial. </td></tr> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>a</em> </td><td>parameter of <img class="formulaInl" alt="$p(a)$" src="form_23.png"> . </td></tr> <tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>q</em> </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> <tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>e</em> </td><td>round-off error to be expected in the calculation of <img class="formulaInl" alt="$p(a)$" src="form_23.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>Polynomial<T>::evalAndDeflate(const U& x, Polynomial<U>& q) const<br> Polynomial<T>::evalAndDeflate(const U& x, Polynomial<U>& q, V& e) const<br> <a class="el" href="a00100.html#g0a6fc89686a91e3c8c99923a7b0247e3">evalAndDeflate(const Polynomial<T>& p, const U& x, Polynomial<U>& q)</a> </dd></dl><p>Definition at line <a class="el" href="a00107.html#l01011">1011</a> of file <a class="el" href="a00107.html">Polynomial.h</a>. </td> </tr></table><a class="anchor" name="g0a6fc89686a91e3c8c99923a7b0247e3"></a><!-- doxytag: member="Polynomial.h::evalAndDeflate" ref="g0a6fc89686a91e3c8c99923a7b0247e3" args="(const Polynomial< T > &p, const U &a, Polynomial< U > &q)" --><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<class T, class U> </td> </tr> <tr> <td class="md" nowrap valign="top">U evalAndDeflate </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="a00090.html">Polynomial</a>< T > & </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 U & </td> <td class="mdname" nowrap> <em>a</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="a00090.html">Polynomial</a>< U > & </td> <td class="mdname" nowrap> <em>q</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <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> </td><td valign="top"><em>p</em> </td><td>a polynomial. </td></tr> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>a</em> </td><td>parameter of <img class="formulaInl" alt="$p(a)$" src="form_23.png"> . </td></tr> <tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>q</em> </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>Polynomial<T>::evalAndDeflate(const U& x, Polynomial<U>& q) const<br> Polynomial<T>::evalAndDeflate(const U& x, Polynomial<U>& q, V& e) const<br> <a class="el" href="a00100.html#g2fe3a1cb7b5ae7739c3f228758d9f1fd">evalAndDeflate(const Polynomial<T>& p, const U& x, Polynomial<U>& q, V& e)</a> </dd></dl><p>Definition at line <a class="el" href="a00107.html#l00954">954</a> of file <a class="el" href="a00107.html">Polynomial.h</a>. </td> </tr></table><a class="anchor" name="gcc297191b953d7df4ecad642e13e7911"></a><!-- doxytag: member="Polynomial.h::evalAndDerive" ref="gcc297191b953d7df4ecad642e13e7911" args="(const Polynomial< T > &p, const U &x, U &ppx, U &pppx)" --><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<class T, class U> </td> </tr> <tr> <td class="md" nowrap valign="top">U evalAndDerive </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="a00090.html">Polynomial</a>< T > & </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 U & </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>U & </td> <td class="mdname" nowrap> <em>ppx</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>U & </td> <td class="mdname" nowrap> <em>pppx</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>evaluates <img class="formulaInl" alt="$p(x)$" src="form_21.png"> , first derivate <img class="formulaInl" alt="$p'(x)$" src="form_30.png"> , and second derivative <img class="formulaInl" alt="$p''(x)$" src="form_31.png"> at the same time.<p>Evaluates efficiently <img class="formulaInl" alt="$p(x)$" src="form_21.png"> , first derivate <img class="formulaInl" alt="$p'(x)$" src="form_30.png"> , and second derivative <img class="formulaInl" alt="$p''(x)$" src="form_31.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> </td><td valign="top"><em>p</em> </td><td>a polynomial. </td></tr> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>x</em> </td><td>variable to evaluate. </td></tr> <tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>ppx</em> </td><td>on exit contains <img class="formulaInl" alt="$p'(x)$" src="form_30.png"> . </td></tr> <tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>pppx</em> </td><td>on exit contains <img class="formulaInl" alt="$p''(x)$" src="form_31.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><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a00100.html#gc143079d7e07a2b902831ec539e45fc6">evalAndDerive(const Polynomial<T>& p, const U& x, U& ppx)</a> </dd></dl><p>Definition at line <a class="el" href="a00107.html#l01141">1141</a> of file <a class="el" href="a00107.html">Polynomial.h</a>. </td> </tr></table><a class="anchor" name="gc143079d7e07a2b902831ec539e45fc6"></a><!-- doxytag: member="Polynomial.h::evalAndDerive" ref="gc143079d7e07a2b902831ec539e45fc6" args="(const Polynomial< T > &p, const U &x, U &ppx)" --><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<class T, class U> </td> </tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -