Skip to content

hardisp shell sort stable? #137

@ourairquality

Description

@ourairquality

Noticed in passing that the translation of hardisp shells.f (a stable shell sort) to shells.cpp uses std::sort() which I understand is not a stable sort. It is not immediately obvious to me if the caller, admint.cpp, really needs a stable sort, but if so then might std::stable_sort() be useful here. See also shells.f at Now sort k's (for identical values of x, if any). I the caller does not need a stable sort then adding a code comment on that might help readers. If in doubt then perhaps it would be best to use a stable sort.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions