Blyx Nest Blyx language
Registry / Library
library · v0.1.1

GapHold

Count activity segments while bridging short internal silences.

Source repository · Package JSON

Use GapHold

use vendor::gaphold::gaphold;

Run the example

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

fn main() {
    let levels = [2, 0, 2, 0, 0, 2];
    let threshold = 1.0;
    let gap = 1.0;
    let result = gaphold_segments(levels, threshold, gap);
    if len(result) == 0 { println!("invalid"); return; }
    let mut i = 0;
    while i < len(result) {
        println!(at(result, i));
        i += 1;
    }
}

Expected output

2
1

Published versions

VersionPackageSource commitSHA-256
0.1.1Download ZIP65d7a6c85c49154accfe09f37715d9943c61f926bfe5f4305f41c5b46e71eca30fbccb19dc