ecodeclub / ekit

支持泛型的工具库
https://doc.meoying.com/
Apache License 2.0
383 stars 164 forks source link

切片实现的支持泛型的小根堆,简单封装了一下internal里面的红黑树 #218

Closed KelipuTe closed 1 year ago

codecov[bot] commented 1 year ago

Codecov Report

Merging #218 (b72a1bd) into dev (046debe) will increase coverage by 0.04%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##              dev     #218      +/-   ##
==========================================
+ Coverage   95.89%   95.93%   +0.04%     
==========================================
  Files          54       56       +2     
  Lines        3046     3077      +31     
==========================================
+ Hits         2921     2952      +31     
  Misses         96       96              
  Partials       29       29              
Files Changed Coverage Δ
queue/priority_queue.go 100.00% <100.00%> (ø)
tree/red_black_tree.go 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

KelipuTe commented 1 year ago

我换成优先级队列看看。好像确实差不多,先map映射然后再优先级队列入队,效果和这个小根堆的效果是一样的,也可以满足随机删除缓存时清理优先级数据的需求。不过这玩意也要先从internal里面放出来。

flycash commented 1 year ago

大哥!你的 license 和 format go code 都失败了!运行一下 make check

flycash commented 1 year ago

复制粘贴一下证书。

flycash commented 1 year ago

在 ecache 里面使用 dev 分支,等 ecache 通过考验,我会发布 0.0.9