module
Depth::Stats::Quantize
Defined in:
depth/stats/quantize.crClass Method Summary
- .gen_quantized(quants : Array(Int64), coverage : Array(Int32), limit : Int32, & : Tuple(Int32, Int32, String) -> )
-
.gen_quantized(quants : Array(Int64), coverage : Array(Int32), &block : Tuple(Int32, Int32, String) -> )
Backward-compatible overload: consume entire coverage array
-
.get_quantize_args(qa : String) : Array(Int64)
Parse quantize arguments string into array of integers Examples: ":1" -> [0, 1] "0:1:4:" -> [0, 1, 4, Int64::MAX] (the final value represents infinity)
-
.linear_search(q : Int32 | Int64, vals : Array(Int64)) : Int32
Linear search to find which bin a value belongs to Returns -1 if value is outside all bins
-
.make_lookup(quants : Array(Int64)) : Array(String)
Create lookup table for quantize bins Examples: [0, 1, 4] -> ["0:1", "1:4", "4:inf"]
Class Method Detail
Backward-compatible overload: consume entire coverage array
Parse quantize arguments string into array of integers Examples: ":1" -> [0, 1] "0:1:4:" -> [0, 1, 4, Int64::MAX] (the final value represents infinity)
Linear search to find which bin a value belongs to Returns -1 if value is outside all bins
Create lookup table for quantize bins Examples: [0, 1, 4] -> ["0:1", "1:4", "4:inf"]