Documentation ¶
Index ¶
- func NewBucket[K Hashable, V any]() *bucket[K, V]
- func NewNode[K Hashable, V any](key K, value V) *node[K, V]
- type HashMap
- func (h *HashMap[K, V]) Count() int
- func (h *HashMap[K, V]) Delete(key K) (*node[K, V], error)
- func (h *HashMap[K, V]) Get(key K) (*node[K, V], error)
- func (h *HashMap[K, V]) LoadFactor() float64
- func (h *HashMap[K, V]) Reset()
- func (h *HashMap[K, V]) Resize(size int) error
- func (h *HashMap[K, V]) Set(key K, value V) error
- func (h *HashMap[K, V]) SetLoadFactor(loadFactor float64)
- func (h *HashMap[K, V]) Size() int
- type Hashable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HashMap ¶
func NewHashMap ¶
initialize new HashMap
func (*HashMap[K, V]) LoadFactor ¶
Get load factor of hashmap
func (*HashMap[K, V]) SetLoadFactor ¶
Set load factor of hashmap (default is 0.75)
Click to show internal directories.
Click to hide internal directories.