Added data_list()
This commit is contained in:
@ -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(
|
||||
|
||||
Reference in New Issue
Block a user