def wfstree(o, *args): lngth = len(args) #njobj = o._data #wfsm = jobj2wfsm(njobj) wfsm = o._wfsm depth = len(wfsm) start = elel.uniform_index(args[0], depth + 1) if (lngth > 0) else 0 end = elel.uniform_index(args[1], depth + 1) if (lngth > 1) else (depth + 1) dotpm = emem.mapv(wfsm, map_func=lambda ele: ele.dotpath) dotpm = dotpm[start:end] for row in dotpm: for each in row: print(each)
def edfs_brackets(o, *args): lngth = len(args) wfsm = o._wfsm depth = len(wfsm) start = elel.uniform_index(args[0], depth + 1) if (lngth > 0) else 0 end = elel.uniform_index(args[1], depth + 1) if (lngth > 1) else (depth + 1) edfsel = wfsmat.m2edfsel(wfsm) edfsel = elel.cond_select_values_all(edfsel, cond_func=lambda ele: (len(ele.fapl) >= start) and (len(ele.fapl) < end)) edfs = elel.mapv(edfsel, lambda ele: ele.dotpath) for each in edfs: print(each)
def sdfstree(o, *args): lngth = len(args) wfsm = o._wfsm depth = len(wfsm) start = elel.uniform_index(args[0], depth + 1) if (lngth > 0) else 0 end = elel.uniform_index(args[1], depth + 1) if (lngth > 1) else (depth + 1) sdfsel = wfsmat.m2sdfsel(wfsm) sdfsel = elel.cond_select_values_all(sdfsel, cond_func=lambda ele: (len(ele.fapl) >= start) and (len(ele.fapl) < end)) sdfs = elel.mapv(sdfsel, lambda ele: ele.dotpath) for dotpath in sdfs: print(dotpath)