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.
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 mightstd::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.