Historiogram

class Historiogram(out: IntIntMap = IntIntMap())

Supports getting a map determining the number of occurrences for different Int

For example:

intArrayOf(1, 1, 5, 1, 9, 5) // 3x 1, 2x 5, 1x 9
==
intIntMapOf((1 to 3), (5 to 2), (9 to 1))

Constructors

Link copied to clipboard
constructor(out: IntIntMap = IntIntMap())

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun add(value: Int)

Adds a new value to this historiogram

Link copied to clipboard
fun addArray(values: IntArray, start: Int = 0, end: Int = values.size)

Adds a set of values in the optional range start..<end to this historiogram

Link copied to clipboard

Creates a new Historiogram

Link copied to clipboard

Gets a copy of the map representing each value with its frequency.

Link copied to clipboard
open override fun toString(): String