blob: b58c40b8b44cf77d2a4b11c0659262d78a887558 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>PolynomialsUtils (Apache Commons Math 3.3 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="PolynomialsUtils (Apache Commons Math 3.3 API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/PolynomialsUtils.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialSplineFunction.html" title="class in org.apache.commons.math3.analysis.polynomials"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/commons/math3/analysis/polynomials/PolynomialsUtils.html" target="_top">Frames</a></li>
<li><a href="PolynomialsUtils.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.commons.math3.analysis.polynomials</div>
<h2 title="Class PolynomialsUtils" class="title">Class PolynomialsUtils</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.commons.math3.analysis.polynomials.PolynomialsUtils</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">PolynomialsUtils</span>
extends <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">A collection of static methods that operate on or return polynomials.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>2.0</dd>
<dt><span class="strong">Version:</span></dt>
<dd>$Id: PolynomialsUtils.java 1517203 2013-08-24 21:55:35Z psteitz $</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" title="class in org.apache.commons.math3.analysis.polynomials">PolynomialFunction</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialsUtils.html#createChebyshevPolynomial(int)">createChebyshevPolynomial</a></strong>(int&nbsp;degree)</code>
<div class="block">Create a Chebyshev polynomial of the first kind.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" title="class in org.apache.commons.math3.analysis.polynomials">PolynomialFunction</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialsUtils.html#createHermitePolynomial(int)">createHermitePolynomial</a></strong>(int&nbsp;degree)</code>
<div class="block">Create a Hermite polynomial.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" title="class in org.apache.commons.math3.analysis.polynomials">PolynomialFunction</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialsUtils.html#createJacobiPolynomial(int, int, int)">createJacobiPolynomial</a></strong>(int&nbsp;degree,
int&nbsp;v,
int&nbsp;w)</code>
<div class="block">Create a Jacobi polynomial.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" title="class in org.apache.commons.math3.analysis.polynomials">PolynomialFunction</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialsUtils.html#createLaguerrePolynomial(int)">createLaguerrePolynomial</a></strong>(int&nbsp;degree)</code>
<div class="block">Create a Laguerre polynomial.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" title="class in org.apache.commons.math3.analysis.polynomials">PolynomialFunction</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialsUtils.html#createLegendrePolynomial(int)">createLegendrePolynomial</a></strong>(int&nbsp;degree)</code>
<div class="block">Create a Legendre polynomial.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static double[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialsUtils.html#shift(double[], double)">shift</a></strong>(double[]&nbsp;coefficients,
double&nbsp;shift)</code>
<div class="block">Compute the coefficients of the polynomial <code>P<sub>s</sub>(x)</code>
whose values at point <code>x</code> will be the same as the those from the
original polynomial <code>P(x)</code> when computed at <code>x + shift</code>.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="createChebyshevPolynomial(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createChebyshevPolynomial</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" title="class in org.apache.commons.math3.analysis.polynomials">PolynomialFunction</a>&nbsp;createChebyshevPolynomial(int&nbsp;degree)</pre>
<div class="block">Create a Chebyshev polynomial of the first kind.
<p><a href="http://mathworld.wolfram.com/ChebyshevPolynomialoftheFirstKind.html">Chebyshev
polynomials of the first kind</a> are orthogonal polynomials.
They can be defined by the following recurrence relations:
<pre>
T<sub>0</sub>(X) = 1
T<sub>1</sub>(X) = X
T<sub>k+1</sub>(X) = 2X T<sub>k</sub>(X) - T<sub>k-1</sub>(X)
</pre></p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>degree</code> - degree of the polynomial</dd>
<dt><span class="strong">Returns:</span></dt><dd>Chebyshev polynomial of specified degree</dd></dl>
</li>
</ul>
<a name="createHermitePolynomial(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createHermitePolynomial</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" title="class in org.apache.commons.math3.analysis.polynomials">PolynomialFunction</a>&nbsp;createHermitePolynomial(int&nbsp;degree)</pre>
<div class="block">Create a Hermite polynomial.
<p><a href="http://mathworld.wolfram.com/HermitePolynomial.html">Hermite
polynomials</a> are orthogonal polynomials.
They can be defined by the following recurrence relations:
<pre>
H<sub>0</sub>(X) = 1
H<sub>1</sub>(X) = 2X
H<sub>k+1</sub>(X) = 2X H<sub>k</sub>(X) - 2k H<sub>k-1</sub>(X)
</pre></p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>degree</code> - degree of the polynomial</dd>
<dt><span class="strong">Returns:</span></dt><dd>Hermite polynomial of specified degree</dd></dl>
</li>
</ul>
<a name="createLaguerrePolynomial(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createLaguerrePolynomial</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" title="class in org.apache.commons.math3.analysis.polynomials">PolynomialFunction</a>&nbsp;createLaguerrePolynomial(int&nbsp;degree)</pre>
<div class="block">Create a Laguerre polynomial.
<p><a href="http://mathworld.wolfram.com/LaguerrePolynomial.html">Laguerre
polynomials</a> are orthogonal polynomials.
They can be defined by the following recurrence relations:
<pre>
L<sub>0</sub>(X) = 1
L<sub>1</sub>(X) = 1 - X
(k+1) L<sub>k+1</sub>(X) = (2k + 1 - X) L<sub>k</sub>(X) - k L<sub>k-1</sub>(X)
</pre></p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>degree</code> - degree of the polynomial</dd>
<dt><span class="strong">Returns:</span></dt><dd>Laguerre polynomial of specified degree</dd></dl>
</li>
</ul>
<a name="createLegendrePolynomial(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createLegendrePolynomial</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" title="class in org.apache.commons.math3.analysis.polynomials">PolynomialFunction</a>&nbsp;createLegendrePolynomial(int&nbsp;degree)</pre>
<div class="block">Create a Legendre polynomial.
<p><a href="http://mathworld.wolfram.com/LegendrePolynomial.html">Legendre
polynomials</a> are orthogonal polynomials.
They can be defined by the following recurrence relations:
<pre>
P<sub>0</sub>(X) = 1
P<sub>1</sub>(X) = X
(k+1) P<sub>k+1</sub>(X) = (2k+1) X P<sub>k</sub>(X) - k P<sub>k-1</sub>(X)
</pre></p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>degree</code> - degree of the polynomial</dd>
<dt><span class="strong">Returns:</span></dt><dd>Legendre polynomial of specified degree</dd></dl>
</li>
</ul>
<a name="createJacobiPolynomial(int, int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createJacobiPolynomial</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" title="class in org.apache.commons.math3.analysis.polynomials">PolynomialFunction</a>&nbsp;createJacobiPolynomial(int&nbsp;degree,
int&nbsp;v,
int&nbsp;w)</pre>
<div class="block">Create a Jacobi polynomial.
<p><a href="http://mathworld.wolfram.com/JacobiPolynomial.html">Jacobi
polynomials</a> are orthogonal polynomials.
They can be defined by the following recurrence relations:
<pre>
P<sub>0</sub><sup>vw</sup>(X) = 1
P<sub>-1</sub><sup>vw</sup>(X) = 0
2k(k + v + w)(2k + v + w - 2) P<sub>k</sub><sup>vw</sup>(X) =
(2k + v + w - 1)[(2k + v + w)(2k + v + w - 2) X + v<sup>2</sup> - w<sup>2</sup>] P<sub>k-1</sub><sup>vw</sup>(X)
- 2(k + v - 1)(k + w - 1)(2k + v + w) P<sub>k-2</sub><sup>vw</sup>(X)
</pre></p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>degree</code> - degree of the polynomial</dd><dd><code>v</code> - first exponent</dd><dd><code>w</code> - second exponent</dd>
<dt><span class="strong">Returns:</span></dt><dd>Jacobi polynomial of specified degree</dd></dl>
</li>
</ul>
<a name="shift(double[], double)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>shift</h4>
<pre>public static&nbsp;double[]&nbsp;shift(double[]&nbsp;coefficients,
double&nbsp;shift)</pre>
<div class="block">Compute the coefficients of the polynomial <code>P<sub>s</sub>(x)</code>
whose values at point <code>x</code> will be the same as the those from the
original polynomial <code>P(x)</code> when computed at <code>x + shift</code>.
Thus, if <code>P(x) = &Sigma;<sub>i</sub> a<sub>i</sub> x<sup>i</sup></code>,
then
<pre>
<table>
<tr>
<td><code>P<sub>s</sub>(x)</td>
<td>= &Sigma;<sub>i</sub> b<sub>i</sub> x<sup>i</sup></code></td>
</tr>
<tr>
<td></td>
<td>= &Sigma;<sub>i</sub> a<sub>i</sub> (x + shift)<sup>i</sup></code></td>
</tr>
</table>
</pre></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>coefficients</code> - Coefficients of the original polynomial.</dd><dd><code>shift</code> - Shift value.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the coefficients <code>b<sub>i</sub></code> of the shifted
polynomial.</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/PolynomialsUtils.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialSplineFunction.html" title="class in org.apache.commons.math3.analysis.polynomials"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/commons/math3/analysis/polynomials/PolynomialsUtils.html" target="_top">Frames</a></li>
<li><a href="PolynomialsUtils.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2003&#x2013;2014 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>