'Add by -log(-log(rand)).'

def perturb_energy_for_softmax_sampling(self, target=None):

    if (not target):
        target = self
    err_code = _eigenmat.perturb_energy(EigenMatrix.rnd_state_p, self.p_mat, target.p_mat)
    if err_code:
        raise generate_exception(err_code)
    return self
