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
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)
def addSpotify(args): spot.add(args[3])