def neighbour(self, v): fits = [f for _,f in self.k_values] if self.switch == "-n": if MetaUtils.move_by_step1(fits, STDDEV_CNT, STDDEV): return int(math.ceil(v * EX_STEP1)) return int(math.ceil(v * EX_STEP2)) if MetaUtils.move_by_step1(fits, STDDEV_CNT, STDDEV): return v + LEN_STEP1 return v + LEN_STEP2
def neighbourw(self, key_fits, w): fits = [f for _,f in key_fits] if MetaUtils.move_by_step1(fits, NNEIGH, STDDEV): return (w * WGT_STEP1) return (w * WGT_STEP2)
def neighbourd(self, key_fits, d): fits = [f for _,_,f in key_fits] if MetaUtils.move_by_step1(fits, NNEIGH, STDDEV): return d + D_STEP1 return d + D_STEP2
def neighbour(self, l): fits = [f for _,f in self.k_values] if MetaUtils.move_by_step1(fits, NNEIGH, STDDEV): return l + LEN_STEP1 return l + LEN_STEP2