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

FieldCost

Estimate expanded resolver work using per-field costs and visit counts.

Source repository · Package JSON

Use FieldCost

use vendor::fieldcost::fieldcost;

Run the example

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

fn main() {
    let units = [1, 5, 2];
    let visits = [1, 4, 3];
    let result = fieldcost_weighted(units, visits);
    if len(result) == 0 { println!("invalid"); return; }
    let mut i = 0;
    while i < len(result) {
        println!(at(result, i));
        i += 1;
    }
}

Expected output

27
1
20

Published versions

VersionPackageSource commitSHA-256
0.1.0Download ZIPe87b0cb35cdb63cabd0e73c4b8df734349f5adcf5bc15023c90433b33733080e951fa99209