Documentation

Overview

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

    Index

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    This section is empty.

    Types

    type Heap

    type Heap struct {
    	// contains filtered or unexported fields
    }

      Heap contains a slice of items and the last index.

      func New

      func New() *Heap

        New returns a heap pointer.

        func (*Heap) IsEmpty

        func (h *Heap) IsEmpty() bool

          IsEmpty returns whether a heap is empty.

          func (*Heap) Pop

          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

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

              Push inserts two new clustering candidates and their kt distance.

              Source Files