MlbendReport.weighted_sums: def of mlbend-report@0.1.0.0 Import: import mlbend-report@0.1.0.0/main.bend as MlbendReport Lines 211-220 of mlbend-report@0.1.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=mlbend-report@0.1.0.0/main.bend&start_line=211&end_line=220 import Base # The weighted sums: every per-class score multiplied by its support. def weighted_sums(classes: List<&2, Cls>, +p: F32, +r: F32, +f: F32) -> Tot: match classes: case Nil{}: Tot{p, r, f, 0n} case Con{c, t}: match c: case Cls{p2, r2, f2, s2}: +w = F32.from_nat(s2) weighted_sums(t, (p + p2 * w : F32), (r + r2 * w : F32), (f + f2 * w : F32)) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.from_nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=mlbend-report@0.1.0.0/main.bend&name=Cls https://jend.leeeet.dev/definition.txt?path=mlbend-report@0.1.0.0/main.bend&name=Tot