def check(darts, dims): for ddd in darts.values(): if 0 in dims: idxs = map(lambda x : x.idx, get_0_orbit(ddd)) idxs.reverse() idxs2 = map(lambda x : x.idx, generic_get_orbit(ddd, 0 )) assert idxs == idxs2 if 1 in dims: idxs = map(lambda x : x.idx, get_1_orbit(ddd)) idxs.reverse() idxs2 = map(lambda x : x.idx, generic_get_orbit(ddd, 1 )) assert idxs == idxs2 if 2 in dims: idxs = map(lambda x : x.idx, get_2_orbit(ddd)) idxs.reverse() idxs2 = map(lambda x : x.idx, generic_get_orbit(ddd, 2 )) assert idxs == idxs2
def get_X_orbit_all(darts): for ddd in darts.values(): get_0_orbit(ddd) get_1_orbit(ddd) get_2_orbit(ddd)