Added save_chromosome
This commit is contained in:
@ -130,6 +130,11 @@ class Attributes:
|
|||||||
self.database.insert_current_population(self)
|
self.database.insert_current_population(self)
|
||||||
|
|
||||||
|
|
||||||
|
def save_chromosome(self, chromosome):
|
||||||
|
"""Saves the given chromosome to the database."""
|
||||||
|
self.database.insert_current_chromosome(self.current_generation, chromosome)
|
||||||
|
|
||||||
|
|
||||||
# Getter and setters for all required varibles
|
# Getter and setters for all required varibles
|
||||||
@property
|
@property
|
||||||
def chromosome_length(self):
|
def chromosome_length(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user