diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2016-06-24 01:54:13 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2016-06-24 01:54:13 +0300 |
commit | 82a674e409fce161299efeb43e1176f869af64af (patch) | |
tree | 3b544bd96688f3847233e011452c754c38755116 /algorithms/registry.py | |
parent | add Pylint configuration (diff) | |
download | sorting-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.py | 12 |
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] |