'Update the current covariance matrix strategy from the
*population*.
:param population: A list of individuals from which to update the
parameters.'

def update(self, population):

    population.sort(key=(lambda ind: ind.fitness), reverse=True)
    old_centroid = self.centroid
    self.centroid = numpy.dot(self.weights, population[0:self.mu])
    c_diff = (self.centroid - old_centroid)
    self.ps = (((1 - self.cs) * self.ps) + ((sqrt(((self.cs * (2 - self.cs)) * self.mueff)) / self.sigma) * numpy.dot(self.B, ((1.0 / self.diagD) * numpy.dot(self.B.T, c_diff)))))
    hsig = float((((numpy.linalg.norm(self.ps) / sqrt((1.0 - ((1.0 - self.cs) ** (2.0 * (self.update_count + 1.0)))))) / self.chiN) < (1.4 + (2.0 / (self.dim + 1.0)))))
    self.update_count += 1
    self.pc = (((1 - self.cc) * self.pc) + (((hsig * sqrt(((self.cc * (2 - self.cc)) * self.mueff))) / self.sigma) * c_diff))
    artmp = (population[0:self.mu] - old_centroid)
    self.C = ((((((1 - self.ccov1) - self.ccovmu) + ((((1 - hsig) * self.ccov1) * self.cc) * (2 - self.cc))) * self.C) + (self.ccov1 * numpy.outer(self.pc, self.pc))) + ((self.ccovmu * numpy.dot((self.weights * artmp.T), artmp)) / (self.sigma ** 2)))
    self.sigma *= numpy.exp(((((numpy.linalg.norm(self.ps) / self.chiN) - 1.0) * self.cs) / self.damps))
    (self.diagD, self.B) = numpy.linalg.eigh(self.C)
    indx = numpy.argsort(self.diagD)
    self.cond = (self.diagD[indx[(-1)]] / self.diagD[indx[0]])
    self.diagD = (self.diagD[indx] ** 0.5)
    self.B = self.B[:, indx]
    self.BD = (self.B * self.diagD)
