Documentation ¶
Index ¶
- type HashTab
- func (tt *HashTab[T]) Delete(find *T) (found bool)
- func (tt *HashTab[T]) Dump(fo io.Writer)
- func (tt *HashTab[T]) Insert(item *T)
- func (tt HashTab[T]) IsEmpty() bool
- func (tt *HashTab[T]) Len() int
- func (tt *HashTab[T]) Length() int
- func (tt *HashTab[T]) Search(find *T) (item *T)
- func (tt *HashTab[T]) Truncate()
- type Hashable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HashTab ¶
type HashTab[T comparable.Equality] struct { // contains filtered or unexported fields }
HashTab is a generic binary tree
func (*HashTab[T]) Insert ¶
func (tt *HashTab[T]) Insert(item *T)
Insert will add a new item to the tree. If it is a duplicate of an exiting item the new item will replace the existing one. Complexity is O(log n)/k.
func (HashTab[T]) IsEmpty ¶
IsEmpty will return true if the binary-tree is empty Complexity is O(1).
Click to show internal directories.
Click to hide internal directories.