aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/algorithms/registry.py
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-06-24 01:54:13 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-06-24 01:54:13 +0300
commit82a674e409fce161299efeb43e1176f869af64af (patch)
tree3b544bd96688f3847233e011452c754c38755116 /algorithms/registry.py
parentadd Pylint configuration (diff)
downloadsorting-algorithms-82a674e409fce161299efeb43e1176f869af64af.tar.gz
sorting-algorithms-82a674e409fce161299efeb43e1176f869af64af.zip
major refactoring
With the focus on (re)usability. That includes adding separate modules for plotting, input generation and things like that.
Diffstat (limited to 'algorithms/registry.py')
-rw-r--r--algorithms/registry.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/algorithms/registry.py b/algorithms/registry.py
index 8f0469d..0f75dce 100644
--- a/algorithms/registry.py
+++ b/algorithms/registry.py
@@ -2,16 +2,12 @@
# This file is licensed under the terms of the MIT License.
# See LICENSE.txt for details.
-import algorithms.impl
+from . import impl
-def refresh_algorithms():
- algorithms.impl._refresh_algorithms()
+_ALL_ALGORITHMS = impl.refresh_algorithms()
def get_codenames():
- return algorithms.impl._ALL_ALGORITHMS.keys()
-
-def iter_algorithms():
- return iter(algorithms.impl._ALL_ALGORITHMS.values())
+ return _ALL_ALGORITHMS.keys()
def get(codename):
- return algorithms.impl._ALL_ALGORITHMS[codename]
+ return _ALL_ALGORITHMS[codename]