Changeset 1139 for framspy/evolalg/selection
- Timestamp:
- 05/08/21 12:42:58 (4 years ago)
- Location:
- framspy/evolalg/selection
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
framspy/evolalg/selection/identity.py
r1113 r1139 6 6 7 7 class IdentitySelection(Selection): 8 def __init__(self, copy=False ):9 super(IdentitySelection, self).__init__(copy )8 def __init__(self, copy=False, *args, **kwargs): 9 super(IdentitySelection, self).__init__(copy, *args, **kwargs) 10 10 11 11 def call(self, population, selection_size=None): 12 super(IdentitySelection, self).call(population) 12 13 res = population 13 14 if selection_size is not None: -
framspy/evolalg/selection/selection.py
r1113 r1139 6 6 7 7 class Selection(Step): 8 def __init__(self, copy=False): 8 def __init__(self, copy=False, *args, **kwargs): 9 super(Selection, self).__init__(*args, **kwargs) 9 10 self.copy = copy 10 11 … … 14 15 15 16 def call(self, population, count=None): 17 super(Selection, self).call(population) 16 18 res = [] 17 19 if count is None: -
framspy/evolalg/selection/tournament.py
r1113 r1139 8 8 9 9 class TournamentSelection(Selection): 10 def __init__(self, tournament_size: int, fit_attr="fitness", copy=False ):11 super(TournamentSelection, self).__init__(copy )10 def __init__(self, tournament_size: int, fit_attr="fitness", copy=False, *args, **kwargs): 11 super(TournamentSelection, self).__init__(copy, *args, **kwargs) 12 12 self.tournament_size = tournament_size 13 13 self.fit_attr = fit_attr
Note: See TracChangeset
for help on using the changeset viewer.