5 or more points on line segments in FastCollinearPoints #8
Labels
bug
correctness
hard
It is a very hard issue to resolve.
part 1
"Algorithms, Part I" course on Coursera
Correctness bug in FastCollinearPoints of 1-3-collinear-points assignment
Description
The program fails on the test cases with 5 or more on some line segments. I actually thought that I was able to prevent this problem from happening.
To reproduce
Test 5a: points from a file with 5 or more on some line segments
filename = input9.txt
filename = input10.txt
filename = input20.txt
'(5120, 29184) -> (8192, 29184)'
filename = input50.txt
filename = input80.txt
'(28000, 14000) -> (13000, 29000)'
filename = input300.txt
filename = inarow.txt
'(10000, 3100) -> (25000, 12400)'
==> FAILED
Test 5b: points from a file with 5 or more on some line segments
filename = kw1260.txt
'(15979, 30308) -> (14764, 30467)'
filename = rs1423.txt
==> FAILED
A possible solution
It would be nice to double-check the algorithm in the constructor of the FastCollinearPoints class. Roughly speaking, it would be so difficult to fix :)
The text was updated successfully, but these errors were encountered: