merger

package
v2.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Merge

func Merge(lists ...[]*internalpb.Entry) []*internalpb.Entry

Types

type Element

type Element struct {
	*internalpb.Entry
	// sorted sequence
	SortedSeq int
}

type Heap

type Heap []Element

Heap min heap

func (*Heap) Len

func (h *Heap) Len() int

func (*Heap) Less

func (h *Heap) Less(i, j int) bool

func (*Heap) Pop

func (h *Heap) Pop() any

Pop the minimum element in heap 1. move the minimum element to the end of slice 2. pop it (what this method does) 3. heapify

func (*Heap) Push

func (h *Heap) Push(x any)

func (*Heap) Swap

func (h *Heap) Swap(i, j int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL