def add(self, value, user):
        vL = int(value / self.resolution)
        vH = vL + 1
        wL = value / self.resolution - vL
        wH = 1.0 - wL
        if user in self.hist:
            hist = self.hist[user]
            if vL in hist:
                hist[vL] += wL
            else:
                hist[vL] = wL
            if vH in hist:
                hist[vH] += wH
            else:
                hist[vH] = wH
            self.num[user] += 1.0
        else:
            self.hist[user] = {vL:wL, vH:wH}
            self.num[user] = 1.0
dataset/ETHPy150Open xumiao/pymonk/monk/roles/monitor.py/Aggregator.add/original