SignedDataSummary<T> Class
Class to accumulate statistics about a stream of signed numbers with tag items.
- All sums, counts, extrema, and item values are initialized to zero in the constructor.
- Each call to
announceItem (item, value)
updates the various sums, counts, and extrema.
Methods
Name |
Description |
|
constructor<T>(createArrays: boolean): SignedDataSummary<T> |
setup with zero sums and optional arrays |
|
announceItem(item: T, data: number): void |
update with an item and its data value. |
|
Properties
Name |
Type |
Description |
|
largestNegativeItem |
undefined | T |
the tag item item with the most negative data |
|
largestNegativeValue |
number |
|
|
largestPositiveItem |
undefined | T |
the tag item item with the largest positive data |
|
largestPositiveValue |
number |
|
|
negativeItemArray |
undefined | T[] |
array of all negative area items |
|
negativeSum |
number |
sum of negative area items |
|
numNegative |
number |
number of negative area items |
|
numPositive |
number |
number of positive area items |
|
numZero |
number |
number of zero area items |
|
positiveItemArray |
undefined | T[] |
array of positive area items |
|
positiveSum |
number |
sum of all positive area items |
|
zeroItemArray |
undefined | T[] |
array of zero area items |
|
Defined in
Last Updated:
30 November, 2023