master > master: code py - setup
This commit is contained in:
@@ -1,65 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# IMPORTS
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
import os;
|
||||
import sys;
|
||||
|
||||
os.chdir(os.path.join(os.path.dirname(__file__), '..'));
|
||||
sys.path.insert(0, os.getcwd());
|
||||
|
||||
from src.core.log import *;
|
||||
from src.local.maths import *;
|
||||
from src.graphs.graph import *;
|
||||
from src.graphs.tarjan import *;
|
||||
from src.travel.naive import *;
|
||||
from src.string_alignment.hirschberg import *;
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# GLOBAL CONSTANTS/VARIABLES
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
#
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# MAIN METHOD
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
def enter():
|
||||
# ## Beispiel für Seminarwoche 9 (Blatt 8):
|
||||
# tsp_naive_algorithm(
|
||||
# dist = np.asarray([
|
||||
# [0, 7, 4, 3],
|
||||
# [7, 0, 5, 6],
|
||||
# [2, 5, 0, 5],
|
||||
# [2, 7, 4, 0],
|
||||
# ], dtype=float),
|
||||
# optimise=min,
|
||||
# verbose=True,
|
||||
# );
|
||||
## Beispiel für Seminarwoche 10 (Blatt 9):
|
||||
hirschberg_algorithm_once(
|
||||
# hirschberg_algorithm(
|
||||
# Y = 'ANSPANNEN',
|
||||
# X = 'ANSTRENGEN',
|
||||
# Y = 'AGAT',
|
||||
# X = 'ACGAAG',
|
||||
Y = 'applses',
|
||||
X = 'happily ever, lol',
|
||||
# Y = 'apple',
|
||||
# X = 'happily',
|
||||
mode = DisplayMode.COSTS,
|
||||
# mode = DisplayMode.MOVES,
|
||||
# mode = DisplayMode.COSTS_AND_MOVES,
|
||||
);
|
||||
return;
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# EXECUTION
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
if __name__ == '__main__':
|
||||
enter();
|
||||
Reference in New Issue
Block a user