Registry / Library

library · v0.1.0
ShotMargins
Extract both individual bit frequencies from joint two-bit shots.
Use ShotMargins
use vendor::shotmargins::shotmargins;
Run the example
nest demo shotmargins@0.1.0
blyxc native-run shotmargins-demo/main.blyx
Example source and expected output
use vendor::shotmargins::shotmargins;
fn main() {
let counts = [2, 1, 3, 2];
let result = shotmargins_bits(counts);
if len(result) == 0 { println!("invalid"); return; }
let mut i = 0;
while i < len(result) {
println!(at(result, i));
i += 1;
}
}
Expected output
0.625
0.375
8
Published versions
| Version | Package | Source commit | SHA-256 |
|---|---|---|---|
| 0.1.0 | Download ZIP | 206922afe9 | fa9394ae6ea372cdfa461d63bbb7bb87e128a05bd1b9ae88cd0e746cd810f43b |