working on RSNA
This commit is contained in:
@@ -8,7 +8,11 @@ class ExtendedContextAutomaton(ContextAutomaton):
|
||||
def __init__(self, reaction_system):
|
||||
self._actions = []
|
||||
super(ExtendedContextAutomaton, self).__init__(reaction_system)
|
||||
|
||||
|
||||
@property
|
||||
def number_of_actions(self):
|
||||
return len(self._actions)
|
||||
|
||||
def add_transition(self, src, actions, ctx_reaction, dst):
|
||||
"""Adds a transition
|
||||
|
||||
|
||||
@@ -3,12 +3,16 @@ from sys import exit
|
||||
class NetworkOfContextAutomata(object):
|
||||
|
||||
def __init__(self, context_automata):
|
||||
self.cas = list(context_automata)
|
||||
self.automata = list(context_automata)
|
||||
|
||||
@property
|
||||
def number_of_automata(self):
|
||||
return len(self.automata)
|
||||
|
||||
def show(self):
|
||||
for ca in self.cas:
|
||||
for ca in self.automata:
|
||||
print()
|
||||
ca.show()
|
||||
|
||||
def add(self, aut):
|
||||
self.cas.append(aut)
|
||||
self.automata.append(aut)
|
||||
|
||||
Reference in New Issue
Block a user