- for (int i = 0; i < num_players; ++i) {
- for (unsigned j = 0; j < matches_for_player[i].size(); ++j) {
- const match& m = matches_for_player[i][j];
-
- // Only count each match once.
- if (m.other_player <= i) {
- continue;
- }
-
- float mu1 = mu[i];
- float mu2 = mu[m.other_player];
- float sigma1 = sigma[i];
- float sigma2 = sigma[m.other_player];
- float sigma = sqrt(sigma1 * sigma1 + sigma2 * sigma2);
- float mu = mu1 - mu2;
- float x = m.margin;
- float w = m.weight;
-
- printf("%f %f\n", (x - mu) / sigma, w);
- }
+ for (unsigned i = 0; i < all_matches.size(); ++i) {
+ const match& m = all_matches[i];
+
+ float mu1 = mu[m.player];
+ float mu2 = mu[m.other_player];
+ float sigma1 = sigma[m.player];
+ float sigma2 = sigma[m.other_player];
+ float sigma = sqrt(sigma1 * sigma1 + sigma2 * sigma2);
+ float mu = mu1 - mu2;
+ float x = m.margin;
+ float w = m.weight;
+
+ printf("%f %f\n", (x - mu) / sigma, w);