Blyx Nest Blyx language
Registry / Framework
framework · v0.1.0

Nightingale

Bound a percentile from histogram counts without inventing a within-bin value.

Source repository · Package JSON

Use Nightingale

use vendor::nightingale::nightingale;

Run the example

nest demo nightingale@0.1.0
blyxc native-run nightingale-demo/main.blyx
Example source and expected output
use vendor::nightingale::nightingale;

fn main() {
    let counts = [2, 6];
    let edges = [0, 10, 30];
    let probability = 0.5;
    let threshold = 20.0;
    let result = nightingale_quantile(counts, edges, probability, threshold);
    if len(result) == 0 { println!("invalid"); return; }
    let mut i = 0;
    while i < len(result) {
        println!(at(result, i));
        i += 1;
    }
}

Expected output

10
30
4
0

Published versions

VersionPackageSource commitSHA-256
0.1.0Download ZIP5219544513c530aaa35a81a2a17c294c55a08cb035ee3f03c7f8df5acc627d86128e4d0e5d