def matToListe(M): G = Vector.initVectList(len(M) + 1) for i in range(len(M)): for j in range(len(M[i])): x = M[i][j] while x > 0: G[i + 1].append(j + 1) x = x - 1 return G
def kuratowski(n): V = Vector.initVectList(n+1) for i in range(1, n+1): for j in range(1, n+1): if i == j: pass else: V[i].append(j) return V
def areteToListe(n, L): G = Vector.initVectList(n + 1) for i in range(len(L)): G[L[i][0]].append(L[i][1]) return G
def areteToListe(n, L): V = Vector.initVectList(n) for i in range(0,len(L)): V[L[i][0]].append(L[i][-1]) V[L[i][-1]].append(L[i][0]) return V