correctly name the Shell sort
PATCH 2/8 correctly name the Shell sort
As per http://www.nist.gov/dads/HTML/shellsort.html, this should be referred to as a Shell sort. Shell-Metzner is a misnomer.
---
kj-domen/kernel/sys.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
kernel/sys.c renamed from kernel/sys.c~comment-kernel_sys +1 -1
@@ -1194,7 +1194,7 @@ static int groups_from_user(struct groupreturn 0 ; } -/* a simple shell-metzner sort */ +/* a simple Shell sort */ static void groups_sort (struct group_info *group_info) {int base, max, stride;
_
Quoted 5 lines · [email protected] said:
As per http://www.nist.gov/dads/HTML/shellsort.html, this should be referred to as a Shell sort. Shell-Metzner is a misnomer.
Signed-off-by Daniel Dickman <[email protected]>Signed-off-by Domen Puncer <[email protected]>
Why not use the sort routine from lib/sort.c?
Signature · 4 lines
Dr. Horst H. von Brand User #22616 counter.li.org Departamento de Informatica Fono: +56 32 654431 Universidad Tecnica Federico Santa Maria +56 32 654239 Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513
Quoted 9 lines · Horst von Brand
Quoted 5 lines · [email protected] said:
As per http://www.nist.gov/dads/HTML/shellsort.html, this should be referred to as a Shell sort. Shell-Metzner is a misnomer.
Signed-off-by Daniel Dickman <[email protected]>Signed-off-by Domen Puncer <[email protected]>Why not use the sort routine from
lib/sort.c?
Because the groups are not in an array. They're in a bunch of page-sized blocks and the indexing function knows how to look at the index block and make everything look like an array from the point of view of the shell sort. I couldn't come up with a clean way to handle it.
Signature · 1 line
Mathematics is the supreme nostalgia of our time.