Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on May 18, 2019. It is now read-only.

implement natural merge sort to have O(n) for already sorted lists#1881

Open
hkiel wants to merge 1 commit into
OpenModelica:master from
hkiel:omc_rsort
Open

implement natural merge sort to have O(n) for already sorted lists #1881
hkiel wants to merge 1 commit into
OpenModelica:master from
hkiel:omc_rsort

Conversation

@hkiel

@hkiel hkiel commented Oct 10, 2017

Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Member

The test suite is unstable according to OpenModelica_TEST_PULL_REQUEST 2017年10月10日_12-15-02.

Copy link
Copy Markdown
Member

The test suite is unstable according to OpenModelica_TEST_PULL_REQUEST 2017年10月10日_16-14-06.

Copy link
Copy Markdown
Member

The test suite is unstable according to OpenModelica_TEST_PULL_REQUEST 2017年10月12日_14-59-45.

hkiel commented Oct 12, 2017

Copy link
Copy Markdown
Member Author

@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?

Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
Member Author

I still think that we should use a stable sort algorithm.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /