master > master: code py - fügte tarjan im Hauptzyklus hinzu

This commit is contained in:
raj_mathe committed 2022-06-10 16:32:15 +02:00
1 parent 3e8b3c157d
commit c0bc69450c
5 files changed
+53 -30

No files matched your search

+3 -1
View File
@@ -7,6 +7,7 @@
from __future__ import annotations;
from models.generated.commands import *;
from src.thirdparty.types import *;
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -28,7 +29,8 @@ class Graph(object):
nodes: list[Any];
edges: list[tuple[Any,Any]]
def __init__(self, nodes: list[Any], edges: list[tuple[Any,Any]]):
def __init__(self, nodes: list[Any], edges: list[Tuple[Any, Any]]):
assert all(len(edge) == 2 for edge in edges);
self.nodes = nodes;
self.edges = edges;
return;