master > master: code-py - refactoring von config/models

- manche command-optionen wie verbosity nach config.yaml umgezogen.
This commit is contained in:
RD
2022-06-10 12:08:31 +02:00
parent 0523c68100
commit 97295b71cd
9 changed files with 87 additions and 64 deletions

View File

@@ -22,7 +22,6 @@ from src.graphs.tarjan import *;
from src.tsp import *;
from src.hirschberg import *;
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# GLOBAL CONSTANTS/VARIABLES
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -39,15 +38,15 @@ def enter():
tsp_algorithm(
dist = np.asarray(command.dist, dtype=float),
optimise = min if command.optimise == EnumTspOptimise.min else max,
verbose = command.verbose,
verbose = OPTIONS.tsp.verbose,
);
elif isinstance(command, CommandHirschberg):
hirschberg_algorithm(
X = command.word1,
Y = command.word2,
once = command.once,
verb = command.verbose,
show = command.show,
verb = OPTIONS.hirschberg.verbose,
show = OPTIONS.hirschberg.show,
);
return;