https://github.com/felixseptem/collections
some useful datatypes
https://github.com/felixseptem/collections
data-structures go golang lfu-cache lru-cache
Last synced: 7 months ago
JSON representation
some useful datatypes
- Host: GitHub
- URL: https://github.com/felixseptem/collections
- Owner: FelixSeptem
- License: mit
- Created: 2019-01-09T12:04:45.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-27T13:35:01.000Z (about 7 years ago)
- Last Synced: 2025-01-05T04:33:40.299Z (about 1 year ago)
- Topics: data-structures, go, golang, lfu-cache, lru-cache
- Language: Go
- Homepage:
- Size: 30.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# collections
[](https://www.travis-ci.org/FelixSeptem/collections)
[](https://coveralls.io/github/FelixSeptem/collections?branch=master)
[](https://goreportcard.com/report/github.com/FelixSeptem/collections)
some useful datatypes inspired by [collections](https://docs.python.org/2/library/collections.html) and [boltons](https://github.com/mahmoud/boltons)
## Install
```shell
go get -u github.com/FelixSeptem/collections
```
### Data Structures
- queue [](http://godoc.org/github.com/FelixSeptem/collections/queue)
implement a thread safe FILO queue
- stack [](http://godoc.org/github.com/FelixSeptem/collections/stack)
implement a thread safe FIFO stack
- deque [](http://godoc.org/github.com/FelixSeptem/collections/deque)
deques are a generalization of stacks and queues ,inspired by [deque](https://docs.python.org/2/library/collections.html#collections.deque)
- priority queue [](http://godoc.org/github.com/FelixSeptem/collections/priority_queue) implement a fix size queue with weight
### Cache
- LRU [](http://godoc.org/github.com/FelixSeptem/collections/lru)
implement a thread safe `Least Recently Used` [ref](https://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU)) [Code](https://github.com/FelixSeptem/collections/tree/master/lru)
- LFU [](http://godoc.org/github.com/FelixSeptem/collections/lfu)
implement a thread safe `Least Frequently Used` [ref](https://en.wikipedia.org/wiki/Cache_replacement_policies#Least-frequently_used_(LFU)) [Code](https://github.com/FelixSeptem/collections/tree/master/lfu)
- ARC [](http://godoc.org/github.com/FelixSeptem/collections/arc)
implement a thread safe `Adaptive Replacement Cache` [ref](https://en.wikipedia.org/wiki/Adaptive_replacement_cache) Paper:[[1]](https://www.usenix.org/legacy/events/fast03/tech/full_papers/megiddo/megiddo.pdf)[[2]](https://arxiv.org/pdf/1503.07624.pdf) [Code](https://github.com/FelixSeptem/collections/tree/master/arc)
### Others