Skip to content
This repository was archived by the owner on May 9, 2018. It is now read-only.

Fix the custom merge sort, which could lead to crash on very simple data#3

Open
ChengCat wants to merge 1 commit into
MetricPanda:masterfrom
ChengCat:local
Open

Fix the custom merge sort, which could lead to crash on very simple data#3
ChengCat wants to merge 1 commit into
MetricPanda:masterfrom
ChengCat:local

Conversation

@ChengCat
Copy link
Copy Markdown

@ChengCat ChengCat commented Feb 4, 2018

Thanks for the library!

I encountered crash when testing it with very simple data. Fortunately, it it not hard to find the bug. In the custom merge sort function, it may requires sorting when InHalf1[-1]->Y == InHalf1[0]->Y.

Also note that, the way epsilon is used in the sorting section is incorrect. For the following points, both MPE_POLY_COMPARE(A, B) and MPE_POLY_COMPARE(B, A) are true.

A = 2, 1
B = 1, 1+eps/2

I can make another pull request for this.

It may requires sorting when "InHalf1[-1]->Y == InHalf1[0]->Y".
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant