public class Median extends AbstractUnivariateStatistic implements Serializable
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.
| Constructor and Description | 
|---|
| Median()Default constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| Median | copy()Returns a copy of the statistic with the same internal state. | 
| double | evaluate(double[] values,
        int begin,
        int length)Returns the result of evaluating the statistic over the specified entries
 in the input array. | 
| Percentile.EstimationType | getEstimationType()Get the estimation  typeused for computation. | 
| KthSelector | getKthSelector()Get the  kthSelectorused for computation. | 
| NaNStrategy | getNaNStrategy()Get the  NaN Handlingstrategy used for computation. | 
| Median | withEstimationType(Percentile.EstimationType newEstimationType)Build a new instance similar to the current one except for the
  estimation type. | 
| Median | withKthSelector(KthSelector newKthSelector)Build a new instance similar to the current one except for the
  kthSelectorinstance specifically set. | 
| Median | withNaNStrategy(NaNStrategy newNaNStrategy)Build a new instance similar to the current one except for the
  NaN handlingstrategy. | 
evaluate, getData, getDataRef, setData, setDataclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitevaluatepublic double evaluate(double[] values,
                       int begin,
                       int length)
                throws MathIllegalArgumentException
evaluate in interface UnivariateStatisticevaluate in interface MathArrays.Functionevaluate in class AbstractUnivariateStatisticvalues - the input arraybegin - the index of the first element to includelength - the number of elements to includeMathIllegalArgumentException - if values is null or the indices are invalidpublic Median copy()
copy in interface UnivariateStatisticcopy in class AbstractUnivariateStatisticpublic Percentile.EstimationType getEstimationType()
type used for computation.estimationType setpublic Median withEstimationType(Percentile.EstimationType newEstimationType)
estimation type.newEstimationType - estimation type for the new instanceNullArgumentException - when newEstimationType is nullpublic NaNStrategy getNaNStrategy()
NaN Handling strategy used for computation.NaN Handling strategy set during constructionpublic Median withNaNStrategy(NaNStrategy newNaNStrategy)
NaN handling strategy.newNaNStrategy - NaN strategy for the new instanceNullArgumentException - when newNaNStrategy is nullpublic KthSelector getKthSelector()
kthSelector used for computation.kthSelector setpublic Median withKthSelector(KthSelector newKthSelector)
kthSelector instance specifically set.newKthSelector - KthSelector for the new instanceNullArgumentException - when newKthSelector is nullCopyright © 2016–2020 Hipparchus.org. All rights reserved.