mirror of
				https://github.com/avitex/elixir-glicko
				synced 2025-11-04 07:33:27 +00:00 
			
		
		
		
	credo
This commit is contained in:
		
							parent
							
								
									c96d357812
								
							
						
					
					
						commit
						7d46daf078
					
				@ -75,7 +75,8 @@ defmodule Glicko do
 | 
			
		||||
 | 
			
		||||
	# Calculation of the estimated variance of the player's rating based on game outcomes
 | 
			
		||||
	defp calc_variance_estimate(%{player: player, results: results}) do
 | 
			
		||||
		Enum.reduce(results, 0.0, fn result, acc ->
 | 
			
		||||
		results
 | 
			
		||||
		|> Enum.reduce(0.0, fn result, acc ->
 | 
			
		||||
			tmp_e = calc_e(player, result)
 | 
			
		||||
			acc + :math.pow(result.opponent_rating_deviation_g, 2) * tmp_e * (1 - tmp_e)
 | 
			
		||||
		end)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user