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 Object
implements RunningAverageAndStdDev


Constructor Summary
InvertedRunningAverageAndStdDev(RunningAverageAndStdDev delegate)
           
 
Method Summary
 void addDatum(double datum)
           
 void changeDatum(double delta)
           
 double getAverage()
           
 int getCount()
           
 double getStandardDeviation()
           
 RunningAverageAndStdDev inverse()
           
 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

inverse

public RunningAverageAndStdDev inverse()
Specified by:
inverse in interface RunningAverage
Specified by:
inverse in interface RunningAverageAndStdDev
Returns:
a (possibly immutable) object whose average is the negative of this object's


Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.