master > master: src-py bsp

This commit is contained in:
RD 2022-04-07 16:41:33 +02:00
parent cd265e4ee9
commit 3338b255a1
1 changed files with 12 additions and 1 deletions

View File

@ -11,6 +11,9 @@ import sys;
os.chdir(os.path.join(os.path.dirname(__file__), '..'));
sys.path.insert(0, os.getcwd());
from src.graphs.graph import *;
from src.graphs.tarjan import *;
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# GLOBAL CONSTANTS/VARIABLES
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -22,7 +25,15 @@ sys.path.insert(0, os.getcwd());
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def enter():
print('Hello world!')
## Beispiel aus Seminarblatt 1
## TODO -> schieben in config datei
G = Graph(
nodes=[1,2,3,4,5,6,7],
edges=[(1,2), (1,3), (2,3), (3,4), (4,5), (5,2), (5,6), (5,7), (6,7)],
);
components = tarjan_algorithm(G);
for component in components:
print(component);
return;
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~