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

This commit is contained in:
RD
2022-06-10 16:05:15 +02:00
parent 3e8b3c157d
commit c0bc69450c
5 changed files with 53 additions and 30 deletions

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;