source:
framspy/evolalg/base/union_step.py
@
1138
Last change on this file since 1138 was 1113, checked in by , 4 years ago | |
---|---|
File size: 370 bytes |
Line | |
---|---|
1 | from collections import Iterable |
2 | |
3 | from evolalg.base.step import Step |
4 | |
5 | |
6 | class UnionStep(Step): |
7 | def __init__(self, steps): |
8 | if isinstance(steps, Iterable): |
9 | self.steps = steps |
10 | else: |
11 | self.steps = [steps] |
12 | |
13 | def call(self, population): |
14 | for s in self.steps: |
15 | population = s(population) |
16 | return population |
Note: See TracBrowser
for help on using the repository browser.