有人知道一个好的 LinkedDictionary/Hashed LinkedList 吗?
我需要一个介于字典和链接列表之间的通用集合。我希望能够:
- 通过键访问元素
- 访问上一个和下一个元素
我已经查看了提供的通用集合以及专用集合。我还没有真正找到我要找的东西,最接近的集合是 OrderedDictionary 和 SortedDictionary。
快速 Google 发现了以下潜在集合:
- LinkedDictionary - http://www.glennslayden.com/code/c -sharp/linked-dictionary
- C5集合(支持哈希链表)- https://github.com/sestoft/C5/
每个似乎都很合适。不过,我想问问 SO 的专家们他们的建议是什么。
那么各位大师,你们有什么建议呢?您是否使用这些集合或其他集合来实现这些或相关目标?是否有一些明显明显的东西我应该注意但我却错过了?
I am in need of a Generic collection that is somewhere in between a Dictionary and LinkedList. I want to be able to:
- Access elements by key
- Access previous and next elements
I've taken a look at the provided Generic collections as well as the specialized collections. I haven't really found what I'm looking for, the closest collections were OrderedDictionary and SortedDictionary.
A quick Google found the following potential collections:
- LinkedDictionary - http://www.glennslayden.com/code/c-sharp/linked-dictionary
- C5 collection (supports Hashed linked lists) - https://github.com/sestoft/C5/
Each seems like it could be a good fit. However, I wanted to ask the gurus at SO what their suggestions would be.
So gurus, what are your suggestions? Have you used these collections or other collections to accomplish these or related goals? Is there something blatantly obvious that I should be looking at and am just missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我想你已经找到了自己的答案; C5 是一个很好的库,有你想要的东西,它有很棒的文档和测试。哦,它可以通过 Nuget 获得。
I think you found your own answer; C5 is good library and has what you are looking for, it has great documentation and tests. Oh, and it's available via Nuget.
我自己写的。评论&欢迎建设性批评。
I wrote my own. Comments & constructive criticism welcome.