Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HashSet ¶
type HashSet[E comparable] struct { Seed Go_Utils.Hasher // contains filtered or unexported fields }
func New ¶
func New[E comparable](h byte, size, seed uint) *HashSet[E]
New HashSet of type E. h is the neighborhood size parameter in Hopscotch hashing, 16 is a good value. size is used to calculate the initial table size that should handle size elements without resizing.
func (*HashSet[E]) Range ¶
Range over elements in a snapshot of the set at the time of the call to Range and call f on the elements. Stops when f returns false. It uses range to iterate through the bucket array, so concurrent modification during iteration won't be visible to f.
Click to show internal directories.
Click to hide internal directories.