Commit 3806bedd authored by Vincent-Xavier JUMEL's avatar Vincent-Xavier JUMEL 📚
Browse files

Utilisation de @ pour gérer le produit de matrices

Signed-off-by: Vincent-Xavier JUMEL's avatarVincent-Xavier JUMEL <>
parent aac794f7
......@@ -185,13 +185,13 @@ def cycles_longueur_3(liste_chemins):
for chemin in liste:
if chemin[0]==chemin[3]:
return liste_cycles
return liste_cycles
def sommets_cycles_3(matrice):
Retourne la liste des sommets appartenant a un cycle de mongueur 3
n = len(matrice)
matrice_chemins_3 = matr_chem_3(matrice)
matrice_chemins_3 = matrice @ matrice @ matrice
liste_sommets_appartenant_cycles = []
for i in range(n):
if matrice_chemins_3[i][i] != 0:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment