summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-04-19 14:04:31 +0200
committerDaniel Friesel <derf@finalrewind.org>2018-04-19 14:04:31 +0200
commitc82ea1b5792009175654efc5dc0b69ef9cb475dd (patch)
tree5e31d767aaf08697a4b0c93553eaac19f5a58abc
parent1a9cac2fd80baa377c4ca39e8626fb90a390ef8c (diff)
add states_and_transitions accessor
-rwxr-xr-xlib/dfatool.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/dfatool.py b/lib/dfatool.py
index 299190f..5b8f69f 100755
--- a/lib/dfatool.py
+++ b/lib/dfatool.py
@@ -1154,6 +1154,11 @@ class EnergyModel:
def transitions(self):
return sorted(list(filter(lambda k: self.by_name[k]['isa'] == 'transition', self.by_name.keys())))
+ def states_and_transitions(self):
+ ret = self.states()
+ ret.extend(self.transitions())
+ return ret
+
def parameters(self):
return self._parameter_names