Bug 2510 - Possible minor typos
Summary: Possible minor typos
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: manual (show other bugs)
Version: unspecified
: P3 minor
Target Milestone: ---
Assignee: Roland McGrath
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-04 09:52 UTC by Matthew Mundell
Modified: 2018-04-19 15:12 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Mundell 2006-04-04 09:52:48 UTC
From search.texi line 84:  > The mean runtime of this function is @code{*@var{nmemb}}/2.  This > function should only be used elements often get added to or deleted from         ... should only be used if elements...  > the array in which case it might not be useful to sort the array before > searching.   From search.texi line 250:  > The functions mentioned so far in this chapter are searching in a sorted                                    ..this chapter are for searching...                                   ..this chapter search in a sorted...  > or unsorted array.  There are other methods to organize information > which later should be searched.  The costs of insert, delete and search > differ.  One possible implementation is using hashing tables. > The following functions are declared in the the header file @file{search.h}. > > @comment search.h > @comment SVID > @deftypefun int hcreate (size_t @var{nel}) > > The @code{hcreate} function creates a hashing table which can contain at > least @var{nel} elements.  There is no possibility to grow this table so > it is necessary to choose the value for @var{nel} wisely.  The used > methods to implement this function might make it necessary to make the  Is this sentence correct?  Should it perhaps be "The method used to implement this function..."?  > number of elements in the hashing table larger than the expected maximal > number of elements.  Hashing tables usually work inefficient if they are                                                  ...inefficiently...  > filled 80% or more.  The constant access time guaranteed by hashing can > only be achieved if few collisions exist.  See Knuth's ``The Art of > Computer Programming, Part 3: Searching and Sorting'' for more > information.  Thanks.
Comment 1 Matthew Mundell 2006-04-04 09:59:01 UTC
Oh dear.  Here is the description again.

From search.texi line 84:

> The mean runtime of this function is @code{*@var{nmemb}}/2.  This
> function should only be used elements often get added to or deleted from

       ... should only be used if elements...

> the array in which case it might not be useful to sort the array before
> searching.


From search.texi line 250:

> The functions mentioned so far in this chapter are searching in a sorted

                                  ..this chapter are for searching...
                                  ..this chapter search in a sorted...

> or unsorted array.  There are other methods to organize information
> which later should be searched.  The costs of insert, delete and search
> differ.  One possible implementation is using hashing tables.
> The following functions are declared in the the header file @file{search.h}.
>
> @comment search.h
> @comment SVID
> @deftypefun int hcreate (size_t @var{nel})
> > The @code{hcreate} function creates a hashing table which can contain at
> least @var{nel} elements.  There is no possibility to grow this table so
> it is necessary to choose the value for @var{nel} wisely.  The used
> methods to implement this function might make it necessary to make the

Is this sentence correct?  Should it perhaps be "The method used to
implement this function..."?

> number of elements in the hashing table larger than the expected maximal
> number of elements.  Hashing tables usually work inefficient if they are

                                                ...inefficiently...

> filled 80% or more.  The constant access time guaranteed by hashing can
> only be achieved if few collisions exist.  See Knuth's ``The Art of
> Computer Programming, Part 3: Searching and Sorting'' for more
> information.

Thanks.
Comment 2 Sourceware Commits 2006-10-12 05:26:43 UTC
Subject: Bug 2510

CVSROOT:	/cvs/glibc
Module name:	libc
Changes by:	aj@sourceware.org	2006-10-12 05:26:33

Modified files:
	manual         : search.texi 

Log message:
	[BZ #2510]
	* manual/search.texi (Hash Search Function): Clarify.
	(Array Search Function): Clarify.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/manual/search.texi.diff?cvsroot=glibc&r1=1.36&r2=1.37

Comment 3 Andreas Jaeger 2006-10-12 05:28:01 UTC
Fixed for glibc 2.6.