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

def update(self, population):

    (chosen, not_chosen) = self._select((population + self.parents))
    (cp, cc, ccov) = (self.cp, self.cc, self.ccov)
    (d, ptarg, pthresh) = (self.d, self.ptarg, self.pthresh)
    last_steps = [(self.sigmas[ind._ps[1]] if (ind._ps[0] == 'o') else None) for ind in chosen]
    sigmas = [(self.sigmas[ind._ps[1]] if (ind._ps[0] == 'o') else None) for ind in chosen]
    invCholesky = [(self.invCholesky[ind._ps[1]].copy() if (ind._ps[0] == 'o') else None) for ind in chosen]
    A = [(self.A[ind._ps[1]].copy() if (ind._ps[0] == 'o') else None) for ind in chosen]
    pc = [(self.pc[ind._ps[1]].copy() if (ind._ps[0] == 'o') else None) for ind in chosen]
    psucc = [(self.psucc[ind._ps[1]] if (ind._ps[0] == 'o') else None) for ind in chosen]
    for (i, ind) in enumerate(chosen):
        (t, p_idx) = ind._ps
        if (t == 'o'):
            psucc[i] = (((1.0 - cp) * psucc[i]) + cp)
            sigmas[i] = (sigmas[i] * exp(((psucc[i] - ptarg) / (d * (1.0 - ptarg)))))
            if (psucc[i] < pthresh):
                xp = numpy.array(ind)
                x = numpy.array(self.parents[p_idx])
                pc[i] = (((1.0 - cc) * pc[i]) + ((sqrt((cc * (2.0 - cc))) * (xp - x)) / last_steps[i]))
                (invCholesky[i], A[i]) = self._rankOneUpdate(invCholesky[i], A[i], (1 - ccov), ccov, pc[i])
            else:
                pc[i] = ((1.0 - cc) * pc[i])
                pc_weight = (cc * (2.0 - cc))
                (invCholesky[i], A[i]) = self._rankOneUpdate(invCholesky[i], A[i], ((1 - ccov) + pc_weight), ccov, pc[i])
            self.psucc[p_idx] = (((1.0 - cp) * self.psucc[p_idx]) + cp)
            self.sigmas[p_idx] = (self.sigmas[p_idx] * exp(((self.psucc[p_idx] - ptarg) / (d * (1.0 - ptarg)))))
    for ind in not_chosen:
        (t, p_idx) = ind._ps
        if (t == 'o'):
            self.psucc[p_idx] = ((1.0 - cp) * self.psucc[p_idx])
            self.sigmas[p_idx] = (self.sigmas[p_idx] * exp(((self.psucc[p_idx] - ptarg) / (d * (1.0 - ptarg)))))
    self.parents = chosen
    self.sigmas = [(sigmas[i] if (ind._ps[0] == 'o') else self.sigmas[ind._ps[1]]) for (i, ind) in enumerate(chosen)]
    self.invCholesky = [(invCholesky[i] if (ind._ps[0] == 'o') else self.invCholesky[ind._ps[1]]) for (i, ind) in enumerate(chosen)]
    self.A = [(A[i] if (ind._ps[0] == 'o') else self.A[ind._ps[1]]) for (i, ind) in enumerate(chosen)]
    self.pc = [(pc[i] if (ind._ps[0] == 'o') else self.pc[ind._ps[1]]) for (i, ind) in enumerate(chosen)]
    self.psucc = [(psucc[i] if (ind._ps[0] == 'o') else self.psucc[ind._ps[1]]) for (i, ind) in enumerate(chosen)]
