Skip to contentSkip to conversation

correctly name the Shell sort

PATCH In review [email protected] 3 participants 3 messages Apr 8, 2005 – Apr 9, 2005

lore
Share & tools
lore
#0 lore raw

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
diff -puN kernel/sys.c~comment-kernel_sys kernel/sys.c
@@ -1194,7 +1194,7 @@ static int groups_from_user(struct group
 	return 0;
 }
 
-/* a simple shell-metzner sort */
+/* a simple Shell sort */
 static void groups_sort(struct group_info *group_info)
 {
 	int base, max, stride;

_

#1 lore raw
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.

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
#2 lore raw
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.

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.