Documentation ¶
Index ¶
- type BSTree
- func (p *BSTree[T]) Data() T
- func (p *BSTree[T]) Has(newNode *BSTree[T]) bool
- func (p *BSTree[T]) Insert(newNode *BSTree[T]) *BSTree[T]
- func (p *BSTree[T]) Maximum() *BSTree[T]
- func (p *BSTree[T]) Merge(b *BSTree[T]) *BSTree[T]
- func (p *BSTree[T]) Minimum() *BSTree[T]
- func (p *BSTree[T]) PreTravel(list *[]T)
- func (p *BSTree[T]) Remove(newNode *BSTree[T]) *BSTree[T]
- func (p *BSTree[T]) ToArray() []T
- type CanHashUnique
- type Priority
- type Queue
- type QueueOption
- type QueueOptions
- type QueueType
- type SetType
- type SetV2
- func (s *SetV2[T]) Clear()
- func (s *SetV2[T]) Clone() *SetV2[T]
- func (s *SetV2[T]) Empty() bool
- func (s *SetV2[T]) Has(val T) bool
- func (s *SetV2[T]) HasAnyItem(val ...T) bool
- func (s *SetV2[T]) Insert(val T) *SetV2[T]
- func (s *SetV2[T]) InsertAll(val ...T) *SetV2[T]
- func (s *SetV2[T]) Instance() *SetV2[T]
- func (s *SetV2[T]) InstanceFromSlice(slice *[]T) *SetV2[T]
- func (s *SetV2[T]) Remove(val T)
- func (s *SetV2[T]) Size() uint
- func (s *SetV2[T]) ToArray() []T
- func (s *SetV2[T]) TryInsert(val T) (*SetV2[T], bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BSTree ¶
type BSTree[T Priority] struct { Left *BSTree[T] Right *BSTree[T] // contains filtered or unexported fields }
func NewBSTNode ¶
NewBSTNode Attention: data need implement Priority
type CanHashUnique ¶
type CanHashUnique[T SetType] interface { Unique() T }
type Queue ¶
func (*Queue[T, K]) Instance ¶
func (q *Queue[T, K]) Instance(opts ...QueueOption) *Queue[T, K]
type QueueOption ¶
type QueueOption func(opts *QueueOptions)
type QueueOptions ¶
type QueueOptions struct {
// contains filtered or unexported fields
}
type SetV2 ¶
type SetV2[T SetType] struct { // contains filtered or unexported fields }
func InstanceSetAndMapFromStructSlice ¶
func InstanceSetAndMapFromStructSlice[T SetType, K CanHashUnique[T]](slice []K) (*SetV2[T], map[T]K)
func (*SetV2[T]) HasAnyItem ¶
func (*SetV2[T]) InstanceFromSlice ¶
Click to show internal directories.
Click to hide internal directories.