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

Update the (partial)sortperm docs #27169

Merged
merged 4 commits into from
May 28, 2018

Conversation

haampie
Copy link
Contributor

@haampie haampie commented May 19, 2018

Our Perm ordering enforces stability of the permutation, even for unstable algorithms. The docs suggested otherwise.

Also adds an example to partialsortperm and removes the alg keyword from the signature in the docs (we only have partial quicksort).

Closes #27112

@@ -685,16 +685,35 @@ sort(v::AbstractVector; kws...) = sort!(copymutable(v); kws...)
## partialsortperm: the permutation to sort the first k elements of an array ##

"""
partialsortperm(v, k; alg=<algorithm>, by=<transform>, lt=<comparison>, rev=false)
partialsortperm(v, k; by=<transform>, lt=<comparison>, rev=false)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also remove the alg argument from the partialsortperm! docstring.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, done.

@kshyatt kshyatt added the domain:docs This change adds or pertains to documentation label May 27, 2018
@haampie
Copy link
Contributor Author

haampie commented May 27, 2018

This seems good to go I think?

@andreasnoack andreasnoack merged commit cfca311 into JuliaLang:master May 28, 2018
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