org.apache.mahout.cf.taste.impl.common
Class InvertedRunningAverageAndStdDev

java.lang.Object
  extended by org.apache.mahout.cf.taste.impl.common.InvertedRunningAverageAndStdDev
All Implemented Interfaces:
RunningAverage, RunningAverageAndStdDev

public final class InvertedRunningAverageAndStdDev
extends java.lang.Object
implements RunningAverageAndStdDev


Constructor Summary
InvertedRunningAverageAndStdDev(RunningAverageAndStdDev delegate)
           
 
Method Summary
 void addDatum(double datum)
           
 void changeDatum(double delta)
           
 double getAverage()
           
 int getCount()
           
 double getStandardDeviation()
           
 void removeDatum(double datum)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InvertedRunningAverageAndStdDev

public InvertedRunningAverageAndStdDev(RunningAverageAndStdDev delegate)
Method Detail

addDatum

public void addDatum(double datum)
Specified by:
addDatum in interface RunningAverage
Parameters:
datum - new item to add to the running average

removeDatum

public void removeDatum(double datum)
Specified by:
removeDatum in interface RunningAverage
Parameters:
datum - item to remove to the running average

changeDatum

public void changeDatum(double delta)
Specified by:
changeDatum in interface RunningAverage
Parameters:
delta - amount by which to change a datum in the running average

getCount

public int getCount()
Specified by:
getCount in interface RunningAverage

getAverage

public double getAverage()
Specified by:
getAverage in interface RunningAverage

getStandardDeviation

public double getStandardDeviation()
Specified by:
getStandardDeviation in interface RunningAverageAndStdDev
Returns:
standard deviation of data


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.