|
Boost : |
Subject: Re: [boost] Painting a bikeshed ...
From: alex (alexhighviz_at_[hidden])
Date: 2015-10-02 06:10:30
>
>If that were specified, then the mth_to_nth_element name has merit for
Sean's
>algorithm, but Marshall's is still left without a good name. Finding
similar names
>that vary only on the use of "sort" vs. "gather", for example, would be
helpful.
>
One problem with both "gather" and "into" is that they suggest picking or
inserting additional elements, whereas the algorithm just rearranges values.
Rearranging to some criterion is sorting IMO.
One problem with "into" is that it implies insertion, and therefore also
picking up additional elements.
I think the discussion so far underestimates how much information is in the
argument names. If you have to provide a range and a subrange it is clear
that the function is not just sorting the subrange.
Some possible alternatives for mth_to_nth_element are:
- stratum (as in stratification)
- league
- echelon
An alternative for subrange could be segment:
sort_to_league(range, segment); // Sean's function
sort_to_unsorted_league( range, segment); // Marshall's function
or
sort_to_sorted_stratum(range, segment); // Sean's function
sort_to_stratum (range, segment); // Marshall's function
or
sorted_stratify (range, segment) ; // Sean's function
stratify (range, segment) ; // Marshall's function
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk