Return a copy of this histogram.
Return a copy of this histogram.
Note the occurance of 'item.
Note the occurance of 'item.
The optional parameter 'count' allows histograms to be built more efficiently. Negative counts can be used to remove a particular number of occurances of 'item'.
Return 'num' evenly spaced Doubles from 0.
Return 'num' evenly spaced Doubles from 0.0 to 1.0.
Return the number of occurances for 'item'.
Return the number of occurances for 'item'.
Return the largest item seen.
Return the largest item seen.
Return the smallest and largest items seen as a tuple.
Return the smallest and largest items seen as a tuple.
Return the smallest item seen.
Return the smallest item seen.
Return the total number of occurances for all items.
Return the total number of occurances for all items.
This is a heuristic used by getQuantileBreaks, which mutates the histogram.
This is a heuristic used by getQuantileBreaks, which mutates the histogram.
The basic idea here is to try to "evenly" split 'b' values across 'q' slots.
The basic idea here is to try to "evenly" split 'b' values across 'q' slots. The goal is to drop or duplicate values as evenly as possible. Here are some examples:
splitBreakIndices(1, 1) -> Array(0) splitBreakIndices(3, 5) -> Array(1,2,4) splitBreakIndices(4, 5) -> Array(0,1,3,4) splitBreakIndices(5, 5) -> Array(0,1,2,3,4) splitBreakIndices(7, 5) -> Array(0,1,1,2,3,3,4) splitBreakIndices(10,5) -> Array(0,0,1,1,2,2,3,3,4,4)
Take an existing array of class breaks (values that define the maximum for a particular class) and "stretch" them over a larger range.
Take an existing array of class breaks (values that define the maximum for a particular class) and "stretch" them over a larger range. The idea is that a user might want 6 classes, but only 4 could be created. In these cases we will streth the 4 breaks into 6 (with some breaks being unused) to better map onto a users' preferred colors.
Forget all occurances of 'item'.
Forget all occurances of 'item'.
Data object representing a histogram using an array for internal storage, which requires an initial minimum and maximum val and a specified number of 'breaks' which are used to group values together into ranges.