diff --git a/README.md b/README.md index c8e72a7..a1eb651 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ I recommend try to find mature implementations, but in case you need to customiz my implementation is a good start to customize it for your needs. -## Data structure implementations +## Data structures implemented * Binary search tree * Binary heap @@ -26,10 +26,16 @@ my implementation is a good start to customize it for your needs. * dijkstra search * bfs * [BK-Tree](https://en.wikipedia.org/wiki/BK-tree) -* [Prefix tree] (https://en.wikipedia.org/wiki/Trie) +* [Prefix tree](https://en.wikipedia.org/wiki/Trie) +## Links + +* [List of algorithms](https://en.wikipedia.org/wiki/List_of_algorithms) +* [List of data structures](https://en.wikipedia.org/wiki/List_of_data_structures) +* [Google Technical Development Guide](https://www.google.com/about/careers/students/guide-to-technical-development.html) ## Tests -`tox` + + tox diff --git a/setup.py b/setup.py index d75c113..3a02cdb 100644 --- a/setup.py +++ b/setup.py @@ -2,11 +2,11 @@ setup( name='data_structures', - version='0.1.0', - packages=['structures', 'structures.tests'], + version='0.1.1', + packages=['structures'], url='https://github.com/prawn-cake/data_structures', license='MIT', author='Maksim Ekimovskii', author_email='ekimovsky.maksim@gmail.com', - description='Pure python data structures implementations' + description='Various data structures implementations in pure python' ) diff --git a/structures/binary_heap.py b/structures/binary_heap.py index e1bdfd4..aa27100 100644 --- a/structures/binary_heap.py +++ b/structures/binary_heap.py @@ -1,11 +1,8 @@ # -*- coding: utf-8 -*- -import abc class BinaryHeap(object): - __metaclass__ = abc.ABCMeta - def __init__(self, values=None): self._storage = values or [] @@ -13,9 +10,8 @@ def __init__(self, values=None): def storage(self): return self._storage - @abc.abstractmethod def insert(self, k): - pass + raise NotImplementedError() @classmethod def heapify(cls, values): @@ -24,13 +20,11 @@ def heapify(cls, values): heap.insert(k) return heap - @abc.abstractmethod def remove(self, k): - pass + raise NotImplementedError() - @abc.abstractmethod def extract_min(self): - pass + raise NotImplementedError() def swap(self, i, j): swap = self.storage[i]