Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MergeTreeNode ¶
最佳合并树的结点
type MergeTreePrioQueue ¶
type MergeTreePrioQueue []MergeTreeNode
用于构建最佳合并树的优先队列
func BuildMergeTreePrioQueue ¶
func BuildMergeTreePrioQueue(nodes map[string]uint64, K int) (MergeTreePrioQueue, error)
构造用于生成最佳归并树(哈夫曼树)的优先队列(森林)
func (MergeTreePrioQueue) Len ¶
func (mtpq MergeTreePrioQueue) Len() int
func (MergeTreePrioQueue) Less ¶
func (mtpq MergeTreePrioQueue) Less(i, j int) bool
func (*MergeTreePrioQueue) Pop ¶
func (mtpq *MergeTreePrioQueue) Pop() interface{}
func (*MergeTreePrioQueue) Push ¶
func (mtpq *MergeTreePrioQueue) Push(node interface{})
func (MergeTreePrioQueue) Swap ¶
func (mtpq MergeTreePrioQueue) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.