public static void Run(ChangePointDetectorOptions options) { PeltChangePointDetector detector = options.Algorithm switch { ChangePointDetectorAlgorithm.EdPelt => EdPeltChangePointDetector.Instance, ChangePointDetectorAlgorithm.RqqPelt => RqqPeltChangePointDetector.Instance, _ => throw new ArgumentOutOfRangeException(nameof(options.Algorithm)) }; var data = options.GetSourceArray(); var indexes = detector.GetChangePointIndexes(data, options.MinDistance); Console.WriteLine(indexes.Any() ? string.Join(options.SourceSeparator, indexes) : "No changepoints found"); } }