示例#1
0
def smooth_list(l):
    res = []
    cur_l = None
    for v in l:
        if not cur_l:
            cur_l = Load(m=1, initial_value=v)
        cur_l.update_load(v, 5)
        res.append(cur_l.get_load())
    return res
示例#2
0
def smooth_list(l):
    res = []
    cur_l = None
    for v in l:
        if not cur_l:
            cur_l = Load(m=1, initial_value=v)
        cur_l.update_load(v, 5)
        res.append(cur_l.get_load())
    return res
示例#3
0
 def quick_update(self, prev_val, new_val, m, interval):
     l = Load(m=m, initial_value=prev_val)
     l.update_load(new_val, interval)
     return l.get_load()
示例#4
0
 def quick_update(self, prev_val, new_val, m, interval):
     l = Load(m=m, initial_value=prev_val)
     l.update_load(new_val, interval)
     return l.get_load()