Documentation ¶
Index ¶
- type Element
- type ElementPtr
- type Heap
- func (h *Heap[T, TPtr]) Add(sk TPtr) (err error)
- func (a Heap[T, TPtr]) Copy() Heap[T, TPtr]
- func (a Heap[T, TPtr]) Each(f schnittstellen.FuncIter[T]) (err error)
- func (a Heap[T, TPtr]) EachPtr(f schnittstellen.FuncIter[TPtr]) (err error)
- func (a Heap[T, TPtr]) Equals(b Heap[T, TPtr]) bool
- func (a *Heap[T, TPtr]) Fix()
- func (h *Heap[T, TPtr]) GetEqualer() schnittstellen.Equaler[T, TPtr]
- func (h *Heap[T, TPtr]) GetLessor() schnittstellen.Lessor2[T, TPtr]
- func (h *Heap[T, TPtr]) GetResetter() schnittstellen.Resetter2[T, TPtr]
- func (h Heap[T, TPtr]) Len() int
- func (a *Heap[T, TPtr]) MergeStream(read func() (TPtr, error), write schnittstellen.FuncIter[TPtr]) (err error)
- func (h *Heap[T, TPtr]) Peek() (sk TPtr, ok bool)
- func (h *Heap[T, TPtr]) Pop() (sk TPtr, ok bool)
- func (h *Heap[T, TPtr]) PopAndSave() (sk TPtr, ok bool)
- func (h *Heap[T, TPtr]) PopError() (sk TPtr, err error)
- func (h *Heap[T, TPtr]) Push(sk TPtr)
- func (a *Heap[T, TPtr]) Reset()
- func (a *Heap[T, TPtr]) ResetWith(b Heap[T, TPtr])
- func (h *Heap[T, TPtr]) Restore()
- func (h *Heap[T, TPtr]) SetPool(p schnittstellen.Pool[T, TPtr])
- func (a *Heap[T, TPtr]) Sorted() (b []TPtr)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ElementPtr ¶
type ElementPtr[T Element] interface { schnittstellen.Ptr[T] }
type Heap ¶
type Heap[T Element, TPtr ElementPtr[T]] struct { // contains filtered or unexported fields }
func Make ¶
func Make[T Element, TPtr ElementPtr[T]]( equaler schnittstellen.Equaler[T, TPtr], lessor schnittstellen.Lessor2[T, TPtr], resetter schnittstellen.Resetter2[T, TPtr], ) Heap[T, TPtr]
func MakeHeapFromSlice ¶
func MakeHeapFromSlice[T Element, TPtr ElementPtr[T]]( equaler schnittstellen.Equaler[T, TPtr], lessor schnittstellen.Lessor2[T, TPtr], resetter schnittstellen.Resetter2[T, TPtr], s []TPtr, ) Heap[T, TPtr]
func (Heap[T, TPtr]) EachPtr ¶
func (a Heap[T, TPtr]) EachPtr(f schnittstellen.FuncIter[TPtr]) (err error)
func (*Heap[T, TPtr]) GetEqualer ¶
func (h *Heap[T, TPtr]) GetEqualer() schnittstellen.Equaler[T, TPtr]
func (*Heap[T, TPtr]) GetLessor ¶
func (h *Heap[T, TPtr]) GetLessor() schnittstellen.Lessor2[T, TPtr]
func (*Heap[T, TPtr]) GetResetter ¶
func (h *Heap[T, TPtr]) GetResetter() schnittstellen.Resetter2[T, TPtr]
func (*Heap[T, TPtr]) MergeStream ¶
func (a *Heap[T, TPtr]) MergeStream( read func() (TPtr, error), write schnittstellen.FuncIter[TPtr], ) (err error)
func (*Heap[T, TPtr]) PopAndSave ¶
func (*Heap[T, TPtr]) SetPool ¶
func (h *Heap[T, TPtr]) SetPool(p schnittstellen.Pool[T, TPtr])
Click to show internal directories.
Click to hide internal directories.