public static double EstimatedAccountWN8(IExpectedValueList expectedValueList, string version, WinrateRecord[] winrateRecords, Statistics cumulatedStats) { Dictionary <int, ExpectedValues> expectedValues = expectedValueList[version]; ExpectedValues cumulatedExpected = new ExpectedValues(); foreach (var winrateRecord in winrateRecords) { if (expectedValues.TryGetValue(winrateRecord.TankID, out ExpectedValues values)) { cumulatedExpected += values * winrateRecord.Battles; } } cumulatedExpected /= cumulatedStats.Battles; return(Calculate(cumulatedStats, cumulatedExpected)); }
public static double AccountWN8(IExpectedValueList expectedValueList, string version, Dictionary <int, Statistics> tankStats, out Statistics cumulatedStats) { return(AccountWN8(expectedValueList[version], tankStats, out cumulatedStats)); }
public static double EstimatedAccountWN8Newest(IExpectedValueList expectedValueList, WinrateRecord[] winrateRecords, Statistics cumulatedStats) { return(EstimatedAccountWN8(expectedValueList, expectedValueList.Versions.Max(), winrateRecords, cumulatedStats)); }
public static double AccountWN8Newest(IExpectedValueList expectedValueList, Dictionary <int, Statistics> tankStats) { return(AccountWN8(expectedValueList, expectedValueList.Versions.Max(), tankStats)); }