(self, x)
return y
return ``pheno(self.mean - (geno(x) - self.mean))``.

        TODO: this implementation is yet experimental.

        Selectively mirrored sampling improves to a moderate extend but
        overadditively with active CMA for quite understandable reasons.

        Optimal number of mirrors are suprisingly small: 1,2,3 for maxlam=7,13,20
        however note that 3,6,10 are the respective maximal possible mirrors that
        must be clearly suboptimal.
return ``pheno(self.mean - (geno(x) - self.mean))``.
return pheno ( self . mean - ( geno ( x ) - self . mean )) .
def get_mirror(self, x):
        """return ``pheno(self.mean - (geno(x) - self.mean))``.

        TODO: this implementation is yet experimental.

        Selectively mirrored sampling improves to a moderate extend but
        overadditively with active CMA for quite understandable reasons.

        Optimal number of mirrors are suprisingly small: 1,2,3 for maxlam=7,13,20
        however note that 3,6,10 are the respective maximal possible mirrors that
        must be clearly suboptimal.

        """
        try:
            # dx = x.geno - self.mean, repair or boundary handling is not taken into account
            dx = self.sent_solutions[x]['geno'] - self.mean
        except:
            print('WARNING: use of geno is depreciated')
            dx = self.gp.geno(x, copy=True) - self.mean
        dx *= sum(self.randn(self.N)**2)**0.5 / self.mahalanobisNorm(dx)
        x = self.mean - dx
        y = self.gp.pheno(x, bounds=self.gp.bounds)
        if not self.gp.isidentity or use_sent_solutions:  # costs 25% in CPU performance with N,lambda=20,200
            self.sent_solutions[y] = {'geno': x,
                                        'pheno': y,
                                        'iteration': self.countiter}
        return y
def get_mirror ( self , x ) : try : # dx = x.geno - self.mean, repair or boundary handling is not taken into account dx = self . sent_solutions [ x ] [ 'geno' ] - self . mean except : print ( 'WARNING: use of geno is depreciated' ) dx = self . gp . geno ( x , copy = True ) - self . mean dx *= sum ( self . randn ( self . N ) ** 2 ) ** 0.5 / self . mahalanobisNorm ( dx ) x = self . mean - dx y = self . gp . pheno ( x , bounds = self . gp . bounds ) if not self . gp . isidentity or use_sent_solutions : # costs 25% in CPU performance with N,lambda=20,200 self . sent_solutions [ y ] = { 'geno' : x , 'pheno' : y , 'iteration' : self . countiter } return y