def check_bounds_index(data, partitioner, t): if data < partitioner.lower_set().get_lower(t): return 0 elif data > partitioner.upper_set().get_upper(t): return len(partitioner.sets) -1
def check_bounds(data, partitioner, t): if data < partitioner.lower_set().get_lower(t): return partitioner.lower_set() elif data > partitioner.upper_set().get_upper(t): return partitioner.upper_set()