commons-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r948061 [13/22] - in /websites/production/commons/content/proper/commons-math: ./ xref/ xref/org/apache/commons/math3/ xref/org/apache/commons/math3/analysis/ xref/org/apache/commons/math3/analysis/differentiation/ xref/org/apache/commons/m...
Date Fri, 17 Apr 2015 19:17:18 GMT
Modified: websites/production/commons/content/proper/commons-math/xref/org/apache/commons/math3/random/EmpiricalDistribution.html
==============================================================================
--- websites/production/commons/content/proper/commons-math/xref/org/apache/commons/math3/random/EmpiricalDistribution.html (original)
+++ websites/production/commons/content/proper/commons-math/xref/org/apache/commons/math3/random/EmpiricalDistribution.html Fri Apr 17 19:17:13 2015
@@ -628,221 +628,230 @@
 <a class="jxr_linenumber" name="L620" href="#L620">620</a> <em class="jxr_javadoccomment">     * &lt;li&gt;Compute K(B) = the probability mass of B with respect to the within-bin kernel</em>
 <a class="jxr_linenumber" name="L621" href="#L621">621</a> <em class="jxr_javadoccomment">     * and K(B-) = the kernel distribution evaluated at the lower endpoint of B&lt;/li&gt;</em>
 <a class="jxr_linenumber" name="L622" href="#L622">622</a> <em class="jxr_javadoccomment">     * &lt;li&gt;Return P(B-) + P(B) * [K(x) - K(B-)] / K(B) where</em>
