Logo Search packages:      
Sourcecode: python-biopython version File versions

def Bio::GA::Crossover::GeneralPoint::InterleaveCrossover::_crossover (   self,
) [private]

Generalized Crossover Function:
 x (int)        - genome number [0|1]
 no (organism,organism)
                - new organisms
 locs (int list, int list)
                - lists of locations, 
              [0, +n points+, bound]
            for each genome (sync'd with x)

    return type: sequence (to replace no[x])

Reimplemented from Bio::GA::Crossover::GeneralPoint::GeneralPointCrossover.

Definition at line 172 of file GeneralPoint.py.

00172                                        :
      s = no[ x ].genome[ 0:1 ]
      for n in range(1,self._npoints+2):
          mode = ( x+n )%2
          s = s + no[ mode ].genome[ n:n+1 ]
      return s+no[mode].genome[self._npoints+3:]
      return s+no[mode].genome[self._npoints+3:]

Generated by  Doxygen 1.6.0   Back to index