Files
2016-04-27 01:07:35 -04:00

482 lines
18 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_51) on Wed Apr 06 13:11:04 EDT 2016 -->
<title>Mathe (Parallel Java 2 Library Documentation)</title>
<meta name="date" content="2016-04-06">
<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="Mathe (Parallel Java 2 Library Documentation)";
}
//-->
</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/Mathe.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-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../edu/rit/numeric/ListXYZSeries.html" title="class in edu.rit.numeric"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../edu/rit/numeric/MDFunction.html" title="interface in edu.rit.numeric"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?edu/rit/numeric/Mathe.html" target="_top">Frames</a></li>
<li><a href="Mathe.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">edu.rit.numeric</div>
<h2 title="Class Mathe" class="title">Class Mathe</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/7/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>edu.rit.numeric.Mathe</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">Mathe</span>
extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">Class Mathe provides static methods for various mathematical functions. The
class name is "Mathe" to distinguish it from class java.lang.Math.</div>
</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 double</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/numeric/Mathe.html#betai(double, double, double)">betai</a></strong>(double&nbsp;a,
double&nbsp;b,
double&nbsp;x)</code>
<div class="block">Returns the incomplete beta function
<I>I</I><SUB><I>x</I></SUB>(<I>a,b</I>).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static double</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/numeric/Mathe.html#binomProb(long, long, double)">binomProb</a></strong>(long&nbsp;n,
long&nbsp;k,
double&nbsp;p)</code>
<div class="block">Returns the binomial probability.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static double</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/numeric/Mathe.html#cumulBinomProb(long, long, double)">cumulBinomProb</a></strong>(long&nbsp;n,
long&nbsp;k,
double&nbsp;p)</code>
<div class="block">Returns the cumulative binomial probability.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static double</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/numeric/Mathe.html#erf(double)">erf</a></strong>(double&nbsp;x)</code>
<div class="block">Returns the error function erf(<I>x</I>).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static double</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/numeric/Mathe.html#erfc(double)">erfc</a></strong>(double&nbsp;x)</code>
<div class="block">Returns the complementary error function erfc(<I>x</I>).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static double</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/numeric/Mathe.html#gammp(double, double)">gammp</a></strong>(double&nbsp;a,
double&nbsp;x)</code>
<div class="block">Returns the incomplete gamma function, <I>P</I>(<I>a,x</I>).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static double</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/numeric/Mathe.html#gammq(double, double)">gammq</a></strong>(double&nbsp;a,
double&nbsp;x)</code>
<div class="block">Returns the complementary incomplete gamma function
<I>Q</I>(<I>a,x</I>) = 1&nbsp;&minus;&nbsp;<I>P</I>(<I>a,x</I>).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static double</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/numeric/Mathe.html#log2(double)">log2</a></strong>(double&nbsp;x)</code>
<div class="block">Returns the base-2 logarithm of <I>x</I>, log<SUB>2</SUB>&nbsp;<I>x</I>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static double</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/numeric/Mathe.html#logBinomProb(long, long, double)">logBinomProb</a></strong>(long&nbsp;n,
long&nbsp;k,
double&nbsp;p)</code>
<div class="block">Returns the logarithm of the binomial probability.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static double</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/numeric/Mathe.html#logChoose(long, long)">logChoose</a></strong>(long&nbsp;n,
long&nbsp;k)</code>
<div class="block">Returns the natural logarithm of the binomial coefficient,
log&nbsp;choose(<I>n,k</I>).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static double</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/numeric/Mathe.html#logFactorial(long)">logFactorial</a></strong>(long&nbsp;n)</code>
<div class="block">Returns the natural logarithm of the factorial function,
log&nbsp;<I>n</I>!.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static double</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/numeric/Mathe.html#logGamma(double)">logGamma</a></strong>(double&nbsp;x)</code>
<div class="block">Returns the natural logarithm of the gamma function,
log&nbsp;&Gamma;(<I>x</I>).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static double</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/numeric/Mathe.html#normalCDF(double, double, double)">normalCDF</a></strong>(double&nbsp;x,
double&nbsp;mu,
double&nbsp;sigma)</code>
<div class="block">Returns the cumulative normal distribution at <TT>x</TT> for the given
mean <TT>mu</TT> and standard deviation <TT>sigma</TT>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static double</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/numeric/Mathe.html#sqr(double)">sqr</a></strong>(double&nbsp;x)</code>
<div class="block">Returns <I>x</I><SUP>2</SUP>.</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/7/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/7/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/7/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/7/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/7/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/7/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/7/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/7/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/7/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/7/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/7/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/7/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="sqr(double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sqr</h4>
<pre>public static&nbsp;double&nbsp;sqr(double&nbsp;x)</pre>
<div class="block">Returns <I>x</I><SUP>2</SUP>.</div>
</li>
</ul>
<a name="log2(double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>log2</h4>
<pre>public static&nbsp;double&nbsp;log2(double&nbsp;x)</pre>
<div class="block">Returns the base-2 logarithm of <I>x</I>, log<SUB>2</SUB>&nbsp;<I>x</I>.</div>
</li>
</ul>
<a name="logGamma(double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>logGamma</h4>
<pre>public static&nbsp;double&nbsp;logGamma(double&nbsp;x)</pre>
<div class="block">Returns the natural logarithm of the gamma function,
log&nbsp;&Gamma;(<I>x</I>). If <I>x</I> is an integer, then
&Gamma;(<I>x</I>+1) = <I>x</I>!.</div>
</li>
</ul>
<a name="logFactorial(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>logFactorial</h4>
<pre>public static&nbsp;double&nbsp;logFactorial(long&nbsp;n)</pre>
<div class="block">Returns the natural logarithm of the factorial function,
log&nbsp;<I>n</I>!.</div>
</li>
</ul>
<a name="logChoose(long, long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>logChoose</h4>
<pre>public static&nbsp;double&nbsp;logChoose(long&nbsp;n,
long&nbsp;k)</pre>
<div class="block">Returns the natural logarithm of the binomial coefficient,
log&nbsp;choose(<I>n,k</I>).
choose(<I>n,k</I>)&nbsp;=&nbsp;<I>n</I>!/<I>k</I>!/(<I>n</I>&minus;<I>k</I>)!.</div>
</li>
</ul>
<a name="logBinomProb(long, long, double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>logBinomProb</h4>
<pre>public static&nbsp;double&nbsp;logBinomProb(long&nbsp;n,
long&nbsp;k,
double&nbsp;p)</pre>
<div class="block">Returns the logarithm of the binomial probability.
<TT>logBinomProb(n,k,p)</TT> = log
choose(<I>n,k</I>)&nbsp;+&nbsp;<I>k</I>&nbsp;log&nbsp;<I>p</I>&nbsp;+&nbsp;(<I>n</I>&minus;<I>k</I>)&nbsp;log&nbsp;(1&minus;<I>p</I>).</div>
</li>
</ul>
<a name="binomProb(long, long, double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>binomProb</h4>
<pre>public static&nbsp;double&nbsp;binomProb(long&nbsp;n,
long&nbsp;k,
double&nbsp;p)</pre>
<div class="block">Returns the binomial probability.
<TT>binomProb(n,k,p)</TT> =
choose(<I>n,k</I>)&nbsp;<I>p</I><SUP><I>k</I></SUP>&nbsp;(1&minus;<I>p</I>)<SUP><I>n</I>&minus;<I>k</I></SUP>.</div>
</li>
</ul>
<a name="cumulBinomProb(long, long, double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cumulBinomProb</h4>
<pre>public static&nbsp;double&nbsp;cumulBinomProb(long&nbsp;n,
long&nbsp;k,
double&nbsp;p)</pre>
<div class="block">Returns the cumulative binomial probability. This is the sum from
<I>i</I> = 0 to <I>k</I> of <a href="../../../edu/rit/numeric/Mathe.html#binomProb(long, long, double)"><code>binomProb(n,i,p)</code></a>.</div>
</li>
</ul>
<a name="gammp(double, double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>gammp</h4>
<pre>public static&nbsp;double&nbsp;gammp(double&nbsp;a,
double&nbsp;x)</pre>
<div class="block">Returns the incomplete gamma function, <I>P</I>(<I>a,x</I>).</div>
</li>
</ul>
<a name="gammq(double, double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>gammq</h4>
<pre>public static&nbsp;double&nbsp;gammq(double&nbsp;a,
double&nbsp;x)</pre>
<div class="block">Returns the complementary incomplete gamma function
<I>Q</I>(<I>a,x</I>) = 1&nbsp;&minus;&nbsp;<I>P</I>(<I>a,x</I>).</div>
</li>
</ul>
<a name="erf(double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>erf</h4>
<pre>public static&nbsp;double&nbsp;erf(double&nbsp;x)</pre>
<div class="block">Returns the error function erf(<I>x</I>).</div>
</li>
</ul>
<a name="erfc(double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>erfc</h4>
<pre>public static&nbsp;double&nbsp;erfc(double&nbsp;x)</pre>
<div class="block">Returns the complementary error function erfc(<I>x</I>).</div>
</li>
</ul>
<a name="normalCDF(double, double, double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>normalCDF</h4>
<pre>public static&nbsp;double&nbsp;normalCDF(double&nbsp;x,
double&nbsp;mu,
double&nbsp;sigma)</pre>
<div class="block">Returns the cumulative normal distribution at <TT>x</TT> for the given
mean <TT>mu</TT> and standard deviation <TT>sigma</TT>.</div>
</li>
</ul>
<a name="betai(double, double, double)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>betai</h4>
<pre>public static&nbsp;double&nbsp;betai(double&nbsp;a,
double&nbsp;b,
double&nbsp;x)</pre>
<div class="block">Returns the incomplete beta function
<I>I</I><SUB><I>x</I></SUB>(<I>a,b</I>).</div>
</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/Mathe.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-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../edu/rit/numeric/ListXYZSeries.html" title="class in edu.rit.numeric"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../edu/rit/numeric/MDFunction.html" title="interface in edu.rit.numeric"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?edu/rit/numeric/Mathe.html" target="_top">Frames</a></li>
<li><a href="Mathe.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><FONT SIZE="-2">Copyright &copy; 2013&ndash;2016 by Alan Kaminsky. All rights reserved. Send comments to ark</FONT><FONT SIZE="1" COLOR="#FFFFFF">&shy;</FONT><FONT SIZE="-2">&#64;</FONT><FONT SIZE="1" COLOR="#FFFFFF">&shy;</FONT><FONT SIZE="-2">cs.rit.edu.</FONT></small></p>
</body>
</html>