-<a class="jxr_linenumber" name="L623" href="#L623">623</a> <em class="jxr_javadoccomment">     * K(x) is the within-bin kernel distribution function evaluated at x.&lt;/li&gt;&lt;/ol&gt;&lt;/p&gt;</em>
-<a class="jxr_linenumber" name="L624" href="#L624">624</a> <em class="jxr_javadoccomment">     *</em>
-<a class="jxr_linenumber" name="L625" href="#L625">625</a> <em class="jxr_javadoccomment">     * @since 3.1</em>
-<a class="jxr_linenumber" name="L626" href="#L626">626</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L627" href="#L627">627</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> cumulativeProbability(<strong class="jxr_keyword">double</strong> x) {
-<a class="jxr_linenumber" name="L628" href="#L628">628</a>         <strong class="jxr_keyword">if</strong> (x &lt; min) {
-<a class="jxr_linenumber" name="L629" href="#L629">629</a>             <strong class="jxr_keyword">return</strong> 0d;
-<a class="jxr_linenumber" name="L630" href="#L630">630</a>         } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (x &gt;= max) {
-<a class="jxr_linenumber" name="L631" href="#L631">631</a>             <strong class="jxr_keyword">return</strong> 1d;
-<a class="jxr_linenumber" name="L632" href="#L632">632</a>         }
-<a class="jxr_linenumber" name="L633" href="#L633">633</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> binIndex = findBin(x);
-<a class="jxr_linenumber" name="L634" href="#L634">634</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> pBminus = pBminus(binIndex);
-<a class="jxr_linenumber" name="L635" href="#L635">635</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> pB = pB(binIndex);
-<a class="jxr_linenumber" name="L636" href="#L636">636</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] binBounds = getUpperBounds();
-<a class="jxr_linenumber" name="L637" href="#L637">637</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> kB = kB(binIndex);
-<a class="jxr_linenumber" name="L638" href="#L638">638</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> lower = binIndex == 0 ? min : binBounds[binIndex - 1];
-<a class="jxr_linenumber" name="L639" href="#L639">639</a>         <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/math3/distribution/RealDistribution.html">RealDistribution</a> kernel = k(x);
-<a class="jxr_linenumber" name="L640" href="#L640">640</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> withinBinCum =
-<a class="jxr_linenumber" name="L641" href="#L641">641</a>             (kernel.cumulativeProbability(x) -  kernel.cumulativeProbability(lower)) / kB;
-<a class="jxr_linenumber" name="L642" href="#L642">642</a>         <strong class="jxr_keyword">return</strong> pBminus + pB * withinBinCum;
-<a class="jxr_linenumber" name="L643" href="#L643">643</a>     }
-<a class="jxr_linenumber" name="L644" href="#L644">644</a> 
-<a class="jxr_linenumber" name="L645" href="#L645">645</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L646" href="#L646">646</a> <em class="jxr_javadoccomment">     * {@inheritDoc}</em>
-<a class="jxr_linenumber" name="L647" href="#L647">647</a> <em class="jxr_javadoccomment">     *</em>
-<a class="jxr_linenumber" name="L648" href="#L648">648</a> <em class="jxr_javadoccomment">     * &lt;p&gt;Algorithm description:&lt;ol&gt;</em>
-<a class="jxr_linenumber" name="L649" href="#L649">649</a> <em class="jxr_javadoccomment">     * &lt;li&gt;Find the smallest i such that the sum of the masses of the bins</em>
-<a class="jxr_linenumber" name="L650" href="#L650">650</a> <em class="jxr_javadoccomment">     *  through i is at least p.&lt;/li&gt;</em>
-<a class="jxr_linenumber" name="L651" href="#L651">651</a> <em class="jxr_javadoccomment">     * &lt;li&gt;</em>
-<a class="jxr_linenumber" name="L652" href="#L652">652</a> <em class="jxr_javadoccomment">     *   Let K be the within-bin kernel distribution for bin i.&lt;/br&gt;</em>
-<a class="jxr_linenumber" name="L653" href="#L653">653</a> <em class="jxr_javadoccomment">     *   Let K(B) be the mass of B under K. &lt;br/&gt;</em>
-<a class="jxr_linenumber" name="L654" href="#L654">654</a> <em class="jxr_javadoccomment">     *   Let K(B-) be K evaluated at the lower endpoint of B (the combined</em>
-<a class="jxr_linenumber" name="L655" href="#L655">655</a> <em class="jxr_javadoccomment">     *   mass of the bins below B under K).&lt;br/&gt;</em>
-<a class="jxr_linenumber" name="L656" href="#L656">656</a> <em class="jxr_javadoccomment">     *   Let P(B) be the probability of bin i.&lt;br/&gt;</em>
-<a class="jxr_linenumber" name="L657" href="#L657">657</a> <em class="jxr_javadoccomment">     *   Let P(B-) be the sum of the bin masses below bin i. &lt;br/&gt;</em>
-<a class="jxr_linenumber" name="L658" href="#L658">658</a> <em class="jxr_javadoccomment">     *   Let pCrit = p - P(B-)&lt;br/&gt;</em>
-<a class="jxr_linenumber" name="L659" href="#L659">659</a> <em class="jxr_javadoccomment">     * &lt;li&gt;Return the inverse of K evaluated at &lt;br/&gt;</em>
-<a class="jxr_linenumber" name="L660" href="#L660">660</a> <em class="jxr_javadoccomment">     *    K(B-) + pCrit * K(B) / P(B) &lt;/li&gt;</em>
-<a class="jxr_linenumber" name="L661" href="#L661">661</a> <em class="jxr_javadoccomment">     *  &lt;/ol&gt;&lt;/p&gt;</em>
-<a class="jxr_linenumber" name="L662" href="#L662">662</a> <em class="jxr_javadoccomment">     *</em>
-<a class="jxr_linenumber" name="L663" href="#L663">663</a> <em class="jxr_javadoccomment">     * @since 3.1</em>
-<a class="jxr_linenumber" name="L664" href="#L664">664</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L665" href="#L665">665</a>     @Override
-<a class="jxr_linenumber" name="L666" href="#L666">666</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> inverseCumulativeProbability(<strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> p) <strong class="jxr_keyword">throws</strong> OutOfRangeException {
-<a class="jxr_linenumber" name="L667" href="#L667">667</a>         <strong class="jxr_keyword">if</strong> (p &lt; 0.0 || p &gt; 1.0) {
-<a class="jxr_linenumber" name="L668" href="#L668">668</a>             <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html">OutOfRangeException</a>(p, 0, 1);
-<a class="jxr_linenumber" name="L669" href="#L669">669</a>         }
-<a class="jxr_linenumber" name="L670" href="#L670">670</a> 
-<a class="jxr_linenumber" name="L671" href="#L671">671</a>         <strong class="jxr_keyword">if</strong> (p == 0.0) {
-<a class="jxr_linenumber" name="L672" href="#L672">672</a>             <strong class="jxr_keyword">return</strong> getSupportLowerBound();
-<a class="jxr_linenumber" name="L673" href="#L673">673</a>         }
-<a class="jxr_linenumber" name="L674" href="#L674">674</a> 
-<a class="jxr_linenumber" name="L675" href="#L675">675</a>         <strong class="jxr_keyword">if</strong> (p == 1.0) {
-<a class="jxr_linenumber" name="L676" href="#L676">676</a>             <strong class="jxr_keyword">return</strong> getSupportUpperBound();
-<a class="jxr_linenumber" name="L677" href="#L677">677</a>         }
-<a class="jxr_linenumber" name="L678" href="#L678">678</a> 
-<a class="jxr_linenumber" name="L679" href="#L679">679</a>         <strong class="jxr_keyword">int</strong> i = 0;
-<a class="jxr_linenumber" name="L680" href="#L680">680</a>         <strong class="jxr_keyword">while</strong> (cumBinP(i) &lt; p) {
-<a class="jxr_linenumber" name="L681" href="#L681">681</a>             i++;
+<a class="jxr_linenumber" name="L623" href="#L623">623</a> <em class="jxr_javadoccomment">     * K(x) is the within-bin kernel distribution function evaluated at x.&lt;/li&gt;&lt;/ol&gt;</em>
+<a class="jxr_linenumber" name="L624" href="#L624">624</a> <em class="jxr_javadoccomment">     * If K is a constant distribution, we return P(B-) + P(B) (counting the full</em>
+<a class="jxr_linenumber" name="L625" href="#L625">625</a> <em class="jxr_javadoccomment">     * mass of B).&lt;/p&gt;</em>
+<a class="jxr_linenumber" name="L626" href="#L626">626</a> <em class="jxr_javadoccomment">     *</em>
+<a class="jxr_linenumber" name="L627" href="#L627">627</a> <em class="jxr_javadoccomment">     * @since 3.1</em>
+<a class="jxr_linenumber" name="L628" href="#L628">628</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L629" href="#L629">629</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> cumulativeProbability(<strong class="jxr_keyword">double</strong> x) {
+<a class="jxr_linenumber" name="L630" href="#L630">630</a>         <strong class="jxr_keyword">if</strong> (x &lt; min) {
+<a class="jxr_linenumber" name="L631" href="#L631">631</a>             <strong class="jxr_keyword">return</strong> 0d;
+<a class="jxr_linenumber" name="L632" href="#L632">632</a>         } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (x &gt;= max) {
+<a class="jxr_linenumber" name="L633" href="#L633">633</a>             <strong class="jxr_keyword">return</strong> 1d;
+<a class="jxr_linenumber" name="L634" href="#L634">634</a>         }
+<a class="jxr_linenumber" name="L635" href="#L635">635</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> binIndex = findBin(x);
+<a class="jxr_linenumber" name="L636" href="#L636">636</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> pBminus = pBminus(binIndex);
+<a class="jxr_linenumber" name="L637" href="#L637">637</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> pB = pB(binIndex);
+<a class="jxr_linenumber" name="L638" href="#L638">638</a>         <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/math3/distribution/RealDistribution.html">RealDistribution</a> kernel = k(x);
+<a class="jxr_linenumber" name="L639" href="#L639">639</a>         <strong class="jxr_keyword">if</strong> (kernel instanceof ConstantRealDistribution) {
+<a class="jxr_linenumber" name="L640" href="#L640">640</a>             <strong class="jxr_keyword">if</strong> (x &lt; kernel.getNumericalMean()) {
+<a class="jxr_linenumber" name="L641" href="#L641">641</a>                 <strong class="jxr_keyword">return</strong> pBminus;
+<a class="jxr_linenumber" name="L642" href="#L642">642</a>             } <strong class="jxr_keyword">else</strong> {
+<a class="jxr_linenumber" name="L643" href="#L643">643</a>                 <strong class="jxr_keyword">return</strong> pBminus + pB;
+<a class="jxr_linenumber" name="L644" href="#L644">644</a>             }
+<a class="jxr_linenumber" name="L645" href="#L645">645</a>         }
+<a class="jxr_linenumber" name="L646" href="#L646">646</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] binBounds = getUpperBounds();
+<a class="jxr_linenumber" name="L647" href="#L647">647</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> kB = kB(binIndex);
+<a class="jxr_linenumber" name="L648" href="#L648">648</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> lower = binIndex == 0 ? min : binBounds[binIndex - 1];
+<a class="jxr_linenumber" name="L649" href="#L649">649</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> withinBinCum =
+<a class="jxr_linenumber" name="L650" href="#L650">650</a>             (kernel.cumulativeProbability(x) -  kernel.cumulativeProbability(lower)) / kB;
+<a class="jxr_linenumber" name="L651" href="#L651">651</a>         <strong class="jxr_keyword">return</strong> pBminus + pB * withinBinCum;
+<a class="jxr_linenumber" name="L652" href="#L652">652</a>     }
+<a class="jxr_linenumber" name="L653" href="#L653">653</a> 
+<a class="jxr_linenumber" name="L654" href="#L654">654</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L655" href="#L655">655</a> <em class="jxr_javadoccomment">     * {@inheritDoc}</em>
+<a class="jxr_linenumber" name="L656" href="#L656">656</a> <em class="jxr_javadoccomment">     *</em>
+<a class="jxr_linenumber" name="L657" href="#L657">657</a> <em class="jxr_javadoccomment">     * &lt;p&gt;Algorithm description:&lt;ol&gt;</em>
+<a class="jxr_linenumber" name="L658" href="#L658">658</a> <em class="jxr_javadoccomment">     * &lt;li&gt;Find the smallest i such that the sum of the masses of the bins</em>
+<a class="jxr_linenumber" name="L659" href="#L659">659</a> <em class="jxr_javadoccomment">     *  through i is at least p.&lt;/li&gt;</em>
+<a class="jxr_linenumber" name="L660" href="#L660">660</a> <em class="jxr_javadoccomment">     * &lt;li&gt;</em>
+<a class="jxr_linenumber" name="L661" href="#L661">661</a> <em class="jxr_javadoccomment">     *   Let K be the within-bin kernel distribution for bin i.&lt;/br&gt;</em>
+<a class="jxr_linenumber" name="L662" href="#L662">662</a> <em class="jxr_javadoccomment">     *   Let K(B) be the mass of B under K. &lt;br/&gt;</em>
+<a class="jxr_linenumber" name="L663" href="#L663">663</a> <em class="jxr_javadoccomment">     *   Let K(B-) be K evaluated at the lower endpoint of B (the combined</em>
+<a class="jxr_linenumber" name="L664" href="#L664">664</a> <em class="jxr_javadoccomment">     *   mass of the bins below B under K).&lt;br/&gt;</em>
+<a class="jxr_linenumber" name="L665" href="#L665">665</a> <em class="jxr_javadoccomment">     *   Let P(B) be the probability of bin i.&lt;br/&gt;</em>
+<a class="jxr_linenumber" name="L666" href="#L666">666</a> <em class="jxr_javadoccomment">     *   Let P(B-) be the sum of the bin masses below bin i. &lt;br/&gt;</em>
+<a class="jxr_linenumber" name="L667" href="#L667">667</a> <em class="jxr_javadoccomment">     *   Let pCrit = p - P(B-)&lt;br/&gt;</em>
+<a class="jxr_linenumber" name="L668" href="#L668">668</a> <em class="jxr_javadoccomment">     * &lt;li&gt;Return the inverse of K evaluated at &lt;br/&gt;</em>
+<a class="jxr_linenumber" name="L669" href="#L669">669</a> <em class="jxr_javadoccomment">     *    K(B-) + pCrit * K(B) / P(B) &lt;/li&gt;</em>
+<a class="jxr_linenumber" name="L670" href="#L670">670</a> <em class="jxr_javadoccomment">     *  &lt;/ol&gt;&lt;/p&gt;</em>
+<a class="jxr_linenumber" name="L671" href="#L671">671</a> <em class="jxr_javadoccomment">     *</em>
+<a class="jxr_linenumber" name="L672" href="#L672">672</a> <em class="jxr_javadoccomment">     * @since 3.1</em>
+<a class="jxr_linenumber" name="L673" href="#L673">673</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L674" href="#L674">674</a>     @Override
+<a class="jxr_linenumber" name="L675" href="#L675">675</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> inverseCumulativeProbability(<strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> p) <strong class="jxr_keyword">throws</strong> OutOfRangeException {
+<a class="jxr_linenumber" name="L676" href="#L676">676</a>         <strong class="jxr_keyword">if</strong> (p &lt; 0.0 || p &gt; 1.0) {
+<a class="jxr_linenumber" name="L677" href="#L677">677</a>             <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html">OutOfRangeException</a>(p, 0, 1);
+<a class="jxr_linenumber" name="L678" href="#L678">678</a>         }
+<a class="jxr_linenumber" name="L679" href="#L679">679</a> 
+<a class="jxr_linenumber" name="L680" href="#L680">680</a>         <strong class="jxr_keyword">if</strong> (p == 0.0) {
+<a class="jxr_linenumber" name="L681" href="#L681">681</a>             <strong class="jxr_keyword">return</strong> getSupportLowerBound();
 <a class="jxr_linenumber" name="L682" href="#L682">682</a>         }
 <a class="jxr_linenumber" name="L683" href="#L683">683</a> 
-<a class="jxr_linenumber" name="L684" href="#L684">684</a>         <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/math3/distribution/RealDistribution.html">RealDistribution</a> kernel = getKernel(binStats.get(i));
-<a class="jxr_linenumber" name="L685" href="#L685">685</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> kB = kB(i);
-<a class="jxr_linenumber" name="L686" href="#L686">686</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] binBounds = getUpperBounds();
-<a class="jxr_linenumber" name="L687" href="#L687">687</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> lower = i == 0 ? min : binBounds[i - 1];
-<a class="jxr_linenumber" name="L688" href="#L688">688</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> kBminus = kernel.cumulativeProbability(lower);
-<a class="jxr_linenumber" name="L689" href="#L689">689</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> pB = pB(i);
-<a class="jxr_linenumber" name="L690" href="#L690">690</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> pBminus = pBminus(i);
-<a class="jxr_linenumber" name="L691" href="#L691">691</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> pCrit = p - pBminus;
-<a class="jxr_linenumber" name="L692" href="#L692">692</a>         <strong class="jxr_keyword">if</strong> (pCrit &lt;= 0) {
-<a class="jxr_linenumber" name="L693" href="#L693">693</a>             <strong class="jxr_keyword">return</strong> lower;
-<a class="jxr_linenumber" name="L694" href="#L694">694</a>         }
-<a class="jxr_linenumber" name="L695" href="#L695">695</a>         <strong class="jxr_keyword">return</strong> kernel.inverseCumulativeProbability(kBminus + pCrit * kB / pB);
-<a class="jxr_linenumber" name="L696" href="#L696">696</a>     }
-<a class="jxr_linenumber" name="L697" href="#L697">697</a> 
-<a class="jxr_linenumber" name="L698" href="#L698">698</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L699" href="#L699">699</a> <em class="jxr_javadoccomment">     * {@inheritDoc}</em>
-<a class="jxr_linenumber" name="L700" href="#L700">700</a> <em class="jxr_javadoccomment">     * @since 3.1</em>
-<a class="jxr_linenumber" name="L701" href="#L701">701</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L702" href="#L702">702</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> getNumericalMean() {
-<a class="jxr_linenumber" name="L703" href="#L703">703</a>        <strong class="jxr_keyword">return</strong> sampleStats.getMean();
-<a class="jxr_linenumber" name="L704" href="#L704">704</a>     }
-<a class="jxr_linenumber" name="L705" href="#L705">705</a> 
-<a class="jxr_linenumber" name="L706" href="#L706">706</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L707" href="#L707">707</a> <em class="jxr_javadoccomment">     * {@inheritDoc}</em>
-<a class="jxr_linenumber" name="L708" href="#L708">708</a> <em class="jxr_javadoccomment">     * @since 3.1</em>
-<a class="jxr_linenumber" name="L709" href="#L709">709</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L710" href="#L710">710</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> getNumericalVariance() {
-<a class="jxr_linenumber" name="L711" href="#L711">711</a>         <strong class="jxr_keyword">return</strong> sampleStats.getVariance();
-<a class="jxr_linenumber" name="L712" href="#L712">712</a>     }
-<a class="jxr_linenumber" name="L713" href="#L713">713</a> 
-<a class="jxr_linenumber" name="L714" href="#L714">714</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L715" href="#L715">715</a> <em class="jxr_javadoccomment">     * {@inheritDoc}</em>
-<a class="jxr_linenumber" name="L716" href="#L716">716</a> <em class="jxr_javadoccomment">     * @since 3.1</em>
-<a class="jxr_linenumber" name="L717" href="#L717">717</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L718" href="#L718">718</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> getSupportLowerBound() {
-<a class="jxr_linenumber" name="L719" href="#L719">719</a>        <strong class="jxr_keyword">return</strong> min;
-<a class="jxr_linenumber" name="L720" href="#L720">720</a>     }
-<a class="jxr_linenumber" name="L721" href="#L721">721</a> 
-<a class="jxr_linenumber" name="L722" href="#L722">722</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L723" href="#L723">723</a> <em class="jxr_javadoccomment">     * {@inheritDoc}</em>
-<a class="jxr_linenumber" name="L724" href="#L724">724</a> <em class="jxr_javadoccomment">     * @since 3.1</em>
-<a class="jxr_linenumber" name="L725" href="#L725">725</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L726" href="#L726">726</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> getSupportUpperBound() {
-<a class="jxr_linenumber" name="L727" href="#L727">727</a>         <strong class="jxr_keyword">return</strong> max;
-<a class="jxr_linenumber" name="L728" href="#L728">728</a>     }
-<a class="jxr_linenumber" name="L729" href="#L729">729</a> 
-<a class="jxr_linenumber" name="L730" href="#L730">730</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L731" href="#L731">731</a> <em class="jxr_javadoccomment">     * {@inheritDoc}</em>
-<a class="jxr_linenumber" name="L732" href="#L732">732</a> <em class="jxr_javadoccomment">     * @since 3.1</em>
-<a class="jxr_linenumber" name="L733" href="#L733">733</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L734" href="#L734">734</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> isSupportLowerBoundInclusive() {
-<a class="jxr_linenumber" name="L735" href="#L735">735</a>         <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">true</strong>;
-<a class="jxr_linenumber" name="L736" href="#L736">736</a>     }
-<a class="jxr_linenumber" name="L737" href="#L737">737</a> 
-<a class="jxr_linenumber" name="L738" href="#L738">738</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L739" href="#L739">739</a> <em class="jxr_javadoccomment">     * {@inheritDoc}</em>
-<a class="jxr_linenumber" name="L740" href="#L740">740</a> <em class="jxr_javadoccomment">     * @since 3.1</em>
-<a class="jxr_linenumber" name="L741" href="#L741">741</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L742" href="#L742">742</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> isSupportUpperBoundInclusive() {
-<a class="jxr_linenumber" name="L743" href="#L743">743</a>         <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">true</strong>;
-<a class="jxr_linenumber" name="L744" href="#L744">744</a>     }
-<a class="jxr_linenumber" name="L745" href="#L745">745</a> 
-<a class="jxr_linenumber" name="L746" href="#L746">746</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L747" href="#L747">747</a> <em class="jxr_javadoccomment">     * {@inheritDoc}</em>
-<a class="jxr_linenumber" name="L748" href="#L748">748</a> <em class="jxr_javadoccomment">     * @since 3.1</em>
-<a class="jxr_linenumber" name="L749" href="#L749">749</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L750" href="#L750">750</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> isSupportConnected() {
-<a class="jxr_linenumber" name="L751" href="#L751">751</a>         <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">true</strong>;
-<a class="jxr_linenumber" name="L752" href="#L752">752</a>     }
-<a class="jxr_linenumber" name="L753" href="#L753">753</a> 
-<a class="jxr_linenumber" name="L754" href="#L754">754</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L755" href="#L755">755</a> <em class="jxr_javadoccomment">     * {@inheritDoc}</em>
-<a class="jxr_linenumber" name="L756" href="#L756">756</a> <em class="jxr_javadoccomment">     * @since 3.1</em>
-<a class="jxr_linenumber" name="L757" href="#L757">757</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L758" href="#L758">758</a>     @Override
-<a class="jxr_linenumber" name="L759" href="#L759">759</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> reseedRandomGenerator(<strong class="jxr_keyword">long</strong> seed) {
-<a class="jxr_linenumber" name="L760" href="#L760">760</a>         randomData.reSeed(seed);
+<a class="jxr_linenumber" name="L684" href="#L684">684</a>         <strong class="jxr_keyword">if</strong> (p == 1.0) {
+<a class="jxr_linenumber" name="L685" href="#L685">685</a>             <strong class="jxr_keyword">return</strong> getSupportUpperBound();
+<a class="jxr_linenumber" name="L686" href="#L686">686</a>         }
+<a class="jxr_linenumber" name="L687" href="#L687">687</a> 
+<a class="jxr_linenumber" name="L688" href="#L688">688</a>         <strong class="jxr_keyword">int</strong> i = 0;
+<a class="jxr_linenumber" name="L689" href="#L689">689</a>         <strong class="jxr_keyword">while</strong> (cumBinP(i) &lt; p) {
+<a class="jxr_linenumber" name="L690" href="#L690">690</a>             i++;
+<a class="jxr_linenumber" name="L691" href="#L691">691</a>         }
+<a class="jxr_linenumber" name="L692" href="#L692">692</a> 
+<a class="jxr_linenumber" name="L693" href="#L693">693</a>         <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/math3/distribution/RealDistribution.html">RealDistribution</a> kernel = getKernel(binStats.get(i));
+<a class="jxr_linenumber" name="L694" href="#L694">694</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> kB = kB(i);
+<a class="jxr_linenumber" name="L695" href="#L695">695</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] binBounds = getUpperBounds();
+<a class="jxr_linenumber" name="L696" href="#L696">696</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> lower = i == 0 ? min : binBounds[i - 1];
+<a class="jxr_linenumber" name="L697" href="#L697">697</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> kBminus = kernel.cumulativeProbability(lower);
+<a class="jxr_linenumber" name="L698" href="#L698">698</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> pB = pB(i);
+<a class="jxr_linenumber" name="L699" href="#L699">699</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> pBminus = pBminus(i);
+<a class="jxr_linenumber" name="L700" href="#L700">700</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> pCrit = p - pBminus;
+<a class="jxr_linenumber" name="L701" href="#L701">701</a>         <strong class="jxr_keyword">if</strong> (pCrit &lt;= 0) {
+<a class="jxr_linenumber" name="L702" href="#L702">702</a>             <strong class="jxr_keyword">return</strong> lower;
+<a class="jxr_linenumber" name="L703" href="#L703">703</a>         }
+<a class="jxr_linenumber" name="L704" href="#L704">704</a>         <strong class="jxr_keyword">return</strong> kernel.inverseCumulativeProbability(kBminus + pCrit * kB / pB);
+<a class="jxr_linenumber" name="L705" href="#L705">705</a>     }
+<a class="jxr_linenumber" name="L706" href="#L706">706</a> 
+<a class="jxr_linenumber" name="L707" href="#L707">707</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L708" href="#L708">708</a> <em class="jxr_javadoccomment">     * {@inheritDoc}</em>
+<a class="jxr_linenumber" name="L709" href="#L709">709</a> <em class="jxr_javadoccomment">     * @since 3.1</em>
+<a class="jxr_linenumber" name="L710" href="#L710">710</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L711" href="#L711">711</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> getNumericalMean() {
+<a class="jxr_linenumber" name="L712" href="#L712">712</a>        <strong class="jxr_keyword">return</strong> sampleStats.getMean();
+<a class="jxr_linenumber" name="L713" href="#L713">713</a>     }
+<a class="jxr_linenumber" name="L714" href="#L714">714</a> 
+<a class="jxr_linenumber" name="L715" href="#L715">715</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L716" href="#L716">716</a> <em class="jxr_javadoccomment">     * {@inheritDoc}</em>
+<a class="jxr_linenumber" name="L717" href="#L717">717</a> <em class="jxr_javadoccomment">     * @since 3.1</em>
+<a class="jxr_linenumber" name="L718" href="#L718">718</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L719" href="#L719">719</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> getNumericalVariance() {
+<a class="jxr_linenumber" name="L720" href="#L720">720</a>         <strong class="jxr_keyword">return</strong> sampleStats.getVariance();
+<a class="jxr_linenumber" name="L721" href="#L721">721</a>     }
+<a class="jxr_linenumber" name="L722" href="#L722">722</a> 
+<a class="jxr_linenumber" name="L723" href="#L723">723</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L724" href="#L724">724</a> <em class="jxr_javadoccomment">     * {@inheritDoc}</em>
+<a class="jxr_linenumber" name="L725" href="#L725">725</a> <em class="jxr_javadoccomment">     * @since 3.1</em>
+<a class="jxr_linenumber" name="L726" href="#L726">726</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L727" href="#L727">727</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> getSupportLowerBound() {
+<a class="jxr_linenumber" name="L728" href="#L728">728</a>        <strong class="jxr_keyword">return</strong> min;
+<a class="jxr_linenumber" name="L729" href="#L729">729</a>     }
+<a class="jxr_linenumber" name="L730" href="#L730">730</a> 
+<a class="jxr_linenumber" name="L731" href="#L731">731</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L732" href="#L732">732</a> <em class="jxr_javadoccomment">     * {@inheritDoc}</em>
+<a class="jxr_linenumber" name="L733" href="#L733">733</a> <em class="jxr_javadoccomment">     * @since 3.1</em>
+<a class="jxr_linenumber" name="L734" href="#L734">734</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L735" href="#L735">735</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> getSupportUpperBound() {
+<a class="jxr_linenumber" name="L736" href="#L736">736</a>         <strong class="jxr_keyword">return</strong> max;
+<a class="jxr_linenumber" name="L737" href="#L737">737</a>     }
+<a class="jxr_linenumber" name="L738" href="#L738">738</a> 
+<a class="jxr_linenumber" name="L739" href="#L739">739</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L740" href="#L740">740</a> <em class="jxr_javadoccomment">     * {@inheritDoc}</em>
+<a class="jxr_linenumber" name="L741" href="#L741">741</a> <em class="jxr_javadoccomment">     * @since 3.1</em>
+<a class="jxr_linenumber" name="L742" href="#L742">742</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L743" href="#L743">743</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> isSupportLowerBoundInclusive() {
+<a class="jxr_linenumber" name="L744" href="#L744">744</a>         <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">true</strong>;
+<a class="jxr_linenumber" name="L745" href="#L745">745</a>     }
+<a class="jxr_linenumber" name="L746" href="#L746">746</a> 
+<a class="jxr_linenumber" name="L747" href="#L747">747</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L748" href="#L748">748</a> <em class="jxr_javadoccomment">     * {@inheritDoc}</em>
+<a class="jxr_linenumber" name="L749" href="#L749">749</a> <em class="jxr_javadoccomment">     * @since 3.1</em>
+<a class="jxr_linenumber" name="L750" href="#L750">750</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L751" href="#L751">751</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> isSupportUpperBoundInclusive() {
+<a class="jxr_linenumber" name="L752" href="#L752">752</a>         <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">true</strong>;
+<a class="jxr_linenumber" name="L753" href="#L753">753</a>     }
+<a class="jxr_linenumber" name="L754" href="#L754">754</a> 
+<a class="jxr_linenumber" name="L755" href="#L755">755</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L756" href="#L756">756</a> <em class="jxr_javadoccomment">     * {@inheritDoc}</em>
+<a class="jxr_linenumber" name="L757" href="#L757">757</a> <em class="jxr_javadoccomment">     * @since 3.1</em>
+<a class="jxr_linenumber" name="L758" href="#L758">758</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L759" href="#L759">759</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> isSupportConnected() {
+<a class="jxr_linenumber" name="L760" href="#L760">760</a>         <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">true</strong>;
 <a class="jxr_linenumber" name="L761" href="#L761">761</a>     }
 <a class="jxr_linenumber" name="L762" href="#L762">762</a> 
 <a class="jxr_linenumber" name="L763" href="#L763">763</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L764" href="#L764">764</a> <em class="jxr_javadoccomment">     * The probability of bin i.</em>
