public override int[] GetAllValue(LotTickData[] data) { int[] res = new int[data.Length - this.RuleInfoParams.NeedRows]; int[] str = data.Select(n => GetValue(n)).ToArray(); for (int i = 0; i < res.Length; i++) { List<int> temp = new List<int>(); for (int j = i; j < i + this.RuleInfoParams.NeedRows; j++) { temp.Add(str[j]);//添加到一起后再计算比较 } res[i] = temp.FindAll(n => n == str[i + this.RuleInfoParams.NeedRows]).Count(); } return res; }
public override int[] GetAllPrizeGradesCount(LotTickData prizeNo, LotTickData[] testNoes) { int[] res = testNoes.Select(n => GetPrizeGrade(prizeNo, n)).ToArray();//每一注的结果,然后统计下 int[] last = new int[7]; foreach (var item in res) last[item]++; return last; }