public final class DoubleMedianValueAggregatorFunction extends Object implements UnaryFunction<List<Double>,Double>
AbstractListBackedAggregator
which computes the median
of all the numbers in the list.| Constructor and Description |
|---|
DoubleMedianValueAggregatorFunction()
By default create a function which will operate on a copy of the original
list (
useCopy = true). |
DoubleMedianValueAggregatorFunction(boolean useCopy)
Constructor which allows the caller to specify whether to operate on the
original list or a copy of it.
|
public DoubleMedianValueAggregatorFunction()
useCopy = true).useCopypublic DoubleMedianValueAggregatorFunction(boolean useCopy)
useCopy - Set to true to operate on a copy of the list or false to
operate on the original list.useCopypublic Double evaluate(List<Double> data)
useCopy.evaluate in interface UnaryFunction<List<Double>,Double>data - List to compute the median value fornull if the
list is null or empty.Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.