de.is24.util.monitoring
Class Math

java.lang.Object
  extended by de.is24.util.monitoring.Math

public class Math
extends Object

Util method for Maths that are not provided by standard libraries.

Current functions available are:

Author:
Stefan Schubert, IT-E, IS24

Constructor Summary
protected Math()
           
 
Method Summary
static double average(long n, double sum)
          Calculate the average from an amount of values n and a sum.
static double stdDeviation(long n, double sum, double sumOfSquares)
          Calculate the standard deviation from an amount of values n, a sum and a sum of squares.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Math

protected Math()
Method Detail

average

public static double average(long n,
                             double sum)
Calculate the average from an amount of values n and a sum.

Parameters:
n - the number of values measured.
sum - the total sum of values measured.
Returns:
the average of a number of values.

stdDeviation

public static double stdDeviation(long n,
                                  double sum,
                                  double sumOfSquares)
Calculate the standard deviation from an amount of values n, a sum and a sum of squares.

Parameters:
n - the number of values measured.
sum - the total sum of values measured.
sumOfSquares - the total sum of squares of the values measured.
Returns:
the standard deviation of a number of values.


Copyright © 2013 Immobilien Scout GmbH. All Rights Reserved.