source:
framspy/evolalg/repair/remove/remove.py
@
1138
Last change on this file since 1138 was 1113, checked in by , 4 years ago | |
---|---|
File size: 287 bytes |
Line | |
---|---|
1 | from abc import abstractmethod |
2 | from evolalg.base.step import Step |
3 | |
4 | |
5 | |
6 | class Remove(Step): |
7 | def __init__(self): |
8 | pass |
9 | |
10 | @abstractmethod |
11 | def remove(self, individual): |
12 | pass |
13 | |
14 | def call(self, population): |
15 | return [_ for _ in population if not self.remove(_)] |
Note: See TracBrowser
for help on using the repository browser.