-
Notifications
You must be signed in to change notification settings - Fork 61
implement natural merge sort to have O(n) for already sorted lists#1881
implement natural merge sort to have O(n) for already sorted lists #1881hkiel wants to merge 1 commit into
Conversation
OpenModelica-Hudson
commented
Oct 10, 2017
The test suite is unstable according to OpenModelica_TEST_PULL_REQUEST 2017年10月10日_12-15-02.
OpenModelica-Hudson
commented
Oct 10, 2017
The test suite is unstable according to OpenModelica_TEST_PULL_REQUEST 2017年10月10日_16-14-06.
OpenModelica-Hudson
commented
Oct 12, 2017
The test suite is unstable according to OpenModelica_TEST_PULL_REQUEST 2017年10月12日_14-59-45.
hkiel
commented
Oct 12, 2017
@sjoelund The current merge sort implementation in List.sort is not stable. In fact it reverts the order of equal elements.
My natural merge sort implementation should however be stable but leads to failures in the test suite. E.g. simulation/libraries/msl32/Modelica.Fluid.Examples.HeatingSystem.mos does not compile anymore. Do you have any hint why this can be?
sjoelund
commented
Oct 12, 2017
HeatingSystem is very sensitive to the order of elements. It's just some heuristics that choose a different path as far as I know.
hkiel
commented
Oct 18, 2017
I still think that we should use a stable sort algorithm.
No description provided.