Companion

object Companion

Properties

Link copied to clipboard
const val thresholdToHash: Int = 10

When a linear bin reaches this many entries and it's not already at the bottom allowable level (HashedSetBinDescriptor.numberOfLevels - 1) of the hash tree, then convert it to a hashed bin.

Functions

Link copied to clipboard
fun createLinearSetBinPair(level: Int, firstElement: A_BasicObject, secondElement: A_BasicObject): AvailObject

Create a mutable 2-element linear bin at the specified level and with the specified elements. The caller is responsible for making the elements immutable if necessary. The caller should also ensure the values are not equal.

Link copied to clipboard

Answer an empty bin for the specified level.

Link copied to clipboard
fun generateLinearSetBinFrom(level: Int, size: Int, generator: (Int) -> A_BasicObject): AvailObject

Generate a linear set bin by extracting the specified number of values from the generator. The values might not necessarily be unique, so reduce them. If they are all the same value, answer the value itself as a singleton bin.