X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Futil%2FBasicDescriptiveStatistics.java;h=057b388dfce1b8d59f755d66377aa7409a9db4cd;hb=4e20c9132065232b26afd38e8ce371b353a2686d;hp=dbb1db9d1b4e785e5c0dd0a55225d4cbfe21952d;hpb=9a9e40a5768c100cbbb70e32a2637c82890d2d53;p=jalview.git diff --git a/forester/java/src/org/forester/util/BasicDescriptiveStatistics.java b/forester/java/src/org/forester/util/BasicDescriptiveStatistics.java index dbb1db9..057b388 100644 --- a/forester/java/src/org/forester/util/BasicDescriptiveStatistics.java +++ b/forester/java/src/org/forester/util/BasicDescriptiveStatistics.java @@ -23,7 +23,7 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // // Contact: phylosoft @ gmail . com -// WWW: www.phylosoft.org/forester +// WWW: https://sites.google.com/site/cmzmasek/home/software/forester package org.forester.util; @@ -195,7 +195,7 @@ public class BasicDescriptiveStatistics implements DescriptiveStatistics { public double sampleVariance() { validate(); if ( getN() < 2 ) { - throw new ArithmeticException( "attempt to calculate sample variance for less then two values" ); + return 0; } return ( sumDeviations() / ( getN() - 1 ) ); }