-<a class="jxr_linenumber" name="L765" href="#L765">765</a> <em class="jxr_javadoccomment">     *</em>
-<a class="jxr_linenumber" name="L766" href="#L766">766</a> <em class="jxr_javadoccomment">     * @param i the index of the bin</em>
-<a class="jxr_linenumber" name="L767" href="#L767">767</a> <em class="jxr_javadoccomment">     * @return the probability that selection begins in bin i</em>
-<a class="jxr_linenumber" name="L768" href="#L768">768</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L769" href="#L769">769</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">double</strong> pB(<strong class="jxr_keyword">int</strong> i) {
-<a class="jxr_linenumber" name="L770" href="#L770">770</a>         <strong class="jxr_keyword">return</strong> i == 0 ? upperBounds[0] :
-<a class="jxr_linenumber" name="L771" href="#L771">771</a>             upperBounds[i] - upperBounds[i - 1];
-<a class="jxr_linenumber" name="L772" href="#L772">772</a>     }
-<a class="jxr_linenumber" name="L773" href="#L773">773</a> 
-<a class="jxr_linenumber" name="L774" href="#L774">774</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L775" href="#L775">775</a> <em class="jxr_javadoccomment">     * The combined probability of the bins up to but not including bin i.</em>
-<a class="jxr_linenumber" name="L776" href="#L776">776</a> <em class="jxr_javadoccomment">     *</em>
-<a class="jxr_linenumber" name="L777" href="#L777">777</a> <em class="jxr_javadoccomment">     * @param i the index of the bin</em>
-<a class="jxr_linenumber" name="L778" href="#L778">778</a> <em class="jxr_javadoccomment">     * @return the probability that selection begins in a bin below bin i.</em>
-<a class="jxr_linenumber" name="L779" href="#L779">779</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L780" href="#L780">780</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">double</strong> pBminus(<strong class="jxr_keyword">int</strong> i) {
-<a class="jxr_linenumber" name="L781" href="#L781">781</a>         <strong class="jxr_keyword">return</strong> i == 0 ? 0 : upperBounds[i - 1];
-<a class="jxr_linenumber" name="L782" href="#L782">782</a>     }
-<a class="jxr_linenumber" name="L783" href="#L783">783</a> 
-<a class="jxr_linenumber" name="L784" href="#L784">784</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L785" href="#L785">785</a> <em class="jxr_javadoccomment">     * Mass of bin i under the within-bin kernel of the bin.</em>
-<a class="jxr_linenumber" name="L786" href="#L786">786</a> <em class="jxr_javadoccomment">     *</em>
-<a class="jxr_linenumber" name="L787" href="#L787">787</a> <em class="jxr_javadoccomment">     * @param i index of the bin</em>
-<a class="jxr_linenumber" name="L788" href="#L788">788</a> <em class="jxr_javadoccomment">     * @return the difference in the within-bin kernel cdf between the</em>
-<a class="jxr_linenumber" name="L789" href="#L789">789</a> <em class="jxr_javadoccomment">     * upper and lower endpoints of bin i</em>
-<a class="jxr_linenumber" name="L790" href="#L790">790</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L791" href="#L791">791</a>     @SuppressWarnings(<span class="jxr_string">"deprecation"</span>)
-<a class="jxr_linenumber" name="L792" href="#L792">792</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">double</strong> kB(<strong class="jxr_keyword">int</strong> i) {
-<a class="jxr_linenumber" name="L793" href="#L793">793</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] binBounds = getUpperBounds();
-<a class="jxr_linenumber" name="L794" href="#L794">794</a>         <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/math3/distribution/RealDistribution.html">RealDistribution</a> kernel = getKernel(binStats.get(i));
-<a class="jxr_linenumber" name="L795" href="#L795">795</a>         <strong class="jxr_keyword">return</strong> i == 0 ? kernel.cumulativeProbability(min, binBounds[0]) :
-<a class="jxr_linenumber" name="L796" href="#L796">796</a>             kernel.cumulativeProbability(binBounds[i - 1], binBounds[i]);
-<a class="jxr_linenumber" name="L797" href="#L797">797</a>     }
-<a class="jxr_linenumber" name="L798" href="#L798">798</a> 
-<a class="jxr_linenumber" name="L799" href="#L799">799</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L800" href="#L800">800</a> <em class="jxr_javadoccomment">     * The within-bin kernel of the bin that x belongs to.</em>
-<a class="jxr_linenumber" name="L801" href="#L801">801</a> <em class="jxr_javadoccomment">     *</em>
-<a class="jxr_linenumber" name="L802" href="#L802">802</a> <em class="jxr_javadoccomment">     * @param x the value to locate within a bin</em>
-<a class="jxr_linenumber" name="L803" href="#L803">803</a> <em class="jxr_javadoccomment">     * @return the within-bin kernel of the bin containing x</em>
-<a class="jxr_linenumber" name="L804" href="#L804">804</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L805" href="#L805">805</a>     <strong class="jxr_keyword">private</strong> <a href="../../../../../org/apache/commons/math3/distribution/RealDistribution.html">RealDistribution</a> k(<strong class="jxr_keyword">double</strong> x) {
-<a class="jxr_linenumber" name="L806" href="#L806">806</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> binIndex = findBin(x);
-<a class="jxr_linenumber" name="L807" href="#L807">807</a>         <strong class="jxr_keyword">return</strong> getKernel(binStats.get(binIndex));
-<a class="jxr_linenumber" name="L808" href="#L808">808</a>     }
-<a class="jxr_linenumber" name="L809" href="#L809">809</a> 
-<a class="jxr_linenumber" name="L810" href="#L810">810</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L811" href="#L811">811</a> <em class="jxr_javadoccomment">     * The combined probability of the bins up to and including binIndex.</em>
-<a class="jxr_linenumber" name="L812" href="#L812">812</a> <em class="jxr_javadoccomment">     *</em>
-<a class="jxr_linenumber" name="L813" href="#L813">813</a> <em class="jxr_javadoccomment">     * @param binIndex maximum bin index</em>
-<a class="jxr_linenumber" name="L814" href="#L814">814</a> <em class="jxr_javadoccomment">     * @return sum of the probabilities of bins through binIndex</em>
-<a class="jxr_linenumber" name="L815" href="#L815">815</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L816" href="#L816">816</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">double</strong> cumBinP(<strong class="jxr_keyword">int</strong> binIndex) {
-<a class="jxr_linenumber" name="L817" href="#L817">817</a>         <strong class="jxr_keyword">return</strong> upperBounds[binIndex];
-<a class="jxr_linenumber" name="L818" href="#L818">818</a>     }
-<a class="jxr_linenumber" name="L819" href="#L819">819</a> 
-<a class="jxr_linenumber" name="L820" href="#L820">820</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L821" href="#L821">821</a> <em class="jxr_javadoccomment">     * The within-bin smoothing kernel. Returns a Gaussian distribution</em>
-<a class="jxr_linenumber" name="L822" href="#L822">822</a> <em class="jxr_javadoccomment">     * parameterized by {@code bStats}, unless the bin contains only one</em>
-<a class="jxr_linenumber" name="L823" href="#L823">823</a> <em class="jxr_javadoccomment">     * observation, in which case a constant distribution is returned.</em>
-<a class="jxr_linenumber" name="L824" href="#L824">824</a> <em class="jxr_javadoccomment">     *</em>
-<a class="jxr_linenumber" name="L825" href="#L825">825</a> <em class="jxr_javadoccomment">     * @param bStats summary statistics for the bin</em>
-<a class="jxr_linenumber" name="L826" href="#L826">826</a> <em class="jxr_javadoccomment">     * @return within-bin kernel parameterized by bStats</em>
-<a class="jxr_linenumber" name="L827" href="#L827">827</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L828" href="#L828">828</a>     <strong class="jxr_keyword">protected</strong> <a href="../../../../../org/apache/commons/math3/distribution/RealDistribution.html">RealDistribution</a> getKernel(<a href="../../../../../org/apache/commons/math3/stat/descriptive/SummaryStatistics.html">SummaryStatistics</a> bStats) {
-<a class="jxr_linenumber" name="L829" href="#L829">829</a>         <strong class="jxr_keyword">if</strong> (bStats.getN() == 1) {
-<a class="jxr_linenumber" name="L830" href="#L830">830</a>             <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/commons/math3/distribution/ConstantRealDistribution.html">ConstantRealDistribution</a>(bStats.getMean());
-<a class="jxr_linenumber" name="L831" href="#L831">831</a>         } <strong class="jxr_keyword">else</strong> {
-<a class="jxr_linenumber" name="L832" href="#L832">832</a>             <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/commons/math3/distribution/NormalDistribution.html">NormalDistribution</a>(randomData.getRandomGenerator(),
-<a class="jxr_linenumber" name="L833" href="#L833">833</a>                 bStats.getMean(), bStats.getStandardDeviation(),
-<a class="jxr_linenumber" name="L834" href="#L834">834</a>                 NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
-<a class="jxr_linenumber" name="L835" href="#L835">835</a>         }
-<a class="jxr_linenumber" name="L836" href="#L836">836</a>     }
-<a class="jxr_linenumber" name="L837" href="#L837">837</a> }
+<a class="jxr_linenumber" name="L764" href="#L764">764</a> <em class="jxr_javadoccomment">     * {@inheritDoc}</em>
+<a class="jxr_linenumber" name="L765" href="#L765">765</a> <em class="jxr_javadoccomment">     * @since 3.1</em>
+<a class="jxr_linenumber" name="L766" href="#L766">766</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L767" href="#L767">767</a>     @Override
+<a class="jxr_linenumber" name="L768" href="#L768">768</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> reseedRandomGenerator(<strong class="jxr_keyword">long</strong> seed) {
+<a class="jxr_linenumber" name="L769" href="#L769">769</a>         randomData.reSeed(seed);
+<a class="jxr_linenumber" name="L770" href="#L770">770</a>     }
+<a class="jxr_linenumber" name="L771" href="#L771">771</a> 
+<a class="jxr_linenumber" name="L772" href="#L772">772</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L773" href="#L773">773</a> <em class="jxr_javadoccomment">     * The probability of bin i.</em>
+<a class="jxr_linenumber" name="L774" href="#L774">774</a> <em class="jxr_javadoccomment">     *</em>
+<a class="jxr_linenumber" name="L775" href="#L775">775</a> <em class="jxr_javadoccomment">     * @param i the index of the bin</em>
+<a class="jxr_linenumber" name="L776" href="#L776">776</a> <em class="jxr_javadoccomment">     * @return the probability that selection begins in bin i</em>
+<a class="jxr_linenumber" name="L777" href="#L777">777</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L778" href="#L778">778</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">double</strong> pB(<strong class="jxr_keyword">int</strong> i) {
+<a class="jxr_linenumber" name="L779" href="#L779">779</a>         <strong class="jxr_keyword">return</strong> i == 0 ? upperBounds[0] :
+<a class="jxr_linenumber" name="L780" href="#L780">780</a>             upperBounds[i] - upperBounds[i - 1];
+<a class="jxr_linenumber" name="L781" href="#L781">781</a>     }
+<a class="jxr_linenumber" name="L782" href="#L782">782</a> 
+<a class="jxr_linenumber" name="L783" href="#L783">783</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L784" href="#L784">784</a> <em class="jxr_javadoccomment">     * The combined probability of the bins up to but not including bin i.</em>
+<a class="jxr_linenumber" name="L785" href="#L785">785</a> <em class="jxr_javadoccomment">     *</em>
+<a class="jxr_linenumber" name="L786" href="#L786">786</a> <em class="jxr_javadoccomment">     * @param i the index of the bin</em>
+<a class="jxr_linenumber" name="L787" href="#L787">787</a> <em class="jxr_javadoccomment">     * @return the probability that selection begins in a bin below bin i.</em>
+<a class="jxr_linenumber" name="L788" href="#L788">788</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L789" href="#L789">789</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">double</strong> pBminus(<strong class="jxr_keyword">int</strong> i) {
+<a class="jxr_linenumber" name="L790" href="#L790">790</a>         <strong class="jxr_keyword">return</strong> i == 0 ? 0 : upperBounds[i - 1];
+<a class="jxr_linenumber" name="L791" href="#L791">791</a>     }
+<a class="jxr_linenumber" name="L792" href="#L792">792</a> 
+<a class="jxr_linenumber" name="L793" href="#L793">793</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L794" href="#L794">794</a> <em class="jxr_javadoccomment">     * Mass of bin i under the within-bin kernel of the bin.</em>
+<a class="jxr_linenumber" name="L795" href="#L795">795</a> <em class="jxr_javadoccomment">     *</em>
+<a class="jxr_linenumber" name="L796" href="#L796">796</a> <em class="jxr_javadoccomment">     * @param i index of the bin</em>
+<a class="jxr_linenumber" name="L797" href="#L797">797</a> <em class="jxr_javadoccomment">     * @return the difference in the within-bin kernel cdf between the</em>
+<a class="jxr_linenumber" name="L798" href="#L798">798</a> <em class="jxr_javadoccomment">     * upper and lower endpoints of bin i</em>
+<a class="jxr_linenumber" name="L799" href="#L799">799</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L800" href="#L800">800</a>     @SuppressWarnings(<span class="jxr_string">"deprecation"</span>)
+<a class="jxr_linenumber" name="L801" href="#L801">801</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">double</strong> kB(<strong class="jxr_keyword">int</strong> i) {
+<a class="jxr_linenumber" name="L802" href="#L802">802</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] binBounds = getUpperBounds();
+<a class="jxr_linenumber" name="L803" href="#L803">803</a>         <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/math3/distribution/RealDistribution.html">RealDistribution</a> kernel = getKernel(binStats.get(i));
+<a class="jxr_linenumber" name="L804" href="#L804">804</a>         <strong class="jxr_keyword">return</strong> i == 0 ? kernel.cumulativeProbability(min, binBounds[0]) :
+<a class="jxr_linenumber" name="L805" href="#L805">805</a>             kernel.cumulativeProbability(binBounds[i - 1], binBounds[i]);
+<a class="jxr_linenumber" name="L806" href="#L806">806</a>     }
+<a class="jxr_linenumber" name="L807" href="#L807">807</a> 
+<a class="jxr_linenumber" name="L808" href="#L808">808</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L809" href="#L809">809</a> <em class="jxr_javadoccomment">     * The within-bin kernel of the bin that x belongs to.</em>
+<a class="jxr_linenumber" name="L810" href="#L810">810</a> <em class="jxr_javadoccomment">     *</em>
+<a class="jxr_linenumber" name="L811" href="#L811">811</a> <em class="jxr_javadoccomment">     * @param x the value to locate within a bin</em>
+<a class="jxr_linenumber" name="L812" href="#L812">812</a> <em class="jxr_javadoccomment">     * @return the within-bin kernel of the bin containing x</em>
+<a class="jxr_linenumber" name="L813" href="#L813">813</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L814" href="#L814">814</a>     <strong class="jxr_keyword">private</strong> <a href="../../../../../org/apache/commons/math3/distribution/RealDistribution.html">RealDistribution</a> k(<strong class="jxr_keyword">double</strong> x) {
+<a class="jxr_linenumber" name="L815" href="#L815">815</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> binIndex = findBin(x);
+<a class="jxr_linenumber" name="L816" href="#L816">816</a>         <strong class="jxr_keyword">return</strong> getKernel(binStats.get(binIndex));
+<a class="jxr_linenumber" name="L817" href="#L817">817</a>     }
+<a class="jxr_linenumber" name="L818" href="#L818">818</a> 
+<a class="jxr_linenumber" name="L819" href="#L819">819</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L820" href="#L820">820</a> <em class="jxr_javadoccomment">     * The combined probability of the bins up to and including binIndex.</em>
+<a class="jxr_linenumber" name="L821" href="#L821">821</a> <em class="jxr_javadoccomment">     *</em>
+<a class="jxr_linenumber" name="L822" href="#L822">822</a> <em class="jxr_javadoccomment">     * @param binIndex maximum bin index</em>
+<a class="jxr_linenumber" name="L823" href="#L823">823</a> <em class="jxr_javadoccomment">     * @return sum of the probabilities of bins through binIndex</em>
+<a class="jxr_linenumber" name="L824" href="#L824">824</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L825" href="#L825">825</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">double</strong> cumBinP(<strong class="jxr_keyword">int</strong> binIndex) {
+<a class="jxr_linenumber" name="L826" href="#L826">826</a>         <strong class="jxr_keyword">return</strong> upperBounds[binIndex];
+<a class="jxr_linenumber" name="L827" href="#L827">827</a>     }
+<a class="jxr_linenumber" name="L828" href="#L828">828</a> 
+<a class="jxr_linenumber" name="L829" href="#L829">829</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L830" href="#L830">830</a> <em class="jxr_javadoccomment">     * The within-bin smoothing kernel. Returns a Gaussian distribution</em>
+<a class="jxr_linenumber" name="L831" href="#L831">831</a> <em class="jxr_javadoccomment">     * parameterized by {@code bStats}, unless the bin contains only one</em>
+<a class="jxr_linenumber" name="L832" href="#L832">832</a> <em class="jxr_javadoccomment">     * observation, in which case a constant distribution is returned.</em>
+<a class="jxr_linenumber" name="L833" href="#L833">833</a> <em class="jxr_javadoccomment">     *</em>
+<a class="jxr_linenumber" name="L834" href="#L834">834</a> <em class="jxr_javadoccomment">     * @param bStats summary statistics for the bin</em>
+<a class="jxr_linenumber" name="L835" href="#L835">835</a> <em class="jxr_javadoccomment">     * @return within-bin kernel parameterized by bStats</em>
+<a class="jxr_linenumber" name="L836" href="#L836">836</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L837" href="#L837">837</a>     <strong class="jxr_keyword">protected</strong> <a href="../../../../../org/apache/commons/math3/distribution/RealDistribution.html">RealDistribution</a> getKernel(<a href="../../../../../org/apache/commons/math3/stat/descriptive/SummaryStatistics.html">SummaryStatistics</a> bStats) {
+<a class="jxr_linenumber" name="L838" href="#L838">838</a>         <strong class="jxr_keyword">if</strong> (bStats.getN() == 1 || bStats.getVariance() == 0) {
+<a class="jxr_linenumber" name="L839" href="#L839">839</a>             <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/commons/math3/distribution/ConstantRealDistribution.html">ConstantRealDistribution</a>(bStats.getMean());
+<a class="jxr_linenumber" name="L840" href="#L840">840</a>         } <strong class="jxr_keyword">else</strong> {
+<a class="jxr_linenumber" name="L841" href="#L841">841</a>             <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/commons/math3/distribution/NormalDistribution.html">NormalDistribution</a>(randomData.getRandomGenerator(),
+<a class="jxr_linenumber" name="L842" href="#L842">842</a>                 bStats.getMean(), bStats.getStandardDeviation(),
+<a class="jxr_linenumber" name="L843" href="#L843">843</a>                 NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
+<a class="jxr_linenumber" name="L844" href="#L844">844</a>         }
+<a class="jxr_linenumber" name="L845" href="#L845">845</a>     }
+<a class="jxr_linenumber" name="L846" href="#L846">846</a> }
 </pre>
 <hr/>
 <div id="footer">Copyright &#169; 2003&#x2013;2015 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div>

