Ignore:
Timestamp:
05/08/21 12:42:58 (3 years ago)
Author:
Maciej Komosinski
Message:

Added --debug mode that prints names of steps; final multiple evaluation now evaluates genotypes in hall of fame instead of the last population

File:
1 edited

Legend:

Unmodified
Added
Removed
  • framspy/evolalg/base/union_step.py

    r1113 r1139  
    55
    66class UnionStep(Step):
    7     def __init__(self, steps):
     7    def __init__(self, steps, *args, **kwargs):
     8        super(UnionStep, self).__init__(*args, **kwargs)
    89        if isinstance(steps, Iterable):
    910            self.steps = steps
     
    1213
    1314    def call(self, population):
     15        super(UnionStep, self).call(population)
    1416        for s in self.steps:
    1517            population = s(population)
    1618        return population
     19
     20    def __len__(self):
     21        return len(self.steps)
     22
     23    def __iter__(self):
     24        return iter(self.steps)
Note: See TracChangeset for help on using the changeset viewer.