source: framspy/evolalg_steps/repair/remove/remove.py @ 1326

Last change on this file since 1326 was 1185, checked in by Maciej Komosinski, 2 years ago

Renamed a module; new name is "evolalg_steps"

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