Logo Search packages:      
Sourcecode: uligo version File versions  Download package

def uligo::PbmRecord::getNext (   self  ) 

This function returns a randomly chosen number (with probability 5/6 in the first third
    of the list, with probability 1/6 in the third sixth). 

Definition at line 236 of file uligo.py.

00236                      :
        """ This function returns a randomly chosen number (with probability 5/6 in the first third
            of the list, with probability 1/6 in the third sixth). """
        if self.modeVar.get() == 0:
            if randint(0,1):
                self.handleCurrent = randint(0,self.noOfPbms/3)
            else:
                self.handleCurrent = randint(0,self.noOfPbms/2)
            self.current = self.list[self.handleCurrent][0]
        elif self.modeVar.get() == 1:
            self.handleCurrent = 0
            self.current = self.list[0][0]
        elif self.modeVar.get() == 2:
            self.handleCurrent = -1
            self.current = (self.current + 1) % self.noOfPbms
        co = randint(0,1)
        ori = randint(0,7)
        self.history.append((self.handleCurrent, self.current, co, ori))
        return self.current, co, ori

    def getPrevious(self):


Generated by  Doxygen 1.6.0   Back to index