Modified: websites/production/commons/content/proper/commons-math/xref/org/apache/commons/math3/random/package-frame.html
==============================================================================
--- websites/production/commons/content/proper/commons-math/xref/org/apache/commons/math3/random/package-frame.html (original)
+++ websites/production/commons/content/proper/commons-math/xref/org/apache/commons/math3/random/package-frame.html Fri Apr 17 19:17:13 2015
@@ -3,7 +3,7 @@
 <html xml:lang="en" lang="en">
 	<head>
 		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-		<title>Apache Commons Math 3.4.1 Reference Package org.apache.commons.math3.random</title>
+		<title>Apache Commons Math 3.5 Reference Package org.apache.commons.math3.random</title>
 		<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="style" />
 	</head>
 	<body>

Modified: websites/production/commons/content/proper/commons-math/xref/org/apache/commons/math3/random/package-summary.html
==============================================================================
--- websites/production/commons/content/proper/commons-math/xref/org/apache/commons/math3/random/package-summary.html (original)
+++ websites/production/commons/content/proper/commons-math/xref/org/apache/commons/math3/random/package-summary.html Fri Apr 17 19:17:13 2015
@@ -3,7 +3,7 @@
 <html xml:lang="en" lang="en">
 	<head>
 		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-		<title>Apache Commons Math 3.4.1 Reference Package org.apache.commons.math3.random</title>
+		<title>Apache Commons Math 3.5 Reference Package org.apache.commons.math3.random</title>
 		<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="style" />
 	</head>
 	<body>



Mime
View raw message