Go to file
2015-03-05 21:21:55 +01:00
maps hashmap implemented (inc. tests) 2015-03-05 18:46:42 +01:00
sets hashmap implemented (inc. tests) 2015-03-05 18:46:42 +01:00
stacks optimizing the array stack to shrink array by factor of 1.5, now array stack is faster than linked list stack 2015-03-05 21:10:37 +01:00
trees/redblacktree red-black tree Clear() method 2015-03-05 15:05:12 +01:00
utils - comparator test for custom comparator 2015-03-04 19:38:09 +01:00
.gitignore - gitignore update 2015-03-04 18:55:42 +01:00
.travis.yml Update .travis.yml 2015-03-05 04:43:07 +01:00
LICENSE Initial commit 2015-03-04 15:19:53 +01:00
README.md readme update 2015-03-05 21:21:55 +01:00

Build Status

GoDS (Go Data Structures)

Implementation of various data structures in Go.

Implementations

  • Sets:
    • HashSet (unordered)
    • TreeSet (ordered)
  • Stacks:
    • LinkedListStack
    • ArrayStack
  • Maps:
    • HashMap (unordered)
    • TreeMap (ordered)
  • Tree:
    • RedBlackTree

Motivations

Collections and data structures found in other languages: Java Collections, C++ Standard Template Library (STL) containers, Qt Containers, etc.

Goals

Fast algorithms:

  • Based on decades of knowledge and experiences of other libraries mentioned below.

Memory efficient algorithms:

  • Avoiding to consume memory by using optimal algorithms and data structures for the given set of problems, e.g. red-black tree in case of TreeMap to avoid keeping redundant sorted array of keys in memory.

Easy to use library:

  • Well-structued library with minimalistic set of atomic operations from which more complex operations can be crafted.

Stable library:

  • Only additions are permitted keeping the library backward compatible.

Solid documentation and examples:

  • TODO

Production ready:

  • 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.

Thread safety is not a concern of this project, this should be handled at a higher level.

Testing and Benchmarking

go test -v -bench . -benchmem -benchtime 1s ./...

License

Copyright (c) Emir Pasic, All rights reserved.

GNU Lesser General Public License Version 3, see LICENSE for more details.