minimum distance calculation expects every group to have at least 2 items, and fails with a "Sequence contains no elements" when this expectation is not met
i have no idea why the diff is showing every line is changed. i only changed refactored starting at 507, extracting that section of linq to the method GetMinimumDistanceBetweenItems at the bottom that could handle the case when a group contains one or no elements.
minimum distance calculation expects every group to have at least 2 items, and fails with a "Sequence contains no elements" when this expectation is not met
i have no idea why the diff is showing every line is changed. i only changed refactored starting at 507, extracting that section of linq to the method GetMinimumDistanceBetweenItems at the bottom that could handle the case when a group contains one or no elements.