public static int[] GetSegmentPriorities(Calculator calc, int segment) => calc.GetPriorities(segment).Select(q => q.Key).ToArray();
public static int[] GetActualPriorities(Calculator calc) => calc.GetPriorities().Select(q => q.Key).ToArray();
public static IEnumerable<int> Calculate(Calculator calc, IEnumerable<int[]> perspectives) { foreach (var perspective in perspectives) yield return Calculate(calc, perspective); }
/// <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); }
/// <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); }