public class Median extends Percentile 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.
Percentile.EstimationType
Constructor and Description |
---|
Median()
Default constructor.
|
Median(Median original)
Copy constructor, creates a new
Median identical
to the original |
Modifier and Type | Method and Description |
---|---|
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
kthSelector instance specifically set. |
Median |
withNaNStrategy(NaNStrategy newNaNStrategy)
Build a new instance similar to the current one except for the
NaN handling strategy. |
copy, copy, evaluate, evaluate, evaluate, evaluate, getEstimationType, getKthSelector, getNaNStrategy, getPivotingStrategy, getQuantile, getWorkArray, setData, setData, setQuantile
evaluate, evaluate, getData, getDataRef, test, test, test, test
public Median()
public Median(Median original) throws NullArgumentException
Median
identical
to the original
original
- the Median
instance to copyNullArgumentException
- if original is nullpublic Median withEstimationType(Percentile.EstimationType newEstimationType)
estimation type
.
This method is intended to be used as part of a fluent-type builder pattern. Building finely tune instances should be done as follows:
Percentile customized = new Percentile(quantile). withEstimationType(estimationType). withNaNStrategy(nanStrategy). withKthSelector(kthSelector);
If any of the withXxx
method is omitted, the default value for
the corresponding customization parameter will be used.
withEstimationType
in class Percentile
newEstimationType
- estimation type for the new instancepublic Median withNaNStrategy(NaNStrategy newNaNStrategy)
NaN handling
strategy.
This method is intended to be used as part of a fluent-type builder pattern. Building finely tune instances should be done as follows:
Percentile customized = new Percentile(quantile). withEstimationType(estimationType). withNaNStrategy(nanStrategy). withKthSelector(kthSelector);
If any of the withXxx
method is omitted, the default value for
the corresponding customization parameter will be used.
withNaNStrategy
in class Percentile
newNaNStrategy
- NaN strategy for the new instancepublic Median withKthSelector(KthSelector newKthSelector)
kthSelector
instance specifically set.
This method is intended to be used as part of a fluent-type builder pattern. Building finely tune instances should be done as follows:
Percentile customized = new Percentile(quantile). withEstimationType(estimationType). withNaNStrategy(nanStrategy). withKthSelector(newKthSelector);
If any of the withXxx
method is omitted, the default value for
the corresponding customization parameter will be used.
withKthSelector
in class Percentile
newKthSelector
- KthSelector for the new instanceCopyright © 2003–2016 The Apache Software Foundation. All rights reserved.