source:
flowtimer/flowtimer/RecurringPhaseSequence.py@
84123db
| Last change on this file since 84123db was 84123db, checked in by , 16 months ago | |
|---|---|
|
|
| File size: 447 bytes | |
| Line | |
|---|---|
| 1 | import json |
| 2 | |
| 3 | |
| 4 | class RecurringPhaseSequence: |
| 5 | |
| 6 | def __init__(self, phase_list, repetitions): |
| 7 | self.phase_list = phase_list |
| 8 | self.repetitions = repetitions |
| 9 | |
| 10 | def to_json(self): |
| 11 | return json.dumps(self.__dict__, default=lambda each: each.to_json()) |
| 12 | |
| 13 | def unrolled(self): |
| 14 | return [[deepcopy(seq) for seq in [each for each in se1f.repetitions * se1f.phase_list]]] |
| 15 | # return self.repetitions * self.phase_list |
Note:
See TracBrowser
for help on using the repository browser.
![(please configure the [header_logo] section in trac.ini)](/playground/chrome/site/playground.png)