Discover Packages
github.com/dolthub/swiss
package
module
Version:
v0.1.0
Opens a new window with list of versions in this module.
Published: Mar 28, 2023
License: Apache-2.0
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 24
Opens a new window with list of known importers.
README
README
¶
swiss
Golang port of Abseil's flat_hash_map
Expand ▾
Collapse ▴
Documentation
¶
Rendered for
linux/amd64
windows/amd64
darwin/amd64
js/wasm
Map is an open-addressing hash map
based on Abseil's flat_hash_map.
func (m *Map [K, V]) Count() int
Count returns the number of elements in the Map.
func (m *Map [K, V]) Delete(key K) (ok bool )
Delete attempts to remove |key|, returns true successful.
func (m *Map [K, V]) Get(key K) (value V, ok bool )
Get returns the |value| mapped by |key| if one exists.
func (m *Map [K, V]) Has(key K) (ok bool )
Has returns true if |key| is present in |m|.
func (m *Map [K, V]) Iter(cb func(k K, v V) (stop bool ))
Iter iterates the elements of the Map, passing them to the callback.
It guarantees that any key in the Map will be visited only once, and
for un-mutated Maps, every key will be visited once. If the Map is
Mutated during iteration, mutations will be reflected on return from
Iter, but the set of keys visited by Iter is non-deterministic.
func (m *Map [K, V]) Put(key K, value V)
Put attempts to insert |key| and |value|
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.