Statistics<N extends num> class

A statistics summary of a numeric collection.

Inheritance

Constructors

Statistics(num length, N min, N max, {N? medianLow, required N medianHigh, double? mean, double? standardDeviation, num? sum, num? squaresSum, BigInt? sumBigInt, BigInt? squaresSumBigInt, Statistics<N>? lowerStatistics, Statistics<N>? upperStatistics})
Statistics.compute(Iterable<N> data, {bool alreadySortedData = false, bool computeLowerAndUpper = true, bool keepData = false, bool useBigIntToCompute = false})
Computes a Statistics summary from data.
factory

Properties

center → N
The center value of the numeric collection. (Equivalent to medianHigh).
no setter
centerIndex int
The center value index of the numeric collection: (length ~/ 2) (Equivalent to medianHighIndex).
no setter
data List<N>?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
Returns true if length == 0.
no setter
isNotEmpty bool
Returns true if length != 0.
no setter
length num
The length/size of the numeric collection.
getter/setter pair
lowerStatistics Statistics<N>?
Returns the computed Statistics of the lower part of the numeric collection, from index 0 (inclusive) to centerIndex (exclusive).
getter/setter pair
max ↔ N
The maximum value of the numeric collection.
getter/setter pair
mean double
Returns the mean/average of the numeric collection.
getter/setter pair
median num
The median value. Also the average between medianLow and medianHigh.
no setter
medianHigh ↔ N
The higher median value. See median.
getter/setter pair
medianHighIndex int
The medianHigh value index.
no setter
medianLow ↔ N
The lower median value. See median.
getter/setter pair
medianLowIndex int
The medianLow value index.
no setter
min ↔ N
The minimal value of the numeric collection.
getter/setter pair
nType Type
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
squaresMean double
Returns the mean of squares.
no setter
squaresSum num
The total sum of squares of the numeric collection.
getter/setter pair
squaresSumBigInt BigInt
Same as squaresSum but as a BigInt.
getter/setter pair
standardDeviation double
The standard deviation of the numeric collection.
getter/setter pair
sum num
The total sum of the numeric collection.
getter/setter pair
sumBigInt BigInt
Same as sum but as a BigInt.
getter/setter pair
upperStatistics Statistics<N>?
Returns the computed Statistics of the upper part of the numeric collection, from index centerIndex (inclusive) to length (exclusive).
getter/setter pair

Methods

cast<T extends num>() Statistics<T>
Casts this instance to Statistics<T>.
divideBy(num n) Statistics<double>
Divide this statistics fields by n.
getDataFields() List<String>
Returns the fields names of this DataEntry.
override
getDataMap() Map<String, dynamic>
Returns the DataEntry as a Map of fields and values.
inherited
getDataValues() List
Returns the fields values of this DataEntry.
override
isMeanInRange(double minMean, double maxMean, [double minDeviation = double.negativeInfinity, double maxDeviation = double.infinity]) bool
Returns true if mean is in range of minMean and maxMean. Also checks if standardDeviation is in range of minDeviation and maxDeviation (if passed).
multiplyBy(num n) Statistics<num>
Multiply this statistics fields by n.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sumWith(Statistics<num> other) Statistics<num>
Sum this statistics fields with other fields.
toString({int precision = 4}) String
A string representation of this object.
override

Operators

operator +(Statistics<num> other) Statistics<double>
operator /(Statistics<num> other) Statistics<double>
operator ==(Object other) bool
The equality operator.
inherited

Static Properties

maxSafeInt int
Represents the maximum safe integer in JavaScript: (2^53 - 1)
final
maxSafeIntSqrt int
Square root of maxSafeInt.
final