public int GetMaxNumberOfContsBracketNum() { if (PbList.Count > 1) { return(PbList.Max(x => x.Frquency)); } else { return(0); } }
public void CreateRanks() { for (int i = 0; i < PbList.Count; i++) { PbList[i] = GetStdRank(PbList[i]); PbList[i] = GetProximityRank(PbList[i]); PbList[i] = GetOriginalScoreRate(PbList[i]); } // order from higher to lower PbList.OrderByDescending(i => i.GeneralRate); }
public void AddPotentialBracket(double score, int frequency, double stdDivision, decimal originalscoresrating, double proximitytonumofconts, List <int> participantsIDs, Dictionary <int, double> idandscore, GlobalVars.GenderEnum gender) { // make fixes if its a woman (is must not have any factor if its mixed house) PbList.Add(new PotentialBrackets { Score = score, Frquency = frequency, StdDivision = stdDivision, OriginalScoresRating = originalscoresrating, proximityToNumOfConts = proximitytonumofconts, ParticipantsIDs = participantsIDs, BracketID = PotentialBracetNum, IdAndScore = idandscore, Gender = gender }); PotentialBracetNum += 1; }
public PotentialBrackets GetMostRecommendedBracket() { // most ideal for bracket by by priority: first priority is original score second place is proximity to n (frequency) and third place is std division beetween contenders PbList = PbList.OrderByDescending(i => i.OriginalScoreRank).ThenBy(n => n.ProximityRank).ThenBy(n => n.StdRank).ToList(); return(PbList[0]); }
public void ClearPbList() { PbList.Clear(); }