-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix tests of kd_tree
#18
Comments
The KD Tree implementation is already tested against a primitive linear search. |
I think the order of correctness guaranteed by having all queries beeing correct, or knowing that the tree is correctly implemented is not equal. The former could have bugs in the creation of the tree which are solved by other bugs in the query. The latter checks both individually. However, I agree, this is low priority ATM. I think we can look into this again after #22 is solved. |
The Tree we implemented here results in a non-standard representation of the tree as a specially balanced heap. There will be no present kd tree implementation resulting in the same tree |
That's a good reason not to check against other implementations. However, can we have a test case which (under heavy use of heap memory) traverses the tree to check its validity as unit test? |
openTAWS/kd_tree_sort/src/lib.rs
Line 125 in e9d1818
cargo fuzz
instead? Then also one can run the test for arbitrary times without having to alter the test code.cargo bench
feature or criterion.rsI'm not so comfortable having code this complicated without rigid validation. Hence I would also propose that we introduce tests which uses one of the other kd tree implementations of the rust universe as oracle to check our implementation.
The text was updated successfully, but these errors were encountered: