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

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

public final class FixedRunningAverageAndStdDev
extends FixedRunningAverage
implements RunningAverageAndStdDev

A simple class that represents a fixed value of an average, count and standard deviation. This is useful when an API needs to return RunningAverageAndStdDev but is not in a position to accept updates to it.

See Also:
Serialized Form

Constructor Summary
FixedRunningAverageAndStdDev(double average, double stdDev, int count)
           
 
Method Summary
 double getStandardDeviation()
           
 java.lang.String toString()
           
 
Methods inherited from class org.apache.mahout.cf.taste.impl.common.FixedRunningAverage
addDatum, changeDatum, getAverage, getCount, removeDatum
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.mahout.cf.taste.impl.common.RunningAverage
addDatum, changeDatum, getAverage, getCount, removeDatum
 

Constructor Detail

FixedRunningAverageAndStdDev

public FixedRunningAverageAndStdDev(double average,
                                    double stdDev,
                                    int count)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class FixedRunningAverage

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.