master > master: code - fügte algorithmen und config datei hinzu
This commit is contained in:
0
code/display/__init__.py
Normal file
0
code/display/__init__.py
Normal file
42
code/display/display.py
Normal file
42
code/display/display.py
Normal file
@@ -0,0 +1,42 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# IMPORTS
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
from code.local.typing import *;
|
||||
|
||||
from code.core.log import *;
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# METHODS display case
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
def DisplayCase(name: Any):
|
||||
logPlain('');
|
||||
logInfo('\033[92;1mCASE {}\033[0m'.format(name))
|
||||
return;
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# METHODS display algorithm start/end
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
def DisplayStartOfAlgorithm(name: str, **inputs: Any):
|
||||
logInfo('Ausführung vom Algorithmus: \033[92;1m{}\033[0m'.format(name))
|
||||
logInfo('INPUTS');
|
||||
for varname, value in inputs.items():
|
||||
logPlain(' - {} = {}'.format(varname, value))
|
||||
return;
|
||||
|
||||
def DisplayEndOfAlgorithm(**outputs: Any):
|
||||
logInfo('OUTPUTS:')
|
||||
for varname, value in outputs.items():
|
||||
logPlain(' - {} = {}'.format(varname, value))
|
||||
DisplayMetrics()
|
||||
return;
|
||||
|
||||
def DisplayMetrics():
|
||||
logInfo('Dauer der Ausführung: t = \033[2m{}\033[0m'.format(TimeElapsed()))
|
||||
logInfo('Anzahl der Schritte: T(n) = \033[1m{}\033[0m'.format(NumberOfSteps()))
|
||||
return;
|
||||
Reference in New Issue
Block a user