From 4481f2848408f30edf25d5ab8a7692dbe9b5c30c Mon Sep 17 00:00:00 2001 From: Francisco Matias Date: Mon, 28 Aug 2017 10:25:52 -0300 Subject: [PATCH] -- --- Graphs/Graph_list.py | 8 +++----- Graphs/Graph_matrix.py | 10 +++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Graphs/Graph_list.py b/Graphs/Graph_list.py index fe795cc80..8e33cf55c 100644 --- a/Graphs/Graph_list.py +++ b/Graphs/Graph_list.py @@ -17,14 +17,12 @@ class Graph: g = Graph(100) -'''g.add_edge(1,3) +g.add_edge(1,3) g.add_edge(2,3) g.add_edge(3,4) g.add_edge(3,5) -g.add_edge(4,5)''' -for i in range(100): - for j in range(100): - g.add_edge(i,j) +g.add_edge(4,5) + g.show() diff --git a/Graphs/Graph_matrix.py b/Graphs/Graph_matrix.py index e62df3d0c..1998fec8d 100644 --- a/Graphs/Graph_matrix.py +++ b/Graphs/Graph_matrix.py @@ -20,10 +20,10 @@ class Graph: g = Graph(100) -for i in range(100): - for j in range(100): - g.add_edge(i,j) - - +g.add_edge(1,4) +g.add_edge(4,2) +g.add_edge(4,5) +g.add_edge(2,5) +g.add_edge(5,3) g.show()