Documentation ¶
Overview ¶
Package heap provides heap operations for any type that implements heap.Interface. A heap is a tree with the property that each node is the minimum-valued node in its subtree.
The minimum element in the tree is the root, at index 0.
A heap is a common way to implement a priority queue. To build a priority queue, implement the Heap interface with the (negative) priority as the ordering for the Less method, so Push adds items while Pop removes the highest-priority item from the queue. The Examples include such an implementation; the file example_pq_test.go has the complete source.
Package sort provides primitives for sorting slices and user-defined collections.
Index ¶
- func Merge(col []containers.Vector, src *[]uint32, fromLayout, toLayout []uint32) (ret []containers.Vector, mapping []uint32)
- func Multiplex(col []containers.Vector, src []uint32, fromLayout, toLayout []uint32) (ret []containers.Vector)
- func Reshape(col []containers.Vector, fromLayout, toLayout []uint32) (ret []containers.Vector)
- func Shuffle(col containers.Vector, idx []uint32)
- func Sort(col containers.Vector, idx []uint32) (ret containers.Vector)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Merge ¶
func Merge(col []containers.Vector, src *[]uint32, fromLayout, toLayout []uint32) (ret []containers.Vector, mapping []uint32)
func Multiplex ¶
func Multiplex(col []containers.Vector, src []uint32, fromLayout, toLayout []uint32) (ret []containers.Vector)
func Reshape ¶
func Reshape(col []containers.Vector, fromLayout, toLayout []uint32) (ret []containers.Vector)
func Shuffle ¶
func Shuffle(col containers.Vector, idx []uint32)
func Sort ¶
func Sort(col containers.Vector, idx []uint32) (ret containers.Vector)
Types ¶
This section is empty.