We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1ee2eab commit f7afb85Copy full SHA for f7afb85
aalpy/learning_algs/general_passive/GsmNode.py
@@ -128,6 +128,12 @@ def get_prefix(self, include_output=True):
128
prefix.reverse()
129
return prefix
130
131
+ def get_root(self):
132
+ current = self
133
+ while current.predecessor:
134
+ current = current.predecessor
135
+ return current
136
+
137
def get_or_create_transitions(self, in_sym) -> Dict[Any, TransitionInfo]:
138
t = self.transitions.get(in_sym)
139
if t is None:
0 commit comments