Пример #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);
        }