46 |
(@pxref{Creating Symbols}). |
(@pxref{Creating Symbols}). |
47 |
|
|
48 |
@menu |
@menu |
49 |
* Creating Hash:: |
* Creating Hash:: Functions to create hash tables. |
50 |
* Hash Access:: |
* Hash Access:: Reading and writing the hash table contents. |
51 |
* Defining Hash:: |
* Defining Hash:: Defining new comparison methods |
52 |
* Other Hash:: |
* Other Hash:: Miscellaneous. |
53 |
@end menu |
@end menu |
54 |
|
|
55 |
@node Creating Hash |
@node Creating Hash |
146 |
The default value is 1.5. |
The default value is 1.5. |
147 |
|
|
148 |
@item :rehash-threshold @var{threshold} |
@item :rehash-threshold @var{threshold} |
149 |
This specifies the criterion for when the hash table is ``full.'' The |
This specifies the criterion for when the hash table is ``full'' (so |
150 |
value, @var{threshold}, should be a positive floating point number, no |
it should be made larger). The value, @var{threshold}, should be a |
151 |
greater than 1. The hash table is ``full'' whenever the actual number of |
positive floating point number, no greater than 1. The hash table is |
152 |
entries exceeds this fraction of the nominal size. The default for |
``full'' whenever the actual number of entries exceeds this fraction |
153 |
@var{threshold} is 0.8. |
of the nominal size. The default for @var{threshold} is 0.8. |
154 |
@end table |
@end table |
155 |
@end defun |
@end defun |
156 |
|
|
167 |
@section Hash Table Access |
@section Hash Table Access |
168 |
|
|
169 |
This section describes the functions for accessing and storing |
This section describes the functions for accessing and storing |
170 |
associations in a hash table. |
associations in a hash table. In general, any Lisp object can be used |
171 |
|
as a hash key, unless the comparison method imposes limits. Any Lisp |
172 |
|
object can also be used as the value. |
173 |
|
|
174 |
@tindex gethash |
@tindex gethash |
175 |
@defun gethash key table &optional default |
@defun gethash key table &optional default |
212 |
This function calls @var{function} once for each of the associations in |
This function calls @var{function} once for each of the associations in |
213 |
@var{table}. The function @var{function} should accept two |
@var{table}. The function @var{function} should accept two |
214 |
arguments---a @var{key} listed in @var{table}, and its associated |
arguments---a @var{key} listed in @var{table}, and its associated |
215 |
@var{value}. |
@var{value}. @code{maphash} returns @code{nil}. |
216 |
@end defun |
@end defun |
217 |
|
|
218 |
@node Defining Hash |
@node Defining Hash |