Beispiel #1
0
 def prop_2(self,row,col,val,prop):
     if row>=0 and col>=0 and row<self.rows and col<self.cols:
        spot = self.matrix[row][col]
        pval = (val - spot.value)/prop * damping - discharge
        if pval > 0:
            spot.add(pval)
            return pval
     return 0
Beispiel #2
0
 def prop_(self,row,col,val):
     if row>=0 and col>=0 and row<self.rows and col<self.cols:
        spot = self.matrix[row][col]
        spot.add(val - discharge)
Beispiel #3
0
def addSpotify(args):
    spot.add(args[3])