From 7eb1f3ba73a5fae6a42a18fb0eea71bce2420047 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 17 Mar 2012 14:15:12 +0100 Subject: [PATCH] Make update_prior_sigma care about weight. --- bayeswf.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bayeswf.cpp b/bayeswf.cpp index 5eba479..2dfc85b 100644 --- a/bayeswf.cpp +++ b/bayeswf.cpp @@ -179,8 +179,9 @@ void update_prior_sigma(float *mu, float *sigma, int num_players) float mu1 = mu[i]; - nom += ((mu1 - PRIOR_MU) * (mu1 - PRIOR_MU)); - denom += 1.0f; + float w = m.weight; + nom += w * ((mu1 - PRIOR_MU) * (mu1 - PRIOR_MU)); + denom += w * 1.0f; } } -- 2.39.2