(genome, **args)
return (sister, brother)
The G2DBinaryString Uniform Crossover

   .. versionadded:: 0.6
      The *G2DBinaryStringXUniform* function
The G2DBinaryString Uniform Crossover
The G2DBinaryString Uniform Crossover
def G2DBinaryStringXUniform(genome, **args):
   """ The G2DBinaryString Uniform Crossover

   .. versionadded:: 0.6
      The *G2DBinaryStringXUniform* function
   """
   sister = None
   brother = None
   gMom = args["mom"]
   gDad = args["dad"]

   sister = gMom.clone()
   brother = gDad.clone()
   sister.resetStats()
   brother.resetStats()

   h, w = gMom.getSize()

   for i in xrange(h):
      for j in xrange(w):
         if Util.randomFlipCoin(Consts.CDefG2DBinaryStringUniformProb):
            temp = sister.getItem(i, j)
            sister.setItem(i, j, brother.getItem(i, j))
            brother.setItem(i, j, temp)

   return (sister, brother)
def G2DBinaryStringXUniform ( genome , * * args ) : sister = None brother = None gMom = args [ "mom" ] gDad = args [ "dad" ] sister = gMom . clone ( ) brother = gDad . clone ( ) sister . resetStats ( ) brother . resetStats ( ) h , w = gMom . getSize ( ) for i in xrange ( h ) : for j in xrange ( w ) : if Util . randomFlipCoin ( Consts . CDefG2DBinaryStringUniformProb ) : temp = sister . getItem ( i , j ) sister . setItem ( i , j , brother . getItem ( i , j ) ) brother . setItem ( i , j , temp ) return ( sister , brother )