wrangle mixture weights in go

This commit is contained in:
NunoSempere 2024-02-16 13:43:55 +01:00
parent fa0065c96e
commit 1f4eb1fec4

View File

@ -51,7 +51,7 @@ type func64 func() float64
func sample_mixture(fs []func64, weights []float64) float64 {
var sum_weights float64 = 0
for i_, weight := range weights {
for _, weight := range weights {
sum_weights += weight
}
return sum_weights