def add(self, point, value):
<EOL>for p, r in zip(point, self.range):<EOL><INDENT>if p < r[<NUM_LIT:0>] or p > r[<NUM_LIT:1>]:<EOL><INDENT>return<EOL><DEDENT><DEDENT>if isnan(value):<EOL><INDENT>return<EOL><DEDENT>refs = self.opts['<STR_LIT>']<EOL>for position, intensity in self.sortMethod.getPositionsIntensities(<EOL>point):<EOL><INDENT>position = tuple(position)<EOL>if self.mean is not None:<EOL><INDENT>old_value = self.values[position]<EOL>if not np.isnan(old_value):<EOL><INDENT>anz_values = self.density[position]<EOL>mean = old_value + intensity * (<EOL>((value - old_value) / (anz_values + intensity)))<EOL>self.mean[position] = mean<EOL>if self.variance is not None:<EOL><INDENT>self.variance[<EOL>position] += (abs(value - mean) / (<EOL>anz_values + intensity))<EOL><DEDENT><DEDENT><DEDENT>if self.mergeMethod(self.values, position, intensity, value):<EOL><INDENT>for a in refs:<EOL><INDENT>a.mergeMethod(a, position, intensity, value)<EOL><DEDENT><DEDENT>if self.density is not None:<EOL><INDENT>self.density[position] += intensity<EOL><DEDENT><DEDENT>
Assign all self.merge_values to the self._mergeMatrix
Get the position/intensity of a value