def processDir(gridPoint, condPoint, self): fileNameBase = 'population' + str(int(gridPoint['randomSeeds'])) + '_gen' files = [ fileNameBase + '0.log', fileNameBase + '1.log' ] fitness = [ extractFitness(file) for file in files ] fullCond = ta.sumOfDicts(gridPoint, condPoint) self._recordEvolvabilityStats(fullCond, fitness) self._recordRandomSearchStats(fullCond, fitness)
def processDir(gridPoint, condPoint, self): fileNameBase = 'population' + str(int( gridPoint['randomSeeds'])) + '_gen' files = [fileNameBase + '0.log', fileNameBase + '1.log'] fitness = [extractFitness(file) for file in files] fullCond = ta.sumOfDicts(gridPoint, condPoint) self._recordEvolvabilityStats(fullCond, fitness) self._recordRandomSearchStats(fullCond, fitness)
def __getitem__(self, i): super(ProductOfGrids, self).__getitem__(i) firstPoint = self.first[i // len(self.second)] secondPoint = self.second[i % len(self.second)] return sumOfDicts(firstPoint, secondPoint)
def __iter__(self): for firstPoint in self.first: for secondPoint in self.second: yield sumOfDicts(firstPoint, secondPoint)
def __getitem__(self, i): super(SumOfGrids, self).__getitem__(i) return sumOfDicts(self.first[i], self.second[i])
def __iter__(self): for firstPoint, secondPoint in izip(self.first, self.second): yield sumOfDicts(firstPoint, secondPoint)
def __getitem__(self, i): super(ProductOfGrids, self).__getitem__(i) firstPoint = self.first[i / len(self.second)] secondPoint = self.second[i % len(self.second)] return sumOfDicts(firstPoint, secondPoint)