git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
more test for isDuplication() and isSpecation() added (phyloXML encoded
[jalview.git]
/
forester
/
java
/
src
/
org
/
forester
/
util
/
BasicDescriptiveStatistics.java
diff --git
a/forester/java/src/org/forester/util/BasicDescriptiveStatistics.java
b/forester/java/src/org/forester/util/BasicDescriptiveStatistics.java
index
dbb1db9
..
f3dfb80
100644
(file)
--- 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
// 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;
package org.forester.util;
@@
-195,7
+195,7
@@
public class BasicDescriptiveStatistics implements DescriptiveStatistics {
public double sampleVariance() {
validate();
if ( getN() < 2 ) {
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 ) );
}
}
return ( sumDeviations() / ( getN() - 1 ) );
}
@@
-306,7
+306,7
@@
public class BasicDescriptiveStatistics implements DescriptiveStatistics {
* Computes the sample standard unit (z-score). Used to compute 'value' in
* terms of standard units. Note that 'value', 'mean' and 'sd' must be all
* from the same sample data.
* Computes the sample standard unit (z-score). Used to compute 'value' in
* terms of standard units. Note that 'value', 'mean' and 'sd' must be all
* from the same sample data.
- *
+ *
* @param value
* a double in the sample for which
* @param mean
* @param value
* a double in the sample for which
* @param mean