Documentation ¶
Index ¶
- type Bitset
- type BitsetDict
- type Deque
- type Pair
- type PriorityQueue
- type Set
- func (s *Set[T]) Contains(x T) bool
- func (s *Set[T]) Copy() *Set[T]
- func (s *Set[T]) Difference(other *Set[T]) *Set[T]
- func (s *Set[T]) Erase(x T) *Set[T]
- func (s *Set[T]) Insert(x T) *Set[T]
- func (s *Set[T]) Intersection(other *Set[T]) *Set[T]
- func (s *Set[T]) Iterator() *setIterator[T]
- func (s *Set[T]) Size() int
- func (s *Set[T]) Slice() []T
- func (s *Set[T]) Union(other *Set[T]) *Set[T]
- type Sha
- type UnionFind
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bitset ¶
type Bitset struct {
// contains filtered or unexported fields
}
func (Bitset) Intersection ¶
type BitsetDict ¶
type BitsetDict[T any] struct { // contains filtered or unexported fields }
func NewBitsetDict ¶
func NewBitsetDict[T any]() *BitsetDict[T]
func (*BitsetDict[T]) Contains ¶
func (d *BitsetDict[T]) Contains(bs Bitset) bool
func (*BitsetDict[T]) Get ¶
func (d *BitsetDict[T]) Get(bs Bitset) (T, bool)
func (*BitsetDict[T]) Set ¶
func (d *BitsetDict[T]) Set(bs Bitset, v T) *BitsetDict[T]
type Pair ¶
type Pair[T, W comparable] struct { First T Second W }
func NewPair ¶
func NewPair[T, W comparable](first T, second W) Pair[T, W]
type PriorityQueue ¶ added in v0.4.0
type PriorityQueue[T any] struct { // contains filtered or unexported fields }
Algorithms, 4th Edition https://algs4.cs.princeton.edu/home/
func NewPriorityQueue ¶ added in v0.4.0
func NewPriorityQueue[T any](lessFunc func(x, y T) bool) *PriorityQueue[T]
func (*PriorityQueue[T]) IsEmpty ¶ added in v0.4.0
func (pq *PriorityQueue[T]) IsEmpty() bool
func (*PriorityQueue[T]) Pop ¶ added in v0.4.0
func (pq *PriorityQueue[T]) Pop()
func (*PriorityQueue[T]) Push ¶ added in v0.4.0
func (pq *PriorityQueue[T]) Push(x T)
func (*PriorityQueue[T]) Size ¶ added in v0.4.0
func (pq *PriorityQueue[T]) Size() int
func (*PriorityQueue[T]) Top ¶ added in v0.4.0
func (pq *PriorityQueue[T]) Top() T
type Set ¶
type Set[T comparable] struct { Mp map[T]struct{} Elems []T }
func NewSet ¶
func NewSet[T comparable]() *Set[T]
func (*Set[T]) Difference ¶
func (*Set[T]) Intersection ¶
type UnionFind ¶
type UnionFind struct {
// contains filtered or unexported fields
}
func NewUnionFind ¶
Click to show internal directories.
Click to hide internal directories.