hep: go-hep.org/x/hep/fastjet/internal/heap Index | Files

package heap

import "go-hep.org/x/hep/fastjet/internal/heap"

package heap implements a min-heap for pairs of jets.


Package Files

doc.go heap.go

type Heap Uses

type Heap struct {
    // contains filtered or unexported fields

Heap contains a slice of items and the last index.

func New Uses

func New() *Heap

New returns a heap pointer.

func (*Heap) IsEmpty Uses

func (h *Heap) IsEmpty() bool

IsEmpty returns whether a heap is empty.

func (*Heap) Pop Uses

func (h *Heap) Pop() (jeti, jetj int, dij float64)

Pop returns the two jets with the smallest distance. It returns -1, -1, 0 if the heap is empty.

func (*Heap) Push Uses

func (h *Heap) Push(jeti, jetj int, dij float64)

Push inserts two new clustering candidates and their kt distance.

Package heap is imported by 1 packages. Updated 2019-05-31. Refresh now. Tools for package owners.