The 1D test has become a popular non-parametric statistical test. This diagram is probably even less clear than before - the cumulative functions are not shown. A rapid algorithm for finding the difference is, therefore, important. Finally, maxDelta records the largest absolute difference. Second, not all possible quadrants are considered.
Every quadrant tested is centred on an observation, but the example above shows a counter example.
It cannot be used with large numbers of points. The top point, then the top two points, then the top three points, etc., are considered. Only the sweep down will be considered in detail here. Some care must be taken to include the different cumulative numbers of points generated by taking account of the observations whose coordinates are being used to align the quadrants. All permutations must be considered.