Class Median

  extended by org.apache.commons.math3.stat.descriptive.AbstractUnivariateStatistic
      extended by org.apache.commons.math3.stat.descriptive.rank.Percentile
          extended by org.apache.commons.math3.stat.descriptive.rank.Median
All Implemented Interfaces:
Serializable, UnivariateStatistic, MathArrays.Function

public class Median
extends Percentile
implements Serializable

Returns the median of the available values. This is the same as the 50th percentile. See Percentile for a description of the algorithm used.

Note that this implementation is not synchronized. If multiple threads access an instance of this class concurrently, and at least one of the threads invokes the increment() or clear() method, it must be synchronized externally.

$Id: 1416643 2012-12-03 19:37:14Z tn $
See Also:
Serialized Form

Constructor Summary
          Default constructor.
Median(Median original)
          Copy constructor, creates a new Median identical to the original
Method Summary
Methods inherited from class org.apache.commons.math3.stat.descriptive.rank.Percentile
copy, copy, evaluate, evaluate, evaluate, evaluate, getQuantile, setData, setData, setQuantile
Methods inherited from class org.apache.commons.math3.stat.descriptive.AbstractUnivariateStatistic
evaluate, evaluate, getData, getDataRef, test, test, test, test
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public Median()
Default constructor.


public Median(Median original)
       throws NullArgumentException
Copy constructor, creates a new Median identical to the original

original - the Median instance to copy
NullArgumentException - if original is null

Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.