예제 #1
0
 public static int[] GetSegmentPriorities(Calculator calc, int segment) => calc.GetPriorities(segment).Select(q => q.Key).ToArray();
예제 #2
0
 public static int[] GetActualPriorities(Calculator calc) => calc.GetPriorities().Select(q => q.Key).ToArray();
예제 #3
0
 public static IEnumerable<int> Calculate(Calculator calc, IEnumerable<int[]> perspectives)
 {
     foreach (var perspective in perspectives)
         yield return Calculate(calc, perspective);
 }
예제 #4
0
        /// <summary>
        /// Compares the provided perspective on priorities against the actual priorities
        /// </summary>
        public static int Calculate(Calculator calc, int[] perspectives)
        {
            var actuals = LimitToScale(GetActualPriorities(calc));

            return Calculate(actuals, perspectives);
        }
예제 #5
0
        /// <summary>
        /// Compares the segment's perspective on priorities against the actual priorities
        /// </summary>
        public static int Calculate(Calculator calc, int segment)
        {
            var perspectives = LimitToScale(GetSegmentPriorities(calc, segment));

            return Calculate(calc, perspectives);
        }