uk.ac.essex.ia.util
Class MathFunctions

java.lang.Object
  extended by uk.ac.essex.ia.util.MathFunctions

public final class MathFunctions
extends java.lang.Object

A final class with some mathmatical functions as static methods


Constructor Summary
MathFunctions()
           
 
Method Summary
static float normalize(float[] data)
          Normalizes an array of floats ie/ sums up all the entries in the array, then divides each entry by this sum.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MathFunctions

public MathFunctions()
Method Detail

normalize

public static float normalize(float[] data)
Normalizes an array of floats ie/ sums up all the entries in the array, then divides each entry by this sum. After this function has finished the parameter data will be normalized( So data cannot be a constant ).

Parameters:
data - - The array to noramalize
Returns:
the sum of the entries in the array