Documentation ¶
Index ¶
- func MergeStream[T Element, TPtr ElementPtr[T]](a *Heap[T, TPtr], read func() (TPtr, error), ...) (err error)
- func MergeStreamPreferringHeap[T Element, TPtr ElementPtr[T]](h *Heap[T, TPtr], r func() (TPtr, error), w schnittstellen.FuncIter[TPtr], ...) (err error)
- type Element
- type ElementPtr
- type Heap
- func Make[T Element, TPtr ElementPtr[T]](equaler schnittstellen.Equaler1[TPtr], lessor schnittstellen.Lessor3[TPtr], ...) *Heap[T, TPtr]
- func MakeHeapFromSlice[T Element, TPtr ElementPtr[T]](equaler schnittstellen.Equaler1[TPtr], lessor schnittstellen.Lessor3[TPtr], ...) *Heap[T, TPtr]
- func MakeHeapFromSliceUnsorted[T Element, TPtr ElementPtr[T]](equaler schnittstellen.Equaler1[TPtr], lessor schnittstellen.Lessor3[TPtr], ...) *Heap[T, TPtr]
- 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.Equaler1[TPtr]
- func (h *Heap[T, TPtr]) GetLessor() schnittstellen.Lessor3[TPtr]
- func (h *Heap[T, TPtr]) GetResetter() schnittstellen.Resetter2[T, TPtr]
- func (h *Heap[T, TPtr]) Len() int
- 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(v schnittstellen.Pool[T, TPtr])
- func (a *Heap[T, TPtr]) Sorted() (b []TPtr)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MergeStream ¶
func MergeStream[T Element, TPtr ElementPtr[T]]( a *Heap[T, TPtr], read func() (TPtr, error), write schnittstellen.FuncIter[TPtr], ) (err error)
func MergeStreamPreferringHeap ¶
func MergeStreamPreferringHeap[T Element, TPtr ElementPtr[T]]( h *Heap[T, TPtr], r func() (TPtr, error), w schnittstellen.FuncIter[TPtr], equaler schnittstellen.Equaler1[TPtr], l schnittstellen.Lessor3[TPtr], re schnittstellen.Resetter2[T, TPtr], ) (err error)
Types ¶
type Element ¶
type Element interface{}
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.Equaler1[TPtr], lessor schnittstellen.Lessor3[TPtr], resetter schnittstellen.Resetter2[T, TPtr], ) *Heap[T, TPtr]
func MakeHeapFromSlice ¶
func MakeHeapFromSlice[T Element, TPtr ElementPtr[T]]( equaler schnittstellen.Equaler1[TPtr], lessor schnittstellen.Lessor3[TPtr], resetter schnittstellen.Resetter2[T, TPtr], s []TPtr, ) *Heap[T, TPtr]
func MakeHeapFromSliceUnsorted ¶
func MakeHeapFromSliceUnsorted[T Element, TPtr ElementPtr[T]]( equaler schnittstellen.Equaler1[TPtr], lessor schnittstellen.Lessor3[TPtr], resetter schnittstellen.Resetter2[T, TPtr], s []TPtr, ) *Heap[T, TPtr]
func (*Heap[T, TPtr]) Each ¶
func (a *Heap[T, TPtr]) Each(f schnittstellen.FuncIter[T]) (err error)
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.Equaler1[TPtr]
func (*Heap[T, TPtr]) GetLessor ¶
func (h *Heap[T, TPtr]) GetLessor() schnittstellen.Lessor3[TPtr]
func (*Heap[T, TPtr]) GetResetter ¶
func (h *Heap[T, TPtr]) GetResetter() schnittstellen.Resetter2[T, TPtr]
func (*Heap[T, TPtr]) SetPool ¶
func (h *Heap[T, TPtr]) SetPool(v schnittstellen.Pool[T, TPtr])
Click to show internal directories.
Click to hide internal directories.