public final class DoubleMoments extends Object implements Serializable
DoubleMomentStatistics, 
Serialized Form| Modifier and Type | Method and Description | 
|---|---|
| boolean | equals(Object obj) | 
| long | getCount()Returns the count of values recorded. | 
| double | getKurtosis()Return the kurtosis of values recorded, or  Double.NaNif less
 than four values have been recorded. | 
| double | getMax()Return the maximum value recorded, or  Integer.MIN_VALUEif no
 values have been recorded. | 
| double | getMean()Return the arithmetic mean of values recorded, or zero if no values have
 been recorded. | 
| double | getMin()Return the minimum value recorded, or  Integer.MAX_VALUEif no
 values have been recorded. | 
| double | getSkewness()Return the skewness of values recorded, or  Double.NaNif less
 than two values have been recorded. | 
| double | getSum()Return the sum of values recorded, or zero if no values have been
 recorded. | 
| double | getVariance()Return the variance of values recorded, or  Double.NaNif no
 values have been recorded. | 
| int | hashCode() | 
| static DoubleMoments | of(DoubleMomentStatistics statistics)Return a new value object of the statistical moments, currently
 represented by the  statisticsobject. | 
| static DoubleMoments | of(long count,
  double min,
  double max,
  double sum,
  double mean,
  double variance,
  double skewness,
  double kurtosis)Create an immutable object which contains statistical values. | 
| static <T> Collector<T,?,DoubleMoments> | toDoubleMoments(ToDoubleFunction<? super T> mapper)Return a  Collectorwhich applies an double-producing mapping
 function to each input element, and returns moments-statistics for the
 resulting values. | 
| String | toString() | 
public long getCount()
public double getMin()
Integer.MAX_VALUE if no
 values have been recorded.Integer.MAX_VALUE if nonepublic double getMax()
Integer.MIN_VALUE if no
 values have been recorded.Integer.MIN_VALUE if nonepublic double getSum()
public double getMean()
public double getVariance()
Double.NaN if no
 values have been recorded.NaN if nonepublic double getSkewness()
Double.NaN if less
 than two values have been recorded.NaN if less than two values
         have been recordedpublic double getKurtosis()
Double.NaN if less
 than four values have been recorded.NaN if less than four values
         have been recordedpublic static DoubleMoments of(long count, double min, double max, double sum, double mean, double variance, double skewness, double kurtosis)
count - the count of values recordedmin - the minimum valuemax - the maximum valuesum - the sum of the recorded valuesmean - the arithmetic mean of valuesvariance - the variance of valuesskewness - the skewness of valueskurtosis - the kurtosis of valuespublic static DoubleMoments of(DoubleMomentStatistics statistics)
statistics object.statistics - the creating (mutable) statistics classpublic static <T> Collector<T,?,DoubleMoments> toDoubleMoments(ToDoubleFunction<? super T> mapper)
Collector which applies an double-producing mapping
 function to each input element, and returns moments-statistics for the
 resulting values.
 
 final Stream<SomeObject> stream = ...
 final DoubleMoments moments = stream
     .collect(toDoubleMoments(v -> v.doubleValue()));T - the type of the input elementsmapper - a mapping function to apply to each elementCollector implementing the moments-statistics reductionNullPointerException - if the given mapper is
         null© 2007-2014 Franz Wilhelmstötter (2014-12-28 10:45)