def printStats(self):
""" Print generation statistics
:rtype: the printed statistics as string
.. versionchanged:: 0.6
The return of *printStats* method.
"""
percent = self.currentGeneration * 100 / float(self.nGenerations)
message = "Gen. %d (%.2f%%):" % (self.currentGeneration, percent)
log.info(message)
print(message,)
sys_stdout.flush()
self.internalPop.statistics()
stat_ret = self.internalPop.printStats()
return message + stat_ret
# -----------------------------------------------------------------
评论列表
文章目录