source:
framspy/evolalg/repair/const.py
@
1114
Last change on this file since 1114 was 1113, checked in by , 4 years ago | |
---|---|
File size: 310 bytes |
Rev | Line | |
---|---|---|
[1113] | 1 | import copy |
2 | ||
3 | from evolalg.repair.repair import Repair | |
4 | ||
5 | ||
6 | class ConstRepair(Repair): | |
7 | def __init__(self, value, excepted_size): | |
8 | super(ConstRepair, self).__init__(excepted_size) | |
9 | self.value = value | |
10 | ||
11 | def generate_new(self, population, missing_count): | |
12 | return copy.deepcopy(self.value) |
Note: See TracBrowser
for help on using the repository browser.