Skip to content
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

Doc sorting algos #28514

Merged
merged 1 commit into from
Aug 17, 2018
Merged

Doc sorting algos #28514

merged 1 commit into from
Aug 17, 2018

Conversation

kshyatt
Copy link
Contributor

@kshyatt kshyatt commented Aug 7, 2018

No description provided.

@kshyatt kshyatt added the domain:docs This change adds or pertains to documentation label Aug 7, 2018
@kshyatt kshyatt requested a review from mbauman August 7, 2018 20:57
@ChristianKurz
Copy link
Contributor

Thanks for improving documentation!

I think it may be better to have the characteristics of a sorting function in a list/table:

`PartialQuickSort{T <: Union{Int,OrdinalRange}}`

Indicate that a sorting function should use the partial quick sort
algorithm, which is not stable.
Partial quick sort returns the smallest k elements sorted from smallest
to largest, finding them and sorting them using QuickSort.
A stable sort preserves the ordering of elements which
compare equal (e.g. "a" and "A" in a sort of letters which
ignores case). Partial quick sort can be performed in-place in memory.
Like MergeSort, it is a divide-and-conquer sort algorithm.

vs.

`PartialQuickSort{T <: Union{Int,OrdinalRange}}`

Indicate that a sorting function should use the partial quick sort algorithm.

Partial quick sort returns the smallest k elements sorted from smallest
to largest, finding them and sorting them using QuickSort.

Characteristics:

  • not stable: Does not preserve the ordering of elements which
    compare equal (e.g. "a" and "A" in a sort of letters which
    ignores case).
  • in place: Partial quick sort can be performed in-place in memory.
  • divide-and-conquer

@kshyatt
Copy link
Contributor Author

kshyatt commented Aug 14, 2018

I could go either way on this one. Anyone else have thoughts?

@StefanKarpinski
Copy link
Sponsor Member

A list does seem a bit easier to compare at a glance.

@kshyatt
Copy link
Contributor Author

kshyatt commented Aug 17, 2018

Good to go?

@fredrikekre fredrikekre merged commit e21c1bb into master Aug 17, 2018
@fredrikekre fredrikekre deleted the ksh/docsorts branch August 17, 2018 19:47
KristofferC pushed a commit that referenced this pull request Aug 19, 2018
(cherry picked from commit e21c1bb)
KristofferC pushed a commit that referenced this pull request Aug 19, 2018
(cherry picked from commit e21c1bb)
@KristofferC KristofferC mentioned this pull request Aug 19, 2018
KristofferC pushed a commit that referenced this pull request Aug 19, 2018
(cherry picked from commit e21c1bb)
KristofferC pushed a commit that referenced this pull request Sep 8, 2018
(cherry picked from commit e21c1bb)
KristofferC pushed a commit that referenced this pull request Sep 8, 2018
(cherry picked from commit e21c1bb)
KristofferC pushed a commit that referenced this pull request Feb 11, 2019
(cherry picked from commit e21c1bb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:docs This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants