diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2017-05-29 06:55:50 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2017-05-29 06:55:50 +0300 |
commit | d90a93d7f1224a43ef4baf24281e0df7bdde5413 (patch) | |
tree | d11f2dc3eeecca8de5722cbe998ad222cdcc7e9b /algorithms/algorithm.py | |
parent | code style (diff) | |
download | sorting-algorithms-d90a93d7f1224a43ef4baf24281e0df7bdde5413.tar.gz sorting-algorithms-d90a93d7f1224a43ef4baf24281e0df7bdde5413.zip |
algorithms.inputgen -> algorithms.input_kind
Diffstat (limited to 'algorithms/algorithm.py')
-rw-r--r-- | algorithms/algorithm.py | 12 |
1 files changed, 6 insertions, 6 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) |