2015-03-05 03:34:09 +00:00
[![Build Status ](https://travis-ci.org/emirpasic/gods.svg )](https://travis-ci.org/emirpasic/gods)
2015-03-05 19:07:30 +00:00
# GoDS (Go Data Structures)
2015-03-05 03:34:09 +00:00
2015-03-05 19:07:30 +00:00
Implementation of various data structures in Go.
## Implementations
- Sets:
- HashSet (unordered)
- TreeSet (ordered)
- Stacks:
- LinkedListStack
- ArrayStack
- Maps:
- HashMap (unordered)
- TreeMap (ordered)
- Tree:
- RedBlackTree
## Motivations
2015-03-05 19:12:13 +00:00
Collections and data structures found in other languages: Java Collections, C++ Standard Template Library (STL) containers, Qt Containers, etc.
2015-03-05 19:07:30 +00:00
## Goals
2015-03-05 19:12:13 +00:00
- **Fast algorithms**:
2015-03-05 19:07:30 +00:00
- Based on decades of knowledge and experiences of other libraries mentioned below.
2015-03-05 19:12:13 +00:00
- **Memory efficient algorithms**:
2015-03-05 19:07:30 +00:00
- Avoiding to keep consume memory by using optimal algorithms and data structures for the given set of problems.
2015-03-05 19:12:13 +00:00
- **Easy to use library**:
2015-03-05 19:07:30 +00:00
- Well-structued library with minimalistic set of atomic operations from which more complex operations can be crafted.
2015-03-05 19:12:13 +00:00
- **Stable library**:
2015-03-05 19:07:30 +00:00
- Only additions are permitted keeping the library backward compatible.
2015-03-05 19:12:13 +00:00
- **Solid documentation and examples**:
2015-03-05 19:07:30 +00:00
- TODO
2015-03-05 19:12:13 +00:00
- **Production ready**:
2015-03-05 19:07:30 +00:00
- TODO
There is often a tug of war between speed and memory when crafting algorithms. We choose to optimize for speed in most cases within reasonable limits on memory consumption.
2015-03-04 14:20:27 +00:00
2015-03-05 18:29:57 +00:00
## Testing and Benchmarking
2015-03-04 14:20:27 +00:00
2015-03-05 18:29:57 +00:00
`go test -v -bench . -benchmem -benchtime 1s ./...`
2015-03-05 19:07:30 +00:00
## License
Copyright (c) Emir Pasic, All rights reserved.
2015-03-05 19:12:13 +00:00
GNU Lesser General Public License Version 3, see [LICENSE ](https://github.com/emirpasic/gods/blob/master/LICENSE ) for more details.