2005-04-08 07:57:53

by Domen Puncer

[permalink] [raw]
Subject: [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.

Signed-off-by: Daniel Dickman <[email protected]>
Signed-off-by: Domen Puncer <[email protected]>
---


kj-domen/kernel/sys.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN kernel/sys.c~comment-kernel_sys kernel/sys.c
--- kj/kernel/sys.c~comment-kernel_sys 2005-04-05 12:57:41.000000000 +0200
+++ kj-domen/kernel/sys.c 2005-04-05 12:57:41.000000000 +0200
@@ -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;
_


2005-04-08 15:52:34

by Horst H. von Brand

[permalink] [raw]
Subject: Re: [patch 2/8] correctly name the Shell sort

[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?
--
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

2005-04-09 00:04:11

by Matt Mackall

[permalink] [raw]
Subject: Re: [patch 2/8] correctly name the Shell sort

On Fri, Apr 08, 2005 at 11:52:10AM -0400, Horst von Brand wrote:
> [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.

--
Mathematics is the supreme nostalgia of our time.