aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/algorithms
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--algorithms/algorithm.py12
-rw-r--r--algorithms/input_kind.py (renamed from algorithms/inputgen.py)0
-rw-r--r--algorithms/params.py2
3 files changed, 7 insertions, 7 deletions
diff --git a/algorithms/algorithm.py b/algorithms/algorithm.py
index 673a525..74817de 100644
--- a/algorithms/algorithm.py
+++ b/algorithms/algorithm.py
@@ -3,7 +3,7 @@
# For details, see https://github.com/egor-tensin/sorting-algorithms.
# Distributed under the MIT License.
-from . import inputgen
+from . import input_kind
class Algorithm:
def __init__(self, codename, display_name, f):
@@ -12,13 +12,13 @@ class Algorithm:
self.function = f
@staticmethod
- def gen_input(n, case=inputgen.InputKind.AVERAGE):
- #raise NotImplementedError('input generation is not defined for generic algorithms')
- return inputgen.gen_input_for_sorting(n, case)
+ def gen_input(n, case=input_kind.InputKind.AVERAGE):
+ #raise NotImplementedError('input generation is not defined for a generic algorithm')
+ return input_kind.gen_input_for_sorting(n, case)
class SortingAlgorithm(Algorithm):
def __init__(self, codename, display_name, f):
super().__init__(codename, display_name, f)
- def gen_input(self, n, case=inputgen.InputKind.AVERAGE):
- return inputgen.gen_input_for_sorting(n, case)
+ def gen_input(self, n, case=input_kind.InputKind.AVERAGE):
+ return input_kind.gen_input_for_sorting(n, case)
diff --git a/algorithms/inputgen.py b/algorithms/input_kind.py
index 998f1d6..998f1d6 100644
--- a/algorithms/inputgen.py
+++ b/algorithms/input_kind.py
diff --git a/algorithms/params.py b/algorithms/params.py
index bf87976..edd1361 100644
--- a/algorithms/params.py
+++ b/algorithms/params.py
@@ -6,7 +6,7 @@
from enum import Enum
from numbers import Integral
-from .inputgen import InputKind
+from .input_kind import InputKind
from .plotter import PlotBuilder
from . import registry
from .timer import Timer