Added data_list()

This commit is contained in:
SimpleArt
2020-11-19 09:53:27 -05:00
parent 76e0439160
commit 6c9a9205b0

View File

@ -65,7 +65,7 @@ class Population:
return len(self.next_population)
def get_closet_fitness(self,value):
def get_closet_fitness(self, value):
"""Get the chomosome that has the closets fitness to the value defined"""
pass
@ -149,6 +149,11 @@ class Population:
self.fitness = fitness
def data_list(self):
"""Returns a list of chromosome data lists"""
return [chromosome.data_list() for chromosome in self.chromosome_list]
def __repr__(self):
"""Returns a backend string representation of the entire population"""
return ''.join(