source: framspy/evolalg/repair/remove/remove.py @ 1167

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

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

File size: 404 bytes
RevLine 
[1113]1from abc import abstractmethod
2from evolalg.base.step import Step
3
4
5
6class Remove(Step):
[1139]7    def __init__(self, *args, **kwargs):
8        super(Remove, self).__init__(*args , **kwargs)
[1113]9        pass
10
11    @abstractmethod
12    def remove(self, individual):
13        pass
14
15    def call(self, population):
[1139]16        super(Remove, self).call(population)
[1113]17        return [_ for _ in population if not self.remove(_)]
Note: See TracBrowser for help on using the repository browser.