source: framspy/evolalg/base/union_step.py @ 1138

Last change on this file since 1138 was 1113, checked in by Maciej Komosinski, 4 years ago

Added a framework for evolutionary algorithms cooperating with FramsticksLib?.py

File size: 370 bytes
Line 
1from collections import Iterable
2
3from evolalg.base.step import Step
4
5
6class 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.