(self)
return rand_func(self.beginEnd[choice][0], self.beginEnd[choice][1])
Returns one random choice between the range
Returns one random choice between the range
Returns one random choice between the range
def getRandomAllele(self):
      """ Returns one random choice between the range """
      rand_func = random.uniform if self.real else random.randint

      if len(self.beginEnd) <= 1:
         choice = 0
      else:
         choice = random.randint(0, len(self.beginEnd) - 1)
      return rand_func(self.beginEnd[choice][0], self.beginEnd[choice][1])
def getRandomAllele ( self ) : rand_func = random . uniform if self . real else random . randint if len ( self . beginEnd ) <= 1 : choice = 0 else : choice = random . randint ( 0 , len ( self . beginEnd ) - 1 ) return rand_func ( self . beginEnd [ choice ] [ 0 ] , self . beginEnd [ choice ] [ 1 ] )