From 6c9a9205b0cde134dc6fa389cae4bc618200105a Mon Sep 17 00:00:00 2001 From: SimpleArt <71458112+SimpleArt@users.noreply.github.com> Date: Thu, 19 Nov 2020 09:53:27 -0500 Subject: [PATCH] Added data_list() --- src/structure/population.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/structure/population.py b/src/structure/population.py index 7f873cb..d96699d 100644 --- a/src/structure/population.py +++ b/src/structure/population.py @@ -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(