lispdoc - results for hash-table

hash-table
Undocumented
Example:
(defun clear-memo-table (function-name)
  "Removes all entries from hash table associated with memoized function"
  (let ((hash-table
         (get function-name :memo-table)))
    (when hash-table (clrhash hash-table))))
Mentioned in:
CLtL2 - 16.2. Primitive Hash Function
CLtL2 - 19.5. Defstruct Options
CLtL2 - 2.15. Overlap, Inclusion, and Disjointness of Types
CLtL2 - 22.1.6. What the Print Function Produces
CLtL2 - 25.1.4. Similarity of Constants
HyperSpec - 18.1.1 Hash-Table Operations
HyperSpec - System Class HASH-TABLE
(hash-table-p object)
Undocumented
 Mentioned in:
CLtL2 - 16.1. Hash Table Functions
CLtL2 - 6.2.2. Specific Data Type Predicates
HyperSpec - Function HASH-TABLE-P
(hash-table-size hash-table)
Function: Return a size that can be used with MAKE-HASH-TABLE to create a hash table that can hold however many entries HASH-TABLE can hold without having to be grown.
 Mentioned in:
CLtL2 - 16.1. Hash Table Functions
HyperSpec - Function HASH-TABLE-SIZE
(make-hash-table &key (test 'eql) (size +min-hash-table-size+)
 (rehash-size 1.5) (rehash-threshold 1) (hash-function nil) (weakness nil)
 (synchronized))
Function: Create and return a new hash table. The keywords are as follows: :TEST Determines how keys are compared. Must a designator for one of the standard hash table tests, or a hash table test defined using SB-EXT:DEFINE-HASH-TABLE-TEST. Additionally, when an explicit HASH-FUNCTION is provided (see below), any two argument equivalence predicate can be used as the TEST. :SIZE A hint as to how many elements will be put in this hash table. :REHASH-SIZE Indicates how to expand the table when it fills up. If an integer, add space for that many elements. If a floating point number (which must be greater than 1.0), multiply the size by that amount. :REHASH-THRESHOLD Indicates how dense the table can become before forcing a rehash. Can be any positive number <=1, with density approaching zero as the threshold approaches 0. Density 1 means an average of one entry per bucket. :HASH-FUNCTION If NIL (the default), a hash function based on the TEST argument is used, which then must be one of the standardized hash table test functions, or one for which a default hash function has been defined using SB-EXT:DEFINE-HASH-TABLE-TEST. If HASH-FUNCTION is specified, the TEST argument can be any two argument predicate consistent with it. The HASH-FUNCTION is expected to return a non-negative fixnum hash code. :WEAKNESS When :WEAKNESS is not NIL, garbage collection may remove entries from the hash table. The value of :WEAKNESS specifies how the presence of a key or value in the hash table preserves their entries from garbage collection. Valid values are: :KEY means that the key of an entry must be live to guarantee that the entry is preserved. :VALUE means that the value of an entry must be live to guarantee that the entry is preserved. :KEY-AND-VALUE means that both the key and the value must be live to guarantee that the entry is preserved. :KEY-OR-VALUE means that either the key or the value must be live to guarantee that the entry is preserved. NIL (the default) means that entries are always preserved. :SYNCHRONIZED If NIL (the default), the hash-table may have multiple concurrent readers, but results are undefined if a thread writes to the hash-table concurrently with another reader or writer. If T, all concurrent accesses are safe, but note that CLHS 3.6 (Traversal Rules and Side Effects) remains in force. See also: SB-EXT:WITH-LOCKED-HASH-TABLE. This keyword argument is experimental, and may change incompatibly or be removed in the future.
Example:
(defun make-language-table ()
  (make-hash-table :test #'equal))
Mentioned in:
CLtL2 - 16. Hash Tables
CLtL2 - 16.1. Hash Table Functions
CLtL2 - 6.3. Equality Predicates
CLtL2 - A.2.5. Collectors
HyperSpec - Function MAKE-HASH-TABLE
On Lisp - Common Lisp Evolves
On Lisp - Functions as Representation
On Lisp - Objects in Plain Lisp
On Lisp - The Database
PCL - hash tables
Successful Lisp - hash tables
(hash-table-test instance)
Function: Return whether debug-block represents elsewhere code.
 Mentioned in:
CLtL2 - 16.1. Hash Table Functions
HyperSpec - Function HASH-TABLE-TEST
(hash-table-count hash-table)
Function: Return the number of entries in the given HASH-TABLE.
 Mentioned in:
CLtL2 - 16.1. Hash Table Functions
CLtL2 - 6.3. Equality Predicates
HyperSpec - Function HASH-TABLE-COUNT
(hash-table-rehash-size instance)
Function: Return whether debug-block represents elsewhere code.
 Mentioned in:
CLtL2 - 16.1. Hash Table Functions
HyperSpec - Function HASH-TABLE-REHASH-SIZE
(with-hash-table-iterator (name hash-table) &body body)
Function: WITH-HASH-TABLE-ITERATOR ((name hash-table) &body body) Provides a method of manually looping over the elements of a hash-table. NAME is bound to a generator-macro that, within the scope of the invocation, returns one or three values. The first value tells whether any objects remain in the hash table. When the first value is non-NIL, the second and third values are the key and the value of the next object. Consequences are undefined if HASH-TABLE is mutated during execution of BODY, except for changing or removing elements corresponding to the current key. The applies to all threads, not just the curren one -- even for synchronized hash-tables. If the table may be mutated by another thread during iteration, use eg. SB-EXT:WITH-LOCKED-HASH-TABLE to protect the WITH-HASH-TABLE-ITERATOR for.
 Mentioned in:
CLtL2 - 16.1. Hash Table Functions
CLtL2 - 7.9. Structure Traversal and Side Effects
HyperSpec - Macro WITH-HASH-TABLE-ITERATOR
PCL - hash table iteration
(alexandria.0.dev:copy-hash-table table &key key test size rehash-size
 rehash-threshold)
Function: Returns a copy of hash table TABLE, with the same keys and values as the TABLE. The copy has the same properties as the original, unless overridden by the keyword arguments. Before each of the original values is set into the new hash-table, KEY is invoked on the value. As KEY defaults to CL:IDENTITY, a shallow copy is returned by default.
  
(alexandria.0.dev:hash-table-keys table)
Function: Returns a list containing the keys of hash table TABLE.
  
(alexandria.0.dev:plist-hash-table plist &rest hash-table-initargs)
Function: Returns a hash table containing the keys and values of the property list PLIST. Hash table is initialized using the HASH-TABLE-INITARGS.
  
(alexandria.0.dev:alist-hash-table alist &rest hash-table-initargs)
Function: Returns a hash table containing the keys and values of the association list ALIST. Hash table is initialized using the HASH-TABLE-INITARGS.
  
(alexandria.0.dev:hash-table-plist table)
Function: Returns a property list containing the keys and values of hash table TABLE.
  
(alexandria.0.dev:hash-table-alist table)
Function: Returns an association list containing the keys and values of hash table TABLE.
  
(alexandria.0.dev:hash-table-values table)
Function: Returns a list containing the values of hash table TABLE.
  
(hash-table-rehash-threshold instance)
Function: Return the rehash-threshold HASH-TABLE was created with.
 Mentioned in:
CLtL2 - 16.1. Hash Table Functions
HyperSpec - Function HASH-TABLE-REHASH-THRESHOLD