aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/algorithms/registry.py
diff options
context:
space:
mode:
Diffstat (limited to 'algorithms/registry.py')
-rw-r--r--algorithms/registry.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/algorithms/registry.py b/algorithms/registry.py
new file mode 100644
index 0000000..3bc6495
--- /dev/null
+++ b/algorithms/registry.py
@@ -0,0 +1,17 @@
+# Copyright (c) 2016 Egor Tensin <Egor.Tensin@gmail.com>
+# This file is part of the "Sorting algorithms" project.
+# For details, see https://github.com/egor-tensin/sorting-algorithms.
+# Distributed under the MIT License.
+
+from . import impl
+
+
+_ALL_ALGORITHMS = impl.refresh_algorithms()
+
+
+def get_codenames():
+ return _ALL_ALGORITHMS.keys()
+
+
+def get(codename):
+ return _ALL_ALGORITHMS[codename]