public CoreHelper(PatternManager manager) { patternManager = manager; for (int i = 0; i < patternManager.GetNuberOfPatterns(); i++) { totalFrequency += patternManager.GetPatternFrequency(i); } totalFrequencyLog = Mathf.Log(totalFrequency, 2); }
private List <float> GetListOfWeightsFromIndices(List <int> possibleValues) { var valueFrequencies = possibleValues.Aggregate(new List <float>(), (acc, val) => { acc.Add(patternManager.GetPatternFrequency(val)); return(acc); }, acc => acc).ToList(); return(valueFrequencies); }