Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Fixed a minor bug related to multi-graphs
Browse files Browse the repository at this point in the history
  • Loading branch information
meghanamreddy committed Jul 19, 2018
1 parent 1ea9c1b commit 2375d00
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/sage/graphs/connectivity.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2055,7 +2055,7 @@ class Triconnectivity:
# Add all the vertices first
# there is a possibility of isolated vertices
for v in G.vertex_iterator():
graph_copy.append(v)
self.graph_copy.add_vertex(v)

edges = G.edges()
# dict to map new edges with the old edges
Expand Down Expand Up @@ -2088,13 +2088,14 @@ class Triconnectivity:
self.components_list = [] #list of components
self.graph_copy_adjacency = [[] for i in range(self.n)]

# Triconnectivity algorithm
self.split_multi_egdes()

# Build adjacency list
for e in self.graph_copy.edges():
self.graph_copy_adjacency[e[0]].append(e)
self.graph_copy_adjacency[e[1]].append(e)

# Triconnectivity algorithm
self.split_multi_egdes()
self.dfs_counter = 0 # Initialisation for dfs1()
self.start_vertex = 0 # Initialisation for dfs1()
self.cut_vertex = self.dfs1(self.start_vertex, check=check)
Expand Down

0 comments on commit 2375d00

Please sign in to comment.